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

# seedream-5.0-图生图

> 使用 doubao-seedream-5-0-260128 模型从文本和参考图片生成图片。

<script src="/feedback.js" />


## OpenAPI

````yaml api-reference/model-api/bytedance/openapi/doubao-seedream-5-0-260128-i2i/openapi.yaml POST /v1/images/generations
openapi: 3.1.0
info:
  title: Seedream 5.0 图生图
  description: 通过 Anyfast API 调用字节跳动 Seedream 5.0 图生图模型
  version: 1.0.0
servers:
  - url: https://www.anyfast.com.cn
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      summary: 创建图生图任务
      description: 使用 doubao-seedream-5-0-260128 模型从文本和参考图片生成图片。
      operationId: createSeedream50I2i
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
                - image
              properties:
                model:
                  type: string
                  enum:
                    - doubao-seedream-5-0-260128
                  description: Model ID
                  example: doubao-seedream-5-0-260128
                prompt:
                  type: string
                  description: 图片生成提示词。
                  example: 生成女孩和奶牛玩偶在游乐园开心地坐过山车的图片
                image:
                  type: array
                  items:
                    type: string
                  description: 参考图片 URL 列表，用于图生图。图生图时必填。
                  example:
                    - https://example.com/ref1.png
                    - https://example.com/ref2.png
                sequential_image_generation:
                  type: string
                  enum:
                    - auto
                  description: 连续图片生成模式。设为 'auto' 可批量生成多张图片。
                sequential_image_generation_options:
                  type: object
                  description: 连续图片生成选项。
                  properties:
                    max_images:
                      type: integer
                      description: 批量生成的最大图片数量。
                      example: 3
                size:
                  type: string
                  enum:
                    - 2048x2048
                    - 1728x2304
                    - 2304x1728
                    - 2848x1600
                    - 1600x2848
                    - 2496x1664
                    - 1664x2496
                    - 3136x1344
                    - 3072x3072
                    - 2592x3456
                    - 3456x2592
                    - 4096x2304
                    - 2304x4096
                    - 2496x3744
                    - 3744x2496
                    - 4704x2016
                  description: 输出图片尺寸。
                  example: 2048x2048
                watermark:
                  type: boolean
                  default: false
                  description: 是否添加水印。
                seed:
                  type: integer
                  description: 随机种子，用于复现结果。
                logo_info:
                  type: object
                  description: 自定义 Logo 水印配置。
                  properties:
                    add_logo:
                      type: boolean
                      description: 是否添加 Logo 水印。
                    position:
                      type: integer
                      description: Logo 位置。
                    language:
                      type: integer
                      description: Logo 语言。
                    opacity:
                      type: number
                      description: Logo 透明度（0-1）。
      responses:
        '200':
          description: 图片生成成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  model:
                    type: string
                    description: 使用的模型。
                    example: doubao-seedream-5-0-260128
                  created:
                    type: integer
                    description: 创建时间戳（Unix 秒）。
                    example: 1775029815
                  data:
                    type: array
                    description: 生成的图片列表。
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: 生成的图片 URL。
                          example: >-
                            https://ark-content-generation-v2-cn-beijing.example.com/image.png
                        size:
                          type: string
                          description: 图片尺寸。
                          example: 2048x2048
                  usage:
                    type: object
                    description: Token 用量。
                    properties:
                      generated_images:
                        type: integer
                        description: 生成的图片数量。
                        example: 1
                      output_tokens:
                        type: integer
                        description: 输出 Token 消耗。
                        example: 16384
                      total_tokens:
                        type: integer
                        description: 总 Token 消耗。
                        example: 16384
        '401':
          description: 未授权
        '429':
          description: 请求频率超限
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````