apimaxDocs
DocsPricingConsole
API ReferenceIntegration GuideUser GuideChangelog

Music Series

Image Series

POSTSeedream 5.5 Synchronous Image Generation

Video series

Task Management

Error Code ReferenceQuery Task StatusGET

Account Management

Query Quota UsageGET

Docs / Image Series / Doubao Seedream / Sync - OpenAI Compatible

Sync - OpenAI CompatiblePOSTImageGenerationDoubaoSeedreamOpenAIdoubao-seedream-5-5-261028

Seedream 5.5 Synchronous Image Generation

Call Doubao Seedream 5.5 synchronously through the OpenAI image endpoints POST /v1/images/generations and /v1/images/edits: text-to-image, multi-reference generation, transparent backgrounds and layer decomposition, with standard OpenAI Images requests and responses.

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

Overview#

Doubao Seedream 5.5 can be called synchronously through the OpenAI image endpoint POST /v1/images/generations: requests and responses use the standard OpenAI Images format, so OpenAI SDKs and image clients work without adaptation. 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.

This endpoint is synchronous: the request waits for generation to finish and returns the result directly, with no task to poll.

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.

Other ways to call the model: to submit a task and poll or wait for a callback, see Seedream 5.5 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/generationsSynchronous generation with a JSON body; reference images are passed as image URLs or Base64
POST /v1/images/editsSynchronous generation with multipart/form-data file upload of reference images

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
imagestring / 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
response_formatstringNourlurl returns image links; b64_json returns Base64 image data
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)

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.

json
{
  "model": "doubao-seedream-5-5-261028",
  "prompt": "Split the poster into three layers: background, character and title text",
  "layer_decomposition": true,
  "layer_decomposition_options": { "max_images": 8 },
  "image": "https://example.com/poster.png",
  "size": "2K"
}
  • 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: when set to true, regular text layers also return their text content and style (rich-text OCR).
  • 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 request fails; partial success is not supported.

The OpenAI-format endpoints return 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.

Request examples#

Text-to-image:

cURL
curl --request POST \
  --url https://api.apimax.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedream-5-5-261028",
    "prompt": "Cinematic wide shot of a futuristic city skyline at dusk, 16:9 landscape",
    "size": "2K",
    "response_format": "url"
  }'

Image-to-image and multi-reference generation. Pass reference images through image as a single string or an array of strings:

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

To edit the same image over several rounds, pass the image link returned by the previous round as image, and state in the prompt what to change this round and what to keep; also set "background": "opaque" for better consistency across rounds.

Uploading reference image files#

POST /v1/images/edits uses multipart/form-data. Reference images go in the file field image or image[], at most 10 images of at most 30MB each; the other parameters are sent as form fields, with booleans and numbers written as strings and object parameters as JSON strings.

cURL
curl --request POST \
  --url https://api.apimax.ai/v1/images/edits \
  --header 'Authorization: Bearer <token>' \
  --form 'model=doubao-seedream-5-5-261028' \
  --form 'prompt=Add a red knitted hat to the character and keep the background unchanged' \
  --form 'size=1K' \
  --form 'response_format=url' \
  --form 'image=@./input.png'

Response#

The endpoint returns the OpenAI Images format directly:

json
{
  "created": 1794000000,
  "data": [
    {
      "url": "https://example.com/generated-image.png"
    }
  ]
}
  • With response_format url (default), data[].url holds the image link. Whether or not response_format is sent, data[].url is the upstream image link (the official Ark link), valid for 24 hours after generation; save it in time.
  • With response_format b64_json, data[].b64_json holds the Base64 image data.
  • /v1/images/edits returns upstream image links, valid for 24 hours after generation; save them in time.

Behavior#

  • Synchronous wait: generation usually takes tens of seconds. If the synchronous wait times out, the endpoint answers 504; the task is not cancelled, it keeps running in the background and is billed by its actual result. Use the async endpoint for long-running requests.
  • Content safety: when content is rejected by upstream moderation, generation fails and the endpoint answers 400, with the reason given by upstream in the error message.
  • Billing: quota is pre-held at submission from the requested size and count and settled by the images actually returned; images that fail or are not returned are not charged.

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; or generation failed (including content rejected by upstream moderation)
401API key missing or invalid
403API key has no access to this model, or the account balance is insufficient
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)
504Timed out waiting for the synchronous generation. The task is not cancelled: it keeps running in the background and is billed by its actual result; use the async endpoint for long-running requests

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 decompositionRequest examplesUploading reference image filesResponseBehaviorBillingCommon errorsNext steps
API

POST /v1/images/generations