Submit a request
Create an async generation task and poll the task endpoint for terminal status updates.
Wan 2.7 R2v supports reference-to-video generation and is suitable for creating videos that match uploaded images or videos.
Submit a task to MindVideo with your platform model slug. The response includes a request ID, task ID, normalized status, and estimated cost.
For production retries, send a unique Idempotency-Key per business request. Reusing the same key with the same payload returns the original task without charging again; reusing it with different input returns 409.
curl -X POST https://api.mindvideo.ai/api/v1/tasks \
-H "Authorization: Bearer mv_live_xxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: task_$(date +%s)" \
-d '{
"model": "wan2-7-r2v",
"input": {
"prompt": "图1中的人物走在城市街道上,镜头平稳跟拍,电影感光影。",
"size": "16:9",
"resolution": "1080P",
"duration": 5,
"image_with_roles": [
{
"url": "https://example.com/character.jpg",
"role": "reference_image"
}
]
}
}'Every server-side request must include an API key in the Authorization header. Keys can be created, disabled, and deleted from the dashboard.
The platform maps runtime states into queued, processing, succeeded, failed, or cancelled so clients do not depend on model-specific fields.
Create an async generation task and poll the task endpoint for terminal status updates.
curl https://api.mindvideo.ai/api/v1/tasks/task_demo_model \
-H "Authorization: Bearer mv_live_xxx"curl https://api.mindvideo.ai/api/v1/tasks/task_demo_model/events \
-H "Authorization: Bearer mv_live_xxx"{
"request_id": "req_demo_model",
"task_id": "task_demo_model",
"status": "succeeded",
"cost_estimate": 0.6165,
"cost_actual": 0.6165,
"output": {
"videos": [
{
"url": "https://example.com/output/demo.mp4"
}
]
}
}Inputs can reference hosted files or compact data URIs depending on model constraints. Production apps should prefer stable hosted URLs.
{
"type": "object",
"required": [
"prompt"
],
"properties": {
"seed": {
"type": "integer",
"title": "Seed",
"minimum": 0,
"x-playground": {
"advanced": true
}
},
"size": {
"enum": [
"16:9",
"9:16",
"1:1",
"4:3",
"3:4"
],
"type": "string",
"title": "Aspect ratio",
"default": "16:9"
},
"prompt": {
"type": "string",
"title": "Prompt",
"maxLength": 5000,
"minLength": 1,
"description": "Video content description. Use 图1、图2、视频1 to refer to uploaded references in order.",
"x-playground": {
"rows": 6,
"widget": "textarea"
}
},
"duration": {
"type": "integer",
"title": "Duration",
"default": 5,
"maximum": 15,
"minimum": 2
},
"watermark": {
"type": "boolean",
"title": "Watermark",
"default": false
},
"resolution": {
"enum": [
"720P",
"1080P"
],
"type": "string",
"title": "Resolution",
"default": "1080P"
},
"video_urls": {
"type": "array",
"items": {
"type": "string"
},
"title": "Reference videos",
"maxItems": 5,
"minItems": 1,
"description": "Reference video URLs. Up to 5 videos. image_with_roles and video_urls combined cannot exceed 5 items.",
"x-playground": {
"accept": "video/*",
"widget": "file-upload",
"advanced": true,
"multiple": true,
"uploadKind": "video"
}
},
"prompt_extend": {
"type": "boolean",
"title": "Prompt extend",
"default": true
},
"negative_prompt": {
"type": "string",
"title": "Negative prompt",
"maxLength": 500,
"x-playground": {
"rows": 3,
"widget": "textarea",
"advanced": true
}
},
"image_with_roles": {
"type": "array",
"items": {
"type": "object",
"required": [
"url",
"role"
],
"properties": {
"url": {
"type": "string",
"title": "Image URL"
},
"role": {
"enum": [
"reference_image",
"first_frame"
],
"type": "string",
"title": "Role",
"default": "reference_image"
},
"reference_voice": {
"type": "string",
"title": "Reference voice"
}
},
"additionalProperties": false
},
"title": "Reference images",
"maxItems": 5,
"minItems": 1,
"description": "Reference images with roles. At least one of image_with_roles or video_urls is required.",
"x-playground": {
"accept": "image/*",
"widget": "file-upload",
"advanced": true,
"multiple": true,
"uploadKind": "image"
}
}
},
"additionalProperties": false
}{
"request_id": "req_demo_model",
"task_id": "task_demo_model",
"status": "succeeded",
"cost_estimate": 0.6165,
"cost_actual": 0.6165,
"output": {
"videos": [
{
"url": "https://example.com/output/demo.mp4"
}
]
}
}