OmwAIOmwAI
API GuideAPI ReferenceProgramming Tools
Seedream Image

Image Generation (Sync)

Seedream synchronous text-to-image and image-to-image API

Text to Image

This page covers the Doubao plugin's synchronous OpenAI Images API. For submit-and-poll usage see Image Generation (Async) and Query Result in this section; the separate async adaptor supports different models and parameters. The completed images are returned in data; no asynchronous task polling is required.

Supported models

  • doubao-seedream-5-0-pro-260628
  • doubao-seedream-5-0-flash-260915
  • doubao-seedream-5-0-lite-260128
  • doubao-seedream-5-0-260128
  • doubao-seedream-4-5-251128
  • doubao-seedream-4-0-250828
ModelPresetsCustom pixel areaSequentialLayersOutput formatToolsFast prompt
Seedream 5.0 Pro1K, 1.5K, 2K921600–4624220NoYespng, jpegNoYes
Seedream 5.0 Flash1K, 1.5K, 2K921600–4624220NoYespng, jpegNoNo
Seedream 5.0 Lite / 5.02K, 3K, 4K3686400–16777216YesNopng, jpegYesNo
Seedream 4.52K, 4K3686400–16777216YesNoNoNoNo
Seedream 4.01K, 2K, 4K921600–16777216YesNoNoNoYes

Custom dimensions are widthxheight (also X, ×, *), with positive integer sides and aspect ratio from 1:16 to 16:1. Presets are case-insensitive. Omitted size is estimated as 2K but not inserted into the upstream request; the actual output depends on the provider. auto is only valid for layer decomposition on the edit endpoint.

JSON parameters

FieldValues and restrictions
modelRequired. One of the six registered models above, subject to channel configuration.
promptRequired nonempty string.
sizeA preset from this model's row, or dimensions within its pixel and aspect-ratio limits.
nOnly 1; not used for multiple outputs.
sequential_image_generationauto or disabled, only on models with sequential support.
sequential_image_generation_options.max_imagesInteger 1–15; maximum requested, not a guaranteed output count.
seed / guidance_scaleInteger / finite number; upstream may apply further limits.
watermark / optimize_promptBoolean flags.
optimize_prompt_options.modestandard or fast; fast only for 5.0 Pro and 4.0. The options object can also be null.
output_formatpng or jpeg, only for 5.0-series models.
backgroundopaque or transparent. For 5.0 Pro / Flash, transparent requires exactly one reference image and cannot be combined with JPEG, so it is unavailable for text-only generation on these models. Other models forward it; upstream decides whether it works.
toolsOnly for 5.0 / 5.0 Lite: array of objects with nonempty string type; specific tool support depends on upstream.
response_formaturl or b64_json. For Base64 the gateway attempts to download and add it to URL results; downloads can fail, leaving only URLs.
streamOmit or set to false; streaming is unsupported.

layer_decomposition: true requires exactly one reference image and cannot be used here. This OpenAI Images endpoint forwards only its known fields; do not assume unknown fields reach upstream.

POST
/v1/images/generations

Authorization

BearerAuth

AuthorizationBearer <token>

使用 OmwAI API Key 认证

In: header

Request Body

application/json

model*string

Seedream 模型

Value in"doubao-seedream-5-0-pro-260628" | "doubao-seedream-5-0-flash-260915" | "doubao-seedream-5-0-lite-260128" | "doubao-seedream-5-0-260128" | "doubao-seedream-4-5-251128" | "doubao-seedream-4-0-250828"
prompt*string

图片生成提示词

Length1 <= length
size?string

模型对应预设(见页面能力表),或正整数宽x高:宽高比 1:16–16:1,像素数按模型限制;auto 仅用于图层拆分。省略时普通生成按 2K、图层拆分按 auto 预估,但不补写上游参数。

n?integer

兼容参数,Seedream 仅允许 1

Default1
Value in1
response_format?string

url 或 b64_json;后者由网关尝试下载 URL 后添加 Base64,下载失败可能仅有 URL

Default"url"
Value in"url" | "b64_json"
stream?boolean

当前接口不支持流式响应

Defaultfalse
Value infalse
seed?integer

整数,其他约束由上游决定

guidance_scale?number

有限数字,其他约束由上游决定

watermark?boolean

是否添加水印

optimize_prompt?boolean

是否优化提示词

optimize_prompt_options?|null

对象或 null;mode=standard,fast 仅 Seedream 5.0 Pro 和 4.0 支持

sequential_image_generation?string

auto(组图)或 disabled;仅 Seedream 5.0、5.0 Lite、4.5、4.0 支持。参考图加预估输出图最多 15 张。

Value in"auto" | "disabled"
sequential_image_generation_options?|null
output_format?string

上游生成格式 png/jpeg;仅 5.0 Pro、5.0 Flash、5.0 Lite、5.0 支持

Value in"png" | "jpeg"
background?string

opaque/transparent;5.0 Pro/Flash 使用 transparent 时必须有且仅有一张参考图,且不可和 jpeg 同时使用;其他模型交由上游决定

Value in"opaque" | "transparent"
tools?

仅 5.0 和 5.0 Lite:对象数组,每项 type 必须为非空字符串;具体工具类型取决于上游

[key: string]?any

Response Body

application/json

curl -X POST "https://www.omwai.xyz/v1/images/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "doubao-seedream-5-0-pro-260628",    "prompt": "一只橘猫坐在雨后的霓虹街道旁,电影感摄影",    "size": "2K",    "response_format": "url",    "watermark": false  }'
{
  "created": 0,
  "data": [
    {
      "url": "http://example.com",
      "b64_json": "string"
    }
  ]
}
Empty

Image to Image

This page covers the Doubao plugin's synchronous image-to-image endpoint POST /v1/images/edits. For async reference-image generation, use Image Generation (Async) in this section; its adaptor has different model and parameter support. Reference images may be supplied through the JSON image field as public HTTP(S) URLs or Base64 data URIs with a lowercase MIME format. Multipart requests may upload image, image[], or image[n] file fields.

Parameters and available options

The six registered models, their presets, custom pixel limits, output formats, tools and prompt optimization support are listed in the Text to Image section above.

FieldValues and restrictions
modelRequired registered Seedream model available on your channel.
imageRequired single string or array of HTTP(S) URLs or lowercase-MIME data:image/<format>;base64,... strings. Up to 10 references for 5.0 Pro / Flash, 14 for other listed models. Use file fields for multipart.
promptRequired nonempty string for ordinary edits. May be omitted only for layer decomposition; when supplied must be a string.
sizeModel-specific presets or dimensions as on the generation page. For layers: 1K, 1.5K, 2K, auto; no custom dimensions. Omission is estimated as auto.
layer_decompositionBoolean, only 5.0 Pro / Flash; true requires exactly one input image.
sequential_image_generationauto or disabled, only 5.0 / 5.0 Lite / 4.5 / 4.0; with auto, references plus generated images are estimated to total at most 15.
sequential_image_generation_options.max_imagesInteger 1–15; requested upper bound, not guaranteed output count.
n / streamOnly 1 / false, respectively.
response_formaturl or b64_json; gateway attempts to download URL images and append Base64 for the latter. Downloads may fail, leaving only URLs.
output_formatpng / jpeg, only 5.0-series models; distinct from response_format.
backgroundopaque / transparent. On 5.0 Pro / Flash, transparent requires exactly one input image and cannot be combined with JPEG; otherwise forwarded for upstream handling.
optimize_prompt_options.modestandard / fast, fast only on 5.0 Pro / 4.0; optimize_prompt is a boolean.
watermark, seed, guidance_scaleBoolean, integer, finite number respectively; upstream may impose additional limits.
toolsOnly 5.0 / 5.0 Lite; array of objects each containing a nonempty string type. Particular tool types depend on upstream.
maskUnsupported on this plugin's OpenAI Images protocol; requests are rejected.

Multipart file fields may be image, image[], or image[n], up to 30 MiB per file. Other form fields may appear only once; n, seed, and guidance_scale are parsed as numbers; stream, watermark, optimize_prompt, and layer_decomposition use true / false. Send optimize_prompt_options, sequential_image_generation_options, and tools as JSON strings. Repeat image file fields for multiple files, not ordinary fields. Results are synchronous; there is no task-query step.

POST
/v1/images/edits

Authorization

BearerAuth

AuthorizationBearer <token>

使用 OmwAI API Key 认证

In: header

model*string
Value in"doubao-seedream-5-0-pro-260628" | "doubao-seedream-5-0-flash-260915" | "doubao-seedream-5-0-lite-260128" | "doubao-seedream-5-0-260128" | "doubao-seedream-4-5-251128" | "doubao-seedream-4-0-250828"
prompt?string

普通图生图必填非空字符串;图层拆分允许省略

image*string|

必填:HTTP(S) URL 或小写 MIME 的 data:image/;base64,...;单图用字符串,多图用数组。5.0 Pro/Flash 最多 10 张,其他已列模型最多 14 张

size?string

模型对应预设(见页面能力表),或正整数宽x高:宽高比 1:16–16:1,像素数按模型限制;auto 仅用于图层拆分。省略时普通生成按 2K、图层拆分按 auto 预估,但不补写上游参数。

n?integer
Default1
Value in1
response_format?string

url 或 b64_json;后者由网关尝试下载 URL 后添加 Base64,下载失败可能仅有 URL

Default"url"
Value in"url" | "b64_json"
stream?boolean
Defaultfalse
Value infalse
seed?integer

整数,其他约束由上游决定

guidance_scale?number

有限数字,其他约束由上游决定

watermark?boolean
optimize_prompt?boolean
optimize_prompt_options?|null

对象或 null;mode=standard,fast 仅 Seedream 5.0 Pro 和 4.0 支持

sequential_image_generation?string

auto(组图)或 disabled;仅 Seedream 5.0、5.0 Lite、4.5、4.0 支持。参考图加预估输出图最多 15 张。

Value in"auto" | "disabled"
sequential_image_generation_options?|null
layer_decomposition?boolean

仅 Seedream 5.0 Pro/Flash 支持;true 时恰好 1 张参考图,size 仅 1K/1.5K/2K/auto,不能自定义宽高

output_format?string

上游生成格式 png/jpeg;仅 5.0 Pro、5.0 Flash、5.0 Lite、5.0 支持

Value in"png" | "jpeg"
background?string

opaque/transparent;5.0 Pro/Flash 使用 transparent 时必须有且仅有一张参考图,且不可和 jpeg 同时使用;其他模型交由上游决定

Value in"opaque" | "transparent"
tools?

仅 5.0 和 5.0 Lite:对象数组,每项 type 必须为非空字符串;具体工具类型取决于上游

[key: string]?any

Response Body

application/json

curl -X POST "https://www.omwai.xyz/v1/images/edits" \  -H "Content-Type: application/json" \  -d '{    "model": "doubao-seedream-5-0-pro-260628",    "prompt": "保留主体,将背景替换为日落时的海边",    "image": "https://example.com/reference.png",    "size": "2K",    "response_format": "url"  }'
{
  "created": 0,
  "data": [
    {
      "url": "http://example.com",
      "b64_json": "string"
    }
  ]
}
Empty

How is this guide?

Last updated on