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

# Generations

> Seedream 5.5 文生图 / 图生图（OpenAI Images generations）。

**Path：** `POST https://api.omniall.ai/v1/images/generations`

模型必须为 `doubao-seedream-5.5`。参考图用 `image` / `images` / `image_urls` / `reference_images`。

鉴权：`Authorization: Bearer sk-...`



## OpenAPI

````yaml zh-CN/openapi/jimeng-image.yaml POST /v1/images/generations
openapi: 3.1.0
info:
  title: Omniall AI — 即梦 / Seedream 图像
  version: 1.0.0
  description: >-
    Seedream 5.5，走 OpenAI 兼容 Images 接口。


    **文生图 / 图生图：** `POST https://api.omniall.ai/v1/images/generations`


    鉴权：`Authorization: Bearer sk-...`


    模型仅：`doubao-seedream-5.5`。


    清晰度用 `resolution`（`1080p` / `2K`），比例用
    `size`/`ratio`（`1:1`、`16:9`、`9:16`、`4:3`、`3:4`、`21:9`）。不要把 `2K`/`1080p` 填进
    `size`。
servers:
  - url: https://api.omniall.ai
security: []
tags:
  - name: 即梦绘图
    description: Seedream 5.5 文生图与图生图
paths:
  /v1/images/generations:
    post:
      tags:
        - 即梦绘图
      summary: Generations
      description: >-
        Seedream 5.5 文生图 / 图生图（OpenAI Images generations）。


        **Path：** `POST https://api.omniall.ai/v1/images/generations`


        模型必须为 `doubao-seedream-5.5`。参考图用 `image` / `images` / `image_urls` /
        `reference_images`。


        鉴权：`Authorization: Bearer sk-...`
      operationId: jimengCreateImageGeneration
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API Key，例如 `Bearer sk-...`。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JimengImageRequest'
            examples:
              text_to_image_2k:
                summary: 文生图（2K）
                value:
                  model: doubao-seedream-5.5
                  prompt: 一只橘猫坐在窗台上看雨，温暖室内灯光，写实摄影风
                  'n': 1
                  size: '16:9'
                  resolution: 2K
                  response_format: url
              text_to_image_1080p:
                summary: 文生图（1080p）
                value:
                  model: doubao-seedream-5.5
                  prompt: 极简产品静物，白色背景，柔光
                  'n': 1
                  size: '1:1'
                  resolution: 1080p
                  response_format: url
              with_reference:
                summary: 图生图（参考图）
                value:
                  model: doubao-seedream-5.5
                  prompt: 保留人物和服装，把背景改成夜晚城市
                  images:
                    - https://example.com/reference.png
                  size: '9:16'
                  resolution: 2K
                  'n': 1
                  response_format: url
      responses:
        '200':
          description: 生图结果
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JimengImageResponse'
              example:
                created: 1710000000
                data:
                  - url: https://example.com/image.png
        '400':
          description: 请求无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '404':
          description: 模型或上游路径不可用
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '429':
          description: 触发限流
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '500':
          description: 服务端错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
components:
  schemas:
    JimengImageRequest:
      type: object
      required:
        - model
        - prompt
      description: Seedream 5.5 生图请求体（`POST /v1/images/generations`）。
      properties:
        model:
          $ref: '#/components/schemas/JimengSeedreamModel'
        prompt:
          type: string
          description: 图像描述文本。尽量写清主体、风格、光影与构图。
          example: 一只橘猫坐在窗台上看雨，温暖室内灯光，写实摄影风
        'n':
          type: integer
          minimum: 1
          maximum: 1
          description: 生成张数。Seedream 5.5 固定为 `1`。
          default: 1
        resolution:
          type: string
          description: >-
            清晰度档。传 `1080p` 或 `2K`（别名
            `1080`/`1080P`→`1080p`，`2k`→`2K`）。非法档会拒绝。分辨率分档计费读此字段。
          enum:
            - 1080p
            - 2K
          example: 2K
        size:
          type: string
          description: >-
            仅画面比例（`1:1`、`16:9`、`9:16`、`4:3`、`3:4`、`21:9`）。也可用 `ratio`。不要把
            `2K`/`1080p` 填进 size。
          enum:
            - '1:1'
            - '16:9'
            - '9:16'
            - '4:3'
            - '3:4'
            - '21:9'
          example: '16:9'
        ratio:
          type: string
          description: '`size` 的比例别名。'
          enum:
            - '1:1'
            - '16:9'
            - '9:16'
            - '4:3'
            - '3:4'
            - '21:9'
          example: '16:9'
        response_format:
          type: string
          enum:
            - url
            - b64_json
          description: 返回图片 URL 或 Base64 JSON。推荐 `url`。
          default: url
        watermark:
          type: boolean
          description: 是否请求水印（上游支持时生效）。
          default: false
          example: false
        seed:
          type: integer
          description: 随机种子。相同 seed + 参数有助于复现结果（视上游支持）。
        image:
          oneOf:
            - type: string
              description: 单张参考图。**推荐 HTTPS URL**；避免 Base64 / data URI。
            - type: array
              items:
                type: string
              description: 多张参考图 HTTPS URL 数组。
          description: |-
            可选参考图（图生图）。
            - **推荐：** 单张 HTTPS URL，或 URL 字符串数组
            - **不推荐：** Base64（请求体过大易 413）
            本地文件可先走文件上传接口拿到 URL。
        images:
          type: array
          items:
            type: string
          description: 参考图 URL 数组（`image` / `image_urls` / `reference_images` 别名）。
          example:
            - https://example.com/reference.png
        image_urls:
          type: array
          items:
            type: string
          description: '`images` 别名。'
        reference_images:
          type: array
          items:
            type: string
          description: '`images` 别名。'
        sequential_image_generation:
          type: string
          description: 组图 / 连续出图控制（上游支持时透传，如 `auto` / `disabled`）。
          example: disabled
        user:
          type: string
          description: 终端用户标识，用于滥用监测。
    JimengImageResponse:
      type: object
      description: OpenAI 兼容图像响应。
      properties:
        created:
          type: integer
          description: 完成时间 Unix 时间戳。
        data:
          type: array
          description: 结果列表。
          items:
            type: object
            properties:
              url:
                type: string
                description: 图片 URL（`response_format=url`）。
              b64_json:
                type: string
                description: Base64 图像数据（`response_format=b64_json`）。
              revised_prompt:
                type: string
                description: 上游返回的改写提示词（如有）。
    OpenAIErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
    JimengSeedreamModel:
      type: string
      description: Seedream / 即梦模型 ID。仅 Seedream 5.5。
      enum:
        - doubao-seedream-5.5
      example: doubao-seedream-5.5

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.