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

Model IDs (copy them exactly)
5.5volcengine/doubao-seedream-5.5
5.0 Flashvolcengine/doubao-seedream-5.0-flash
5.0 Provolcengine/doubao-seedream-5.0-pro

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.ai/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 5.0 Pro example saves a JPEG. On 5.0 Flash and 5.5, set output_format to png or jpeg. For a transparent PNG on 5.5, use background: "transparent" and output_format: "png". Set response_format to url to receive an image link.

Download a Seedream 5.5 image

Terminal
IMAGE_URL=$(curl -fsS https://api.ofox.ai/v1/images/generations \ --max-time 600 \ -H "Authorization: Bearer $OFOX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "volcengine/doubao-seedream-5.5", "prompt": "One red apple on a plain white background.", "size": "1K", "response_format": "url" }' | jq -er '.data[0].url') && curl -fsSL --max-time 60 --proto '=https' --proto-redir '=https' "$IMAGE_URL" -o seedream.png
Red apple on a white background
Seedream 5.5 output from the request above.

Response excerpt. The temporary URL is shown as a placeholder. In the test, downloading the returned URL produced a PNG.

{ "model": "volcengine/doubao-seedream-5.5", "data": [ { "url": "https://images.example.com/seedream.png" } ], "usage": { "generated_images": 1 } }

Save a transparent Seedream 5.5 PNG

Terminal
set -o pipefail curl -fsS https://api.ofox.ai/v1/images/generations \ --max-time 600 \ -H "Authorization: Bearer $OFOX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "volcengine/doubao-seedream-5.5", "prompt": "One solid red circle centered on a fully transparent background. No other elements.", "size": "1K", "output_format": "png", "background": "transparent" }' | jq -er '.data[0].b64_json' | base64 --decode > seedream-transparent.png
Red circle on a transparent background
Seedream 5.5 PNG. The checkerboard shows through the transparent pixels.

Response excerpt with the Base64 payload omitted. The decoded PNG was 1024×1024, with an alpha channel and pixels with alpha 0.

{ "model": "volcengine/doubao-seedream-5.5", "data": [ { "b64_json": "BASE64_PNG_OMITTED" } ], "usage": { "generated_images": 1 } }

Size (size)

5.5 and 5.0 Flash accept the 1K, 1.5K, and 2K presets. On 5.0 Pro, the 1k and 2k presets set the resolution. Use exact dimensions such as 2560x1440 to specify the aspect ratio on 5.0 Pro. In tests, 5.0 Pro required at least 921,600 pixels.

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.ai/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.

Multiple images

Send a separate request for each desired image. On 5.0 Pro, remove n and sequential_image_generation if the request is rejected.

Watermarks

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

Latency

Set the client timeout to 300 seconds or more for image generation.

Common errors

Key pointSize errors are the most common; check the pixel count in the error message first.
Error message (excerpt)CauseFix
image area must be at least 921600 pixelsSize below 1280×720 on 5.0 ProIncrease the size
must be 'WIDTHxHEIGHT' or a supported size preset4k sent to 5.0 ProUse 2k or exact dimensions
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
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 are not valid: image area must be at least 921600 pixels. The parameter `size` specified in the request are not valid: must be 'WIDTHxHEIGHT' or a supported size preset. The parameter `sequential_image_generation` specified in the request are not valid: the parameter `sequential_image_generation` 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 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?

Send a separate request for each desired image. On 5.0 Pro, remove n and sequential_image_generation if the request is rejected.

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?

On 5.0 Flash and 5.5, set output_format to png or jpeg. For a transparent PNG on 5.5, use background: "transparent" and output_format: "png".

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

5.5 and 5.0 Flash accept the 1K, 1.5K, and 2K presets. On 5.0 Pro, the 1k and 2k presets set the resolution. Use exact dimensions such as 2560x1440 to specify the aspect ratio on 5.0 Pro. In tests, 5.0 Pro required at least 921,600 pixels.

Last updated on