switch_heading
/v1/imagesImage generation API
Generate new images from text or edit up to ten reference images with Seedream 5 Pro. One stable model alias, predictable product pricing, and provider-independent task responses.
Model alias
seedream-5-pro
Input modes
Text or references
Base price
9 / 18 credits
Quick start
Create a task, keep its task ID, then poll the status endpoint until it reaches SUCCESS or FAILED.
| 1 | curl -X POST 'https://seedanceapi.org/v1/images/generations' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' \ |
| 3 | -H 'Content-Type: application/json' \ |
| 4 | -d '{ |
| 5 | "model": "seedream-5-pro", |
| 6 | "prompt": "A cinematic product photo on a reflective surface", |
| 7 | "aspect_ratio": "1:1", |
| 8 | "resolution": "1k", |
| 9 | "image_urls": [] |
| 10 | }' |
Request lifecycle
- 01
Authenticate
Use an existing Seedance API key in the Bearer authorization header.
- 02
Create a task
Send the request once and keep the task ID returned by the API.
- 03
Poll for results
Query by task ID. Successful images resolve to our archived CDN URL.
Authentication
All image endpoints require your existing Seedance API key. Internal provider credentials are never exposed.
| 1 | Authorization: Bearer YOUR_API_KEY |
| 2 | Content-Type: application/json |
Pricing
Pricing is tied to the public product, not the provider route. The create response returns estimated_credits and a successful status returns consumed_credits.
| Resolution | Base cost | Additional references |
|---|---|---|
| 1K | 9 credits | +0.8 credits each from the second image |
| 2K | 18 credits | +0.8 credits each from the second image |
Endpoints
/v1/images/generationsAn empty image_urls array creates from text. One to ten URLs switches to reference-image editing.
Must be seedream-5-pro.
A text prompt or editing instruction, up to 3000 characters.
One of 1:1, 4:3, 3:4, 16:9, 9:16, 2:3, or 3:2. Defaults to 1:1.
Use 1k or 2k. Defaults to 1k.
Zero to ten public HTTPS image URLs. Empty means text-to-image.
Text-to-image request
| 1 | { |
| 2 | "model": "seedream-5-pro", |
| 3 | "prompt": "A cinematic product photo on a reflective surface", |
| 4 | "aspect_ratio": "1:1", |
| 5 | "resolution": "1k", |
| 6 | "image_urls": [] |
| 7 | } |
Reference-image edit
| 1 | { |
| 2 | "model": "seedream-5-pro", |
| 3 | "prompt": "Place this product in a minimal studio scene", |
| 4 | "aspect_ratio": "4:3", |
| 5 | "resolution": "2k", |
| 6 | "image_urls": [ |
| 7 | "https://cdn.example.com/reference.png" |
| 8 | ] |
| 9 | } |
HTTP 202
| 1 | { |
| 2 | "task_id": "n30c6f2...seed", |
| 3 | "status": "IN_PROGRESS", |
| 4 | "model": "seedream-5-pro", |
| 5 | "estimated_credits": 9 |
| 6 | } |
/v1/images/generations/:task_idRetrieve the latest task state using the task ID returned at creation time.
| 1 | curl 'https://seedanceapi.org/v1/images/generations/n30c6f2...seed' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' |
SUCCESS
| 1 | { |
| 2 | "task_id": "n30c6f2...seed", |
| 3 | "status": "SUCCESS", |
| 4 | "model": "seedream-5-pro", |
| 5 | "images": [ |
| 6 | { "url": "https://cdn44.gogloai.com/results/image.png" } |
| 7 | ], |
| 8 | "consumed_credits": 9, |
| 9 | "created_at": "2026-07-13 10:00:00" |
| 10 | } |
FAILED
| 1 | { |
| 2 | "task_id": "n30c6f2...seed", |
| 3 | "status": "FAILED", |
| 4 | "model": "seedream-5-pro", |
| 5 | "consumed_credits": 0, |
| 6 | "error": { |
| 7 | "code": "GENERATION_FAILED", |
| 8 | "message": "Image generation failed." |
| 9 | } |
| 10 | } |
Errors
| HTTP | Code | Meaning |
|---|---|---|
| 400 | INVALID_* | Invalid JSON, model, prompt, ratio, resolution, URL, or image count. |
| 401 | INVALID_API_KEY | The Bearer API key is missing or invalid. |
| 402 | INSUFFICIENT_CREDITS | The API key does not have enough credits. |
| 404 | TASK_NOT_FOUND | The task was not found. |
| 502 / 503 | UPSTREAM_* | The upstream image service is unavailable or rejected task creation. |