Video
POST /v1/videos — generation, polled to completion in the request, and the file fetched through us.
https://iranrouter.com/v1/videosVideo 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.
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" }'
{
"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 }
}| Parameter | Notes |
|---|---|
prompt | Required. |
duration | Seconds. Each model has its own allowed range (the model page). |
resolution / size / aspect_ratio | 480p … 4K, exact WIDTHxHEIGHT, or an aspect ratio. |
generate_audio | On models that generate audio; usually priced apart. |
input_references / frame_images | Reference images or video, and first/last frames. |
callback_url | Not accepted: the upstream never contacts you directly. |
https://iranrouter.com/v1/videos/{id}/contentThe 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.
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.