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

# Seedream 5.0 Flash 画像生成

> - Seedream 5.0 Flash (doubao-seedream-5.0-flash) は、テキストからの画像生成、画像を基にした生成、画像編集などに対応しています。主なパラメータは Seedream 5.0 Pro と共通で、より高速かつ低価格で生成できます
- 画像単位の課金です。`1K`、`1.5K`、`2K` は同一価格で、参照画像は無料です
- 非同期処理モード、返却されたタスクIDで[照会](/ja/api-manual/task-management/get-task-detail)
- 生成された画像リンクは24時間有効です、お早めに保存してください



## OpenAPI

````yaml ja/api-manual/image-series/seedream/seedream-5.0-flash-image-generate.json POST /v1/images/generations
openapi: 3.1.0
info:
  title: doubao-seedream-5.0-flash インターフェース
  description: AIモデルを使用して画像タスクを作成、複数のモデルとパラメータ設定に対応
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 本番環境
security:
  - bearerAuth: []
tags:
  - name: 画像生成
    description: AI画像生成関連API
paths:
  /v1/images/generations:
    post:
      tags:
        - 画像生成
      summary: doubao-seedream-5.0-flash インターフェース
      description: >-
        - Seedream 5.0 Flash (doubao-seedream-5.0-flash)
        は、テキストからの画像生成、画像を基にした生成、画像編集などに対応しています。主なパラメータは Seedream 5.0 Pro
        と共通で、より高速かつ低価格で生成できます

        - 画像単位の課金です。`1K`、`1.5K`、`2K` は同一価格で、参照画像は無料です

        -
        非同期処理モード、返却されたタスクIDで[照会](/ja/api-manual/task-management/get-task-detail)

        - 生成された画像リンクは24時間有効です、お早めに保存してください
      operationId: createImageGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
            examples:
              text_to_image:
                summary: テキストから画像
                value:
                  model: doubao-seedream-5.0-flash
                  prompt: 美しい夕日を映す静かな湖
                  size: '16:9'
                  quality: 2K
      responses:
        '200':
          description: 画像生成タスクが正常に作成されました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          description: リクエストパラメータが不正です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 未認証、トークンが無効または期限切れです
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: クォータ不足のため、チャージが必要です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: insufficient_quota
                  message: Insufficient quota. Please top up your account.
                  type: insufficient_quota
        '403':
          description: アクセスが拒否されました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: model_access_denied
                  message: >-
                    Token does not have access to model:
                    doubao-seedream-5.0-flash
                  type: invalid_request_error
        '429':
          description: レート制限を超えました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: rate_limit_exceeded
                  message: Too many requests, please try again later
                  type: rate_limit_error
        '500':
          description: サーバー内部エラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: Internal server error
                  type: api_error
components:
  schemas:
    ImageGenerationRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: 画像生成モデル名
          enum:
            - doubao-seedream-5.0-flash
          default: doubao-seedream-5.0-flash
          example: doubao-seedream-5.0-flash
        prompt:
          type: string
          description: >-
            生成したい画像を説明するプロンプト、または入力画像の編集方法を説明するプロンプト


            **対応言語：** 中国語・英語のほか、Seedream 5.0 Flash
            はロシア語、アラビア語、フィリピン語、タイ語、トルコ語、韓国語、マレー語、スペイン語、ポルトガル語、インドネシア語、フランス語、ドイツ語、ベトナム語、日本語にも対応しています。


            **長さ制限：** 最大 `4000` トークン（中国語で約 2,600 字、英語で約 5,000 語）。超過した場合は `400`
            を返し、課金されません。


            **推奨：** 中国語は 300 字、英語は 600
            語以内を推奨します。制限内であっても長すぎると情報が分散し、モデルが細部を見落として画面の要素が欠けることがあります。
          example: 美しい夕日を映す静かな湖
        size:
          type: string
          description: >-
            生成画像のサイズ。2つの形式をサポートします：


            **方法1 - 比率形式：**

            - `auto`, `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`,
            `16:9`, `21:9`, `9:21`

            - `quality` パラメータと組み合わせると、ピクセルを手動で指定せずに、対応する比率と解像度の画像が自動生成されます


            **方法2 - ピクセル形式：**

            - 幅x高さ、例: `1024x1024`, `2048x2048`

            - 総ピクセル範囲: `[921600, 4624220]`

            - アスペクト比範囲: `[1/16, 16]`

            - 幅と高さはいずれも `14px` より大きい必要があります


            `size` を指定しない場合、デフォルトは `auto` です。`auto`
            は比率を指定しないという意味で、モデルがプロンプトに基づいて構図を判断し、出力解像度は `quality` で指定した段階に従います。
          default: auto
          example: '16:9'
        quality:
          type: string
          description: >-
            解像度レベル。`size` の比率形式と組み合わせて使用します。デフォルトは `1K` です。


            | 比率 | 1K | 1.5K | 2K |

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

            | `1:1` | 1024×1024 | 1536×1536 | 2048×2048 |

            | `2:3` | 832×1248 | 1248×1872 | 1664×2496 |

            | `3:2` | 1248×832 | 1872×1248 | 2496×1664 |

            | `3:4` | 864×1152 | 1344×1792 | 1776×2368 |

            | `4:3` | 1152×864 | 1792×1344 | 2368×1776 |

            | `4:5` | 896×1120 | 1344×1680 | 1792×2240 |

            | `5:4` | 1120×896 | 1680×1344 | 2240×1792 |

            | `9:16` | 800×1424 | 1152×2048 | 1584×2816 |

            | `16:9` | 1424×800 | 2048×1152 | 2816×1584 |

            | `21:9` | 1568×672 | 2352×1008 | 3136×1344 |

            | `9:21` | 672×1568 | 1008×2352 | 1344×3136 |


            **課金について：**

            - 画像単位で課金され、`1K`、`1.5K`、`2K` は同一価格です。`1.5K` と `2K`
            では追加料金なしでより高画質の画像を生成できます

            - `size` をピクセル形式で指定した場合も画像単位で課金され、ピクセル数による料金区分はありません
          enum:
            - 1K
            - 1.5K
            - 2K
          default: 1K
          example: 2K
        prompt_priority:
          type: string
          description: >-
            プロンプト最適化のモードを設定するための最適化戦略


            **オプション：**

            - `standard`：標準モード


            **注意：** Seedream 5.0 Flash は `standard` のみに対応しています。`fast` を指定すると
            `400` が返されます。Flash 自体が高速生成版のため、別の高速モードはありません。
          enum:
            - standard
          default: standard
          example: standard
        image_urls:
          type: array
          description: >-
            画像を基にした生成や画像編集に使用する参照画像 URL のリスト


            **注意：**

            - 参照画像は無料です

            - 1 回のリクエストにつき入力画像は最大 `10` 枚です

            - 画像サイズ：`30MB` 以下

            -
            対応形式：`.jpeg`、`.jpg`、`.png`、`.webp`、`.bmp`、`.tiff`、`.gif`、`.heic`、`.heif`

            - アスペクト比（幅/高さ）：`[1/16, 16]`

            - 幅と高さはどちらも `14px` より大きい必要があります

            - 総ピクセル数：`[196, 6000×6000]`

            - 画像 URL はサーバーから直接アクセスできるか、アクセス時に直接ダウンロードが始まる必要があります（通常、このような URL は
            `.png` や `.jpg` などの画像拡張子で終わります）
          items:
            type: string
            format: uri
          maxItems: 10
          example:
            - https://example.com/image1.png
            - https://example.com/image2.png
        output_format:
          type: string
          description: >-
            出力画像フォーマット


            **オプション：**

            - `png`：PNG フォーマット

            - `jpeg`：JPEG フォーマット


            **注意：** `background=transparent` の場合、出力は常に png です。`output_format`
            を省略すると自動で png になり、`jpeg` を指定すると拒否されます。
          enum:
            - png
            - jpeg
          default: jpeg
          example: jpeg
        watermark:
          type: boolean
          description: 生成画像にウォーターマークを追加するかどうか
          default: false
          example: false
        background:
          type: string
          description: >-
            透過チャンネルの設定


            **オプション：**

            - `opaque`：通常の不透明な背景（デフォルト）

            - `transparent`：入力画像に既存の透過チャンネルを保持します


            > `transparent` は入力画像に元からある透過背景を**保持する**機能であり、**背景を除去する機能ではありません**。


            **制限（`transparent` のみ）：**

            - 入力画像はちょうど 1 枚必要です

            - 入力は少なくとも 1 つの透過ピクセルを含む **PNG** である必要があります。webp、jpeg
            などの形式や透過ピクセルを含まない PNG はモデルに拒否されます（失敗したタスクは全額返金されます）

            - 出力は常に png です。`output_format` を省略すると自動で png
            になり、`output_format=jpeg` を指定すると拒否されます
          enum:
            - opaque
            - transparent
          default: opaque
          example: opaque
        callback_url:
          type: string
          description: >-
            タスク完了後の HTTPS コールバックアドレス


            **コールバックタイミング：**

            - タスクが完了、失敗、またはキャンセルされた時にトリガーされます

            - 課金確認完了後に送信されます


            **セキュリティ制限：**

            - HTTPS プロトコルのみサポート

            - 内部 IP アドレスへのコールバックは禁止（127.0.0.1、10.x.x.x、172.16-31.x.x、192.168.x.x
            など）

            - URL の長さは `2048` 文字以内


            **コールバックメカニズム：**

            - タイムアウト：`10` 秒

            - 失敗時最大 `3` 回リトライ（`1` 秒/`2` 秒/`4` 秒後にリトライ）

            - コールバックレスポンスボディの形式はタスククエリ API のレスポンス形式と一致

            - コールバックアドレスが 2xx ステータスコードを返した場合は成功とみなされ、その他のステータスコードはリトライをトリガーします
          format: uri
          example: https://your-domain.com/webhooks/image-task-completed
    ImageGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: タスク作成タイムスタンプ
          example: 1757165031
        id:
          type: string
          description: タスク ID
          example: task-unified-1757165031-seedream5flash
        model:
          type: string
          description: 使用された実際のモデル名
          example: doubao-seedream-5.0-flash
        object:
          type: string
          enum:
            - image.generation.task
          description: 具体的なタスクタイプ
        progress:
          type: integer
          description: タスク進捗率（0-100）
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: タスクステータス
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          $ref: '#/components/schemas/TaskInfo'
          description: 非同期タスク情報
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
          description: タスク出力タイプ
          example: image
        usage:
          $ref: '#/components/schemas/Usage'
          description: 使用量と課金情報
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: エラーコード識別子
            message:
              type: string
              description: エラーの説明
            type:
              type: string
              description: エラータイプ
    TaskInfo:
      type: object
      properties:
        can_cancel:
          type: boolean
          description: タスクをキャンセルできるかどうか
          example: true
        estimated_time:
          type: integer
          description: 推定完了時間（秒）
          minimum: 0
          example: 20
    Usage:
      type: object
      description: 使用量と課金情報
      properties:
        billing_rule:
          type: string
          description: 課金ルール
          enum:
            - per_call
            - per_image
            - per_token
            - per_second
          example: per_image
        credits_reserved:
          type: number
          description: 推定消費クレジット
          minimum: 0
          example: 1.1016
        user_group:
          type: string
          description: ユーザーグループカテゴリ
          example: default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##すべてのAPIにBearer Token認証が必要です##

        **APIキーの取得：**

        [APIキー管理ページ](https://evolink.ai/dashboard/keys)にアクセスしてAPIキーを取得してください

        **リクエストヘッダーに追加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````