> ## 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 Pro レイヤー分解

> - Seedream 5.0 Pro レイヤー分解（doubao-seedream-5.0-pro-layerize）は 1 枚の画像をベース画像と複数の独立したレイヤーに分割します。各レイヤーは透過チャンネル付きの PNG で、ベース画像の形式は `output_format` に従います
- 入力画像は**ちょうど 1 枚**必要です。`prompt` は任意で、指定しない場合はモデルが画像内の主要な要素をすべて自動で認識し、1 つずつ分解します
- 出力枚数は分解結果によって決まり（`1`～`17` 枚）、リクエストパラメータでは制御できません。いずれかのレイヤーが失敗するとリクエスト全体が失敗し、部分的な成功はありません。失敗した場合は全額返金されます
- 非同期処理モード、返却されたタスクIDで[照会](/ja/api-manual/task-management/get-task-detail)。タスク詳細の `result_data` では、各画像に `z_index`（重ね順。ベース画像は `0`、レイヤーは `1` から昇順）が付きます。レイヤーにはさらに `bounding_box`（`absolute` はベース画像の座標系でのピクセル座標、`normalized` は `0`～`1000` の範囲）、`name`、`description` が付きます
- 本モデルは通常の生成より時間がかかり、目安は約 `120` 秒です
- 生成された画像リンクは24時間有効です、お早めに保存してください



## OpenAPI

````yaml ja/api-manual/image-series/seedream/seedream-5.0-pro-layerize-image-generate.json POST /v1/images/generations
openapi: 3.1.0
info:
  title: doubao-seedream-5.0-pro-layerize インターフェース
  description: Seedream 5.0 Pro のレイヤー分解モデルで、1 枚の画像をベース画像と複数の編集可能なレイヤーに分割します
  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-pro-layerize インターフェース
      description: >-
        - Seedream 5.0 Pro レイヤー分解（doubao-seedream-5.0-pro-layerize）は 1
        枚の画像をベース画像と複数の独立したレイヤーに分割します。各レイヤーは透過チャンネル付きの PNG で、ベース画像の形式は
        `output_format` に従います

        - 入力画像は**ちょうど 1 枚**必要です。`prompt` は任意で、指定しない場合はモデルが画像内の主要な要素をすべて自動で認識し、1
        つずつ分解します

        - 出力枚数は分解結果によって決まり（`1`～`17`
        枚）、リクエストパラメータでは制御できません。いずれかのレイヤーが失敗するとリクエスト全体が失敗し、部分的な成功はありません。失敗した場合は全額返金されます

        -
        非同期処理モード、返却されたタスクIDで[照会](/ja/api-manual/task-management/get-task-detail)。タスク詳細の
        `result_data` では、各画像に `z_index`（重ね順。ベース画像は `0`、レイヤーは `1`
        から昇順）が付きます。レイヤーにはさらに `bounding_box`（`absolute`
        はベース画像の座標系でのピクセル座標、`normalized` は `0`～`1000` の範囲）、`name`、`description`
        が付きます

        - 本モデルは通常の生成より時間がかかり、目安は約 `120` 秒です

        - 生成された画像リンクは24時間有効です、お早めに保存してください
      operationId: createSeedreamLayerizeImageGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
            examples:
              auto_layerize:
                summary: 自動分解（prompt なし）
                value:
                  model: doubao-seedream-5.0-pro-layerize
                  image_urls:
                    - https://example.com/poster.png
                  quality: auto
                  output_format: jpeg
              prompt_layerize:
                summary: 自然言語で対象を指定
                value:
                  model: doubao-seedream-5.0-pro-layerize
                  prompt: オウムとタイトル文字を分解して
                  image_urls:
                    - https://example.com/poster.png
                  quality: 2K
              bbox_layerize:
                summary: bbox 座標で正確に指定
                value:
                  model: doubao-seedream-5.0-pro-layerize
                  prompt: >-
                    タイトル文字<bbox>179 58 809 197</bbox>、オウム1羽<bbox>330 274 641
                    991</bbox>
                  image_urls:
                    - https://example.com/poster.png
                  quality: 1.5K
      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-pro-layerize
                  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
        - image_urls
      properties:
        model:
          type: string
          description: 画像生成モデル名
          enum:
            - doubao-seedream-5.0-pro-layerize
          default: doubao-seedream-5.0-pro-layerize
          example: doubao-seedream-5.0-pro-layerize
        image_urls:
          type: array
          description: >-
            分解対象の画像 URL（必須）


            **注意:**

            - **ちょうど `1` 枚が必要**です。指定しない場合や `2` 枚以上を指定した場合はエラーになります

            - サポートされる形式: `.png`、`.jpeg`、`.jpg`（通常の生成より厳しく、webp などは拒否されます）

            - 画像サイズ: 最大 `30MB`

            - 総ピクセル数: `[262144, 6000×6000]`、つまり最低 `512×512`（通常の生成より下限が高い）

            - 縦横比（幅/高さ）の範囲: `[1/16, 16]`

            -
            画像URLはサーバーから直接参照できるか、アクセス時に直接ダウンロードが始まる必要があります（通常このようなURLは`.png`や`.jpg`などの画像拡張子で終わります）
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 1
          example:
            - https://example.com/poster.png
        prompt:
          type: string
          description: >-
            分解したい要素の指定（任意）


            **3 つの使い方：**

            - **指定しない**：モデルが画像内の主要な要素をすべて認識し、1 つずつ分解します

            - **自然言語**：例 `オウムとタイトル文字を分解して`。意味を解釈して要素を判別し、レイヤーに分けます

            - **座標指定**：`<bbox>` タグで位置を指定します。例 `タイトル文字<bbox>179 58 809
            197</bbox>`。正規化座標（`0`～`1000`）の使用を推奨します
          example: オウムとタイトル文字を分解して
        quality:
          type: string
          description: >-
            出力段階。デフォルトは `auto`


            **オプション：** `auto`、`1K`、`1.5K`、`2K`


            **説明：**

            - レイヤーモードは**段階のみ受け付けます**。比率（`16:9` など）やピクセル指定（`2048x2048`
            など）を渡すとエラーになります

            - `auto` は出力が入力画像に従うことを意味します。元のサイズが `[921600, 4624220]`
            ピクセルの範囲内であればそのまま、1K 未満なら 1K、2K を超えるなら 2K で出力されます

            - 各レイヤーは元画像での縦横比をそれぞれ保持し、ベース画像の縦横比は入力画像と同じです


            **課金について：** 段階は出力画像ごとにその画像自身のピクセル数で判定されます。`1K` と `1.5K` は同一価格で、1
            枚の出力が `2610000` ピクセルを超えると高い段階の価格になります。
          enum:
            - auto
            - 1K
            - 1.5K
            - 2K
          default: auto
          example: auto
        prompt_priority:
          type: string
          description: |-
            プロンプト最適化のモードを設定するために使用されるプロンプト最適化戦略

            **オプション:**
            - `standard`: 標準モード、より高品質な出力、処理時間が長い
            - `fast`: 高速モード、処理時間が短く、品質は標準モードよりやや劣ります
          enum:
            - standard
            - fast
          default: standard
          example: standard
        output_format:
          type: string
          description: >-
            出力画像フォーマット


            **オプション：**

            - `jpeg`: JPEG フォーマット（デフォルト）

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


            **注意：** このパラメータは**ベース画像のみを制御します**。分解されたレイヤーは常に透過チャンネル付きの png
            で、この設定の影響を受けません。
          enum:
            - jpeg
            - png
          default: jpeg
          example: jpeg
        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-seedream5prolayerize
        model:
          type: string
          description: 使用された実際のモデル名
          example: doubao-seedream-5.0-pro-layerize
        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: 120
    Usage:
      type: object
      description: 使用量と課金情報
      properties:
        billing_rule:
          type: string
          description: 課金ルール
          enum:
            - per_call
            - per_token
            - per_second
          example: per_call
        credits_reserved:
          type: number
          description: 推定消費クレジット
          minimum: 0
          example: 39.168
        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
        ```

````