Seedream 5.5 is ByteDance’s image creation and editing model. Use doubao-seedream-5-5-261028 for text-to-image, reference-image editing, transparent backgrounds and decomposition into editable layers.POST https://api.mixroute.ai/v1/images/generationsSend JSON to the image-generation endpoint with Authorization: Bearer $MIXROUTE_API_KEY and Content-Type: application/json. Parameters are top-level fields, not a metadata wrapper. Reference-image editing and layer decomposition use this same endpoint, not /v1/images/edits or Chat Completions.
On MixRoute, prompt is required for every request, including layer decomposition. Do not omit it even if an upstream example treats it as optional.
Request parameters
Field
Type
Description
model
string
Required. Use doubao-seedream-5-5-261028.
prompt
string
Required image description or decomposition instructions. Supports multiple languages, including Chinese, English, Japanese and Korean. For Chinese, no more than 300 characters is recommended, not a hard validation limit.
image
string / string[]
Optional for generation; required for decomposition. An accessible image URL or Base64 data URL, or an array of these strings. Generation accepts up to 10 reference images; decomposition accepts exactly one.
size
string
Generation: 1K, 1.5K, 2K (default), or widthxheight. Decomposition: 1K, 1.5K, 2K, auto (default); custom pixel dimensions are not supported in this mode.
output_format
string
png (default) or jpeg. For decomposition this controls the base image only; every separate layer is PNG.
background
string
Generation only: auto (default), transparent or opaque. Transparent output requires PNG. Omit this field entirely during decomposition.
response_format
string
url (default) or b64_json. Generated URLs are temporary and valid for 24 hours; save the images promptly.
watermark
boolean
Defaults to true, adding an AI-generated watermark in the lower-right corner. Set false to disable it.
safety_identifier
string
Optional end-user identifier, at most 64 characters. Prefer a hashed identifier over personal information.
layer_decomposition
boolean
Set true to decompose one input image into a base image and transparent layers. Omit or set false for ordinary generation.
layer_decomposition_options
object
Optional decomposition settings. Supply only when layer_decomposition is true.
layer_decomposition_options.max_images
integer
Integer from 2 to 100, default 30. Caps the total output count including the base image, not the layer count alone.
layer_decomposition_options.text_recognition
boolean
Set true to request rich-text OCR for regular text layers. OCR is not returned for every layer.
Images, sizes and limits
Generation returns one image per request. n does not control the output count. Streaming, sequential image generation and web search are not supported; omit stream, sequential_image_generation and search-tool fields.
Each reference image must be at most 30 MB with an aspect ratio from 1:16 to 16:1. Base64 URLs use a lowercase format name, for example data:image/png;base64,....
For generation with a resolution preset, describe the desired aspect ratio in prompt. For widthxheight, use a lowercase x, a total of 921,600-4,624,220 pixels and an aspect ratio from 1:16 to 16:1; 2880x1440 is valid. These are total-pixel limits, not per-edge limits.
Decomposition requires exactly one PNG or JPEG image with at least 262,144 total pixels (512 x 512). size: auto adapts to input dimensions and aspect ratio; do not assume every output retains its original pixel dimensions. Read each returned data[].size.
If any layer fails, the entire decomposition request fails. Asking for more outputs than max_images permits can leave requested elements out.
Request examples
Set MIXROUTE_API_KEY to your MixRoute key. Replace the example.com input URLs below with accessible images before sending requests.
Text-to-image
curl --request POST "https://api.mixroute.ai/v1/images/generations" \ --header "Authorization: Bearer $MIXROUTE_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "model": "doubao-seedream-5-5-261028", "prompt": "A lake below snowy mountains in morning mist, realistic photography, 16:9 landscape.", "size": "2K", "watermark": false}'
Multiple reference images
curl --request POST "https://api.mixroute.ai/v1/images/generations" \ --header "Authorization: Bearer $MIXROUTE_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "model": "doubao-seedream-5-5-261028", "prompt": "Replace the clothing of the person in image 1 with the outfit in image 2.", "image": [ "https://example.com/person.png", "https://example.com/outfit.png" ], "size": "1K"}'
Transparent PNG
curl --request POST "https://api.mixroute.ai/v1/images/generations" \ --header "Authorization: Bearer $MIXROUTE_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "model": "doubao-seedream-5-5-261028", "prompt": "A red ceramic mug as a clean product cutout with a transparent background.", "size": "1.5K", "output_format": "png", "background": "transparent", "response_format": "url", "watermark": false}'
Layer decomposition with OCR
curl --request POST "https://api.mixroute.ai/v1/images/generations" \ --header "Authorization: Bearer $MIXROUTE_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "model": "doubao-seedream-5-5-261028", "prompt": "Decompose the image into separate layers: title text, person, and background.", "image": "https://example.com/poster.png", "layer_decomposition": true, "layer_decomposition_options": { "max_images": 8, "text_recognition": true }, "size": "2K", "output_format": "png", "response_format": "url", "watermark": false}'
Python with the OpenAI SDK
Install the openai package and set MIXROUTE_API_KEY and SEEDREAM_IMAGE_URL. Put Seedream-specific fields and resolution values in the SDK’s extra_body; they become top-level JSON fields on the wire, not an extra_body or metadata object. Automatic retries are disabled to avoid blindly repeating generation requests.
import osfrom openai import OpenAIclient = OpenAI( base_url="https://api.mixroute.ai/v1", api_key=os.environ["MIXROUTE_API_KEY"], max_retries=0, timeout=180.0,)response = client.images.generate( model="doubao-seedream-5-5-261028", prompt="Decompose the image into separate layers: title text, person, and background.", response_format="url", extra_body={ "image": os.environ["SEEDREAM_IMAGE_URL"], "size": "auto", "layer_decomposition": True, "layer_decomposition_options": {"max_images": 8, "text_recognition": True}, "output_format": "png", "watermark": False, },)result = response.model_dump()if result.get("error"): raise RuntimeError(result["error"])images = result.get("data")if not images: raise ValueError("No output images returned")for item in images: if item.get("error") or not item.get("url"): raise ValueError("An output image is missing or failed") print(item.get("z_index"), item["url"], item.get("size"))print(result.get("usage", {}))
Response fields
Field
Description
data[].url / data[].b64_json
Output image URL or Base64 data, according to response_format.
data[].size
Actual pixel dimensions in widthxheight format. Different layers can have different dimensions.
data[].output_format
Actual png or jpeg format. Decomposed layers are always PNG.
data[].background
Actual transparency: transparent or opaque, rather than the request value auto.
data[].z_index
Decomposition only. The base image is 0; layers start at 1. Larger indexes are placed above smaller indexes.
data[].name / data[].description
Decomposition only. Model-generated layer name and description.
data[].bounding_box
Layer only; absent on the base image. absolute is [left, top, right, bottom] in base-image pixels. normalized uses the same order on a 0-1000 scale.
data[].text_recognition
Returned when OCR is requested and the layer contains regular text. Includes full text and line-level positions/styles such as approximate font, color, bold and italic attributes.
usage.input_images / usage.generated_images
Number of input images and successfully generated images. In decomposition, generated images include the base image and each separate layer.
Illustrative decomposition response excerpt with one base image and one layer:
Start with the base image (z_index: 0). For each layer, resize its pixels to (right - left) x (bottom - top) using bounding_box.absolute, position it at (left, top), and alpha-composite in increasing z_index order. The layer’s native size may differ from its placement dimensions. OCR describes text for your application to edit; it does not perform the editing itself.
Billing
Input images and successful output images are billed separately. Output tiers depend on each image’s actual width multiplied by height, not just the requested size label. The standard USD rates below match the current public pricing; account and route prices in the Model Marketplace take precedence.
Item
Standard USD per image
Input image
0.0075
Output at or below 2,610,000 pixels
0.0195
Output above 2,610,000 pixels
0.0345
Each reference image or image being decomposed is an input image. The base image and every successfully generated layer are separate output images, each using its own pixel tier. Unsuccessful outputs are not charged.
Decomposition reserves credit using max_images and settles against the actual output count, returning unused reserved credit. Use a smaller limit when balance is constrained.
Example: one input and three successful output images, all above 2,610,000 pixels, cost 0.0075 + 3 * 0.0345 = 0.111 USD at the standard rates. Mixed-size layers can fall into different tiers. Check Usage Logs for the actual charge.
Common errors
Field
Description
prompt is required
Include a nonempty prompt, including in decomposition mode.
layer_decomposition_options.max_images must be an integer between 1 and 128
Use an integer from 2 to 100. A gateway error may mention 1-128, but that is not the upstream’s supported range.
layer_decomposition must be a boolean
Use JSON booleans true or false, not strings.
stream: true
Omit stream; Seedream 5.5 does not support streaming.
output_format: jpeg + background: transparent
Use PNG for transparent generation. Omit background during decomposition.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MixRoute","colors":{"primary":"#7B1FA2","light":"#9C27B0","dark":"#7B1FA2"},"logo":{"light":"https://mintcdn.com/personal-a5418d9f/gmsYcyD3CEVDrHlx/logo/mixroute_logo_light.svg?fit=max\u0026auto=format\u0026n=gmsYcyD3CEVDrHlx\u0026q=85\u0026s=265a1a46d074895bd39b660678e01cd8","dark":"https://mintcdn.com/personal-a5418d9f/gmsYcyD3CEVDrHlx/logo/mixroute_logo_dark.svg?fit=max\u0026auto=format\u0026n=gmsYcyD3CEVDrHlx\u0026q=85\u0026s=98fd320a3e678bc64086c7d2f0dc84c1","href":"https://mixroute.ai/"},"favicon":"https://mintcdn.com/personal-a5418d9f/gmsYcyD3CEVDrHlx/mixroute.svg?fit=max\u0026auto=format\u0026n=gmsYcyD3CEVDrHlx\u0026q=85\u0026s=0f5f32b1b26993bc7cedaee3e45d2eb0","api":{"mdx":{"server":"https://api.mixroute.ai"}},"navbar":{"links":[],"primary":{"type":"button","label":"Get Started","href":"https://console.mixroute.ai"}},"footer":{"socials":{}},"seo":{"metatags":{"canonical":"https://mixroute.ai/docs"}},"integrations":{"gtm":{"tagId":"GTM-W54W5KHJ"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"introduction"},{"language":"zh-Hans","href":"zh-Hans/introduction"},{"language":"zh-Hant","href":"zh-Hant/introduction"},{"language":"ja","href":"ja/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"personal-a5418d9f","hasAudioNarration":false,"actualSubdomain":"personal-a5418d9f","customDomains":["mixroute.ai"],"gitSource":{"type":"github","owner":"cherish-cherry","repo":"mixroute-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":false},"entitlements":{},"buildId":"6afa7d41f20ad22eaaee0a07","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"en","tag":"Home","count":263},{"language":"ja","tag":"ホーム","count":263},{"language":"zh-Hans","tag":"首页","count":263},{"language":"zh-Hant","tag":"首頁","count":263},{"language":"en","tag":"Model Introduction","count":245},{"language":"ja","tag":"モデル紹介","count":245},{"language":"zh-Hans","tag":"模型介绍","count":245},{"language":"zh-Hant","tag":"模型介紹","count":245},{"language":"en","tag":"OpenAI","count":58},{"language":"ja","tag":"OpenAI","count":58},{"language":"zh-Hans","tag":"OpenAI","count":58},{"language":"zh-Hant","tag":"OpenAI","count":58},{"language":"en","tag":"API Reference","count":44},{"language":"ja","tag":"APIリファレンス","count":44},{"language":"zh-Hans","tag":"API 手册","count":44},{"language":"zh-Hant","tag":"API 手冊","count":44},{"language":"en","tag":"Google","count":36},{"language":"ja","tag":"Google","count":36},{"language":"zh-Hans","tag":"Google","count":36},{"language":"zh-Hant","tag":"Google","count":36},{"language":"en","tag":"Alibaba","count":26},{"language":"ja","tag":"Alibaba","count":26},{"language":"zh-Hans","tag":"Alibaba","count":26},{"language":"zh-Hant","tag":"Alibaba","count":26},{"language":"en","tag":"Zhipu","count":24},{"language":"ja","tag":"Zhipu","count":24},{"language":"zh-Hans","tag":"Zhipu","count":24},{"language":"zh-Hant","tag":"Zhipu","count":24},{"language":"en","tag":"xAI","count":20},{"language":"ja","tag":"xAI","count":20},{"language":"zh-Hans","tag":"xAI","count":20},{"language":"zh-Hant","tag":"xAI","count":20},{"language":"en","tag":"Integrations","count":18},{"language":"ja","tag":"連携","count":18},{"language":"zh-Hans","tag":"开发工具 \u0026 平台","count":18},{"language":"zh-Hant","tag":"開發工具 \u0026 平台","count":18},{"language":"en","tag":"Anthropic","count":16},{"language":"ja","tag":"Anthropic","count":16},{"language":"zh-Hans","tag":"Anthropic","count":16},{"language":"zh-Hant","tag":"Anthropic","count":16}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"header img,#navbar img,[class*=\"logo\"] img,[class*=\"Logo\"] img,a[href=\"/\"] img,a[href=\"/cn\"] img,a[href=\"/en\"] img,a[href=\"/zh-Hant\"] img{max-height:32px!important;height:32px!important;width:auto!important}.card,[class*=\"Card\"]{position:relative!important;background-color:#f5f5f7!important;border:none!important;overflow:visible!important}.card::before,[class*=\"Card\"]::before{content:\"\";position:absolute;inset:-2px;border-radius:14px;z-index:-1;padding:2px;background:linear-gradient(135deg, #ff8a65 0%, #e91e63 35%, #9c27b0 70%, #673ab7 100%);-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}html.dark .card,html.dark [class*=\"Card\"],.dark .card,.dark [class*=\"Card\"],[data-theme=\"dark\"] .card,[data-theme=\"dark\"] [class*=\"Card\"]{background-color:#2d2d2d!important;color:#e5e5e5}html.dark .card::before,html.dark [class*=\"Card\"]::before,.dark .card::before,.dark [class*=\"Card\"]::before,[data-theme=\"dark\"] .card::before,[data-theme=\"dark\"] [class*=\"Card\"]::before{background:linear-gradient(135deg, #ff9a56 0%, #ff6b9d 35%, #c44dff 70%, #6b7aff 100%)}html.dark .card a,html.dark [class*=\"Card\"] a,.dark .card a,.dark [class*=\"Card\"] a,[data-theme=\"dark\"] .card a,[data-theme=\"dark\"] [class*=\"Card\"] a{color:#a78bfa}html.dark #content img[src=\"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/openai.svg\"],html.dark #content img[src=\"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/grok.svg\"]{filter:invert(1)}"}],"page":{"pagePath":"api-reference/endpoint/seedream","slug":"/api-reference/endpoint/seedream","pageMetadata":{"title":"Seedream 5.5","sidebarTitle":"Seedream 5.5","description":"Seedream 5.5 image generation, reference-image editing, transparent PNGs and layer decomposition through MixRoute.","api":"POST /v1/images/generations","playground":"none","og:title":"Seedream 5.5 API Reference - MixRoute","href":"/api-reference/endpoint/seedream"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Seedream 5.5 image generation, reference-image editing, transparent PNGs and layer decomposition through MixRoute.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Seedream 5.5 is ByteDance’s image creation and editing model. Use `,_jsx(_components.code,{children:`doubao-seedream-5-5-261028`}),` for text-to-image, reference-image editing, transparent backgrounds and decomposition into editable layers.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`POST https://api.mixroute.ai/v1/images/generations`})}),`\n`,_jsxs(_components.p,{children:[`Send JSON to the image-generation endpoint with `,_jsx(_components.code,{children:`Authorization: Bearer $MIXROUTE_API_KEY`}),` and `,_jsx(_components.code,{children:`Content-Type: application/json`}),`. Parameters are top-level fields, not a `,_jsx(_components.code,{children:`metadata`}),` wrapper. Reference-image editing and layer decomposition use this same endpoint, not `,_jsx(_components.code,{children:`/v1/images/edits`}),` or Chat Completions.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`On MixRoute, `,_jsx(_components.code,{children:`prompt`}),` is required for every request, including layer decomposition. Do not omit it even if an upstream example treats it as optional.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-parameters`,children:`Request parameters`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`model`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Required. Use `,_jsx(_components.code,{children:`doubao-seedream-5-5-261028`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`prompt`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Required image description or decomposition instructions. Supports multiple languages, including Chinese, English, Japanese and Korean. For Chinese, no more than 300 characters is recommended, not a hard validation limit.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`image`})}),_jsx(_components.td,{children:`string / string[]`}),_jsx(_components.td,{children:`Optional for generation; required for decomposition. An accessible image URL or Base64 data URL, or an array of these strings. Generation accepts up to 10 reference images; decomposition accepts exactly one.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`size`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Generation: `,_jsx(_components.code,{children:`1K`}),`, `,_jsx(_components.code,{children:`1.5K`}),`, `,_jsx(_components.code,{children:`2K`}),` (default), or `,_jsx(_components.code,{children:`widthxheight`}),`. Decomposition: `,_jsx(_components.code,{children:`1K`}),`, `,_jsx(_components.code,{children:`1.5K`}),`, `,_jsx(_components.code,{children:`2K`}),`, `,_jsx(_components.code,{children:`auto`}),` (default); custom pixel dimensions are not supported in this mode.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`output_format`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`png`}),` (default) or `,_jsx(_components.code,{children:`jpeg`}),`. For decomposition this controls the base image only; every separate layer is PNG.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`background`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Generation only: `,_jsx(_components.code,{children:`auto`}),` (default), `,_jsx(_components.code,{children:`transparent`}),` or `,_jsx(_components.code,{children:`opaque`}),`. Transparent output requires PNG. Omit this field entirely during decomposition.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`response_format`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`url`}),` (default) or `,_jsx(_components.code,{children:`b64_json`}),`. Generated URLs are temporary and valid for 24 hours; save the images promptly.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`watermark`})}),_jsx(_components.td,{children:`boolean`}),_jsxs(_components.td,{children:[`Defaults to `,_jsx(_components.code,{children:`true`}),`, adding an AI-generated watermark in the lower-right corner. Set `,_jsx(_components.code,{children:`false`}),` to disable it.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`safety_identifier`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Optional end-user identifier, at most 64 characters. Prefer a hashed identifier over personal information.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`layer_decomposition`})}),_jsx(_components.td,{children:`boolean`}),_jsxs(_components.td,{children:[`Set `,_jsx(_components.code,{children:`true`}),` to decompose one input image into a base image and transparent layers. Omit or set `,_jsx(_components.code,{children:`false`}),` for ordinary generation.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`layer_decomposition_options`})}),_jsx(_components.td,{children:`object`}),_jsxs(_components.td,{children:[`Optional decomposition settings. Supply only when `,_jsx(_components.code,{children:`layer_decomposition`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`layer_decomposition_options.max_images`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Integer from 2 to 100, default 30. Caps the total output count including the base image, not the layer count alone.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`layer_decomposition_options.text_recognition`})}),_jsx(_components.td,{children:`boolean`}),_jsxs(_components.td,{children:[`Set `,_jsx(_components.code,{children:`true`}),` to request rich-text OCR for regular text layers. OCR is not returned for every layer.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`images-sizes-and-limits`,children:`Images, sizes and limits`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Generation returns one image per request. `,_jsx(_components.code,{children:`n`}),` does not control the output count. Streaming, sequential image generation and web search are not supported; omit `,_jsx(_components.code,{children:`stream`}),`, `,_jsx(_components.code,{children:`sequential_image_generation`}),` and search-tool fields.`]}),`\n`,_jsxs(_components.li,{children:[`Each reference image must be at most 30 MB with an aspect ratio from 1:16 to 16:1. Base64 URLs use a lowercase format name, for example `,_jsx(_components.code,{children:`data:image/png;base64,...`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`For generation with a resolution preset, describe the desired aspect ratio in `,_jsx(_components.code,{children:`prompt`}),`. For `,_jsx(_components.code,{children:`widthxheight`}),`, use a lowercase `,_jsx(_components.code,{children:`x`}),`, a total of 921,600-4,624,220 pixels and an aspect ratio from 1:16 to 16:1; `,_jsx(_components.code,{children:`2880x1440`}),` is valid. These are total-pixel limits, not per-edge limits.`]}),`\n`,_jsxs(_components.li,{children:[`Decomposition requires exactly one PNG or JPEG image with at least 262,144 total pixels (512 x 512). `,_jsx(_components.code,{children:`size: auto`}),` adapts to input dimensions and aspect ratio; do not assume every output retains its original pixel dimensions. Read each returned `,_jsx(_components.code,{children:`data[].size`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If any layer fails, the entire decomposition request fails. Asking for more outputs than `,_jsx(_components.code,{children:`max_images`}),` permits can leave requested elements out.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-examples`,children:`Request examples`}),`\n`,_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`MIXROUTE_API_KEY`}),` to your MixRoute key. Replace the `,_jsx(_components.code,{children:`example.com`}),` input URLs below with accessible images before sending requests.`]}),`\n`,_jsx(Heading,{level:`3`,id:`text-to-image`,children:`Text-to-image`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.mixroute.ai/v1/images/generations\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MIXROUTE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"doubao-seedream-5-5-261028\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"A lake below snowy mountains in morning mist, realistic photography, 16:9 landscape.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\": \"2K\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"watermark\": false`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`multiple-reference-images`,children:`Multiple reference images`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.mixroute.ai/v1/images/generations\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MIXROUTE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"doubao-seedream-5-5-261028\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"Replace the clothing of the person in image 1 with the outfit in image 2.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"image\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com/person.png\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com/outfit.png\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\": \"1K\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`transparent-png`,children:`Transparent PNG`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.mixroute.ai/v1/images/generations\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MIXROUTE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"doubao-seedream-5-5-261028\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"A red ceramic mug as a clean product cutout with a transparent background.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\": \"1.5K\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"output_format\": \"png\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"background\": \"transparent\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"response_format\": \"url\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"watermark\": false`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`layer-decomposition-with-ocr`,children:`Layer decomposition with OCR`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.mixroute.ai/v1/images/generations\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MIXROUTE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"doubao-seedream-5-5-261028\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"Decompose the image into separate layers: title text, person, and background.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"image\": \"https://example.com/poster.png\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"layer_decomposition\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"layer_decomposition_options\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"max_images\": 8,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text_recognition\": true`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\": \"2K\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"output_format\": \"png\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"response_format\": \"url\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"watermark\": false`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`python-with-the-openai-sdk`,children:`Python with the OpenAI SDK`}),`\n`,_jsxs(_components.p,{children:[`Install the `,_jsx(_components.code,{children:`openai`}),` package and set `,_jsx(_components.code,{children:`MIXROUTE_API_KEY`}),` and `,_jsx(_components.code,{children:`SEEDREAM_IMAGE_URL`}),`. Put Seedream-specific fields and resolution values in the SDK’s `,_jsx(_components.code,{children:`extra_body`}),`; they become top-level JSON fields on the wire, not an `,_jsx(_components.code,{children:`extra_body`}),` or `,_jsx(_components.code,{children:`metadata`}),` object. Automatic retries are disabled to avoid blindly repeating generation requests.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`33`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`33`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.mixroute.ai/v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MIXROUTE_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` max_retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`180.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.images.generate(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"doubao-seedream-5-5-261028\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` prompt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Decompose the image into separate layers: title text, person, and background.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` response_format`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` extra_body`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SEEDREAM_IMAGE_URL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"layer_decomposition\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"layer_decomposition_options\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"max_images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text_recognition\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"output_format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"watermark\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.model_dump()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` RuntimeError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`images `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` images:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"No output images returned\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` item `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` images:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` item.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`or`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` item.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"An output image is missing or failed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(item.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"z_index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), item[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], item.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"size\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {}))`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data[].url / data[].b64_json`})}),_jsxs(_components.td,{children:[`Output image URL or Base64 data, according to `,_jsx(_components.code,{children:`response_format`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data[].size`})}),_jsxs(_components.td,{children:[`Actual pixel dimensions in `,_jsx(_components.code,{children:`widthxheight`}),` format. Different layers can have different dimensions.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data[].output_format`})}),_jsxs(_components.td,{children:[`Actual `,_jsx(_components.code,{children:`png`}),` or `,_jsx(_components.code,{children:`jpeg`}),` format. Decomposed layers are always PNG.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data[].background`})}),_jsxs(_components.td,{children:[`Actual transparency: `,_jsx(_components.code,{children:`transparent`}),` or `,_jsx(_components.code,{children:`opaque`}),`, rather than the request value `,_jsx(_components.code,{children:`auto`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data[].z_index`})}),_jsx(_components.td,{children:`Decomposition only. The base image is 0; layers start at 1. Larger indexes are placed above smaller indexes.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data[].name / data[].description`})}),_jsx(_components.td,{children:`Decomposition only. Model-generated layer name and description.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data[].bounding_box`})}),_jsxs(_components.td,{children:[`Layer only; absent on the base image. `,_jsx(_components.code,{children:`absolute`}),` is `,_jsx(_components.code,{children:`[left, top, right, bottom]`}),` in base-image pixels. `,_jsx(_components.code,{children:`normalized`}),` uses the same order on a 0-1000 scale.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data[].text_recognition`})}),_jsx(_components.td,{children:`Returned when OCR is requested and the layer contains regular text. Includes full text and line-level positions/styles such as approximate font, color, bold and italic attributes.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`usage.input_images / usage.generated_images`})}),_jsx(_components.td,{children:`Number of input images and successfully generated images. In decomposition, generated images include the base image and each separate layer.`})]})]})]}),`\n`,_jsx(_components.p,{children:`Illustrative decomposition response excerpt with one base image and one layer:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`38`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`38`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/base.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"size\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2048x2048\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output_format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"z_index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"background\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"opaque\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/person-layer.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"size\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1647x2546\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output_format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"z_index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"bounding_box\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"absolute\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 474`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 372`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1544`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2048`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"normalized\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 231`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 182`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 754`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Person\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The person standing in the center.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"background\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"transparent\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"generated_images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`reconstruct-the-image`,children:`Reconstruct the image`}),`\n`,_jsxs(_components.p,{children:[`Start with the base image (`,_jsx(_components.code,{children:`z_index: 0`}),`). For each layer, resize its pixels to `,_jsx(_components.code,{children:`(right - left) x (bottom - top)`}),` using `,_jsx(_components.code,{children:`bounding_box.absolute`}),`, position it at `,_jsx(_components.code,{children:`(left, top)`}),`, and alpha-composite in increasing `,_jsx(_components.code,{children:`z_index`}),` order. The layer’s native `,_jsx(_components.code,{children:`size`}),` may differ from its placement dimensions. OCR describes text for your application to edit; it does not perform the editing itself.`]}),`\n`,_jsx(Heading,{level:`2`,id:`billing`,children:`Billing`}),`\n`,_jsxs(_components.p,{children:[`Input images and successful output images are billed separately. Output tiers depend on each image’s actual width multiplied by height, not just the requested size label. The standard USD rates below match the current public pricing; account and route prices in the `,_jsx(_components.a,{href:`https://console.mixroute.ai/models`,children:`Model Marketplace`}),` take precedence.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Item`}),_jsx(_components.th,{children:`Standard USD per image`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Input image`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`0.0075`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Output at or below 2,610,000 pixels`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`0.0195`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Output above 2,610,000 pixels`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`0.0345`})]})]})]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Each reference image or image being decomposed is an input image. The base image and every successfully generated layer are separate output images, each using its own pixel tier. Unsuccessful outputs are not charged.`}),`\n`,_jsxs(_components.li,{children:[`Decomposition reserves credit using `,_jsx(_components.code,{children:`max_images`}),` and settles against the actual output count, returning unused reserved credit. Use a smaller limit when balance is constrained.`]}),`\n`,_jsxs(_components.li,{children:[`Example: one input and three successful output images, all above 2,610,000 pixels, cost `,_jsx(_components.code,{children:`0.0075 + 3 * 0.0345 = 0.111`}),` USD at the standard rates. Mixed-size layers can fall into different tiers. Check Usage Logs for the actual charge.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`common-errors`,children:`Common errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`prompt is required`})}),_jsxs(_components.td,{children:[`Include a nonempty `,_jsx(_components.code,{children:`prompt`}),`, including in decomposition mode.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`layer_decomposition_options.max_images must be an integer between 1 and 128`})}),_jsx(_components.td,{children:`Use an integer from 2 to 100. A gateway error may mention 1-128, but that is not the upstream’s supported range.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`layer_decomposition must be a boolean`})}),_jsxs(_components.td,{children:[`Use JSON booleans `,_jsx(_components.code,{children:`true`}),` or `,_jsx(_components.code,{children:`false`}),`, not strings.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`stream: true`})}),_jsxs(_components.td,{children:[`Omit `,_jsx(_components.code,{children:`stream`}),`; Seedream 5.5 does not support streaming.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`output_format: jpeg + background: transparent`})}),_jsxs(_components.td,{children:[`Use PNG for transparent generation. Omit `,_jsx(_components.code,{children:`background`}),` during decomposition.`]})]})]})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.a,{href:`/model-api/bytedance/doubao-seedream-5-5`,children:`Model introduction`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Seedream 5.5","sidebarTitle":"Seedream 5.5","description":"Seedream 5.5 image generation, reference-image editing, transparent PNGs and layer decomposition through MixRoute.","api":"POST /v1/images/generations","playground":"none","og:title":"Seedream 5.5 API Reference - MixRoute","href":"/api-reference/endpoint/seedream"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request parameters","slug":"request-parameters","depth":2,"children":[]},{"title":"Images, sizes and limits","slug":"images-sizes-and-limits","depth":2,"children":[]},{"title":"Request examples","slug":"request-examples","depth":2,"children":[{"title":"Text-to-image","slug":"text-to-image","depth":3,"children":[]},{"title":"Multiple reference images","slug":"multiple-reference-images","depth":3,"children":[]},{"title":"Transparent PNG","slug":"transparent-png","depth":3,"children":[]},{"title":"Layer decomposition with OCR","slug":"layer-decomposition-with-ocr","depth":3,"children":[]}]},{"title":"Python with the OpenAI SDK","slug":"python-with-the-openai-sdk","depth":2,"children":[]},{"title":"Response fields","slug":"response-fields","depth":2,"children":[]},{"title":"Reconstruct the image","slug":"reconstruct-the-image","depth":2,"children":[]},{"title":"Billing","slug":"billing","depth":2,"children":[]},{"title":"Common errors","slug":"common-errors","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Seedream 5.5","path":"/v1/images/generations","servers":[{"url":"https://api.mixroute.ai"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"personal-a5418d9f","siteName":"MixRoute","title":"Seedream 5.5 API Reference - MixRoute","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/endpoint/seedream","matchLevel":0},"zh-Hans":{"href":"/zh-Hans/api-reference/endpoint/seedream","matchLevel":1},"zh-Hant":{"href":"/zh-Hant/api-reference/endpoint/seedream","matchLevel":1},"ja":{"href":"/ja/api-reference/endpoint/seedream","matchLevel":1}}},"lastModified":"2026-11-16T03:49:25.747Z","originalFileLocation":"api-reference/endpoint/seedream.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Seedream 5.5 image generation, reference-image editing, transparent PNGs and layer decomposition through MixRoute.\">\u003cmeta data-mint-head name=\"application-name\" content=\"MixRoute\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Seedream 5.5 API Reference - MixRoute\">\u003cmeta data-mint-head property=\"og:description\" content=\"Seedream 5.5 image generation, reference-image editing, transparent PNGs and layer decomposition through MixRoute.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MixRoute\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://mixroute.ai/docs/api-reference/endpoint/seedream\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://personal-a5418d9f.mintlify.site/docs/_mintlify/api/og/v2?division=Image+Series\u0026amp;title=Seedream+5.5\u0026amp;description=Seedream+5.5+image+generation%2C+reference-image+editing%2C+transparent+PNGs+and+layer+decomposition+through+MixRoute.\u0026amp;theme=4006ee24882b0e4bcca4d898\u0026amp;signature=1e64b702feaa6a05f07f99509181aa5711006467d12c4e59544cc71eda0d7b20\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Seedream 5.5 API Reference - MixRoute\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Seedream 5.5 image generation, reference-image editing, transparent PNGs and layer decomposition through MixRoute.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://personal-a5418d9f.mintlify.site/docs/_mintlify/api/og/v2?division=Image+Series\u0026amp;title=Seedream+5.5\u0026amp;description=Seedream+5.5+image+generation%2C+reference-image+editing%2C+transparent+PNGs+and+layer+decomposition+through+MixRoute.\u0026amp;theme=4006ee24882b0e4bcca4d898\u0026amp;signature=1e64b702feaa6a05f07f99509181aa5711006467d12c4e59544cc71eda0d7b20\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MixRoute\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7B1FA2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://mixroute.ai/docs/api-reference/endpoint/seedream\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/endpoint/seedream.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://mixroute.ai/docs/api-reference/endpoint/seedream\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://mixroute.ai/docs/zh-Hans/api-reference/endpoint/seedream\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://mixroute.ai/docs/zh-Hant/api-reference/endpoint/seedream\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://mixroute.ai/docs/ja/api-reference/endpoint/seedream\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://mixroute.ai/docs/api-reference/endpoint/seedream\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://mixroute.ai/#organization\",\"name\":\"MixRoute\",\"url\":\"https://mixroute.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/personal-a5418d9f/gmsYcyD3CEVDrHlx/logo/mixroute_logo_light.svg?fit=max\u0026auto=format\u0026n=gmsYcyD3CEVDrHlx\u0026q=85\u0026s=265a1a46d074895bd39b660678e01cd8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://mixroute.ai/docs#website\",\"name\":\"MixRoute\",\"url\":\"https://mixroute.ai/docs\",\"publisher\":{\"@id\":\"https://mixroute.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://mixroute.ai/docs/api-reference/endpoint/seedream#webpage\",\"url\":\"https://mixroute.ai/docs/api-reference/endpoint/seedream\",\"name\":\"Seedream 5.5\",\"description\":\"Seedream 5.5 image generation, reference-image editing, transparent PNGs and layer decomposition through MixRoute.\",\"dateModified\":\"2026-11-16T03:49:25.747Z\",\"isPartOf\":{\"@id\":\"https://mixroute.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://mixroute.ai/docs/api-reference/endpoint/seedream#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://mixroute.ai/docs/api-reference/endpoint/seedream#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Image Series\",\"item\":\"https://mixroute.ai/docs/api-reference/endpoint/image-generation\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Seedream 5.5\",\"item\":\"https://mixroute.ai/docs/api-reference/endpoint/seedream\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://mixroute.ai/docs/api-reference/endpoint/seedream#apireference\",\"headline\":\"Seedream 5.5\",\"name\":\"Seedream 5.5\",\"description\":\"Seedream 5.5 image generation, reference-image editing, transparent PNGs and layer decomposition through MixRoute.\",\"url\":\"https://mixroute.ai/docs/api-reference/endpoint/seedream\",\"mainEntityOfPage\":{\"@id\":\"https://mixroute.ai/docs/api-reference/endpoint/seedream#webpage\"},\"dateModified\":\"2026-11-16T03:49:25.747Z\",\"publisher\":{\"@id\":\"https://mixroute.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://mixroute.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"MixRoute\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"MixRoute\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/endpoint/seedream.md","siteName":"MixRoute","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Popular Models","pages":[{"title":"Popular Models","href":"/api-reference/models"}]},{"group":"OpenAI SDK Usage","pages":[{"title":"OpenAI SDK Usage","href":"/api-reference/openai-sdk"}]},{"group":"System API","icon":"server","pages":[{"title":"Authentication and Quota","sidebarTitle":"Authentication and Quota","icon":{"name":"shield-keyhole","library":"lucide"},"href":"/api-reference/system-api/authentication-and-quota"},{"title":"API Key Management","sidebarTitle":"API Key Management","icon":{"name":"key","library":"lucide"},"href":"/api-reference/system-api/api-key-management"},{"title":"Smart Routing API","sidebarTitle":"Smart Routing API","icon":{"name":"route","library":"lucide"},"href":"/api-reference/system-api/smart-routing"},{"title":"Billing and Auto-Recharge","sidebarTitle":"Billing and Auto-Recharge","icon":"https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/solid/wallet.svg","href":"/api-reference/system-api/billing-and-auto-recharge"},{"title":"User Logs \u0026 Usage Statistics","icon":{"name":"book-open","library":"lucide"},"api":"GET /api/log/self","hideApiMarker":true,"href":"/api-reference/endpoint/user-logs"}]},{"group":"Text Series","pages":[{"title":"Gemini Native (Text)","api":"POST /v1beta/models/{model}:generateContent","sidebarTitle":"Gemini Text","href":"/api-reference/endpoint/gemini-native"},{"title":"Chat Completions (OpenAI)","api":"POST /v1/chat/completions","sidebarTitle":"Chat Completions","href":"/api-reference/endpoint/chat-openai"},{"title":"Create Responses Request (OpenAI)","api":"POST /v1/responses","sidebarTitle":"Responses","href":"/api-reference/endpoint/responses-openai"},{"title":"Create Messages (Claude)","api":"POST /v1/messages","sidebarTitle":"Claude Messages","href":"/api-reference/endpoint/messages"},{"title":"Count Tokens (Claude)","api":"POST /v1/messages/count_tokens","sidebarTitle":"Claude Token Count","href":"/api-reference/endpoint/count-tokens"},{"title":"Document Reranking","sidebarTitle":"Rerank","api":"POST /v1/rerank","playground":"none","hidden":false,"href":"/api-reference/endpoint/rerank"}]},{"group":"Decision Models","icon":"list-check","pages":[{"title":"Jev Decisions","sidebarTitle":"Jev Decisions","api":"POST /typesafe/v1/systemone","playground":"none","href":"/api-reference/endpoint/jev"},{"title":"OpenAI Decisions API","sidebarTitle":"OpenAI Decisions","api":"POST /v1/decisions","playground":"none","href":"/api-reference/endpoint/decisions"},{"title":"Google Decisions API","sidebarTitle":"Google Decisions","api":"POST /v1beta/decisions","playground":"none","href":"/api-reference/endpoint/google-decisions"}]},{"group":"Embedding Series","pages":[{"title":"Text Embeddings","api":"POST /v1/embeddings","sidebarTitle":"Text Embeddings","href":"/api-reference/endpoint/embeddings"},{"title":"Gemini Text Embedding (embedContent)","api":"POST /v1/models/{model}:embedContent","sidebarTitle":"Gemini Embeddings","href":"/api-reference/endpoint/gemini-embed-content"}]},{"group":"Image Series","pages":[{"title":"Image API Overview","description":"Choose a supported image model family and its generation or editing request format.","api":"POST /v1/images/generations","sidebarTitle":"Overview","hideApiMarker":true,"playground":"none","href":"/api-reference/endpoint/image-generation"},{"title":"Seedream 5.5","sidebarTitle":"Seedream 5.5","api":"POST /v1/images/generations","playground":"none","href":"/api-reference/endpoint/seedream"},{"title":"GPT Image","sidebarTitle":"GPT Image","description":"GPT Image image generation fields, model constraints, and request examples.","api":"POST /v1/images/generations","playground":"none","href":"/api-reference/endpoint/gpt-image"},{"title":"GPT Image Editing","sidebarTitle":"GPT Image Editing","api":"POST /v1/images/edits","playground":"none","href":"/api-reference/endpoint/gpt-image-edit"},{"title":"Grok Imagine","sidebarTitle":"Grok Imagine","api":"POST /v1/images/generations","playground":"none","href":"/api-reference/endpoint/grok-imagine-image"},{"title":"Grok Imagine Editing","sidebarTitle":"Grok Imagine Editing","api":"POST /v1/images/edits","playground":"none","href":"/api-reference/endpoint/grok-imagine-edit"},{"title":"Qwen Image","sidebarTitle":"Qwen Image","api":"POST /v1/images/generations","playground":"none","href":"/api-reference/endpoint/qwen-image"},{"title":"Qwen Image Editing","sidebarTitle":"Qwen Image Editing","api":"POST /v1/images/generations","playground":"none","href":"/api-reference/endpoint/qwen-image-edit"},{"title":"Gemini Native (Image)","api":"POST /v1/models/{model}:generateContent","sidebarTitle":"Gemini Images","playground":"none","href":"/api-reference/endpoint/nano-banana"},{"title":"Gemini Native (Image, Streaming)","api":"POST /v1/models/{model}:streamGenerateContent","sidebarTitle":"Gemini Image Stream","playground":"none","href":"/api-reference/endpoint/nano-banana-stream"}]},{"group":"Video Series","pages":[{"title":"Video API Overview","api":"POST /v1/video/generations","sidebarTitle":"Overview","hideApiMarker":true,"href":"/api-reference/endpoint/submit-video-task"},{"title":"Seedance","sidebarTitle":"Seedance","api":"POST /v1/video/generations","playground":"none","href":"/api-reference/endpoint/seedance"},{"title":"Doubao","sidebarTitle":"Doubao","api":"POST /v1/video/generations","playground":"none","href":"/api-reference/endpoint/doubao"},{"title":"Dreamina","sidebarTitle":"Dreamina","api":"POST /v1/video/generations","playground":"none","href":"/api-reference/endpoint/dreamina"},{"title":"Wan","sidebarTitle":"Wan","api":"POST /v1/video/generations","playground":"none","href":"/api-reference/endpoint/wan"},{"title":"Veo","api":"POST /v1/video/generations","sidebarTitle":"Veo","playground":"none","href":"/api-reference/endpoint/veo"},{"title":"MiniMax H3","sidebarTitle":"MiniMax H3","api":"POST /v1/video/generations","playground":"none","href":"/api-reference/endpoint/minimax-h3"},{"group":"Kling","icon":"film","pages":[{"title":"Kling Overview","sidebarTitle":"Overview","href":"/api-reference/endpoint/kling"},{"title":"Kling Text to Video","sidebarTitle":"Text to Video","api":"POST /kling/text-to-video/{model}","playground":"none","href":"/api-reference/endpoint/kling-text-to-video"},{"title":"Kling Image to Video","sidebarTitle":"Image to Video","api":"POST /kling/image-to-video/{model}","playground":"none","href":"/api-reference/endpoint/kling-image-to-video"},{"title":"Kling Omni Generation and Editing","sidebarTitle":"Omni Generation and Editing","api":"POST /kling/omni-video/{model}","playground":"none","href":"/api-reference/endpoint/kling-omni-video"},{"title":"Kling Motion Control","sidebarTitle":"Motion Control","api":"POST /kling/motion-control/{model}","playground":"none","href":"/api-reference/endpoint/kling-motion-control"},{"title":"Query Kling Task","sidebarTitle":"Query Kling Task","api":"GET /kling/tasks","playground":"none","href":"/api-reference/endpoint/kling-tasks"}]},{"title":"Query Video Task","api":"GET /v1/video/generations/{task_id}","href":"/api-reference/endpoint/query-video-task"},{"title":"Download Video","api":"GET /v1/video/generations/download","href":"/api-reference/endpoint/download-video"}]},{"group":"Others","pages":[{"title":"List Models","api":"GET /v1/models","href":"/api-reference/endpoint/list-models"},{"title":"Gemini Live","api":"WSS /v1beta/models/{model}/liveStream","hidden":true,"href":"/api-reference/endpoint/gemini-live"}]}]},{"tab":"Smart Routing","pages":[{"title":"Smart Routing","href":"/api-reference/smart-routing"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/lobehub"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/faq/model-changing"}]}]},{"language":"zh-Hans","pages":[{"title":"zh-Hans","href":"/zh-Hans/api-reference/endpoint/seedream"}]},{"language":"zh-Hant","pages":[{"title":"zh-Hant","href":"/zh-Hant/api-reference/endpoint/seedream"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/api-reference/endpoint/seedream"}]}]},"basePath":"","title":"Seedream 5.5 API Reference - MixRoute","deploymentId":"dpl_81ettUQ5G7NASN425B6JKU3FX1Rg","buildId":"dpl_81ettUQ5G7NASN425B6JKU3FX1Rg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-GKHRyhW5.js","utils-CXMoydtj.js","cloneDeep-Cl7CR73B.js","_Uint8Array-7sQhd3aE.js","isObject-FP1Yky1u.js","utils-ABJ_F6Yn.js","addUniqueKeysToSchema-B7v39GOQ.js","snippetPresets-CgibLHmh.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-C2n3VqMC.js","isEqual-BKe3Q7nP.js","usePlaygroundInputsStore-Iji6acs6.js","shallow-Db9K5ulX.js","getApiPlaygroundDisplay-BGnJQBSj.js","CodeSnippet-DlQqWRja.js","CodeSnippets-JF3Bj6-U.js","Page-Ctn-BHcp.js","getPastedJson-B0pIrOza.js","icon-UPBYC1Wr.js","MethodPill-CoVRW5MG.js","DuplicateIcon-BuNnsqwg.js","createIcon-Cj9cJegl.js","DynamicMarkdown-C_R66tyH.js","SectionHeading-C6RB-y9f.js","axios-vUo_bRtp.js"]}