Developer reference

Seedream 5 Pro API documentation

Create images with Seedream 5 Pro through this site's asynchronous API. Seedream 5.5 remains a preview and is not callable here.

Quick start

  1. Create an API key in the workspace under API Keys.
  2. Send model=seedream-5-pro and a prompt to POST /api/v1/images/generate.
  3. Use the returned data.task_id to poll GET /api/v1/images/status?task_id=TASK_ID with the same API key.

Authentication

Send Authorization: Bearer YOUR_API_KEY from your server. No browser session or Cookie is required. Keep your API key private.

Authorization: Bearer YOUR_API_KEY

Endpoints and request fields

POST /api/v1/images/generate

Send a JSON body with model, prompt, aspect_ratio and resolution (1k or 2k). Optional image_urls accepts up to 10 reference image URLs; public is an optional boolean. The response contains code, message and data with task_id and status.

GET /api/v1/images/status?task_id=TASK_ID

Poll with task_id to retrieve code, message and data containing task_id, status, consumed_credits and image_urls (an array of image URLs). error_message may appear when a task fails.

The only callable model is seedream-5-pro

Keep polling while the task is processing, then read image_urls when it completes or error_message if it fails.

cURL example

Copy the commands to your terminal, replace YOUR_API_KEY with your private API key, then replace TASK_ID with data.task_id from the first response.

curl -X POST https://seedream5-5ai.com/api/v1/images/generate -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' --data '{"model":"seedream-5-pro","prompt":"A coffee shop poster with clear readable lettering","aspect_ratio":"1:1","resolution":"1k","image_urls":[],"public":false}'

curl 'https://seedream5-5ai.com/api/v1/images/status?task_id=TASK_ID' -H 'Authorization: Bearer YOUR_API_KEY'