APIMaster.ai

Seedream 5.0 Pro API — Generation, Editing and Layer Decomposition

Generate and edit images with doubao-seedream-5-0-pro-260628, use up to ten references, and separate designs into transparent layers.

Seedream 5.0 Pro

Use model doubao-seedream-5-0-pro-260628 with POST https://apimaster.ai/v1/images/generations, JSON and Bearer authentication. Text-to-image, reference editing and layer decomposition all use this endpoint.

The model generates one image per generation request. It supports up to ten reference images and can decompose one source into a base image plus up to sixteen transparent layers. Streaming, batch generation and web search are unsupported. Omit stream, sequential_image_generation and tools; do not use /images/generations/async. Allow at least 300 seconds for the synchronous response.

Base pricing

USD base rates are shown below. Channel and account group multipliers apply to your actual price; check the marketplace and usage logs.

Operation Each output ≤ 2,610,000 pixels Each output > 2,610,000 pixels
Image generation or editing $0.045/image $0.09/image
Layer decomposition, including base image $0.0225/image $0.045/image

Input images cost $0.003 each after the first image, which is free for every request. Two references incur one input-image charge; ten incur nine.

Each output is classified independently using its returned data[].size (width × height). For example, 2048x1024 is only 2,097,152 pixels and uses the lower rate. A decomposition with one high-resolution base and three standard-resolution layers costs $0.045 + 3 × $0.0225 = $0.1125 before multipliers. Its single input is free. Token counters do not determine image charges.

Text-to-image

curl --max-time 300 "https://apimaster.ai/v1/images/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-5-0-pro-260628",
    "prompt": "A clean poster: a red circle on the left, blue square on the right, black title SEEDREAM TEST, cream background",
    "size": "1.5K",
    "output_format": "png",
    "watermark": false
  }'

Choose 1K, 1.5K or 2K (default). Both lower tiers share the same base rate. Describe the aspect ratio in the prompt. Alternatively specify widthxheight, such as 2048x1024: total area must be 921,600–4,624,220 pixels and aspect ratio 1:16–16:1. 512x512 is invalid. Use size, not another model's resolution parameter.

Image editing and multiple references

Send image as one public URL, an array of up to ten URLs, or a data:image/png;base64,... string. Local filesystem paths are not accepted.

{
  "model": "doubao-seedream-5-0-pro-260628",
  "prompt": "Change only the red circle to green; preserve the blue square, text and layout",
  "image": "https://your-public-host.example/source.png",
  "size": "1.5K",
  "output_format": "png",
  "watermark": false
}

For multiple references use "image": ["https://.../first.png", "https://.../second.png"]. The output is still one image. Each reference must be at most 30 MB and 36 million pixels, with aspect ratio 1:16–16:1 and both dimensions greater than 14 pixels. Supported input formats include JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC and HEIF.

Layer decomposition

Set layer_decomposition: true with exactly one PNG/JPEG input (262,144–36,000,000 pixels, up to 30 MB, aspect ratio 1:16–16:1).

{
  "model": "doubao-seedream-5-0-pro-260628",
  "image": "https://your-public-host.example/poster.png",
  "layer_decomposition": true,
  "size": "auto",
  "output_format": "png",
  "watermark": false
}

Omit prompt for automatic decomposition, or request specific elements. Here size supports only 1K, 1.5K, 2K and auto (default); explicit pixel dimensions are unsupported. output_format controls the base only: all other layers are transparent PNGs. Any failed layer causes the upstream request to fail as a whole.

Each data entry includes an image URL or Base64, size, output_format and z_index. The base has z_index: 0; other layers also carry name, description and bounding_box.

To reconstruct the composition, sort layers by ascending z_index. bounding_box.absolute contains [x_min,y_min,x_max,y_max] in base-image coordinates: resize the layer to (x_max-x_min, y_max-y_min), then place it at (x_min,y_min). normalized coordinates use 0–1000; multiply by target canvas dimensions and divide by 1000. A layer's intrinsic dimensions differ from its placement dimensions.

To edit a separated transparent layer, submit its PNG as the single image, provide an editing prompt and set background: "transparent" and output_format: "png". This requires an input with an alpha channel; JPEG output is incompatible.

Results and errors

response_format accepts url (default) or b64_json. Process the complete data array and preserve layer metadata. Download results promptly: upstream URLs expire after 24 hours and are not permanent storage. usage.generated_images counts successful outputs, while usage.input_images counts references.

HTTP 400 indicates invalid parameters, such as undersized generation dimensions or multiple inputs for decomposition. Correct the request before retrying.

Tested paths include generation at 1K, 1.5K, 2K and 2048x1024; URL/Base64 editing; two references; decomposition at 1K, 2K and auto; and invalid-size/multiple-layer-input errors. Decomposition tests returned a base, square, circle and title with layer coordinates.

Reference: Volcengine image generation API. Examples use APIMaster's endpoint and configured base prices.