# Doubao Seedream Image Generation

> Image Generation

Generate or edit images and return image URLs or Base64 data.
Seedream 5.5 supports ordinary single-image generation, up to 10 reference images, native RGBA output, and layer decomposition.
It does not support `stream`, `tools`, `sequential_image_generation`, or its options.
Streaming and group-generation support for other models is described under each parameter.

Text-to-image (set the `MODELVERSE_API_KEY` environment variable first):
```bash
curl https://api.modelverse.cn/v1/images/generations \
  -H "Authorization: Bearer $MODELVERSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"doubao-seedream-5-5-261028","prompt":"A floating garden above the clouds","size":"2K"}'
```

Layer decomposition (replace the URL in the `images` array with an accessible PNG/JPEG image):
```bash
curl https://api.modelverse.cn/v1/images/generations \
  -H "Authorization: Bearer $MODELVERSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"doubao-seedream-5-5-261028","images":["https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg"],"layer_decomposition":true,"layer_decomposition_options":{"max_images":30},"size":"auto"}'
```

## Endpoint

`POST https://api.modelverse.cn/v1/images/generations`

## Request Body

## Responses

- **200** — Image generation response. Non-stream requests return JSON; stream requests return SSE.
- **400** — Invalid request parameters or image generation error.
- **default** — Error response.

## OpenAPI Definition

```json
{
  "openapi": "3.1.0",
  "x-language": "en-US",
  "info": {
    "title": "ModelVerse doubao-seedream Image API",
    "version": "1.0.0",
    "description": "OpenAPI 3.1 schema for the ModelVerse Seedream 4.5, 5.0 Lite, 5.0 Pro, and 5.5 image API.\nCapabilities reference the [official image generation documentation](https://docs.volcengine.com/docs/ark/image-generation-api).\nUse the ModelVerse endpoint and a ModelVerse API key, not a Volcengine Ark endpoint or key.\nModelVerse accepts reference images as the plural `images` array, rather than the official `image` field.\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "Mainland China"
    },
    {
      "url": "https://api.umodelverse.ai",
      "description": "Global"
    },
    {
      "url": "https://api-us-ca.umodelverse.ai",
      "description": "Los Angeles, US"
    },
    {
      "url": "https://api-sg.umodelverse.ai",
      "description": "Singapore"
    },
    {
      "url": "https://api-ge-fra.umodelverse.ai",
      "description": "Frankfurt"
    }
  ],
  "tags": [
    {
      "name": "doubao-seedream",
      "description": "Image generation and reference-image generation with doubao-seedream."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/images/generations": {
      "post": {
        "tags": [
          "doubao-seedream"
        ],
        "operationId": "createDoubaoSeedreamImageGeneration",
        "summary": "Doubao Seedream Image Generation",
        "description": "Generate or edit images and return image URLs or Base64 data.\nSeedream 5.5 supports ordinary single-image generation, up to 10 reference images, native RGBA output, and layer decomposition.\nIt does not support `stream`, `tools`, `sequential_image_generation`, or its options.\nStreaming and group-generation support for other models is described under each parameter.\n\nText-to-image (set the `MODELVERSE_API_KEY` environment variable first):\n```bash\ncurl https://api.modelverse.cn/v1/images/generations \\\n  -H \"Authorization: Bearer $MODELVERSE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"doubao-seedream-5-5-261028\",\"prompt\":\"A floating garden above the clouds\",\"size\":\"2K\"}'\n```\n\nLayer decomposition (replace the URL in the `images` array with an accessible PNG/JPEG image):\n```bash\ncurl https://api.modelverse.cn/v1/images/generations \\\n  -H \"Authorization: Bearer $MODELVERSE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"doubao-seedream-5-5-261028\",\"images\":[\"https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg\"],\"layer_decomposition\":true,\"layer_decomposition_options\":{\"max_images\":30},\"size\":\"auto\"}'\n```\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DoubaoSeedreamGenerationRequest"
              },
              "examples": {
                "seedream55TextToImage": {
                  "summary": "Seedream 5.5 text-to-image",
                  "value": {
                    "model": "doubao-seedream-5-5-261028",
                    "prompt": "A floating garden above the clouds, cinematic lighting",
                    "size": "2K",
                    "output_format": "png",
                    "background": "auto"
                  }
                },
                "seedream55Transparent": {
                  "summary": "Seedream 5.5 transparent image",
                  "value": {
                    "model": "doubao-seedream-5-5-261028",
                    "prompt": "A cute full-body robot, transparent background, front view",
                    "size": "1K",
                    "output_format": "png",
                    "background": "transparent"
                  }
                },
                "seedream55MultiReference": {
                  "summary": "Seedream 5.5 multiple references",
                  "value": {
                    "model": "doubao-seedream-5-5-261028",
                    "prompt": "Place the character from the references in one cinematic poster",
                    "images": [
                      "https://example.com/character.png",
                      "https://example.com/background.jpg"
                    ],
                    "size": "2K"
                  }
                },
                "seedream55LayerDecomposition": {
                  "summary": "Seedream 5.5 layer decomposition",
                  "value": {
                    "model": "doubao-seedream-5-5-261028",
                    "images": [
                      "https://example.com/source.png"
                    ],
                    "layer_decomposition": true,
                    "layer_decomposition_options": {
                      "max_images": 30
                    },
                    "size": "auto"
                  }
                },
                "referenceImageToSketch": {
                  "summary": "Generate from a reference image",
                  "value": {
                    "model": "doubao-seedream-4.5",
                    "prompt": "将图片转换为铅笔素描",
                    "images": [
                      "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg"
                    ],
                    "size": "2k",
                    "watermark": false,
                    "stream": false,
                    "response_format": "url"
                  }
                },
                "webSearchWeatherPoster": {
                  "summary": "Generate with web search using doubao-seedream-5",
                  "value": {
                    "model": "doubao-seedream-5-0-260128",
                    "prompt": "制作一张上海未来5日的天气预报图，采用现代扁平化插画风格，清晰展示每日天气、温度和穿搭建议。",
                    "size": "2k",
                    "tools": [
                      {
                        "type": "web_search"
                      }
                    ],
                    "output_format": "jpeg",
                    "response_format": "url",
                    "watermark": false
                  }
                },
                "streamedBase64Group": {
                  "summary": "Stream a generated image group as Base64 JSON",
                  "value": {
                    "model": "doubao-seedream-4.5",
                    "prompt": "生成一组现代城市公共空间导视图标",
                    "size": "2048x2048",
                    "sequential_image_generation": "auto",
                    "sequential_image_generation_options": {
                      "max_images": 3
                    },
                    "stream": true,
                    "response_format": "b64_json",
                    "watermark": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Image generation response. Non-stream requests return JSON; stream requests return SSE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DoubaoSeedreamGenerationResponse"
                },
                "examples": {
                  "urlImage": {
                    "summary": "Generated image returned as a URL",
                    "value": {
                      "model": "doubao-seedream-4-5-251128",
                      "created": 1767939740,
                      "data": [
                        {
                          "url": "https://xxxxxx",
                          "size": "2048x2048"
                        }
                      ],
                      "usage": {
                        "generated_images": 1,
                        "output_tokens": 16384,
                        "total_tokens": 16384
                      }
                    }
                  },
                  "layerDecomposition": {
                    "summary": "Layer decomposition response (one base and one layer)",
                    "value": {
                      "model": "doubao-seedream-5-5-261028",
                      "created": 1767939740,
                      "data": [
                        {
                          "url": "https://example.com/base.png",
                          "size": "2048x2048",
                          "output_format": "png",
                          "background": "opaque",
                          "z_index": 0,
                          "name": "background",
                          "description": "Complete base image"
                        },
                        {
                          "url": "https://example.com/layer.png",
                          "size": "2048x2048",
                          "output_format": "png",
                          "background": "transparent",
                          "z_index": 1,
                          "name": "foreground",
                          "description": "Foreground subject",
                          "bounding_box": {
                            "absolute": [
                              512,
                              512,
                              1536,
                              1536
                            ],
                            "normalized": [
                              250,
                              250,
                              750,
                              750
                            ]
                          }
                        }
                      ],
                      "usage": {
                        "input_images": 1,
                        "generated_images": 2
                      }
                    }
                  },
                  "base64Image": {
                    "summary": "Generated image returned as Base64 JSON",
                    "value": {
                      "model": "doubao-seedream-4-5-251128",
                      "created": 1767939740,
                      "data": [
                        {
                          "b64_json": "{image_base64_string}",
                          "size": "2048x2048"
                        }
                      ],
                      "usage": {
                        "generated_images": 1,
                        "output_tokens": 16384,
                        "total_tokens": 16384
                      }
                    }
                  }
                }
              },
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/DoubaoSeedreamStreamEvent"
                },
                "examples": {
                  "streamedImage": {
                    "summary": "Streamed image generation events",
                    "value": "event: image_generation.partial_succeeded\ndata: {\"type\":\"image_generation.partial_succeeded\",\"model\":\"doubao-seedream-4-5-251128\",\"created\":1767939740,\"image_index\":0,\"url\":\"https://xxxxxx\",\"size\":\"2048x2048\"}\n\nevent: image_generation.completed\ndata: {\"type\":\"image_generation.completed\",\"model\":\"doubao-seedream-4-5-251128\",\"created\":1767939740,\"usage\":{\"generated_images\":1,\"output_tokens\":16384,\"total_tokens\":16384}}\n"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or image generation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DoubaoSeedreamErrorResponse"
                },
                "examples": {
                  "requestError": {
                    "summary": "Request-level error",
                    "value": {
                      "error": {
                        "code": "error_code",
                        "message": "error_message"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DoubaoSeedreamErrorResponse"
                },
                "examples": {
                  "requestError": {
                    "summary": "Request-level error",
                    "value": {
                      "error": {
                        "code": "error_code",
                        "message": "error_message"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "ModelVerse API key sent in the `Authorization: Bearer <API_KEY>`\nheader.\n"
      }
    },
    "schemas": {
      "DoubaoSeedreamGenerationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model"
        ],
        "anyOf": [
          {
            "required": [
              "prompt"
            ]
          },
          {
            "required": [
              "layer_decomposition",
              "images"
            ],
            "properties": {
              "layer_decomposition": {
                "const": true
              },
              "images": {
                "type": "array",
                "minItems": 1,
                "maxItems": 1
              }
            }
          }
        ],
        "properties": {
          "model": {
            "$ref": "#/components/schemas/DoubaoSeedreamModel"
          },
          "prompt": {
            "$ref": "#/components/schemas/DoubaoSeedreamPrompt"
          },
          "images": {
            "type": "array",
            "description": "Reference image inputs. Each item can be an accessible URL or a\nBase64 data URL such as `data:image/png;base64,<base64_image>`.\n- `doubao-seedream-4.5` and `doubao-seedream-5-0-260128`: Supports up to 14 reference images\n- Seedream 5.0 Pro (`doubao-seedream-5-0-pro-260628`) and 5.5 (`doubao-seedream-5-5-261028`): Up to 10 reference images\nFor ordinary generation, each input must be at most 30MB, with width and height both greater than 14 pixels, 196..36000000 total pixels, and an aspect ratio of 1/16..16. Supported formats are jpeg/png/webp/bmp/tiff/gif/heic/heif.\nDecomposition requires exactly one png/jpeg input, at most 30MB, with 262144..36000000 total pixels and an aspect ratio of 1/16..16.\n",
            "items": {
              "type": "string"
            }
          },
          "size": {
            "$ref": "#/components/schemas/DoubaoSeedreamSize"
          },
          "sequential_image_generation": {
            "$ref": "#/components/schemas/DoubaoSeedreamSequentialImageGeneration"
          },
          "sequential_image_generation_options": {
            "$ref": "#/components/schemas/DoubaoSeedreamSequentialImageGenerationOptions"
          },
          "stream": {
            "type": "boolean",
            "default": false,
            "description": "Whether to enable streaming output. `false` returns all image\nresults after generation completes; `true` returns SSE events as\neach image result is available.\nNote: Seedream 5.0 Pro (`doubao-seedream-5-0-pro-260628`) and 5.5 (`doubao-seedream-5-5-261028`) do not support this parameter.\n"
          },
          "response_format": {
            "type": "string",
            "enum": [
              "url",
              "b64_json"
            ],
            "default": "url",
            "description": "Image return format. URL links are valid for 24 hours after image\ngeneration; `b64_json` returns Base64-encoded image data.\n"
          },
          "watermark": {
            "type": "boolean",
            "default": true,
            "description": "Whether to add the documented \"AI generated\" watermark in the lower-right corner."
          },
          "optimize_prompt_options": {
            "type": "object",
            "additionalProperties": true,
            "description": "Prompt optimization options documented as an object."
          },
          "tools": {
            "type": "array",
            "description": "Tool configuration. Only `doubao-seedream-5-0-260128` supports this parameter.\nNote: Seedream 5.0 Pro (`doubao-seedream-5-0-pro-260628`) and 5.5 (`doubao-seedream-5-5-261028`) do not support this parameter.\n",
            "items": {
              "$ref": "#/components/schemas/DoubaoSeedreamTool"
            }
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ],
            "description": "5.x models support png/jpeg; 5.5 defaults to png and 5.0 defaults to jpeg. Transparent output requires png.\nDuring decomposition this controls only the base image; layers are always png with an alpha channel.\n"
          },
          "background": {
            "type": "string",
            "enum": [
              "auto",
              "transparent",
              "opaque"
            ],
            "description": "Background transparency. 5.5 defaults to auto, letting the model decide from the prompt; transparent forces transparency and opaque forces an opaque background.\n5.0 Pro defaults to opaque; transparent requires exactly one reference image with an alpha channel and does not support text-only transparent generation.\nTransparent output requires output_format png. Do not send background during decomposition.\n"
          },
          "layer_decomposition": {
            "type": "boolean",
            "default": false,
            "description": "Decompose one input into a base image and independently editable transparent PNG layers. 5.5 supports up to 1 base image + 99 layers; 5.0 Pro supports up to 1 base image + 16 layers.\nFailure of any layer fails the whole request; partial success is not supported. Supply exactly one png/jpeg image in images, at most 30MB, with 262144..36000000 total pixels and an aspect ratio of 1/16..16.\nThe prompt may be omitted for decomposition; do not send background. size accepts only 1K/1.5K/2K/auto, defaults to auto, and preserves the input aspect ratio.\n"
          },
          "layer_decomposition_options": {
            "type": "object",
            "additionalProperties": false,
            "description": "Only Seedream 5.5 supports these options when layer_decomposition is true. ModelVerse currently integrates only max_images, not the official rich-text OCR switch.",
            "properties": {
              "max_images": {
                "type": "integer",
                "minimum": 2,
                "maximum": 100,
                "default": 30,
                "description": "Maximum total output image count, including the base image and layers."
              }
            }
          }
        }
      },
      "DoubaoSeedreamModel": {
        "type": "string",
        "enum": [
          "doubao-seedream-4.5",
          "doubao-seedream-5-0-260128",
          "doubao-seedream-5-0-pro-260628",
          "doubao-seedream-5-5-261028"
        ],
        "description": "Model name.\n- `doubao-seedream-4.5`: Supports group image generation and streaming output\n- `doubao-seedream-5-0-260128`: Supports group image generation, web search, and streaming output\n- `doubao-seedream-5-0-pro-260628`: Supports ordinary single-image generation, up to 10 reference images, and decomposition (1 base image + up to 16 layers); no group generation, web search, or streaming\n- `doubao-seedream-5-5-261028`: Supports text-to-image and single/multiple-reference generation of one image (up to 10 references), native RGBA transparency, and decomposition (1 base image + up to 99 layers); no stream, tools, sequential_image_generation, or its options\n"
      },
      "DoubaoSeedreamPrompt": {
        "type": "string",
        "minLength": 1,
        "description": "Required for image generation; optional for decomposition, where it can specify decomposition requirements. Recommended length is at most 300 Chinese characters or 600 English words."
      },
      "DoubaoSeedreamSize": {
        "type": "string",
        "description": "Choose size by model and mode. Explicit dimensions use `<width>x<height>`; the aspect ratio range is 1/16..16.\n- 5.5 and 5.0 Pro ordinary generation: 1K/1.5K/2K, default 2K; explicit dimensions require 921600..4624220 total pixels.\n- 5.5 and 5.0 Pro decomposition: only 1K/1.5K/2K/auto, default auto, selecting output from the input dimensions while preserving the input aspect ratio. Explicit dimensions are not supported.\n- 4.5: 2K/4K, default 2048x2048; explicit dimensions require 3686400..16777216 total pixels.\n- 5.0 Lite (`doubao-seedream-5-0-260128`): 2K/3K/4K, default 2048x2048; explicit dimensions require 3686400..16777216 total pixels.\n",
        "x-min-aspect-ratio": "1:16",
        "x-max-aspect-ratio": "16:1",
        "oneOf": [
          {
            "pattern": "^(1([.]5)?|[234])[Kk]$"
          },
          {
            "const": "auto"
          },
          {
            "pattern": "^[1-9][0-9]*x[1-9][0-9]*$"
          }
        ],
        "examples": [
          "2K",
          "4K",
          "2048x2048",
          "2304x1728",
          "1728x2304",
          "2560x1440",
          "1440x2560",
          "2496x1664",
          "1664x2496",
          "3024x1296"
        ]
      },
      "DoubaoSeedreamSequentialImageGeneration": {
        "type": "string",
        "enum": [
          "auto",
          "disabled"
        ],
        "default": "disabled",
        "description": "Group-image generation mode. `auto` lets the model decide whether to\nreturn a group and how many images it contains; `disabled` generates\none image.\nNote: Seedream 5.0 Pro (`doubao-seedream-5-0-pro-260628`) and 5.5 (`doubao-seedream-5-5-261028`) do not support this parameter and can only generate single images.\n"
      },
      "DoubaoSeedreamSequentialImageGenerationOptions": {
        "type": "object",
        "additionalProperties": false,
        "description": "Options used only when `sequential_image_generation` is `auto`.\nNote: Seedream 5.0 Pro (`doubao-seedream-5-0-pro-260628`) and 5.5 (`doubao-seedream-5-5-261028`) do not support this parameter.\n",
        "properties": {
          "max_images": {
            "type": "integer",
            "minimum": 1,
            "maximum": 15,
            "description": "Maximum number of images to generate for this request."
          }
        }
      },
      "DoubaoSeedreamTool": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "const": "web_search",
            "default": "web_search",
            "description": "Web search tool. When enabled, the model decides whether to search\nthe internet based on the prompt.\n"
          }
        }
      },
      "DoubaoSeedreamGenerationResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model",
          "created",
          "data"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "Model ID used for this request."
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds for when the request was created."
          },
          "data": {
            "type": "array",
            "description": "Output image entries. Entries can contain image data or per-image error information.",
            "items": {
              "$ref": "#/components/schemas/DoubaoSeedreamImageData"
            }
          },
          "usage": {
            "$ref": "#/components/schemas/DoubaoSeedreamUsage"
          },
          "error": {
            "$ref": "#/components/schemas/DoubaoSeedreamError"
          }
        }
      },
      "DoubaoSeedreamImageData": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Image download URL returned when `response_format` is `url`; valid for 24 hours after generation."
          },
          "b64_json": {
            "type": "string",
            "contentEncoding": "base64",
            "description": "Base64 image data returned when `response_format` is `b64_json`."
          },
          "size": {
            "type": "string",
            "pattern": "^[1-9][0-9]*x[1-9][0-9]*$",
            "description": "Image dimensions in `<width>x<height>` pixels."
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ],
            "description": "Output image format; decomposed layers are always png."
          },
          "background": {
            "type": "string",
            "enum": [
              "transparent",
              "opaque"
            ],
            "description": "Actual output background type; auto is not returned."
          },
          "z_index": {
            "type": "integer",
            "minimum": 0,
            "description": "Decomposition stacking order; the base is 0 and layers start at 1. Composite in ascending order."
          },
          "name": {
            "type": "string",
            "description": "Base image or layer name."
          },
          "description": {
            "type": "string",
            "description": "Description of the base image or layer contents."
          },
          "bounding_box": {
            "type": "object",
            "additionalProperties": false,
            "description": "Layer bounds in the output base image coordinate system; omitted for the base image. Position with absolute coordinates, scale to right-left by bottom-top, and composite by z_index.",
            "properties": {
              "absolute": {
                "type": "array",
                "minItems": 4,
                "maxItems": 4,
                "items": {
                  "type": "integer"
                },
                "description": "Four integers [left, top, right, bottom] in output base image pixels, with the origin at its top-left corner."
              },
              "normalized": {
                "type": "array",
                "minItems": 4,
                "maxItems": 4,
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000
                },
                "description": "Four integers [left, top, right, bottom], normalized by the output base image dimensions to 0..1000."
              }
            }
          },
          "error": {
            "$ref": "#/components/schemas/DoubaoSeedreamError"
          }
        }
      },
      "DoubaoSeedreamUsage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "input_images": {
            "type": "integer",
            "description": "Input image count; 1 for decomposition."
          },
          "generated_images": {
            "type": "integer",
            "description": "Successfully generated image count, excluding failed images; includes the base image and all layers during decomposition."
          },
          "output_tokens": {
            "type": "integer",
            "description": "Tokens spent on generated images. The source describes this as the\nrounded value of `sum(image_width * image_height) / 256`.\n"
          },
          "total_tokens": {
            "type": "integer",
            "description": "Total tokens consumed by the request; currently equal to `output_tokens`."
          }
        }
      },
      "DoubaoSeedreamErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/DoubaoSeedreamError"
          }
        }
      },
      "DoubaoSeedreamError": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Error code."
          },
          "message": {
            "type": "string",
            "description": "Error message."
          }
        }
      },
      "DoubaoSeedreamStreamEvent": {
        "description": "Server-Sent Events stream data payload. Each SSE `data` payload is one\nof `image_generation.partial_succeeded`,\n`image_generation.partial_failed`, or `image_generation.completed`.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/DoubaoSeedreamPartialSucceededEvent"
          },
          {
            "$ref": "#/components/schemas/DoubaoSeedreamPartialFailedEvent"
          },
          {
            "$ref": "#/components/schemas/DoubaoSeedreamCompletedEvent"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "DoubaoSeedreamPartialSucceededEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "model",
          "created",
          "image_index"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "image_generation.partial_succeeded"
          },
          "model": {
            "type": "string",
            "description": "Model ID used for this request."
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds for when the request was created."
          },
          "image_index": {
            "type": "integer",
            "minimum": 0,
            "description": "Zero-based image index for this request."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Image download URL returned when `response_format` is `url`."
          },
          "b64_json": {
            "type": "string",
            "contentEncoding": "base64",
            "description": "Base64 image data returned when `response_format` is `b64_json`."
          },
          "size": {
            "type": "string",
            "pattern": "^[1-9][0-9]*x[1-9][0-9]*$",
            "description": "Image dimensions in `<width>x<height>` pixels."
          }
        }
      },
      "DoubaoSeedreamPartialFailedEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "model",
          "created",
          "image_index",
          "error"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "image_generation.partial_failed"
          },
          "model": {
            "type": "string",
            "description": "Model ID used for this request."
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds for when the request was created."
          },
          "image_index": {
            "type": "integer",
            "minimum": 0,
            "description": "Zero-based image index for this request."
          },
          "error": {
            "$ref": "#/components/schemas/DoubaoSeedreamError"
          }
        }
      },
      "DoubaoSeedreamCompletedEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "model",
          "created",
          "usage"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "image_generation.completed"
          },
          "model": {
            "type": "string",
            "description": "Model ID used for this request."
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds for when the request was created."
          },
          "usage": {
            "$ref": "#/components/schemas/DoubaoSeedreamUsage"
          }
        }
      }
    }
  }
}
```
