# OpenRouter [Video] API

> URL များအဖြစ် ပေးထားသော ဗီဒီယိုများကို ခွဲခြမ်းစိတ်ဖြာရန် သို့မဟုတ် အကျဉ်းချုပ်ရန် ပရောမ့်ပါသည့် LLM တံခါးပေါက် မူကွဲ

`video_urls` တွင် ပေးထားသော ဗီဒီယိုတစ်ခု သို့မဟုတ် တစ်ခုထက်ပိုသော ဗီဒီယိုများကို `prompt` နှင့် လိုအပ်သော `model` တို့နှင့်အတူ လုပ်ဆောင်သည်။ ဖော်ပြထားသော ဖော်မတ်များမှာ mp4, mpeg, mov နှင့် webm ဖြစ်ပြီး အချို့အခြေအနေများတွင် YouTube လင့်ခ်များလည်း အလုပ်လုပ်သည်။ `system_prompt`၊ `temperature`၊ `max_tokens`၊ `reasoning` နှင့် ဝဘ်ရှာဖွေမှုတို့ကိုလည်း ပံ့ပိုးသည်။ စာသားနှင့် တိုကင်အသုံးပြုမှုကို ပြန်ပေးသည်။

- Model id: `openrouter/router/video`
- Made by: OpenRouter
- Category: LLM
- Output: text
- Charged by usage (up to $1.858 per run, typical $0.008; the rest of the hold is refunded): $0.01 / usage unit (cheapest run $0.008 (8 API credits))
- Run: `POST https://api.doitong.com/v1/run/openrouter/router/video`
- Quote: `POST https://api.doitong.com/v1/quote/openrouter/router/video`
- Docs page: https://doitong.com/my/developers/models/openrouter/router/video

## Pricing

Price: **$0.01 / usage unit**. Charged by actual usage at $0.01 / usage unit: up to $1.858 per run (the quote gives the maximum for your input), the rest is refunded automatically after the run. A typical run costs $0.008.

The full example input below holds up to $1.858 = 1858 API credits (up to 185.7946 units × $0.01) when it starts; a typical run costs $0.008 (8 API credits).

Prices are the upstream price in USD, paid from the API balance in API credits (1000 API credits = 1 USD). This model is charged by usage: `POST https://api.doitong.com/v1/quote/openrouter/router/video` with the same JSON body returns the most the run can cost for that input (`credits`, debited when the run starts); after the run you pay the usage the model reports and the rest is refunded automatically. An input whose maximum would exceed the per-run limit is refused with 422. Invalid input is never charged and failed or canceled requests are refunded automatically.

## Input parameters

Send either the canonical name or the native field name (not both). Canonical names are the same across models.

| Parameter | Canonical name | Type | Required | Default | Allowed values / range | Description |
|---|---|---|---|---|---|---|
| `video_urls` | `videos` | array of video URL \| null | no |  |  | `video_url` အစား array အဖြစ် ပေးထားသော ဗီဒီယိုထည့်သွင်းချက်များဖြစ်သည်။ နှစ်မျိုးလုံးကို တစ်ပြိုင်နက် အသုံးမပြုနိုင်ပါ။ AI Studio မှတစ်ဆင့် Google Gemini အသုံးပြုသည့်အခါ YouTube URL များကို လက်ခံသည်။ မဟုတ်ပါက mp4, mpeg, mov သို့မဟုတ် webm ဗီဒီယိုများအတွက် ဖိုင် URL များ သို့မဟုတ် data URI များကို ပေးပါ။ |
| `prompt` |  | string | yes |  |  | ဗီဒီယိုလုပ်ဆောင်မှုကို ညွှန်ကြားသော ပရောမ့်ဖြစ်သည်။ |
| `system_prompt` |  | string \| null | no |  |  | မော်ဒယ်အား ညွှန်ကြားချက် သို့မဟုတ် အကြောင်းအရာ ပေးပို့သည့် စနစ်ပရောမ့်။ |
| `model` |  | string | yes |  |  | အသုံးပြုမည့် မော်ဒယ်ကို သတ်မှတ်သည့် အမည်။ |
| `reasoning` |  | boolean | no | `false` |  | နောက်ဆုံးအဖြေတွင် reasoning ထည့်သွင်းမည် မထည့်သွင်းမည်။ |
| `temperature` |  | number | no | `1` | 0 – 2 | အဖြေကွဲပြားမှု ထိန်းချုပ်မှု၊ 0 သည် ထည့်သွင်းချက်မပြောင်းလဲသရွေ့ တူညီသောအဖြေကို အာမခံသည်။ တန်ဖိုးမြှင့်လေ အဖြေများသည် ခန့်မှန်းရလွယ်သော ပုံမှန်အဖြေများမှ ဝေးကွာကာ ပိုမိုကွဲပြားပြီး ရှားပါးသောအဖြေများ ဖြစ်လာသည်။ |
| `max_tokens` |  | integer \| null | no |  | ≥ 1 | ထွက်ရလဒ် တိုကင်အရေအတွက်ကို context length မှ ပရောမ့်အရှည်နုတ်ထားသည့် တန်ဖိုးထက် မပိုစေရန် ကန့်သတ်သည်။ ဖန်တီးမှုသည် သတ်မှတ်ထားသော ကန့်သတ်ချက်ကို မကျော်နိုင်ပါ။ |
| `enable_web_search` |  | boolean | no | `false` |  | မော်ဒယ်အား မည်သည့်အချိန်တွင် ရှာဖွေမည်ကို ရွေးချယ်ခွင့်ပေးသည့် ဝဘ်ဝင်ရောက်ခွင့် toggle၊ တောင်းဆိုချက်တစ်ခုအတွင်း ရှာဖွေမှုများစွာ ပါဝင်နိုင်သည်။ ရှာဖွေမှုများသည် အချိန်နှင့်တပြေးညီ အချက်အလက်ရယူရန် OpenRouter ၏ server-side web search tool ကို အသုံးပြုသည်။ |
| `web_search_options` |  | object {engine, max_results, max_uses, max_total_results, search_context_size, max_characters, allowed_domains, excluded_domains, user_location} \| null | no |  |  | ရှာဖွေရေးအင်ဂျင်ရွေးချယ်မှု၊ ထွက်ရလဒ်ကန့်သတ်ချက်နှင့် ဒိုမိန်းစစ်ထုတ်မှု ပါဝင်သည့် ဝဘ်ရှာဖွေမှုဖွဲ့စည်းပုံ။ enable_web_search သည် true ဖြစ်သည့်အခါသာ အသုံးပြုသည်။ |
| `web_search_options.engine` |  | enum (string) | no | `auto` | `auto`, `native`, `exa` | ရှာဖွေရေးအင်ဂျင်ရွေးချယ်မှု - native search မရရှိပါက 'auto' နှင့် 'native' နှစ်ခုစလုံးသည် Exa သို့ ပြန်လည်အသုံးပြုသည်။ 'auto' သည် ရရှိနိုင်သော provider-native search ကို အသုံးပြုပြီး 'native' သည် OpenAI၊ Anthropic၊ Google၊ xAI သို့မဟုတ် Perplexity ၏ built-in search ကို ဦးစားပေးသည်။ Exa ၏ search API ကိုသာ အသုံးပြုရန် 'exa' ကို ရွေးချယ်ပါ။ |
| `web_search_options.max_results` |  | integer \| null | no |  | 1 – 25 | Exa ရှာဖွေမှုတစ်ကြိမ်စီအတွက် ထွက်ရလဒ်ကန့်သတ်ချက်၊ 1 မှ 25 အထိဖြစ်ပြီး မူလတန်ဖိုးမှာ 5 ဖြစ်သည်။ Native provider search သည် ဤဆက်တင်ကို လျစ်လျူရှုသည်။ |
| `web_search_options.max_uses` |  | integer \| null | no |  | ≥ 1 | တောင်းဆိုချက်တစ်ခုစီအတွက် ရှာဖွေမှုကန့်သတ်ချက်၊ native search အတွက် Anthropic ထံ ပေးပို့သော်လည်း အခြား native provider များက လျစ်လျူရှုသည်။ ကန့်သတ်ချက်ကျော်လွန်သော ခေါ်ဆိုမှုများသည် အမှားထွက်ရလဒ် ရရှိပြီး မလုပ်ဆောင်ပါ။ |
| `web_search_options.max_total_results` |  | integer \| null | no |  | ≥ 1 | တောင်းဆိုချက်တစ်ခုအတွင်း ရှာဖွေမှုအားလုံးအတွက် ပေါင်းစပ်ထွက်ရလဒ် ကန့်သတ်ချက်။ |
| `web_search_options.search_context_size` |  | enum (string) \| null | no |  | `low`, `medium`, `high` | Exa အတွက် ထွက်ရလဒ်တစ်ခုစီ ရယူမည့်ပမာဏ၊ နှစ်ခုစလုံးပေးထားပါက max_characters က အစားထိုးပြီး native provider search အတွက် လျစ်လျူရှုသည်။ 5K characters အတွက် low၊ 15K အတွက် medium၊ 30K အတွက် high ကို ရွေးချယ်ပါ။ မသတ်မှတ်ထားပါက Exa သည် ထွက်ရလဒ်တစ်ခုလျှင် ခန့်မှန်းခြေ 2–4K အထိ အလိုက်သင့်ညှိပေးသည်။ |
| `web_search_options.max_characters` |  | integer \| null | no |  | 1 – 100,000 | Exa အတွက် ရလဒ်တစ်ခုစီ၏ အကြောင်းအရာတွင် ပါဝင်နိုင်သည့် အများဆုံး စာလုံးအရေအတွက်။ ဆက်တင်နှစ်ခုလုံး ပေးထားပါက search_context_size အစား ဤဆက်တင်ကို အသုံးပြုသည်။ အများဆုံး စာလုံးအရေအတွက်ကို 1 မှ 100,000 အတွင်း အတိအကျ သတ်မှတ်ပါ။ ပံ့ပိုးသူ၏ မူရင်းရှာဖွေမှုက ဤဆက်တင်ကို လျစ်လျူရှုသည်။ |
| `web_search_options.allowed_domains` |  | array of string \| null | no |  |  | Exa နှင့် native search provider အများစုအတွက် domain allowlist၊ ထွက်ရလဒ်များကို စာရင်းပါ ဒိုမိန်းများအတွင်းသာ ကန့်သတ်သည်။ Google native search တွင် မပံ့ပိုးပါ။ |
| `web_search_options.excluded_domains` |  | array of string \| null | no |  |  | Exa ရှာဖွေမှုများနှင့် ကိုက်ညီသော native provider များအတွက် ဒိုမိန်းဖယ်ရှားရန်စာရင်းဖြစ်သည်။ Google နှင့် OpenAI native ရှာဖွေမှုများတွင် ဤစာရင်းကို အသုံးမပြုနိုင်ပါ။ စာရင်းပါ ဒိုမိန်းများမှ ရရှိသော ရလဒ်များကို ဖယ်ရှားထားသည်။ |
| `web_search_options.user_location` |  | object {type, city, region, country, timezone} \| null | no |  |  | native ရှာဖွေမှုရလဒ်များ၏ ပထဝီဝင်ဆိုင်ရာ ဦးစားပေးမှုကို သက်ရောက်စေသော အသုံးပြုသူ၏ ခန့်မှန်းတည်နေရာဖြစ်သည်။ Exa သည် ဤအချက်အလက်ကို အသုံးမပြုပါ။ |
| `web_search_options.user_location.type` |  | string | no | `approximate` |  | တည်နေရာအမျိုးအစားဖြစ်သည်။ ပံ့ပိုးထားသော တန်ဖိုးတစ်ခုတည်းမှာ 'approximate' ဖြစ်သည်။ |
| `web_search_options.user_location.city` |  | string \| null | no |  |  | 'San Francisco' ကဲ့သို့ မြို့အမည်ဖြစ်သည်။ |
| `web_search_options.user_location.region` |  | string \| null | no |  |  | 'California' ကဲ့သို့ ပြည်နယ် သို့မဟုတ် ဒေသအမည်ဖြစ်သည်။ |
| `web_search_options.user_location.country` |  | string \| null | no |  |  | 'US' ကဲ့သို့ အက္ခရာနှစ်လုံးဖြင့် ဖော်ပြထားသော နိုင်ငံအမှတ်အသားဖြစ်သည်။ |
| `web_search_options.user_location.timezone` |  | string \| null | no |  |  | 'America/Los_Angeles' ကဲ့သို့ IANA စံနှုန်းဖြင့် ဖော်ပြထားသော အချိန်ဇုန်အမှတ်အသားဖြစ်သည်။ |

File parameters (`videos`) take a public `https://` URL, a `data:` URI up to 10 MB, or the `file_url` of an upload from `POST /files`.

## Example input

Required parameters only:

```json
{
  "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
  "model": "google/gemini-3.8-flash"
}
```

A fuller example:

```json
{
  "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
  "model": "google/gemini-3.8-flash"
}
```

## Run it

Set `DOITONG_API_KEY` to a key from https://doitong.com/developers/dashboard#keys. `?wait=20` returns the finished request in the same call when it is ready within 20 seconds; otherwise poll `GET /requests/{id}` (it also accepts `?wait=`), or pass `webhook_url`.

### curl

```bash
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/openrouter/router/video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "model": "google/gemini-3.8-flash"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"
```

### JavaScript

```javascript
const API = "https://api.doitong.com/v1";
const headers = {
  "Authorization": "Bearer " + process.env.DOITONG_API_KEY,
  "Content-Type": "application/json",
};

// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/openrouter/router/video?wait=20", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "model": "google/gemini-3.8-flash"
  }),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);

// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
  res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
  request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
```

### Python

```python
import os
import requests

API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}

payload = {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "model": "google/gemini-3.8-flash",
}

# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/openrouter/router/video", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
    raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])

# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
    request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
    raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
```

### MCP

The MCP server at `https://api.doitong.com/v1/mcp` exposes the tools `search_models`, `get_model`, `quote`, `run`, `get_request`, `cancel_request`, `list_requests`, `create_upload` and `get_account`. A `run` call for this model:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "run",
    "arguments": {
      "model_id": "openrouter/router/video",
      "input": {
        "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
        "model": "google/gemini-3.8-flash"
      },
      "wait_seconds": 20
    }
  }
}
```

## Response

Every call returns a request object. `status` is one of `queued`, `running`, `succeeded`, `failed`, `canceled`. `outputs` lists the generated files with URLs on our storage (kept forever, or 7 days with `?storage=temporary`; `storage` says which); `output` is the model's own result object with the same URLs.

```json
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "openrouter/router/video",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 1858,
    "usd": "1.858",
    "charged": 1858,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "model": "google/gemini-3.8-flash"
  },
  "output": {
    "output": "that's the way I look at it and I don't know what you would say. Sooner or later the child gets run over.\nThey seem to be too local, too provincial.",
    "usage": {
      "prompt_tokens": 1,
      "completion_tokens": 1,
      "total_tokens": 0,
      "cost": 1.0,
      "prompt_tokens_details": {
        "cached_tokens": 0,
        "cache_write_tokens": 0
      }
    }
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
```

### Output fields (`output`)

| Field | Type | Description |
|---|---|---|
| `output` | string | ဗီဒီယိုကို လုပ်ဆောင်ပြီး ထွက်လာသော ရလဒ်ဖြစ်သည်။ |
| `usage` | object {prompt_tokens, completion_tokens, total_tokens, cost, prompt_tokens_details} \| null | တိုကင်အသုံးပြုမှု အသေးစိတ်ဖြစ်သည်။ |

## Related models

- [OpenRouter](https://doitong.com/developers/models/openrouter/router.md) (`openrouter/router`): $0.01 / usage unit
- [OpenRouter \[Audio\]](https://doitong.com/developers/models/openrouter/router/audio.md) (`openrouter/router/audio`): $0.01 / usage unit
- [OpenRouter \[Enterprise\]](https://doitong.com/developers/models/openrouter/router/enterprise.md) (`openrouter/router/enterprise`): $0.01 / usage unit
- [OpenRouter \[Video\]\[Enterprise\]](https://doitong.com/developers/models/openrouter/router/video/enterprise.md) (`openrouter/router/video/enterprise`): $0.01 / usage unit
- [OpenRouter \[Vision\]](https://doitong.com/developers/models/openrouter/router/vision.md) (`openrouter/router/vision`): $0.01 / usage unit
- [Bytedance Seed V2 Mini](https://doitong.com/developers/models/bytedance/seed/v2/mini.md) (`bytedance/seed/v2/mini`): $0.0001 / 1000 tokens
- [Fibo Edit \[Structured Instruction\]](https://doitong.com/developers/models/bria/fibo-edit/edit/structured_instruction.md) (`bria/fibo-edit/edit/structured_instruction`): $0.01 / request
- [Fibo Lite · Structured Prompt](https://doitong.com/developers/models/bria/fibo-lite/generate/structured_prompt.md) (`bria/fibo-lite/generate/structured_prompt`): $0.008 / request

## Links

- HTML page: https://doitong.com/developers/models/openrouter/router/video
- All models and guides for AI agents: https://doitong.com/developers/llms.txt
- OpenAPI 3.1 with this model's typed request body: https://doitong.com/developers/openapi.json?model=openrouter/router/video
- Errors: https://doitong.com/developers/docs/errors
- Model details as JSON: https://api.doitong.com/v1/models/openrouter/router/video
