Submit a request
Create an async generation task and poll the task endpoint for terminal status updates.
Doubao Seedance 4.0 is a Doubao 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": "apimart-doubao-seedance-4-0",
"input": {
"prompt": "一只可爱的熊猫坐在竹林里,阳光透过竹叶洒下来",
"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.0252,
"cost_actual": 0.0252,
"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",
"required": [
"prompt"
],
"properties": {
"n": {
"type": "integer",
"title": "Images",
"default": 1,
"maximum": 15,
"minimum": 1
},
"size": {
"type": "string",
"title": "Aspect ratio",
"default": "1:1",
"description": "Supported ratios: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9, 9:21, auto.",
"x-playground": {
"placeholder": "1:1"
}
},
"prompt": {
"type": "string",
"title": "Prompt",
"maxLength": 1000,
"minLength": 1,
"description": "Text prompt for image generation.",
"x-playground": {
"rows": 6,
"widget": "textarea"
}
},
"watermark": {
"type": "boolean",
"title": "Watermark",
"default": false
},
"image_urls": {
"type": "array",
"items": {
"type": "string"
},
"title": "Reference images",
"maxItems": 15,
"minItems": 1,
"description": "Optional reference images. Supports public image URLs and base64 data URI values. Reference image count plus n must be 15 or less.",
"x-playground": {
"accept": "image/*",
"widget": "file-upload",
"advanced": true,
"multiple": true,
"uploadKind": "image"
}
},
"resolution": {
"enum": [
"1K",
"2K",
"4K"
],
"type": "string",
"title": "Resolution",
"default": "2K"
},
"optimize_prompt_options": {
"enum": [
"standard",
"fast"
],
"type": "string",
"title": "Prompt optimization",
"default": "standard",
"x-playground": {
"advanced": true
}
},
"sequential_image_generation": {
"enum": [
"disabled",
"auto"
],
"type": "string",
"title": "Sequential image generation",
"default": "disabled",
"x-playground": {
"advanced": true
}
},
"sequential_image_generation_options": {
"type": "object",
"title": "Sequential generation options",
"properties": {
"max_images": {
"type": "integer",
"maximum": 15,
"minimum": 1
}
},
"x-playground": {
"advanced": true
},
"additionalProperties": false
}
},
"additionalProperties": false
}{
"request_id": "req_demo_model",
"task_id": "task_demo_model",
"status": "succeeded",
"cost_estimate": 0.0252,
"cost_actual": 0.0252,
"output": {
"images": [
{
"url": "https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?auto=format&fit=crop&w=1200&q=80"
}
]
}
}