Skip to content

API: Jobs

Export a project several times, one after the other

POST /api/v1/projects/{id}/export-batches: Export a project several times, one after the other

Last updated:

POST/api/v1/projects/{id}/export-batches

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.

Path parameters#

NameTypeRequiredDescription
idstringyesmin length 1

Request body#

Content type application/json.

NameTypeRequiredDescription
itemsarray of exportBatchItemInyesThe exports, one after the other.. at least 1 items; at most 12 items
timeline_idstringnoThe timeline of the project; required when the project has several.
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.

404#

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/projects/PROJECT_ID/export-batches" \
  -H "Authorization: Bearer $STUARTY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "items": [
    {
      "codec": "string",
      "end": "string",
      "format": "string",
      "preset": "string",
      "start": "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.