Seedream API

Seedream 5.0 API Reference

Generate and edit images with Seedream 5.0 Pro and Seedream 4.5 through a simple asynchronous REST API: submit a task, get a task_id back, then poll for the result.

REST · JSON · Async Base URL: https://seedream45ai.org/api

Quickstart

Create a task, then poll until it finishes. When you are signed in, your own API key is filled into the snippet.

  1. Get an API keyCreate one in your dashboard and keep it on your server.
  2. Send your first requestRun the snippet with your key in the Authorization header.
  3. Read the resultCheck the JSON response. Long jobs return a task ID you can poll.
# 1. Create a taskcurl -X POST https://seedream45ai.org/api/generate \  -H "Authorization: Bearer YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{"model":"seedream-5-pro","prompt":"Cinematic photo of an obsidian smartwatch on a marble plinth, volumetric lighting","aspectRatio":"4:3","quality":"high"}'​# 2. Poll the result with the returned task_idcurl "https://seedream45ai.org/api/status?task_id=YOUR_TASK_ID" \  -H "Authorization: Bearer YOUR_API_KEY"

Authentication

Send your API key as a Bearer token in the Authorization header of every request.

HTTP
Authorization: Bearer YOUR_API_KEY

Models

Choose a model with the model field. Without it, requests run on Seedream 4.5 text-to-image.

Models
ModelModeNotes
seedream-5-proText-to-image, image-to-imageRecommended. Switches to image-to-image automatically when imageUrls is set (up to 10 references). basic = 1K, high = 2K. 21:9 is not supported.
seedream/4.5-text-to-imageText-to-imageDefault model. basic = 2K, high = 4K. imageUrls is ignored.
seedream/4.5-editImage-to-imageNeeds at least one image in imageUrls. basic = 2K, high = 4K.

Credit pricing

Credits are deducted when the task is accepted.

Credit pricing
RequestCredits
seedream-5-pro · basic (1K)9
seedream-5-pro · high (2K)18
seedream-5-pro · each reference image after the first+0.8
seedream/4.5-text-to-image · basic or high12
seedream/4.5-edit · basic or high12

Endpoints

Submits a Seedream task and returns a task_id right away. The image renders asynchronously.

Request bodyJSON
  • promptstringRequired

    Text description of the image, up to 3000 characters.

  • modelstringOptional

    Model to run. See the Models table above. Defaults to seedream/4.5-text-to-image.

  • aspectRatiostringOptional

    Output aspect ratio. aspect_ratio is accepted as an alias. seedream-5-pro does not support 21:9. Defaults to 1:1.

  • qualitystringOptional

    basic or high. Sets the output resolution and, for seedream-5-pro, the price. Defaults to basic.

  • imageUrlsstring[]Optional

    Public URLs of reference images. Required for seedream/4.5-edit; turns seedream-5-pro into image-to-image (up to 10).

Example: text-to-image

JSON
{  "model": "seedream-5-pro",  "prompt": "Cinematic photo of an obsidian smartwatch on a marble plinth, volumetric lighting",  "aspectRatio": "4:3",  "quality": "high"}

Example: image-to-image with a reference

JSON
{  "model": "seedream-5-pro",  "prompt": "Place this watch on a wet black stone at night, neon reflections",  "aspectRatio": "1:1",  "quality": "basic",  "imageUrls": [    "https://example.com/watch.png"  ]}

Responses

code:200
message:"success"
data:1 key
task_id:"n30c1f4e2a8b7d94f6e9a3b5c7d1e0f2a4bseed"
codenumber

Returns the latest task record. While a task is PENDING or IN_PROGRESS, the server also checks the upstream provider before replying.

Query parameters
  • task_idstringRequired

    The task_id returned by /api/generate.

Example request

Bash
curl "https://seedream45ai.org/api/status?task_id=n30c1f4e2a8b7d94f6e9a3b5c7d1e0f2a4bseed" \  -H "Authorization: Bearer YOUR_API_KEY"
Response fields (data)JSON
  • task_idstringOptional

    Task ID.

  • statusstringOptional

    Current task state.

  • requestobjectOptional

    Snapshot of the parameters you submitted.

  • responsestring[]Optional

    Image URLs once the task is SUCCESS.

  • consumed_creditsnumberOptional

    Credits charged for the task; 0 after a refund.

  • error_messagestring | nullOptional

    Reason for the failure when status is FAILED.

  • created_atstringOptional

    UTC time the task was created.

Responses

code:200
message:"success"
data:7 keys
task_id:"n30c1f4e2a8b7d94f6e9a3b5c7d1e0f2a4bseed"
status:"SUCCESS"
request:4 keys
model:"seedream-5-pro"
prompt:"Cinematic photo of an obsidian smartwatch on a marble plinth, volumetric lighting"
aspectRatio:"4:3"
quality:"high"
response:1 item
0:"https://cdn.example.com/seedream/watch_001.png"
consumed_credits:18
error_message:null
created_at:"2026-11-28T05:21:11Z"
codenumber

Try it

Send real requests from this page. Replace YOUR_API_KEY with your key; generate requests consume credits.

API Playground

POST/api/generate

API key
Headers
Request Body
Ctrl ↵to send
  1. PreparedPOST
  2. Sent—
  3. Response—
Send a request to see the response here.

Recent calls

Calls you send in this session show up here.

Errors

Errors return a JSON body with code and message. Retry 429 and 5xx responses with exponential backoff.

Error codes
HTTPMeaning
400Bad RequestMissing prompt, unsupported aspect ratio or quality, or no reference image for an edit model.
401UnauthorizedMissing or invalid API key.
402Payment RequiredNot enough credits for this task.
404Not FoundNo task matches this task_id.
429Too Many RequestsToo many requests. Slow down your request or polling rate.
500Internal Server ErrorTemporary server or provider error. Retry with backoff.

FAQ

Which model should I use?

Use seedream-5-pro for the best quality and for edits with several references. Seedream 4.5 costs a flat 12 credits per task and can output 4K with high quality.

How often should I poll /api/status?

Every 3 to 5 seconds is enough. Stop polling once status is SUCCESS or FAILED.

Are credits refunded when a task fails?

Yes. If generation fails, the credits for that task go back to your balance automatically and consumed_credits becomes 0.

Where can I see the tasks I created through the API?

Open Dashboard → Logs and pick your API key to browse every task with its status, credits and output images.