Skip to content

API: Publishing

Prepare the publication of an exported video; it waits for a person to approve it

POST /api/v1/publish: Prepare the publication of an exported video; it waits for a person to approve it

Last updated:

POST/api/v1/publish

Authentication#

Send the secret in the header Authorization: Bearer <secret>: the local token in local mode, an API key in network mode. An API key needs the render scope; the local token has every scope. See the API overview for both modes.

Request body#

Content type application/json.

NameTypeRequiredDescription
ai_disclosurebooleannoThe video has realistic altered or synthetic content.
connection_idstringyesThe connection of the network and the account the video goes to.. min length 1
descriptionstringnoThe description, at most 5,000 bytes on YouTube.
dry_runbooleanno
exportstringyesThe id of a succeeded export job of the project: the video.. min length 1
made_for_kidsboolean or nullnoRequired: whether the video is made for kids.
project_idstringyesThe project the video was exported from.. min length 1
tagsarray of stringnoThe tags, at most 500 characters in all on YouTube.
thumbnailstringnoThe id of a succeeded export job of a still of the project: the cover.
timeline_idstringnoThe timeline the job is kept on; required when the project has several.
titlestringnoThe title, at most 100 characters on YouTube.
visibilitystringnoprivate (the default), unlisted or public.
wait_msintegerno0 to 25000: hold the call until the job is final.

Responses#

202 Accepted#

Content type application/json. Schema: Job.

NameTypeRequiredDescription
actorstringno
approval_idstringno
created_atstring (date-time)no
dry_runbooleanno
errorError or any or null or nullno
estimateMoney or any or null or nullno
finished_atstring (date-time) or nullno
job_idstringno
kindstringno
lintLintTotals or any or null or nullno
messagestringno
progressnumber (double)no
project_idstring or nullno
resultJobResult or any or null or nullno
started_atstring (date-time) or nullno
statestringno
textstringno
warningsarray of stringno

400#

Validation failed; errors maps each field to its messages and issues lists each problem with its code, key and params

Content type application/problem+json. Schema: Problem.

401 Unauthorized#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

403#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

409#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

422 Unprocessable Content#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

429#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

Any other status#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

curl -X POST "http://127.0.0.1:7878/api/v1/publish" \
  -H "Authorization: Bearer $STUARTY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "connection_id": "string",
  "export": "string",
  "project_id": "string"
}'

Response examples

{
  "actor": "string",
  "approval_id": "string",
  "created_at": "2006-01-02T15:04:05Z",
  "dry_run": false,
  "error": {
    "code": "string",
    "details": {},
    "hint": "string",
    "message": "string",
    "op_index": 0,
    "path": "string",
    "retryable": false
  },
  "estimate": {
    "currency": "string",
    "micros": 0
  },
  "finished_at": "2006-01-02T15:04:05Z",
  "job_id": "string",
  "kind": "string",
  "lint": {
    "errors": 0,
    "lint_scope": "string",
    "warnings": 0
  },
  "message": "string",
  "progress": 0,
  "project_id": "string",
  "result": {
    "batch": {
      "cancelled": 0,
      "failed": 0,
      "items": [],
      "succeeded": 0,
      "total": 0
    },
    "export": {
      "audio_codec": "string",
      "bytes": 0,
      "checks": [],
      "codec_fallback": "string",
      "download_url": "string",
      "duration": {},
      "format": "string",
      "fps": "string",
      "height": 0,
      "loudness_lufs": 0,
      "notes": [],
      "path": "string",
      "preset": "string",
      "revision": 0,
      "sha256": "string",
      "video_codec": "string",
      "width": 0
    },
    "face_track": {
      "asset_id": "string",
      "faces": 0,
      "fps": 0,
      "provider": "string",
      "samples": 0
    },
    "generated": {
      "cost": {},
      "delivered": 0,
      "image": {},
      "items": [],
      "model": "string",
      "notes": [],
      "provider": "string",
      "requested": 0
    },
    "image": {
      "bytes": 0,
      "format": "string",
      "height": 0,
      "image_id": "string",
      "job_id": "string",
      "path": "string",
      "revision": 0,
      "sha256": "string",
      "text": "string",
      "width": 0
    },
    "publish": {
      "connection_id": "string",
      "network": "string",
      "remote_id": "string",
      "state": "string",
      "thumbnail_error": "string",
      "url": "string"
    },
    "text": {
      "cost": {},
      "finish_reason": "string",
      "input_tokens": 0,
      "item_id": "string",
      "model": "string",
      "output_tokens": 0,
      "provider": "string",
      "revision": 0,
      "text": "string"
    },
    "transcribe": {
      "asset_id": "string",
      "language": "string",
      "words": 0
    }
  },
  "started_at": "2006-01-02T15:04:05Z",
  "state": "string",
  "text": "string",
  "warnings": [
    "string"
  ]
}

The examples are built from the schemas of the OpenAPI document, so a value is a placeholder of its type. The fields that carry the real values are in the tables.