Skip to content

Video

Video generation takes a few minutes. Start a job, check its status until it reaches completed, then download the result. The API follows OpenAI’s Videos API format.

Terminal window
curl https://api.indorouter.ai/v1/videos \
-H "Authorization: Bearer $INDOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "google/gemini-omni-1.2-flash",
"prompt": "A slow pan across rice terraces at sunrise",
"seconds": "4",
"size": "1280x720"}'
Field Notes
model Required. A video model ID.
prompt Required, and not empty.
seconds The length. Defaults to "4". Google’s Gemini Omni 1.2 Flash makes 4, 8, 12 or 15 seconds; the other video models make 4, 8 or 12. Any other length is refused.
size "1280x720" (the default) or "720x1280".
input_reference Optional, Gemini Omni only. Up to 6 reference images: the character, product, logo or style the video should keep. Each is a png, jpeg or webp of at most 5 MB, as a base64 data: URL (one string or a list), or as a file in a multipart/form-data request, which is how OpenAI’s SDKs send it (several as input_reference[]). Links to images elsewhere are refused.

In the prompt, say what each image is for, such as “this character” or “this logo”: Google recommends describing it in words. Other video models refuse a request with reference images.

Terminal window
curl https://api.indorouter.ai/v1/videos \
-H "Authorization: Bearer $INDOROUTER_API_KEY" \
-F model=google/gemini-omni-1.2-flash \
-F prompt="This octopus character waves at the camera in a bright office" \
-F seconds=8 \
-F input_reference=@mascot.png

The response is the job: id, status (queued at first), progress, seconds, size and model.

If your account already has its limit of videos being made, or every route for the model is busy, the video waits its turn instead of being refused: you get the job immediately with status: "queued", and it starts when there’s room. Its id stays the same throughout. See Rate limits for concurrency limits.

Terminal window
curl https://api.indorouter.ai/v1/videos/VIDEO_ID \
-H "Authorization: Bearer $INDOROUTER_API_KEY"

Each call asks the vendor for the job’s current state. status moves from queued to in_progress, then ends at completed or failed. A failed job carries an error. Only the account that started a job can see it; any other gets video_not_found.

Terminal window
curl https://api.indorouter.ai/v1/videos/VIDEO_ID/content \
-H "Authorization: Bearer $INDOROUTER_API_KEY" \
--output terraces.mp4

If the job has not finished, this endpoint returns 409 with video_not_ready. We do not keep a copy of the video: each download is fetched from the vendor at that moment, so it is only available for as long as the vendor keeps it. Google keeps Gemini Omni videos for two days. Download the file soon after it is ready and store it yourself.

You can edit or extend Gemini Omni (google/gemini-omni-1.2-flash) videos. The source must have been made by your account, must be completed, and must be used within two days of when it was made, while Google still keeps it.

To edit, send POST /v1/videos/VIDEO_ID/remix with JSON containing a prompt, like OpenAI’s remix. Describe the change in a few words. Google suggests ending the prompt with “keep everything else the same”. The result is a new video job with its own id and the same length as the source.

Terminal window
curl https://api.indorouter.ai/v1/videos/VIDEO_ID/remix \
-H "Authorization: Bearer $INDOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "Make the sky overcast; keep everything else the same"}'

To extend, send POST /v1/videos/VIDEO_ID/extend with a prompt and seconds. The seconds value is "4", "6", "8" or "10", with a default of "8". The new video continues from the end of the source. Its file contains the whole video: the source plus the added seconds, not just the added part. Dialogue keeps the same voice.

Terminal window
curl https://api.indorouter.ai/v1/videos/VIDEO_ID/extend \
-H "Authorization: Bearer $INDOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "The camera keeps moving across the terraces, then reveals mountains in the distance",
"seconds": "8"}'

Both accept optional input_reference with the same rules as when creating a video. Both return a new job like POST /v1/videos, with remixed_from_video_id naming the source video. Check its status and download it the same way as above. Once completed, the result can be edited or extended again, as long as it still meets the limits below.

An edit accepts a source of at most 15 seconds. An extension must keep the whole video at most 30 seconds. If the video’s model, status, age or length does not meet the requirements, the endpoint returns 409 with video_not_buildable and the reason. A video belonging to another account gets 404 with video_not_found.

Edits and extensions run on the same Google project that made the source. If that route is not serving requests at the moment, the endpoint returns 503 with source_route_unavailable. Try again later.

Video models are listed with GET /v1/models?output_modalities=video and on indorouter.ai/models. Video is charged per second of video made, the video_output_seconds rate divided by 1,000,000.

When you start a job we reserve the price of the seconds you asked for, at the rate on that day. The charge is taken when the job completes. A failed job is not charged, and neither is a Gemini Omni job that Google’s safety filter stopped. Either way, the reservation is released. We monitor every job until completion, so billing does not depend on you checking its status.

For edits and extensions, Google reads the whole source video back as input. The charge is the seconds made at the video_output_seconds rate, plus all the source’s seconds at the video_input_seconds rate; both rates are divided by 1,000,000. For an edit, the seconds made equal the source’s length. For an extension, only the added seconds count as output, even though the resulting file contains the whole video. The hold covers both input and output, with the same release rules as above.

Video jobs cannot run as a batch. See Error codes for errors and how to handle them.