> ## 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 Layer Decomposition

> - Seedream 5.0 Pro Layer Decomposition (doubao-seedream-5.0-pro-layerize) splits one image into a base image and several independent layers; every layer is a PNG with an alpha channel, while the base image format follows `output_format`
- Exactly **one** input image is required; `prompt` is optional — omit it and the model automatically detects every major element in the image and splits them one by one
- The number of output images is decided by the decomposition result (`1` ~ `17`) and cannot be controlled by request parameters; if any layer fails the whole request fails — there is no partial success, and a failed request is fully refunded
- Asynchronous processing mode, use the returned task ID to [query](/en/api-manual/task-management/get-task-detail). In the task detail, every item in `result_data` carries `z_index` (stacking order: `0` for the base image, incrementing from `1` for layers); layers additionally carry `bounding_box` (`absolute` in base-image pixel coordinates, `normalized` in the `0`~`1000` range), `name` and `description`
- This model takes longer than plain generation: about `120` seconds
- Generated image links are valid for 24 hours, please save them promptly



## OpenAPI

````yaml en/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 Interface
  description: >-
    Use the Seedream 5.0 Pro layer decomposition model to split one image into a
    base image and multiple editable layers
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: Production environment
security:
  - bearerAuth: []
tags:
  - name: Image Generation
    description: AI image generation related APIs
paths:
  /v1/images/generations:
    post:
      tags:
        - Image Generation
      summary: doubao-seedream-5.0-pro-layerize Interface
      description: >-
        - Seedream 5.0 Pro Layer Decomposition
        (doubao-seedream-5.0-pro-layerize) splits one image into a base image
        and several independent layers; every layer is a PNG with an alpha
        channel, while the base image format follows `output_format`

        - Exactly **one** input image is required; `prompt` is optional — omit
        it and the model automatically detects every major element in the image
        and splits them one by one

        - The number of output images is decided by the decomposition result
        (`1` ~ `17`) and cannot be controlled by request parameters; if any
        layer fails the whole request fails — there is no partial success, and a
        failed request is fully refunded

        - Asynchronous processing mode, use the returned task ID to
        [query](/en/api-manual/task-management/get-task-detail). In the task
        detail, every item in `result_data` carries `z_index` (stacking order:
        `0` for the base image, incrementing from `1` for layers); layers
        additionally carry `bounding_box` (`absolute` in base-image pixel
        coordinates, `normalized` in the `0`~`1000` range), `name` and
        `description`

        - This model takes longer than plain generation: about `120` seconds

        - Generated image links are valid for 24 hours, please save them
        promptly
      operationId: createSeedreamLayerizeImageGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
            examples:
              auto_layerize:
                summary: Automatic decomposition (no prompt)
                value:
                  model: doubao-seedream-5.0-pro-layerize
                  image_urls:
                    - https://example.com/poster.png
                  quality: auto
                  output_format: jpeg
              prompt_layerize:
                summary: Specify elements in natural language
                value:
                  model: doubao-seedream-5.0-pro-layerize
                  prompt: Split out the parrot and the title text
                  image_urls:
                    - https://example.com/poster.png
                  quality: 2K
              bbox_layerize:
                summary: Specify with bbox coordinates
                value:
                  model: doubao-seedream-5.0-pro-layerize
                  prompt: >-
                    title text<bbox>179 58 809 197</bbox>, 1 parrot<bbox>330 274
                    641 991</bbox>
                  image_urls:
                    - https://example.com/poster.png
                  quality: 1.5K
      responses:
        '200':
          description: Image generation task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: Unauthenticated, invalid or expired token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: Insufficient quota, recharge required
          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: Access denied
          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: Rate limit exceeded
          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: Internal server error
          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: Image generation model name
          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 of the image to decompose (required)


            **Note:**

            - **Exactly `1` image is required**; omitting it or passing `2` or
            more returns an error

            - Supported formats: `.png`, `.jpeg`, `.jpg` (stricter than plain
            generation — webp and others are rejected)

            - Image size: no more than `30MB`

            - Total pixels: `[262144, 6000×6000]`, i.e. at least `512×512` (a
            higher lower bound than plain generation)

            - Aspect ratio (width/height) range: `[1/16, 16]`

            - The image URL must be directly viewable by the server, or the URL
            must trigger a direct download when accessed (usually such URLs end
            with an image file extension, such as `.png`, `.jpg`)
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 1
          example:
            - https://example.com/poster.png
        prompt:
          type: string
          description: >-
            Which elements to split out (optional)


            **Three ways to use it:**

            - **Omit it**: the model detects every major element in the image
            and splits them one by one

            - **Natural language**: e.g. `Split out the parrot and the title
            text` — elements are identified semantically and turned into layers

            - **Exact coordinates**: use `<bbox>` tags to pin down a position,
            e.g. `title text<bbox>179 58 809 197</bbox>`; normalized coordinates
            (`0`~`1000`) are recommended
          example: Split out the parrot and the title text
        quality:
          type: string
          description: >-
            Output resolution tier, defaults to `auto`


            **Options:** `auto`, `1K`, `1.5K`, `2K`


            **Notes:**

            - Layer mode **only accepts tiers**; passing a ratio (such as
            `16:9`) or explicit pixels (such as `2048x2048`) returns an error

            - `auto` makes the output follow the input image: if the original
            size falls within `[921600, 4624220]` pixels it is kept as is, below
            1K it is output at 1K, above 2K it is output at 2K

            - Each layer keeps its own aspect ratio from the original image, and
            the base image keeps the aspect ratio of the input


            **Billing:** the tier is decided per output image from its own pixel
            count; `1K` and `1.5K` cost the same, and an output image above
            `2610000` pixels is billed at the higher tier.
          enum:
            - auto
            - 1K
            - 1.5K
            - 2K
          default: auto
          example: auto
        prompt_priority:
          type: string
          description: >-
            Prompt optimization strategy, used to set the mode for prompt
            optimization


            **Options:**

            - `standard`: Standard mode, higher quality output, longer
            processing time

            - `fast`: Fast mode, shorter processing time, slightly lower quality
            than standard mode
          enum:
            - standard
            - fast
          default: standard
          example: standard
        output_format:
          type: string
          description: >-
            Output image format


            **Options:**

            - `jpeg`: JPEG format (default)

            - `png`: PNG format


            **Note:** This parameter **only controls the base image**. The
            layers are always PNG with an alpha channel and are not affected by
            it.
          enum:
            - jpeg
            - png
          default: jpeg
          example: jpeg
        callback_url:
          type: string
          description: >-
            HTTPS callback address after task completion


            **Callback Timing:**

            - Triggered when task is completed, failed, or cancelled

            - Sent after billing confirmation is completed


            **Security Restrictions:**

            - Only HTTPS protocol is supported

            - Callback to internal IP addresses is prohibited (127.0.0.1,
            10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)

            - URL length must not exceed `2048` characters


            **Callback Mechanism:**

            - Timeout: `10` seconds

            - Maximum `3` retries on failure (retries after `1` second/`2`
            seconds/`4` seconds)

            - Callback response body format is consistent with the task query
            API response format

            - Callback address returning 2xx status code is considered
            successful, other status codes will trigger retry
          format: uri
          example: https://your-domain.com/webhooks/image-task-completed
    ImageGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: Task creation timestamp
          example: 1757165031
        id:
          type: string
          description: Task ID
          example: task-unified-1757165031-seedream5prolayerize
        model:
          type: string
          description: Actual model name used
          example: doubao-seedream-5.0-pro-layerize
        object:
          type: string
          enum:
            - image.generation.task
          description: Specific task type
        progress:
          type: integer
          description: Task progress percentage (0-100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: Task status
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          $ref: '#/components/schemas/TaskInfo'
          description: Async task information
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
          description: Task output type
          example: image
        usage:
          $ref: '#/components/schemas/Usage'
          description: Usage and billing information
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code identifier
            message:
              type: string
              description: Error description
            type:
              type: string
              description: Error type
    TaskInfo:
      type: object
      properties:
        can_cancel:
          type: boolean
          description: Whether the task can be cancelled
          example: true
        estimated_time:
          type: integer
          description: Estimated completion time (seconds)
          minimum: 0
          example: 120
    Usage:
      type: object
      description: Usage and billing information
      properties:
        billing_rule:
          type: string
          description: Billing rule
          enum:
            - per_call
            - per_token
            - per_second
          example: per_call
        credits_reserved:
          type: number
          description: Estimated credits consumed
          minimum: 0
          example: 39.168
        user_group:
          type: string
          description: User group category
          example: default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ##All APIs require Bearer Token authentication##


        **Get API Key:**


        Visit [API Key Management Page](https://evolink.ai/dashboard/keys) to
        get your API Key


        **Add to request header:**

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````