Video generation
Make short videos with sound from a prompt, or bring an image to life. A video takes from about 15 seconds to a few minutes, so it runs in the background: you start it, check its status, and download the MP4 when it's ready.
Models
| Model | Length | Resolution | Shapes | Images |
|---|---|---|---|---|
google/gemini-omni-1.1-flash | 3-10 s | 360p, 720p, 1080p, 4K | 16:9, 9:16 | up to 3; also edits and extends its own videos |
xai/grok-imagine-video-1.5 | 1-15 s | 480p, 720p, 1080p | 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 | up to 3 |
xai/grok-imagine-video-1.5-lite | 1-15 s | 480p, 720p, 1080p | 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 | 1 |
xai/grok-imagine-video | 1-15 s | 480p, 720p | 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 | 1; also edits and extends |
A value a model doesn't support is refused with a 400 that lists what it does.
Start a video
curl https://boldrouter.com/v1/videos \
-H "Authorization: Bearer $BOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-omni-1.1-flash",
"prompt": "A slow walk through a bright Scandinavian living room, single continuous shot, no dialogue",
"resolution": "720p",
"aspect_ratio": "16:9",
"seconds": 6
}'| Field | Type | Description |
|---|---|---|
| model* | string | A video model. See video models. |
| prompt* | string | What to show and hear: scene, camera movement, lighting, sound. Up to 8,000 characters. |
| resolution | string | 360p, 480p, 720p (default), 1080p or 4k, as the model supports. Omni's 1080p and 4K are upscaled. |
| aspect_ratio | string | 16:9 (default, landscape), 9:16 (portrait), or for Grok also 1:1, 4:3, 3:4, 3:2 and 2:3. |
| size | string | Instead of the two above, OpenAI-style: 1280x720, 720x1280, 848x480, 720x720 and so on. |
| seconds | integer | Within the model's range (above). Left out, Omni picks a length that suits the prompt and Grok makes 8 seconds. |
| images | array | Images as base64 data: URLs (PNG, JPEG or WebP; GIF for Omni). One image is brought to life as the first frame. With Omni, two can be the first and last frame, or references for a subject; with Grok 1.5, several are references. Say how to use them in the prompt. input_reference (one image) works too. |
The response returns at once, with the video still generating:
{
"id": "video_4bdf63d3fae6f69acd790312",
"object": "video",
"model": "google/gemini-omni-1.1-flash",
"status": "in_progress",
"created_at": 1793112000,
"completed_at": null,
"expires_at": null,
"resolution": "720p",
"aspect_ratio": "16:9",
"size": "1280x720",
"seconds": 6,
"cost_usd": null,
"content_url": null,
"error": null
}Check the status
Poll every few seconds until status is completed or failed. Once completed, seconds is the actual length, cost_usd what you were charged, and content_url where to download it.
import time, requests
H = {"Authorization": f"Bearer {API_KEY}"}
video = requests.post("https://boldrouter.com/v1/videos", headers=H, json={
"model": "google/gemini-omni-1.1-flash",
"prompt": "A paper boat drifting on a calm pond at sunrise",
}).json()
while video["status"] in ("queued", "in_progress"):
time.sleep(5)
video = requests.get(f"https://boldrouter.com/v1/videos/{video['id']}", headers=H).json()
if video["status"] == "completed":
mp4 = requests.get(video["content_url"], headers=H).content
open("boat.mp4", "wb").write(mp4)
else:
print(video["error"]["message"])Download the video
Returns the MP4 (H.264 with an audio track). Byte ranges are supported, so you can stream it to a player. Videos are kept for 30 days (expires_at); download the ones you want to keep.
Edit and extend a video
Edit one of your finished videos by describing the change, or continue it from its last frame. Each starts a new video, which you follow like any other; the original stays as it is.
curl https://boldrouter.com/v1/videos/video_4bdf63d3fae6f69acd790312/extend \
-H "Authorization: Bearer $BOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "prompt": "The camera pulls back to reveal the whole lake", "seconds": 6 }'| Field | Type | Description |
|---|---|---|
| prompt* | string | The change to make, or what happens next. |
| seconds | integer | Extend only: how many seconds to add, 2 to 10 (default 6). An edit keeps the video's length. |
| model | string | Defaults to the model that made the video when it edits its own (Gemini Omni), otherwise xai/grok-imagine-video. |
| Editing model | Works on | Edit | Extend |
|---|---|---|---|
google/gemini-omni-1.1-flash | videos it made | up to 10 s, at the source's resolution (up to 4K) | adds 3-10 s, up to 40 s in all |
xai/grok-imagine-video | any video, uploads too | up to 8.7 s, up to 720p | adds 2-10 s to a 2-15 s video |
- The result keeps the source's shape and resolution. An extension returns the whole video: the original followed by the new seconds.
- Gemini Omni continues the job that made the video, so nothing is uploaded and an edit changes only what you describe. It bills per token as usual, plus about $0.003 per second of the source it reads.
- The response says what was done:
operationiseditorextend, andsource_video_idthe video it came from.
To edit or extend a video you didn't make here, send it as an MP4 (up to 20 MB, with Grok) to POST /v1/videos/edits or POST /v1/videos/extensions, with the same fields plus "video": "data:video/mp4;base64,...".
List and delete
GET /v1/videoslists your videos, newest first (limit, up to 100, andafterfor the next page).DELETE /v1/videos/{id}deletes a finished video and its file.- A workspace member's key sees only the videos that member made.
Pricing
You pay what the provider bills. When you start a video, the most it could cost is held from your balance, and released when it finishes.
| Per second of video | 480p | 720p | 1080p |
|---|---|---|---|
| Grok Imagine Video 1.5 Lite | $0.02 | $0.04 | $0.14 |
| Grok Imagine Video 1.5 | $0.08 | $0.14 | $0.25 |
| Grok Imagine Video (and its edits and extensions) | $0.05 | $0.07 | - |
A Grok edit or extension bills the seconds it makes (the whole video for an edit, the added seconds for an extension) plus about $0.01 per second of the source: editing a 4 second 480p video costs about $0.24. A Gemini Omni edit or extension bills like a new video of the seconds it makes, plus the source it reads: about $0.11 for 3 seconds at 360p.
Gemini Omni Flash bills per token: the prompt, the model's thinking, and the video itself. That's about $0.035 per second at 360p and about $0.10 per second at 720p, so a 6 second 720p clip costs around $0.60.
429 after that).Good to know
- Prompts and images that break the provider's usage policies are refused with a
400saying so, for example images of recognizable people, or of minors in the EU, Switzerland and the UK. - With a starting image, Grok keeps the image's shape;
aspect_ratioandsizethen describe what was asked for, not the file. - Omni videos carry Google's invisible SynthID watermark. Prompts in English work best.
- By default Omni may cut between a few shots. Ask for "a single continuous shot" if you want one, and say "no dialogue" or describe the sound you want.
- Prompts can be anonymized like chat messages: send
"anonymize": true. For workspace members with data protection on it always happens. Images aren't checked for private information.
