Create Video
Asynchronously submits a video generation task. Returns HTTP 202 immediately with a task ID and polling URL. Poll `GET /api/v1/videos/{id}` for status. Video generation models are currently offline — check `GET /v1/models` for current availability before relying on this endpoint.
Authorization
ApiKeyAuth Your Yolo Router API key. Format: Authorization: Bearer sk-...
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.yolorouter.com/api/v1/videos" \ -H "Content-Type: application/json" \ -d '{ "model": "<video-model-id>", "prompt": "A peaceful mountain lake at sunrise, cinematic style", "duration": 5, "resolution": "720p" }'{
"id": "vt_01jhx2k8mnen8xa5m0wfvyjzrp",
"object": "video.generation",
"status": "pending",
"model": "<video-model-id>",
"created_at": 1749574800,
"polling_url": "/api/v1/videos/vt_01jhx2k8mnen8xa5m0wfvyjzrp",
"estimated_cost_usd": 0.015
}{
"error": {
"type": "string",
"code": "string",
"message": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_api_key",
"message": "Invalid API key"
}
}{
"error": {
"type": "insufficient_balance",
"message": "insufficient account balance"
}
}{
"error": {
"type": "insufficient_quota",
"code": "insufficient_quota",
"message": "Quota exceeded"
}
}{
"error": {
"type": "string",
"code": "string",
"message": "string"
}
}Create Response POST
Creates a model response. Supports streaming via `stream: true`. Compatible with the OpenAI Responses API. Automatically routes to the best available provider (OpenAI, Anthropic, Google, etc.).
Edit Image POST
Edits an existing image based on a prompt and optional mask. Compatible with the OpenAI Images Edits API (multipart/form-data). Only OpenAI-compatible upstream providers serve this endpoint; Anthropic and Gemini providers are skipped automatically. Streaming (Server-Sent Events) is supported only for `gpt-image-*` models when `stream=true` is set. No image editing models are currently online — check `GET /v1/models` for current availability before relying on this endpoint.