/v1/videosVideos — Create Job
Submit an async video-generation job.
Creates a durable video job and returns the job resource. Generation is
asynchronous — poll GET /v1/videos/{id} until a terminal state.
Idempotency
| Mechanism | Behaviour |
|---|---|
Idempotency-Key header | Same key + same organisation ⇒ the same job is returned (HTTP 200 instead of 201). Max length 255. |
| No key sent | The gateway fingerprints (org, key, model, prompt, size, seconds) for a 10-minute window — an exact retry within that window returns the same job. |
| Same key, different body | 409 conflict. |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | yes | A video alias. |
prompt | string | yes | Description of the video. |
size | string | no | e.g. 1280x720 — provider dependent. Part of the idempotency fingerprint. |
seconds | integer | no | Requested duration (≥ 1). Part of the fingerprint and the billed unit. |
input_reference | string | no | Optional base64 reference image (provider-dependent). |
Tip
Video aliases are listed by GET /v1/models
with pricing.unit: "second" (video_output is the price per second of video).
Code sample
curl https://api.<domain>/v1/videos \
-H "Authorization: Bearer $TOKENFACTORY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-4831-intro" \
-d '{
"model": "ltx-2",
"prompt": "a slow pan across a mountain valley at dawn",
"size": "1280x720",
"seconds": 8
}'Note
OpenAI SDK note: the SDKs' typed client.videos methods target the
deprecated OpenAI Sora surface — a different job shape, not this async
API. Use the curl sample above, or the SDKs' generic request escape hatch
(client.post('/videos', …) in Python, client.post('/videos', {body}) in
Node) for a typed-client request that hits this exact path. See
SDKs & Tools.
Response (201 created / 200 idempotent replay)
{
"id": "vid_01J8TESTVID01",
"object": "video.job",
"model": "ltx-2",
"status": "queued",
"created_at": 1724680000,
"started_at": null,
"completed_at": null,
"expires_at": 1725284800,
"progress": 0,
"billing": { "state": "pending" },
"provider_metadata": { "provider": "ltx-staging", "actual_model": "ltx-2.3-distilled" }
}Billing
billing.state starts pending; it becomes charged only on confirmed
completion. Failed or cancelled jobs are void — never charged. See
Billing.
Next step
Poll Videos — Poll Job.