Realtime TTS-2 is live. Built for realtime conversation that feels human. Read the Realtime TTS-2 announcement

Videos

Create video

Start a text-to-video generation job

POST/v1/videos

Starts generating a video from a text prompt and returns the job straight away with status: "queued". Generation takes minutes, so the response never contains the video: poll Retrieve video until the job finishes, then download the MP4 from output.videos[0].url.

Send an Idempotency-Key header so that a retry after a network error returns the original job instead of starting and billing a second one. Generate the key once per video and store it before the first attempt, so that retries and restarts of your program send the same value. See retries and idempotency. Your account needs a payment method on file. See the Video generation guide for models, parameters, limits and billing.

Authorizations

Authorizationstringrequired

Your authentication credentials. For Basic authentication, populate Basic $INWORLD_API_KEY.

Body

application/json

modelenum<string>required

The video model. See models and parameters.

Available options:alibaba/wan-3.0minimax/minimax-h3

promptstringrequired

What the video should show. Up to 2,000 characters for alibaba/wan-3.0 and 7,000 for minimax/minimax-h3.

secondsinteger

Clip length in whole seconds. alibaba/wan-3.0: 2 to 30, default 5. minimax/minimax-h3: 5 to 15, default 6.

resolutionstring

Output resolution, case-insensitive. alibaba/wan-3.0: 480p (default), 720p or 1080p. minimax/minimax-h3: 768p (default) or 2k.

aspect_ratiostring

Frame shape, default 16:9. alibaba/wan-3.0: 16:9, 4:3, 1:1, 3:4 or 9:16. minimax/minimax-h3 also accepts 21:9.

Response

200 - application/json

idstringrequired

The job id.

objectenum<string>required

Available options:video

modelstringrequired

statusenum<string>required

queued: accepted; waiting for or being submitted for generation, so cancellation may already be unavailable. in_progress: generating. completed: generation succeeded; download available until expires_at. failed: see error. cancelled: cancelled before generation started. The last three are terminal.

Available options:queuedin_progresscompletedfailedcancelled

created_atintegerrequired

When the job was created, in Unix seconds.

completed_atinteger

When the video finished, in Unix seconds. Present once status is completed.

expires_atinteger

Until when the video can be downloaded, in Unix seconds: 7 days after it finished. Present only when status is completed.

secondsintegerrequired

The requested clip length, with the model's default filled in.

resolutionstringrequired

The requested resolution, with the model's default filled in.

aspect_ratiostringrequired

The requested aspect ratio, with the model's default filled in.

operationstring

The job's long-running operation. Poll it with GET https://api.inworld.ai/lro/v1alpha/{operation} as an alternative to retrieving the job. The operation reports progress and the outcome but never the download link. See Poll the operation instead.

errorobject

Why the job failed. Present only when status is failed.

Show child attributes

codeenum<string>

content_filtered: the prompt or the generated video was blocked by the model provider's content policy. invalid_request: the model provider rejected the request. generation_failed: generation failed for another reason. generation_timeout: generation did not finish in time.

Available options:content_filteredinvalid_requestgeneration_failedgeneration_timeout

messagestring

outputobject

The finished video. Returned only by Retrieve video, only while status is completed and before expires_at.

Show child attributes

videosobject[]

Show child attributes

indexinteger

content_typestring

bytesinteger

File size in bytes.

urlstring

A signed HTTPS link to the MP4. Anyone with the link can download the file until url_expires_at, so treat it like a secret.

url_expires_atinteger

When url stops working, in Unix seconds: up to an hour after the request, and never after the job's expires_at.