Routescope APIRoutescope API
Image ModelsDoubao Seedream

Image Generation

Doubao Seedream image generation API

Doubao Seedream image generation uses /v1/images/generations. It supports text-to-image generation, reference-image generation, multi-image blending, and image-set generation.

POST
/v1/images/generations
curl -X POST "https://api.routescope.ai/v1/images/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "gpt-4o-mini",    "prompt": "The ability to describe this API gateway in plain Chinese."  }'
{
  "created": 1,
  "data": {}
}

Authorization

BearerAuth

AuthorizationBearer <token>

Model relay interface recognition. Request heading: Autoration: Bearer .

In: header

Request Body

application/json

model*string

Picture model name.

prompt*string

Inverted words. Range: 1 to 200000 characters, with a specific upper limit based on the model official interface.

n?integer

Returns the number of pictures. Creates the number of candidates. Scope: 1 to 10; specific ceilings are based on the model official interface.

Range1 <= value <= 10
size?string

Generates dimensions, such as FD_PROTEC_0.

quality?string

Generates a quality slot.

style?string

Generates style.

response_format?string

Picture returns format, e. g. FD_PROTEC_0 or FD_PROTEC_1__.

user?string

End-user identification.

Response Body

application/json

Model Selection

Model IDTypical Use
doubao-seedream-3-0-t2i-250415Chinese/English text-to-image generation, general illustration, product images, poster drafts, and concept visuals.
doubao-seedream-4-0-250828High-quality text-to-image generation, reference-image generation, multi-image blending, and image-set generation.
doubao-seedream-4-5-251128High-quality reference-image generation, multi-image blending, and high-consistency image generation.
doubao-seedream-5-0-260128High-quality reference-image generation, multi-image blending, and complex visual generation.
doubao-seedream-5-0-lite-260128Lightweight generation, low latency, and batch sketch iteration.

Common Parameters

FieldTypeRequiredDefaultDescription
modelstringYesNoneSeedream model ID.
promptstringYesNoneGeneration prompt. Clearly describe subject, scene, composition, text, style, and expected output.
imagestring or string[]NoNoneReference image URL or Base64. Recommended maximum is 14 images, with reference and generated images totaling no more than 15. Seedream 3.0 does not support this.
sizestringNoSee differencesOutput size.
response_formatstringNourlResponse format, supporting url or b64_json.
watermarkbooleanNotrueWhether to add an AI-generated watermark.
sequential_image_generationstringNodisabledImage-set mode. Supports disabled or auto. Seedream 3.0 does not support this.
sequential_image_generation_options.max_imagesintegerNo1Maximum image-set output count, from 1 to 15.
streambooleanNofalseWhether to enable streaming output.
userstringNoNoneEnd-user identifier.

Model-Specific Parameters

FieldApplicable ModelsDefault / RangeDescription
ndoubao-seedream-3-0-t2i-250415Default 1; gateway common range 1 to 10; actual upstream limits applyListed only for Seedream 3.0.
guidance_scaledoubao-seedream-3-0-t2i-250415Default 2.5, range 1 to 10Supported by Seedream 3.0. Do not send it to 4.0 or later.
sizedoubao-seedream-3-0-t2i-250415Default 1024x1024Format such as 1024x1024.
sizeSeedream 4.0 / 4.5 / 5.0 / 5.0 LiteDefault 2KSupports 1K, 2K, 4K, or <width>x<height>. Recommended aspect ratio is 1:16 to 16:1.
streamSeedream 3.0 / 4.0 / 4.5 / 5.0Default falseSeedream 5.0 Lite does not list stream.

Example Code

curl https://api.routescope.ai/v1/images/generations \
  -H "Authorization: Bearer $ROUTESCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-5-0-260128",
    "prompt": "Generate three consistent SaaS homepage hero illustrations, blue-purple gradient, glassmorphism",
    "size": "2K",
    "sequential_image_generation": "auto",
    "sequential_image_generation_options": { "max_images": 3 },
    "response_format": "url"
  }'
import requests

response = requests.post(
    "https://api.routescope.ai/v1/images/generations",
    headers={"Authorization": "Bearer YOUR_ROUTESCOPE_API_KEY"},
    json={
        "model": "doubao-seedream-5-0-260128",
        "prompt": "Generate three consistent SaaS homepage hero illustrations, blue-purple gradient, glassmorphism",
        "size": "2K",
        "sequential_image_generation": "auto",
        "sequential_image_generation_options": {"max_images": 3},
        "response_format": "url",
    },
)
print(response.json())

Response Example

{
  "created": 1777432320,
  "data": [
    {
      "url": "https://api.routescope.ai/assets/images/seedream-5-0.png",
      "b64_json": null,
      "revised_prompt": "Three consistent SaaS homepage hero illustrations, blue-purple gradient, glassmorphism."
    }
  ]
}

Notes

  • Billing follows the model and channel ratios configured in the Routescope backend.
  • guidance_scale is not recommended for Seedream 4.0 or later.
  • Larger size values and more batch outputs increase latency and cost.

How is this guide?

Last updated on