Video

POST /v1/videos — generation, polled to completion in the request, and the file fetched through us.

POSThttps://iranrouter.com/v1/videos

Video generation. The job is handed upstream and this request stays open until it finishes — usually one to a few minutes — then answers with the job id. Set your client timeout to at least 10 minutes.

Shell
curl https://iranrouter.com/v1/videos \
  -H "Authorization: Bearer ir-..." \
  -H "Content-Type: application/json" \
  --max-time 900 \
  -d '{
    "model": "alibaba/wan-3.0",
    "prompt": "یک گربه روی دوچرخه در خیابان بارانی",
    "duration": 5,
    "resolution": "720p"
  }'
JSON
{
  "id": "3f6c...-request-id",
  "object": "video.job",
  "model": "alibaba/wan-3.0",
  "status": "completed",
  "content_url": "/v1/videos/3f6c...-request-id/content",
  "usage": { "cost_rial": 1250000 }
}
ParameterNotes
promptRequired.
durationSeconds. Each model has its own allowed range (the model page).
resolution / size / aspect_ratio480p … 4K, exact WIDTHxHEIGHT, or an aspect ratio.
generate_audioOn models that generate audio; usually priced apart.
input_references / frame_imagesReference images or video, and first/last frames.
callback_urlNot accepted: the upstream never contacts you directly.
If generation outlives the request (the time ceiling, or you disconnecting), the job is not cancelled: you get a 202 with status in_progress and a poll_url. Poll GET /v1/videos/{id} until completed (or failed); the wallet hold stays until then and the final charge settles when the job ends. Until completed, the content path answers 409 with code video_not_ready.
GEThttps://iranrouter.com/v1/videos/{id}/content

The video file (video/mp4), through us. The id is the one from the answer above and works only with a key of the same account. GET /v1/videos/{id} returns the job's status.

Shell
curl https://iranrouter.com/v1/videos/3f6c...-request-id/content -H "Authorization: Bearer ir-..." -o out.mp4

Pricing

Video is not token-priced. Each model has a price table (per second by resolution and audio, sometimes a minimum per generation) shown in Rial on its page. Before submitting, the dearest reading of that table for your request is held from the wallet; once the job finishes the final charge is that job's own bill and the rest of the hold is released. A failed job charges nothing.

Video works only on a credit (wallet) key; a plan's token allowance does not cover it, and a plan key gets a 403.