Skip to Content
ModelsSeedream (Doubao)

Seedream (Doubao) family

ByteDance’s Doubao image models, three in total, called through the OpenAI-compatible endpoint /v1/images/generations; both text to image and editing use this endpoint.

Choosing a model

Key point5.0 Pro generates one image per request and supports 1K to 2K; image sets and 4K are available on 5.0 Lite and 4.5.
Seedream 5.0 ProFlagship
  • Supports 1K sizes
  • No image sets and no 4k preset
doubao-seedream-5.0-pro
Seedream 5.0 Lite
  • Supports image sets and 4K
  • Minimum 2K
doubao-seedream-5.0-lite
Seedream 4.5Previous gen
  • Supports image sets and n for multiple images
  • Minimum 2K
doubao-seedream-4.5
Model IDs (copy them exactly)
5.0 Provolcengine/doubao-seedream-5.0-proFlagship; supports 1K

For live prices, see the model page .

Text to image

seedream.py
import base64 from openai import OpenAI client = OpenAI(api_key="YOUR_OFOX_API_KEY", base_url="https://api.ofox.io/v1", timeout=600) resp = client.images.generate( model="volcengine/doubao-seedream-5.0-pro", prompt="A red apple on a white table", size="2560x1440", ) with open("output.jpg", "wb") as f: f.write(base64.b64decode(resp.data[0].b64_json))

The output format is always JPEG, so save files with a .jpg extension. Base64 is returned by default; pass "response_format": "url" to get an image link instead.

Size (size)

Key point4.5 and 5.0 Lite have a 2K minimum (3,686,400 pixels); both 1k and 1024×1024 are rejected.

size accepts two forms:

  • Resolution presets 1k, 2k, 4k (case-insensitive): these set only the resolution, and the model chooses the aspect ratio based on the prompt. In our tests, 2k on 4.5 produced both 2048×2048 and 1664×2496.
  • Exact dimensions WIDTHxHEIGHT: a fixed aspect ratio, which must fall within the pixel range in the table below.
5.0 Pro5.0 Lite4.5
Minimum pixels921,600 (e.g. 1280×720)3,686,400 (e.g. 2560×1440)3,686,400
Maximum pixels——16,777,216 (4096×4096)
1kSupported; measured 1152×864Not supportedNot supported
2kSupportedSupportedSupported
4kNot supportedSupported; measured 4096×4096Supported
size omittedMeasured 2368×1776——

”—” means not measured in this round; refer to the Volcano Engine Ark official docs .

Commonly used valid sizes (meeting the minimum for 4.5 and 5.0 Lite):

Aspect ratioSize
1:12048x2048
16:92560x1440
9:161440x2560
4:32304x1728
3:41728x2304

Image editing & multiple reference images

Key pointReference images go in the image field, not input_images; /v1/images/edits is not supported.
seedream_edit.py
import base64 from openai import OpenAI client = OpenAI(api_key="YOUR_OFOX_API_KEY", base_url="https://api.ofox.io/v1", timeout=600) with open("apple.jpg", "rb") as f: ref = "data:image/jpeg;base64," + base64.b64encode(f.read()).decode() resp = client.images.generate( model="volcengine/doubao-seedream-5.0-pro", prompt="Make the apple purple, keep everything else the same", size="2k", extra_body={"image": [ref]}, ) with open("apple_purple.jpg", "wb") as f: f.write(base64.b64decode(resp.data[0].b64_json))
  • image is an array; each item is an image URL or a string starting with data:image/...;base64,. Put multiple reference images into the array in order, and describe the role of each image in the prompt.
  • input_images is a Qwen-Image-only field; Seedream does not support it.
  • Seedream does not support /v1/images/edits; to edit images, use the image field described in this section.

Image sets & multiple images

Key point5.0 Lite and 4.5 can return several images per request; 5.0 Pro generates only one image per request.
Request5.0 Pro5.0 Lite4.5
n: 2Returns 400—Measured: returns 2 images
sequential_image_generation: "auto"Returns 400Measured: returns 3 imagesMeasured: returns only 1 image

Image set example:

{ "model": "volcengine/doubao-seedream-5.0-lite", "prompt": "Generate 3 separate images: the same fox in spring, summer and autumn", "size": "2k", "sequential_image_generation": "auto", "sequential_image_generation_options": { "max_images": 3 } }
  • auto means the model decides how many images to generate; max_images is only an upper limit. In our tests, with the same request 4.5 combined a three-panel comic into a single image and returned just 1. If you need a fixed number, state “generate N separate images” explicitly in the prompt.
  • Each image is billed separately; usage.output_tokens is the total across all images.

Watermarks

In our tests, calls through OfoxAI have no watermark by default; no extra parameter is needed.

Latency

We measured about 12 to 40 seconds at 2K, and about 76 seconds for a set of 3 images. Set the client timeout to 300 seconds or more.

Common errors

Key pointSize errors are the most common; check the pixel count in the error message first.
Error message (excerpt)CauseFix
image size must be at least 3686400 pixelsSize below 2K on 4.5 or 5.0 LiteUse 2k, 2560x1440 or similar; see Size
image area must be at least 921600 pixelsSize below 1280×720 on 5.0 ProIncrease the size
image size must be at most 16777216 pixelsLarger than 4096×4096Reduce the size
the specified size is not supported for model doubao-seedream-4-51k sent to 4.5Use 2k or 4k
must be 'WIDTHxHEIGHT' or a supported size preset4k sent to 5.0 ProUse 2k or exact dimensions
size must be one of 'WIDTHxHEIGHT', '1k', '2k', or '4k'An invalid value such as 8K or 2048Use one of those four forms
the parameter sequential_image_generation is not supported by the current modeln or image set parameters sent to 5.0 ProRemove n; for multiple images, send several requests concurrently
the parameter output_format is not supported by the current modeloutput_format was sentRemove it; the output format is always JPEG
does not support the /v1/images/edits endpointThe edit endpoint was calledUse the image field on /v1/images/generations
Reference image has no effectinput_images was usedUse image

The Request id: 0217… at the end of an error message is the upstream request ID; when contacting support, include it together with the request_id from the response.

Exact error messages

The parameter `size` specified in the request is not valid: image size must be at least 3686400 pixels. The parameter `size` specified in the request are not valid: image area must be at least 921600 pixels. The parameter `size` specified in the request is not valid: image size must be at most 16777216 pixels. The parameter `size` specified in the request is not valid: the specified size is not supported for model doubao-seedream-4-5. The parameter `size` specified in the request are not valid: must be 'WIDTHxHEIGHT' or a supported size preset. The parameter `size` specified in the request is not valid: size must be one of 'WIDTHxHEIGHT', '1k', '2k', or '4k'. The parameter `sequential_image_generation` specified in the request are not valid: the parameter `sequential_image_generation` is not supported by the current model. The parameter `output_format` specified in the request is not valid: the parameter `output_format` is not supported by the current model.

Official docs

The official docs describe behavior when calling Volcano Engine Ark directly; when calling through OfoxAI, the measured results on this page take precedence.

FAQ

How do I fix the Seedream error image size must be at least 3686400 pixels?

The minimum size for Seedream 4.5 and 5.0 Lite is 2K, i.e. 3,686,400 pixels; neither 1024x1024 nor 1k meets it. Use 2k, or dimensions such as 2048x2048, 2560x1440 or 1440x2560. For smaller sizes, use 5.0 Pro, whose minimum is 921,600 pixels (1280x720) and which also supports 1k.

How do I edit images with Seedream? Why does input_images have no effect?

The Seedream reference image field is image (an array; each item is an image URL or base64 starting with data:image), not input_images, which is a Qwen-Image field. Also, Seedream does not support /v1/images/edits; editing uses /v1/images/generations as well.

How do I generate several images at once with Seedream image sets?

Pass sequential_image_generation: "auto" and sequential_image_generation_options.max_images. auto means the model decides how many images to generate and max_images is the upper limit; stating "generate N separate images" in the prompt is more reliable. Supported by 5.0 Lite and 4.5, not by 5.0 Pro.

Why does passing n to Seedream 5.0 Pro return sequential_image_generation is not supported?

5.0 Pro cannot generate several images at once, and both n and the image set parameters return this error. Remove n; for multiple images, send several requests concurrently.

Do Seedream images have a watermark?

In our tests, calls through OfoxAI have no watermark by default; no extra parameter is needed.

Can Seedream output PNG?

No, the output is always JPEG. Sending output_format returns 400; just remove the parameter.

Why is the aspect ratio not fixed when I pass size 2k to Seedream?

1k, 2k and 4k set only the resolution; the model chooses the aspect ratio based on the prompt. For a fixed ratio, pass exact dimensions such as 2560x1440.

Last updated on