Video generation: models, prices, requests and errors
gemini-omni-1.1-flash (Google's Gemini Omni Flash) makes a 4, 6 or 8-second clip at 720p in one synchronous call to /gemini/v1beta/interactions and is billed per second of video. muse-video and muse-video-20s (Meta's Muse models) are asynchronous tasks on /v1/video/generations: you create a task, poll it and download the file; each call has a fixed price, whatever the clip's length. A video that is not made costs nothing, and a task that fails is refunded.
Last updated:
The video models
| Model | Vendor | Route | Billed | Length and quality |
|---|---|---|---|---|
gemini-omni-1.1-flash | Vendor:Google (Gemini Omni Flash) | Route:POST /gemini/v1beta/interactions | Billed:Per second of video | Length and quality:4s, 6s or 8s; 720p; 16:9 or 9:16; always with sound |
muse-video | Vendor:Meta (Muse) | Route:POST /v1/video/generations | Billed:A fixed price per call, today about 54,615 Toman | Length and quality:What the model makes; duration does not change the price |
muse-video-20s | Vendor:Meta (Muse) | Route:POST /v1/video/generations | Billed:A fixed price per call, today about 61,442 Toman | Length and quality:What the model makes; duration does not change the price |
- Each model answers on its own route only:
gemini-omni-1.1-flashon/v1/video/generationsanswers503with codeupstream_unavailable, and a Muse model on/gemini/v1beta/interactionsanswers402with codepath_unmetered. GET /v1/modelslistsgemini-omni-1.1-flashwithtypevideo. The Muse models are not in that list; this page is where they are named.- Without code: the video studio (in Persian) makes clips with the same
gemini-omni-1.1-flashin the browser, from a first frame, a last frame or reference images, also billed per second.
Price and who pays
Gemini Omni (gemini-omni-1.1-flash)
- The cost is the seconds you ask for in
duration, at one rate per second; input images add nothing. - Today one second costs about 35,237 Toman: a 4-second clip about 140,948 Toman, a 6-second clip about 211,422 Toman and a 8-second clip about 281,896 Toman. The price follows each day's dollar rate. It carries the model's usual markup; the volume rule can lower it.
- The full price of the clip is held before the call and charged only when the answer holds a video.
- With a paid chat plan that includes the model, the plan's credit pays first, within its API share, and the wallet pays the rest (plans and gift credit). Gift credit does not pay for video.
The Muse models
- Each call has one fixed price, whatever
durationyou send. It is held when you create the task and charged once the model accepts it. - It is paid from the wallet only; plan credit and gift credit do not pay for it.
- These models are not on a public price list yet. The amount of each call is in its row of the usage report (
cost_toman) and in the account API.
In the usage report, total_tokens of an Omni row is the seconds of video, and of a Muse row 1: one call. See reading your bill.
Gemini Omni: one synchronous call
curl https://1xai.ir/gemini/v1beta/interactions \
-H "x-goog-api-key: 1xai-..." \
-H "Content-Type: application/json" \
--max-time 600 \
-d '{
"model": "gemini-omni-1.1-flash",
"input": "Calm sea waves at sunset, with the sound of the waves",
"response_format": {"type": "video", "duration": "8s", "aspect_ratio": "16:9", "resolution": "720p"}
}'{
"model": "gemini-omni-1.1-flash",
"response_format": {"type": "video", "duration": "4s", "aspect_ratio": "9:16", "resolution": "720p"},
"generation_config": {"video_config": {"task": "image_to_video"}},
"input": [
{"type": "image", "data": "<base64>", "mime_type": "image/png"},
{"type": "text", "text": "The camera moves slowly in and the hair moves in the breeze"}
]
}response_formatis one object withtypevideo.durationis required and is one of4s,6sor8s.resolutionis720ponly; any other value answers402with codemodel_not_priced. Setaspect_ratioto16:9or9:16.inputis a text, or a list oftextandimageparts with the picture inline as base64 indata, with itsmime_type.generation_config.video_config.taskmay betext_to_video,image_to_videoorreference_to_video.- These are not accepted and answer
400with codeinvalid_request, at no cost:background,"store": trueand"delivery": "uri"(the video is stored nowhere), an image byuri, a video or audio input,previous_interaction_id,tools,stream, and any othertask. - The answer arrives when the video is made:
statusiscompleted, and amodel_outputstep holds avideopart with the clip as base64 in itsdata. Only such an answer is billed. When Omni makes no video (it then says why in atextpart, or thestatusis another one), nothing is charged. - The gateway waits up to 10 minutes for Google; give your client at least that long. If you close the connection before the answer arrives, the video that was made is billed and can no longer be fetched.
{
"id": "...",
"status": "completed",
"steps": [
{
"type": "model_output",
"content": [{"type": "video", "data": "AAAAIGZ0eXBpc29t..."}]
}
]
}Send the key as on the rest of the native Gemini route, in the x-goog-api-key or Authorization: Bearer header (native Gemini route).
The Muse models: create, poll, download
curl https://1xai.ir/v1/video/generations \
-H "Authorization: Bearer 1xai-..." \
-H "Content-Type: application/json" \
-d '{
"model": "muse-video",
"prompt": "A paper boat on a stream in a park"
}'
# {"task_id": "vt_...", "id": "vt_...", "model": "muse-video", "status": "queued"}curl https://1xai.ir/v1/video/generations/vt_... \
-H "Authorization: Bearer 1xai-..."
# {"id": "vt_...", "task_id": "vt_...", "model": "muse-video", "status_normalized": "succeeded", ...}curl -o clip.mp4 https://1xai.ir/v1/video/generations/vt_.../content \ -H "Authorization: Bearer 1xai-..."
- The body is JSON with
modelandprompt; other fields reach the model as you send them, except a callback address (callback_url,notify_hook), which is removed: poll instead.duration(orseconds), when sent, must be a whole number such as10or"10s"; anything else answers400with codeinvalid_request. - The task id is 1xAi's own:
vt_and 24 characters. Only the account that created the task reaches it, and with a company key only that workspace; any other key gets404with codenot_found. - In a poll's answer, read
status_normalized:pending,succeededorfailed. The rest of the answer is the model's own and may change; any file address in it points to this task's/contentroute. - Once
status_normalizedissucceeded,GET …/{id}/contentstreams the video file with the same key; before that it answers404with codenot_found. 1xAi keeps no copy of the file, so save it on your side. - Only creating a task is billed. Polling and downloading are free and count toward the key's rate limit.
- A task the model reports
failedis refunded once, at your next poll or by a check that runs every 5 minutes. A task stillpendingafter 24 hours is taken as failed and refunded. A refund is a wallet transaction and a usage row withendpointrefund. - A request the model refuses (for example under its content rules) costs nothing, and the model's error is passed back to you.
Errors
| Status | Code | When |
|---|---|---|
400 | Code:invalid_request | When:The body is not valid JSON; on Omni, duration is missing or another value, or an option listed above was sent; on Muse, duration is not a whole number. |
402 | Code:insufficient_balance | When:The balance cannot fund the hold of the video's price. |
402 | Code:plan_media_used | When:On Omni: the paid plan's media share for this period is used up, and the wallet cannot fund the call. |
402 | Code:model_not_priced | When:On Omni: resolution is not 720p. |
402 | Code:path_unmetered | When:On /gemini/v1beta/interactions, a model that has no video price (a text model, an agent, or a Muse model). |
404 | Code:not_found | When:A task id this key cannot reach, or a video that is not ready yet. |
410 | Code:model_retired | When:A retired video model (Veo on Gemini, Sora on /v1/videos). |
502 | Code:upstream_error | When:The model could not be reached, or its answer could not be read. Nothing is charged. |
503 | Code:upstream_unavailable | When:A model that /v1/video/generations does not serve, or whose route is switched off for now. |
The error body and every code are on Errors. None of these errors is billed.
Other video routes
- Google has retired the Veo models on its API;
:predictLongRunningwith one of them answers410with codemodel_retired. - OpenAI has retired the Sora models; creating a video on
/v1/videoswith one of them answers410with codemodel_retired(OpenAI-compatible endpoints). - The full list of retired ids is on Deprecations.
1xAi is an independent gateway. It is not affiliated with, endorsed by, or a reseller for OpenAI, Anthropic, Google, DeepSeek, xAI, Moonshot AI, Z.ai, Alibaba Qwen, MiniMax or Tencent Hunyuan. Requests are relayed upstream rather than answered by models of our own, so each provider's own usage policies apply to what their models will and will not do, and their model availability is theirs to change. Current reachability is published on the status page.