apimaxDocs
DocsPricingConsole
API ReferenceIntegration GuideUser GuideChangelog

Music Series

Image Series

POSTSeedream 5.5 Image Generation

Video series

Task Management

Error Code ReferenceQuery Task StatusGET

Account Management

Query Quota UsageGET

Docs / Image Series / Doubao Seedream / Async

AsyncPOSTImageGenerationDoubaoSeedreamdoubao-seedream-5-5-261028

Seedream 5.5 Image Generation

Call Doubao Seedream 5.5 (`doubao-seedream-5-5-261028`) as an async task through POST /v1/images/async-generations: submit, then poll or wait for a callback; supports text-to-image, multi-reference generation, transparent backgrounds and layer decomposition.

POSThttps://api.apimax.ai/v1/images/async-generations
Try it
Bearer API KeyJSONServer-side call

Overview#

Call Doubao Seedream 5.5 as an async task through POST /v1/images/async-generations: the submission returns a task ID immediately, then you poll GET /v1/tasks/{id} for the result or set callback_url and wait for the callback. The model supports text-to-image, image-to-image and multi-reference generation (up to 10 reference images), can directly output RGBA images with a transparent channel, and can split one image into a base image and multiple independently editable layers.

The public model name for this page is doubao-seedream-5-5-261028. Output images are billed per image by pixel tier and input reference images are billed per image; see the platform Model Pricing page for the unit price.

- The async mode suits long-running generation and cases that need a callback. Quota is pre-held at submission and settled by the actual result on completion. - Returned image links are upstream links, valid for about 24 hours; save them in time.

Other ways to call the model: for a synchronous result in the same request, see Seedream 5.5 Synchronous Image Generation; for the complete layer information (order, names, bounding boxes), or if you already integrate Volcengine Ark, see Native Seedream Format (Sync).

API#

EndpointDescription
POST /v1/images/async-generationsSubmits a generation task and returns a task ID
GET /v1/tasks/{id}Queries the task status and result; see Query Task Status for details

Requests must carry an API key:

http
Authorization: Bearer <token>
Content-Type: application/json

Supported models#

ModelDescription
doubao-seedream-5-5-261028Doubao Seedream 5.5

Request fields#

FieldTypeRequiredDefaultDescription
modelstringYes—Fixed as doubao-seedream-5-5-261028
promptstringYes—Description of the image content and style. Keep it within 300 Chinese characters or 600 English words; state the aspect ratio in the prompt when you need a specific one, e.g. "16:9 landscape"
sizestringNo2KResolution tier or pixel size, see "Size" below
image / image_urlsstring / string[]No—Reference images: publicly accessible HTTP(S) URLs or data:image/<format>;base64,... (lowercase format name). At most 10 images, at most 30MB each; the two field names are equivalent
response_formatstringNourlMust be url or omitted
output_formatstringNopngpng or jpeg
backgroundstringNoautoTransparency mode: auto, transparent or opaque, see "Transparent background" below
watermarkbooleanNotrueWhether to add an "AI generated" watermark in the bottom-right corner of the image
layer_decompositionbooleanNofalseWhether to enable layer decomposition, see "Layer decomposition" below
layer_decomposition_optionsobjectNo—Layer decomposition settings: max_images (integer 2–100, default 30) and text_recognition (boolean, default false)
callback_urlstringNo—Callback URL called when the task ends; see "Callbacks" below for the requirements

The optional Idempotency-Key request header is also supported, to prevent duplicate submissions.

This model generates 1 image per request (layer decomposition excepted), so n must be 1 or omitted. stream, mask and tools are not supported and return 400. Group generation is not supported, so do not send sequential_image_generation. quality and resolution have no effect on this model; set the resolution through size.

Size#

Two forms are supported and cannot be mixed:

  • Resolution tier (recommended): 1K, 1.5K or 2K, case-insensitive. The model decides the aspect ratio from the prompt; describe the ratio you need in the prompt.
  • Pixel size: WIDTHxHEIGHT, such as 1280x720 or 2880x1440. The total must be between 921,600 and 8,294,400 pixels (1280x720 through 2880x2880), and the aspect ratio must be between 1:16 and 16:1.

Reference pixel sizes of each tier at common aspect ratios (the actual size is decided by the model):

Tier1:14:33:416:99:163:22:321:9
1K1024x10241152x864864x11521424x800800x14241248x832832x12481568x672
1.5K1536x15361792x13441344x17922048x11521152x20481872x12481248x18722352x1008
2K2048x20482368x17761776x23682816x15841584x28162496x16641664x24963136x1344

Transparent background#

Set "background": "transparent" and keep output_format as png to get an RGBA image with a transparent background directly from text-to-image or image-to-image, which suits stickers, icons and product assets. Reference images do not need a transparent channel.

  • auto (default): the model decides from the prompt and output format.
  • transparent: outputs an image with a transparent channel.
  • opaque: outputs an image without a transparent channel.

background cannot be combined with output_format: jpeg. Do not send background with layer decomposition: layers are always PNG images with a transparent channel.

Layer decomposition#

Set "layer_decomposition": true and pass one image to split through image. The model splits it into 1 base image and up to 99 PNG layers with a transparent channel.

  • layer_decomposition_options.max_images: the maximum total number of images returned by this request (base image included), 2–100, default 30. A larger value usually gives a finer split, and more quota is pre-held at submission.
  • layer_decomposition_options.text_recognition: set it to true to enable rich-text OCR. The OCR results must be fetched through the native format endpoint; this endpoint does not return them.
  • With layer decomposition, size accepts 1K, 1.5K, 2K and auto (default, the output follows the input image size).
  • If any layer fails to generate, the whole task fails; partial success is not supported.

The async endpoint returns only the image links of the layers, without layer order, names, bounding boxes or OCR results. Use the native format endpoint POST /api/v3/images/generations when you need that layer information.

Submitting a task#

cURL
curl --request POST \
  --url https://api.apimax.ai/v1/images/async-generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: image-order-123' \
  --data '{
    "model": "doubao-seedream-5-5-261028",
    "prompt": "A cat playing on the grass",
    "size": "1K",
    "response_format": "url"
  }'

With reference images, put them in the image_urls array:

json
{
  "model": "doubao-seedream-5-5-261028",
  "prompt": "Combine the two characters into one poster, cyberpunk style",
  "size": "2K",
  "image_urls": [
    "https://example.com/person1.png",
    "https://example.com/person2.png"
  ]
}

A successful submission returns HTTP 200:

json
{
  "id": "task_V1StGXR8_Z5jdHi6B",
  "object": "image.generation.task",
  "type": "image",
  "status": "queued",
  "progress": 0,
  "created": 1757156493,
  "model": "doubao-seedream-5-5-261028",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 60
  }
}

Querying a task#

Query the task with GET /v1/tasks/{id}, every 2–5 seconds, until status becomes completed or failed:

cURL
curl --url https://api.apimax.ai/v1/tasks/task_V1StGXR8_Z5jdHi6B \
  --header 'Authorization: Bearer <token>'

Completed:

json
{
  "id": "task_V1StGXR8_Z5jdHi6B",
  "object": "image.generation.task",
  "type": "image",
  "status": "completed",
  "progress": 100,
  "created": 1757156493,
  "completed_at": 1757156593,
  "model": "doubao-seedream-5-5-261028",
  "data": [
    {
      "url": "https://example.com/generated-image.png"
    }
  ],
  "usage": {
    "billing_rule": "tiered_expr",
    "user_group": "default",
    "billing_state": "settled",
    "credits_charged": 7429
  }
}

Failed:

json
{
  "id": "task_V1StGXR8_Z5jdHi6B",
  "object": "image.generation.task",
  "type": "image",
  "status": "failed",
  "failed_at": 1757156593,
  "model": "doubao-seedream-5-5-261028",
  "error": {
    "code": "upstream_error",
    "message": "..."
  }
}
statusMeaning
queuedQueued, waiting to run
in_progressGenerating
completedGeneration finished; data holds the image links
failedGeneration failed; see error for the reason

Callbacks#

With callback_url set, the gateway POSTs to it when the task completes, fails or is cancelled; the callback body has the same final-state structure as the query endpoint. Only public HTTPS addresses are allowed (private IPs are rejected) and the URL is at most 2048 characters. Each attempt times out after 10 seconds; a failed callback is retried at most 3 times (after 1s / 2s / 4s).

Behavior#

  • Image links: data[].url is an upstream image link, valid for 24 hours after generation; save it in time.
  • Billing: quota is pre-held at submission from the requested size and the number of reference images, then settled by the images actually returned; images that fail or are not returned are not charged.
  • Rate limiting: if you receive 429 while submitting in bulk, slow down and retry later.

Billing#

  • Output images are billed per image by its actual pixels: up to 2.61 MP (the 1K and 1.5K tiers), over 2.61 MP up to 4.63 MP (the 2K tier), and over 4.63 MP. Custom pixel sizes are tiered by the size of the returned image.
  • Input reference images are billed per image.
  • Layer decomposition is billed per generated layer, each at its own tier.
  • See the platform Model Pricing page for the unit price.

Common errors#

HTTPDescription
400Missing or invalid parameter, e.g. n other than 1, size outside the pixel range, more than 10 reference images, or stream or mask sent
401API key missing or invalid
403API key has no access to this model, or the account balance is insufficient
404Task ID not found, or the task belongs to a different key
429Too many requests, or the concurrency limit exceeded
502 / 503Upstream returned an error or is temporarily unavailable; 503 also means no channel is available for this model in your group (for example a misspelled model name)

Next steps

All docs
Midjourney API OverviewMidjourney MJ Proxy-compatible API: endpoints, actions, per-call pricing, task states and error codes.Nano Banana 2.1 Image GenerationGoogle Nano Banana 2.1 (Gemini) async image generation. Excels at multi-image blending, real-person references, and text rendering, with a thinking level option.Nano Banana 2 Lite Image GenerationAsynchronous image generation with Google Nano Banana 2 (Gemini), excelling at multi-image fusion, real-person references, and text rendering, with support for reasoning levels.Nano Banana Pro Image GenerationAsynchronous image generation with Google Nano Banana 2 (Gemini), excelling at multi-image fusion, real-person references, and text rendering, with support for reasoning levels.GPT Image 2 Image Generation/v1/images/async-generationsNano Banana 2 Image GenerationGoogle Nano Banana 2 (Gemini) async image generation. Excels at multi-image blending, real-person references, and text rendering, with support for thinking levels.
On this page
OverviewOverviewAPISupported modelsRequest fieldsSizeTransparent backgroundLayer decompositionSubmitting a taskQuerying a taskCallbacksBehaviorBillingCommon errorsNext steps
API

POST /v1/images/async-generations