Skip to main content
Seedream 5.5
Seedream 5.5 is ByteDance’s image creation and editing model. Use doubao-seedream-5-5-261028 for text-to-image, reference-image editing, transparent backgrounds and decomposition into editable layers. POST https://api.mixroute.ai/v1/images/generations Send JSON to the image-generation endpoint with Authorization: Bearer $MIXROUTE_API_KEY and Content-Type: application/json. Parameters are top-level fields, not a metadata wrapper. Reference-image editing and layer decomposition use this same endpoint, not /v1/images/edits or Chat Completions.
On MixRoute, prompt is required for every request, including layer decomposition. Do not omit it even if an upstream example treats it as optional.

Request parameters

Images, sizes and limits

  • Generation returns one image per request. n does not control the output count. Streaming, sequential image generation and web search are not supported; omit stream, sequential_image_generation and search-tool fields.
  • Each reference image must be at most 30 MB with an aspect ratio from 1:16 to 16:1. Base64 URLs use a lowercase format name, for example data:image/png;base64,....
  • For generation with a resolution preset, describe the desired aspect ratio in prompt. For widthxheight, use a lowercase x, a total of 921,600-4,624,220 pixels and an aspect ratio from 1:16 to 16:1; 2880x1440 is valid. These are total-pixel limits, not per-edge limits.
  • Decomposition requires exactly one PNG or JPEG image with at least 262,144 total pixels (512 x 512). size: auto adapts to input dimensions and aspect ratio; do not assume every output retains its original pixel dimensions. Read each returned data[].size.
  • If any layer fails, the entire decomposition request fails. Asking for more outputs than max_images permits can leave requested elements out.

Request examples

Set MIXROUTE_API_KEY to your MixRoute key. Replace the example.com input URLs below with accessible images before sending requests.

Text-to-image

Multiple reference images

Transparent PNG

Layer decomposition with OCR

Python with the OpenAI SDK

Install the openai package and set MIXROUTE_API_KEY and SEEDREAM_IMAGE_URL. Put Seedream-specific fields and resolution values in the SDK’s extra_body; they become top-level JSON fields on the wire, not an extra_body or metadata object. Automatic retries are disabled to avoid blindly repeating generation requests.

Response fields

Illustrative decomposition response excerpt with one base image and one layer:

Reconstruct the image

Start with the base image (z_index: 0). For each layer, resize its pixels to (right - left) x (bottom - top) using bounding_box.absolute, position it at (left, top), and alpha-composite in increasing z_index order. The layer’s native size may differ from its placement dimensions. OCR describes text for your application to edit; it does not perform the editing itself.

Billing

Input images and successful output images are billed separately. Output tiers depend on each image’s actual width multiplied by height, not just the requested size label. The standard USD rates below match the current public pricing; account and route prices in the Model Marketplace take precedence.
  • Each reference image or image being decomposed is an input image. The base image and every successfully generated layer are separate output images, each using its own pixel tier. Unsuccessful outputs are not charged.
  • Decomposition reserves credit using max_images and settles against the actual output count, returning unused reserved credit. Use a smaller limit when balance is constrained.
  • Example: one input and three successful output images, all above 2,610,000 pixels, cost 0.0075 + 3 * 0.0345 = 0.111 USD at the standard rates. Mixed-size layers can fall into different tiers. Check Usage Logs for the actual charge.

Common errors

Model introduction