> ## Documentation Index
> Fetch the complete documentation index at: https://docs.powertokens.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Seedream 5.0 Pro 图生图

> 支持模型包括 `dola-seedream-5-0-pro-260628`。本文档覆盖图生图与多图参考生成场景。公开字段包括 `model`、`prompt`、`image`、`size`、`response_format`、`watermark`。

**模型能力**
- 生成单图（不支持配置 sequential_image_generation）
- 多图生图：输入多张参考图片（2-10）+ 文本提示词，生成单张图片。
- 单图生图：输入单张参考图片 + 文本提示词，生成单张图片。
- 暂不支持组图生成、联网搜索、流式输出。



## OpenAPI

````yaml api-reference/zh-Hans/zmodelImage/byteplus/seedream-5-0-pro-image-to-image.json POST /v1/images/generations
openapi: 3.0.1
info:
  title: Seedream 5.0 Pro 图生图
  version: 1.0.0
  description: Doubao Seedream 5.0 pro 图生图与多图参考能力文档。公开统一入口为 `/v1/images/generations`。
  license:
    name: Project License
    url: https://github.com/QuantumNous/new-api/blob/main/LICENSE
servers:
  - url: https://api.powertokens.ai
    description: Baze API 服务地址
security: []
tags:
  - name: Seedream Image
    description: Seedream 系列图像生成能力
paths:
  /v1/images/generations:
    post:
      tags:
        - Seedream Image
      summary: Seedream 5.0 Pro 图生图
      description: >-
        支持模型包括 `dola-seedream-5-0-pro-260628`。本文档覆盖图生图与多图参考生成场景。公开字段包括
        `model`、`prompt`、`image`、`size`、`response_format`、`watermark`。


        **模型能力**

        - 生成单图（不支持配置 sequential_image_generation）

        - 多图生图：输入多张参考图片（2-10）+ 文本提示词，生成单张图片。

        - 单图生图：输入单张参考图片 + 文本提示词，生成单张图片。

        - 暂不支持组图生成、联网搜索、流式输出。
      operationId: byteplusImageToImage50Pro
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageToImageRequest'
            examples:
              image_to_image:
                summary: 基础图生图
                value:
                  model: dola-seedream-5-0-pro-260628
                  prompt: 将图片转换为宫崎骏动画风格
                  image: https://example.com/input.jpg
                  size: 2K
              multi_image_reference:
                summary: 多图参考生成
                value:
                  model: dola-seedream-5-0-pro-260628
                  prompt: 结合这些图片的风格，生成一张新的风景图
                  image:
                    - https://example.com/ref1.jpg
                    - https://example.com/ref2.jpg
                  size: 2K
      responses:
        '200':
          description: 调用成功，返回图像生成结果。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          description: 请求参数不合法。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_request:
                  summary: 参数错误
                  value:
                    error:
                      message: 请求体格式错误或字段取值非法
                      type: invalid_request_error
                      code: bad_request_body
                      param: ''
        '401':
          description: 鉴权失败，例如未提供令牌或令牌无效。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: 未授权
                  value:
                    error:
                      message: 无效的令牌
                      type: api_error
                      code: access_denied
                      param: ''
        '429':
          description: 触发速率限制或账户额度不足。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                quota_exceeded:
                  summary: 额度不足或速率受限
                  value:
                    error:
                      message: 当前账户额度不足，请稍后重试
                      type: api_error
                      code: insufficient_user_quota
                      param: ''
        '500':
          description: 服务端处理请求时发生内部错误。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  summary: 内部处理失败
                  value:
                    error:
                      message: 服务内部处理失败，请稍后重试
                      type: api_error
                      code: gen_relay_info_failed
                      param: ''
      security:
        - BearerAuth: []
components:
  schemas:
    ImageToImageRequest:
      type: object
      required:
        - model
        - prompt
        - image
      properties:
        model:
          type: string
          enum:
            - dola-seedream-5-0-pro-260628
          description: >-
            图像生成模型名称。支持的模型包括 `dola-seedream-5-0-pro-260628`（Seedream 5.0
            pro，支持交互编辑，不支持组图生成）。
        prompt:
          type: string
          description: >-
            用于生成图像的提示词，支持中英文。建议不超过 300 个汉字或 600
            个英文单词。字数过多信息容易分散，模型可能因此忽略细节，只关注重点，造成图片缺失部分元素。
          example: 充满活力的特写编辑肖像，模特眼神犀利，头戴雕塑感帽子，色彩拼接丰富。
        image:
          oneOf:
            - type: string
              description: 输入的图片信息，支持 URL 或 Base64 编码。
            - type: array
              description: 输入的多张图片信息，支持 URL 或 Base64 编码。
              items:
                type: string
              maxItems: 10
          description: >-
            输入的图片信息，支持 URL 或 Base64 编码。支持单图或多图输入。


            - 图片 URL：请确保图片 URL 可被访问。

            - Base64 编码：请遵循此格式 `data:image/<图片格式>;base64,<Base64编码>`。注意 `<图片格式>`
            需小写，如 `data:image/png;base64,<base64_image>`。


            说明：

            - 传入单张图片要求：
              - 图片格式：jpeg、png、webp、bmp、tiff、gif、heic、heif
              - 宽高比（宽/高）范围：[1/16, 16]
              - 宽高长度（px） > 14
              - 大小：不超过 30MB
              - 总像素：不超过 6000×6000 = 36000000 px（对单张图宽度和高度的像素乘积限制，而不是对宽度或高度的单独值进行限制）
            - Seedream 5.0 pro 最多支持传入 10 张参考图。
        size:
          type: string
          description: >
            指定生成图像的尺寸信息，支持指定分辨率档位（如 2K）或指定宽高像素值（如 2048x2048）两种方式，不可混用。


            **dola-seedream-5-0-pro-260628（Seedream 5.0 pro）**

            支持以下两种方式，不可混用：


            * 方式 1（推荐）：指定分辨率档位，并在 prompt 中用自然语言描述图片宽高比、图片形状或图片用途，最终由模型判断生成图片的大小。
              * 默认值：2K
              * 可选值：1K、2K

            * 方式 2：指定宽高像素值（宽x高）。
              * 总像素取值范围：[`1280x720`（921600）, `2048x2048×1.1025`（4624220）]
              * 宽高比取值范围：[1/16, 16]

            > 说明：采用方式 2
            时，需同时满足总像素取值范围和宽高比取值范围。其中，总像素是对单张图宽度和高度的像素乘积限制，而不是对宽度或高度的单独值进行限制。

            > * 有效示例：`2048x1024`
              总像素值 2048x1024=2097152，符合 [921600, 4624220] 的区间要求；宽高比 2048/1024=2，符合 [1/16, 16] 的区间要求，故该示例值有效。
            > * 无效示例：`512x512`
              总像素值 512x512=262144，未达到 921600 的最低要求，故该示例值无效。

            使用方式 1 时，模型实际映射的宽高像素参考值（不限于以下标准值，仅列常见）：


            | 分辨率 | 宽高比 | 宽高像素值 |

            |---|---|---|

            | 1K | 1:1 | 1024x1024 |

            | | 4:3 | 1152x864 |

            | | 3:4 | 864x1152 |

            | | 16:9 | 1424x800 |

            | | 9:16 | 800x1424 |

            | | 3:2 | 1248x832 |

            | | 2:3 | 832x1248 |

            | | 21:9 | 1568x672 |

            | 2K | 1:1 | 2048x2048 |

            | | 4:3 | 2368x1776 |

            | | 3:4 | 1776x2368 |

            | | 16:9 | 2816x1584 |

            | | 9:16 | 1584x2816 |

            | | 3:2 | 2496x1664 |

            | | 2:3 | 1664x2496 |

            | | 21:9 | 3136x1344 |
          default: 2K
          example: 2K
          x-enum:
            - 1K
            - 2K
        response_format:
          type: string
          enum:
            - url
            - b64_json
          description: |-
            指定生成图像的返回格式。支持以下两种返回方式：
            - `url`：返回图片下载链接；链接在图片生成后 24 小时内有效，请及时下载图片。
            - `b64_json`：以 Base64 编码字符串的 JSON 格式返回图像数据。
          default: url
        watermark:
          type: boolean
          description: |-
            是否在生成的图片中添加水印。
            - `false`：不添加水印。
            - `true`：在图片右下角添加「AI生成」字样的水印标识。
          default: true
    ImageGenerationResponse:
      type: object
      properties:
        model:
          type: string
          description: 本次请求使用的模型 ID（模型名称-版本）。
        created:
          type: integer
          format: int64
          description: 创建时间的 Unix 时间戳（秒）。
        data:
          type: array
          items:
            $ref: '#/components/schemas/ImageData'
          description: 生成的图像列表。
        usage:
          type: object
          description: 本次请求的用量信息。
          properties:
            generated_images:
              type: integer
              description: 模型成功生成的图片张数，不包含生成失败的图片。
            output_tokens:
              type: integer
              description: 模型生成的图片花费的 token 数量。
            total_tokens:
              type: integer
              description: 本次请求消耗的总 token 数量。
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
    ImageData:
      type: object
      properties:
        url:
          type: string
          description: 图片下载链接。有效期 24 小时，请及时保存。
        b64_json:
          type: string
          description: Base64 编码的图片数据。
        size:
          type: string
          description: 图像尺寸（宽x高）。
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: '在请求头中传入 `Authorization: Bearer <token>`。'

````