Submit a request
Create an async generation task and poll the task endpoint for terminal status updates.
Wan 2.7 Image is an Alibaba Wan image generation model, making it suitable for general image creation.
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-image",
"input": {
"prompt": "A sunlit flower shop with delicate windows, a wooden door, and fresh flowers on display.",
"size": "1:1",
"resolution": "2K",
"n": 1
}
}'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.0243,
"cost_actual": 0.0243,
"output": {
"images": [
{
"url": "https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?auto=format&fit=crop&w=1200&q=80"
}
]
}
}Inputs can reference hosted files or compact data URIs depending on model constraints. Production apps should prefer stable hosted URLs.
{
"type": "object",
"properties": {
"n": {
"type": "integer",
"title": "Images",
"default": 1,
"maximum": 12,
"minimum": 1,
"description": "1-4 in normal mode, 1-12 when enable_sequential is true."
},
"seed": {
"type": "integer",
"title": "Seed",
"maximum": 2147483647,
"minimum": 0,
"x-playground": {
"advanced": true
}
},
"size": {
"type": "string",
"title": "Aspect ratio or size",
"description": "Optional aspect ratio, preset size, or pixel size. Examples: 1:1, 16:9, 2K, 1024x1024, 1024*1024.",
"x-playground": {
"placeholder": "1:1"
}
},
"prompt": {
"type": "string",
"title": "Prompt",
"maxLength": 5000,
"description": "Text prompt. Required when image_urls is not provided, optional for image editing.",
"x-playground": {
"rows": 6,
"widget": "textarea"
}
},
"bbox_list": {
"type": "array",
"items": {
"type": "array"
},
"title": "Bounding boxes",
"description": "Optional interactive editing boxes. The outer array length must match image_urls length.",
"x-playground": {
"advanced": true
}
},
"watermark": {
"type": "boolean",
"title": "Watermark",
"default": false
},
"image_urls": {
"type": "array",
"items": {
"type": "string"
},
"title": "Reference images",
"maxItems": 9,
"minItems": 1,
"description": "Optional input image URLs or data URI images for editing and multi-image reference. Up to 9 items.",
"x-playground": {
"accept": "image/*",
"widget": "file-upload",
"advanced": true,
"multiple": true,
"uploadKind": "image"
}
},
"resolution": {
"enum": [
"1K",
"2K"
],
"type": "string",
"title": "Resolution",
"default": "2K"
},
"color_palette": {
"type": "array",
"items": {
"type": "object",
"properties": {
"hex": {
"type": "string"
},
"ratio": {
"type": "string"
}
},
"additionalProperties": false
},
"title": "Color palette",
"maxItems": 10,
"minItems": 3,
"description": "Optional palette array with 3-10 items. Each item must contain hex and ratio.",
"x-playground": {
"advanced": true
}
},
"thinking_mode": {
"type": "boolean",
"title": "Thinking mode",
"default": true,
"x-playground": {
"advanced": true
}
},
"negative_prompt": {
"type": "string",
"title": "Negative prompt",
"maxLength": 5000,
"description": "Optional negative prompt describing content you do not want to appear."
},
"enable_sequential": {
"type": "boolean",
"title": "Sequential mode",
"default": false,
"x-playground": {
"advanced": true
}
}
},
"additionalProperties": false
}{
"request_id": "req_demo_model",
"task_id": "task_demo_model",
"status": "succeeded",
"cost_estimate": 0.0243,
"cost_actual": 0.0243,
"output": {
"images": [
{
"url": "https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?auto=format&fit=crop&w=1200&q=80"
}
]
}
}