Skip to main content
The video API turns a text prompt (or an image) into a short video. Generation takes from several seconds to a few minutes, so the API is asynchronous: you create a job, poll it until it finishes, then read the result URL. New here? The three steps below take you from a prompt to a saved .mp4.

Step 1: Create a job

A request needs a model and a prompt. Browse the ids on the video models page.
curl
You get back a job object with status: "queued". Save the id so you can poll it in Step 2.

Step 2: Poll for completion

Call GET /v1/videos/{id} on an interval (every few seconds is plenty) until status is completed or failed. A completed job carries the result under videos[].

Step 3: Get the file

Use videos[].url directly, or call GET /v1/videos/{id}/content to be redirected to the same file. The full loop looks like this:
A video id is scoped to the key that created it. Another key cannot poll, download, or delete it. Download anything you want to keep as soon as the job completes.

Image to video

To animate a still image, add input_reference with a public image URL or a data: URI. The model runs in image-to-video mode. Only models whose model card lists image-to-video support accept it.

Choosing a model

Each video model supports different resolutions, durations, aspect ratios, and audio options. There are two ways to see them:
  • The video models page, with a card per model showing its resolution tiers, prompt limit, and whether it supports image-to-video and audio.
  • GET /v1/models, the same facts as JSON, scoped to your key.
Each video entry lists the parameters it accepts (with type, allowed values, and default), plus prompt_max_length and its modalities:
Example video model entry

Common parameters

These apply across video models. A model ignores any field it does not support, so don’t carry one model’s parameters over to another.
string
required
The video model id. Take it from GET /v1/models.
string
required
What to generate. Each model caps the length; over its prompt_max_length returns 400.
string
A public image URL or data: URI. Switches the model to image-to-video. Only models whose card lists image-to-video support accept it.
string
Resolution tier, such as 480p, 720p, 1080p, or 4k. Allowed values are per model. Sets the billed price on resolution-priced models.
integer
Clip length in seconds. An enum for some models (for example 4, 6, 8), a range for others. The billed length.
string
Aspect ratio such as 16:9 or 9:16. Some models add auto in image-to-video mode.
boolean
Generate a soundtrack, on models that support audio.
string
What to avoid in the output, on models that support it.
integer
Seed for reproducible output, on models that support it. Omit for a random seed.

Pricing

Video is priced per second of output. The final cost is the model’s per-second rate times the clip duration. The rate can depend on the resolution and whether audio is on. Per-model rates are on deepshi.ai. You are billed only for delivered output. A job is charged once, when it completes. A job that fails, or that you cancel before it finishes, is not charged. Unlike image responses, video job objects do not carry an inline usage.cost. Check per-model rates and your balance on deepshi.ai.

Canceling a job

DELETE /v1/videos/{id} cancels a job that is still running and stops it from billing, or removes a job you no longer need. It returns a confirmation:
Canceling before the video is delivered means you are not charged. A job that already completed has already billed, so canceling it does not refund it.

Next steps

Video models

Browse video models, their resolution tiers, and audio support.

Credits & billing

How billing and your prepaid balance work.