Image Generation and Editing
Create asynchronous GPT Image and Nano Banana image tasks, then poll for generated image URLs.
Create a text-to-image task
The endpoint reserves the selected model's fixed credit cost and returns a local task ID with HTTP 202.
bash
curl https://api.seedanceapi.app/v1/images/generations \
-H "Authorization: Bearer $SEEDANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2",
"prompt": "A cinematic product photograph with soft studio lighting",
"aspect_ratio": "1:1",
"image_size": "1K",
"response_format": "url"
}'Create an image edit task
Edits accept public HTTPS image URLs. File and Base64 bodies are not accepted by the public API.
bash
curl https://api.seedanceapi.app/v1/images/edits \
-H "Authorization: Bearer $SEEDANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-pro",
"prompt": "Keep the subject and replace the background with a studio set",
"image_urls": ["https://example.com/source.png"],
"aspect_ratio": "1:1",
"image_size": "2K"
}'Poll the task
bash
curl https://api.seedanceapi.app/v1/images/img_xxx \
-H "Authorization: Bearer $SEEDANCE_API_KEY"Continue polling while status is queued or running. A successful task returns result.images.