# Seedream5.5 - Layer Decomposition

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v1/jobs/createTask:
    post:
      summary: Seedream5.5 - Layer Decomposition
      deprecated: false
      description: >
        Layer decomposition with Seedream 5.5: split an image into a base image
        and separate layers.


        :::tip

        Billing = input image fee + number of images actually returned (base
        image plus every separated layer) × the per-image price of the selected
        `size` tier (`auto` is billed at the 2K rate). Use `max_images` to cap
        the output count. For current prices, see
        [kie.ai/pricing](https://kie.ai/pricing).

        :::


        ## Query Task Status


        After submitting a task, use the unified query endpoint to check
        progress and retrieve results:


        <Card title="Get Task Details" icon="lucide-search"
        href="/market/common/get-task-detail">
          Learn how to query task status and retrieve generation results
        </Card>


        ::: tip[]

        For production use, we recommend using the `callBackUrl` parameter to
        receive automatic notifications when generation completes, rather than
        polling the status endpoint.

        :::


        ## Related Resources


        <CardGroup cols={2}>
          <Card title="Market Overview" icon="lucide-store" href="/market/quickstart">
            Explore all available models
          </Card>
          <Card title="Common API" icon="lucide-cog" href="/common-api/get-account-credits">
            Check credits and account usage
          </Card>
        </CardGroup>
      operationId: seedream-5-5-layer-decomposition
      tags:
        - docs/en/Market/Image    Models/Seedream
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              properties:
                model:
                  default: seedream/5-5-layer-decomposition
                  description: >-
                    The model name used to execute the layer decomposition task.
                    Required field.


                    - Must be `seedream/5-5-layer-decomposition` for this
                    endpoint
                  enum:
                    - seedream/5-5-layer-decomposition
                  examples:
                    - seedream/5-5-layer-decomposition
                  type: string
                  x-apidog-enum:
                    - description: ''
                      name: ''
                      value: seedream/5-5-layer-decomposition
                callBackUrl:
                  description: >-
                    The URL to receive task completion notifications. Optional,
                    but recommended for production environments.


                    - Upon task completion, the system will send a POST request
                    to this URL

                    - The callback content includes task status, generated
                    result URLs, and task information

                    - You can also actively query the task status through the
                    get task details interface

                    - For callback signature verification methods, please refer
                    to the [Webhook Verification
                    Guide](/common-api/webhook-verification)
                  examples:
                    - https://your-domain.com/api/callback
                  format: uri
                  type: string
                input:
                  description: Input parameters for the layer decomposition task
                  properties:
                    image_url:
                      type: string
                      format: uri
                      examples:
                        - >-
                          https://static.aiquickdraw.com/tools/example/1786019968051_cKRYLHHu.png
                      description: |-
                        Required. URL of the image to decompose.

                        - Exactly 1 image, publicly accessible URL
                        - Supported formats: JPEG, PNG, WEBP
                        - Max 10 MB
                    prompt:
                      type: string
                      description: >-
                        Optional. Describes which elements to separate, 0–2000
                        characters.


                        - When provided, the model separates the described
                        elements

                        - When empty, the model identifies the main elements
                        automatically

                        - You can use `<bbox>x1 y1 x2 y2</bbox>` to mark element
                        positions, with coordinates normalized to 0–1000
                      minLength: 0
                      maxLength: 2000
                      examples:
                        - >-
                          Separate the title text <bbox>179 58 809 197</bbox>
                          and the parrot <bbox>330 274 641 991</bbox> into
                          independent layers
                    size:
                      type: string
                      description: >-
                        Resolution tier of the output images. Defaults to
                        `auto`.


                        - `auto`: keeps the input size (raised to 1K if smaller,
                        reduced to 2K if larger); billed at the 2K rate

                        - `1K` / `1.5K` / `2K`: fixed resolution tier
                      enum:
                        - auto
                        - 1K
                        - 1.5K
                        - 2K
                      examples:
                        - auto
                      x-apidog-enum:
                        - value: auto
                          name: ''
                          description: Keep the input size (clamped to 1K–2K)
                        - value: 1K
                          name: ''
                          description: 1K resolution tier
                        - value: 1.5K
                          name: ''
                          description: 1.5K resolution tier
                        - value: 2K
                          name: ''
                          description: 2K resolution tier
                      default: auto
                    output_format:
                      type: string
                      description: >-
                        Format of the base image. Defaults to `png`. Only
                        affects the base image; separated layers are always PNG
                        (transparent background).
                      enum:
                        - png
                        - jpeg
                      examples:
                        - png
                      x-apidog-enum:
                        - value: png
                          name: ''
                          description: ''
                        - value: jpeg
                          name: ''
                          description: ''
                      default: png
                    max_images:
                      type: integer
                      minimum: 2
                      maximum: 100
                      default: 30
                      examples:
                        - 30
                      description: >-
                        Maximum number of output images, including the base
                        image. Range 2–100, defaults to 30. Billing is based on
                        the number of images actually returned.
                    text_recognition:
                      type: boolean
                      default: false
                      examples:
                        - false
                      description: >-
                        Whether to recognize text in the layers. Defaults to
                        `false`.
                    nsfw_checker:
                      type: boolean
                      description: >-
                        Defaults to false. When false, no additional content
                        filtering is applied and results are returned directly
                        by the model.
                  required:
                    - image_url
                  type: object
                  x-apidog-orders:
                    - image_url
                    - prompt
                    - size
                    - output_format
                    - max_images
                    - text_recognition
                    - 01MBF2DFBE7H80WFDHECZZMD8F
                  x-apidog-refs:
                    01MBF2DFBE7H80WFDHECZZMD8F:
                      $ref: '#/components/schemas/nsfw_checker'
                  x-apidog-ignore-properties:
                    - nsfw_checker
              required:
                - model
                - input
              type: object
              x-apidog-orders:
                - model
                - callBackUrl
                - input
              x-apidog-ignore-properties: []
            example:
              model: seedream/5-5-layer-decomposition
              callBackUrl: https://your-domain.com/api/callback
              input:
                image_url: >-
                  https://static.aiquickdraw.com/tools/example/1786019968051_cKRYLHHu.png
                prompt: >-
                  Separate the title text <bbox>179 58 809 197</bbox> and the
                  parrot <bbox>330 274 641 991</bbox> into independent layers
                size: auto
                output_format: png
                max_images: 30
                text_recognition: false
                nsfw_checker: false
      responses:
        '200':
          description: Request successful.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/response%20not%20with%20recordId'
          headers: {}
          x-apidog-name: Success
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: >-
                      Response status code


                      - **200**: Success - Request has been processed
                      successfully

                      - **401**: Unauthorized - Authentication credentials are
                      missing or invalid

                      - **402**: Insufficient Credits - Account does not have
                      enough credits to perform the operation

                      - **404**: Not Found - The requested resource or endpoint
                      does not exist

                      - **408**: Timeout - No result has been returned for over
                      10 minutes.

                      - **422**: Validation Error - The request parameters
                      failed validation checks

                      - **429**: Rate Limited - Request limit has been exceeded
                      for this resource

                      - **455**: Service Unavailable - System is currently
                      undergoing maintenance

                      - **500**: Server Error - An unexpected error occurred
                      while processing the request

                      - **501**: Generation Failed - Content generation task
                      failed

                      - **505**: Feature Disabled - The requested feature is
                      currently disabled
                  msg:
                    type: string
                    description: Response message, error description when failed
                  data:
                    type: object
                    properties: {}
                    x-apidog-orders: []
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - code
                  - msg
                  - data
                required:
                  - code
                  - msg
                  - data
                x-apidog-ignore-properties: []
              example:
                code: 500
                msg: >-
                  Server Error - An unexpected error occurred while processing
                  the request
                data: null
          headers: {}
          x-apidog-name: Error
      security:
        - BearerAuth: []
          x-apidog:
            schemeGroups:
              - id: kn8M4YUlc5i0A0179ezwx
                schemeIds:
                  - BearerAuth
            required: true
            use:
              id: kn8M4YUlc5i0A0179ezwx
            scopes:
              kn8M4YUlc5i0A0179ezwx:
                BearerAuth: []
      callbacks:
        onImageGenerated:
          '{$request.body#/callBackUrl}':
            post:
              summary: Image Generation Callback
              description: Sent when the task succeeds or fails.
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        code:
                          type: integer
                          description: >-
                            200 indicates success; any other value indicates
                            failure (e.g., 501).
                          enum:
                            - 200
                            - 501
                        msg:
                          type: string
                          description: Status message
                          example: Playground task completed successfully.
                        data:
                          type: object
                          properties:
                            taskId:
                              type: string
                              description: Task ID
                              example: 37431da86ba51e56243d5ed2b277053d
                            model:
                              type: string
                              description: >-
                                Model used for the image layer decomposition
                                task
                              example: seedream/5-5-layer-decomposition
                            state:
                              type: string
                              description: Task status
                              enum:
                                - success
                                - fail
                              example: success
                            param:
                              type: string
                              description: >-
                                Parameters submitted when creating the task, in
                                JSON string format
                              example: >-
                                {"input": "{\"image_url\":
                                \"https://static.aiquickdraw.com/tools/example/1786019968051_cKRYLHHu.png\",
                                \"prompt\": \"Separate the title text <bbox>179
                                58 809 197</bbox> and the parrot <bbox>330 274
                                641 991</bbox> into independent layers\",
                                \"size\": \"auto\", \"output_format\": \"png\",
                                \"max_images\": 30, \"text_recognition\": false,
                                \"nsfw_checker\": false}", "callBackUrl":
                                "https://your-domain.com/api/callback", "model":
                                "seedream/5-5-layer-decomposition"}
                            resultJson:
                              type: string
                              description: >-
                                JSON string of the generation result. Present
                                only when state is success. After parsing:
                                resultUrls lists the base image first, followed
                                by each separated layer;
                                resultObject.layers_data describes each layer
                                (z_index 0 is the base image and has no
                                bounding_box/name/description).
                              example: >-
                                {"resultObject":{"layers_data":[{"z_index":0,"size":"1080x1080","output_format":"png","url":"https://tempfile.aiquickdraw.com/seedream55/1794408433585-buxhz9pdgj9.png"},{"z_index":1,"size":"1726x608","output_format":"png","bounding_box":{"absolute":[75,0,998,325],"normalized":[69,0,924,301]},"name":"Bright
                                yellow serif title text
                                “Seedream”","description":"Bright yellow serif
                                title text
                                “Seedream”","url":"https://tempfile.aiquickdraw.com/seedream55/1794408434582-mqvvxfi3d1.png"},{"z_index":2,"size":"823x1275","output_format":"png","bounding_box":{"absolute":[248,195,819,1080],"normalized":[230,181,758,1000]},"name":"Scarlet
                                macaw with red head, yellow-green and blue
                                gradient wings, perched on a moss-covered
                                branch","description":"Scarlet macaw with red
                                head, yellow-green and blue gradient wings,
                                perched on a moss-covered
                                branch","url":"https://tempfile.aiquickdraw.com/seedream55/1794408435078-xpwm3rwghhk.png"}]},"resultUrls":["https://tempfile.aiquickdraw.com/seedream55/1794408433585-buxhz9pdgj9.png","https://tempfile.aiquickdraw.com/seedream55/1794408434582-mqvvxfi3d1.png","https://tempfile.aiquickdraw.com/seedream55/1794408435078-xpwm3rwghhk.png"]}
                            completeTime:
                              type: integer
                              format: int64
                              description: >-
                                Task completion time, represented as a Unix
                                timestamp in milliseconds
                              example: 1794408435748
                            costTime:
                              type: integer
                              description: >-
                                Processing time in seconds. Present on both
                                success and failure callbacks.
                              example: 17
                            createTime:
                              type: integer
                              format: int64
                              description: >-
                                Task creation time, represented as a Unix
                                timestamp in milliseconds
                              example: 1794408417940
                            creditsConsumed:
                              type: number
                              format: double
                              description: >-
                                Credits consumed by the task; 0 for failed
                                tasks.
                              example: 20.34
                            updateTime:
                              type: integer
                              format: int64
                              description: >-
                                Use completeTime as the completion time;
                                updateTime may equal createTime.
                              example: 1794408435748
                            failCode:
                              type: string
                              description: >-
                                Failure code, a numeric string such as "400" or
                                "500". Present only when state is fail.
                              example: '500'
                            failMsg:
                              type: string
                              description: Failure reason. Present only when state is fail.
                              example: <error detail>
                    examples:
                      success:
                        summary: Success
                        value:
                          code: 200
                          msg: Playground task completed successfully.
                          data:
                            taskId: 37431da86ba51e56243d5ed2b277053d
                            model: seedream/5-5-layer-decomposition
                            state: success
                            param: >-
                              {"input": "{\"image_url\":
                              \"https://static.aiquickdraw.com/tools/example/1786019968051_cKRYLHHu.png\",
                              \"prompt\": \"Separate the title text <bbox>179 58
                              809 197</bbox> and the parrot <bbox>330 274 641
                              991</bbox> into independent layers\", \"size\":
                              \"auto\", \"output_format\": \"png\",
                              \"max_images\": 30, \"text_recognition\": false,
                              \"nsfw_checker\": false}", "callBackUrl":
                              "https://your-domain.com/api/callback", "model":
                              "seedream/5-5-layer-decomposition"}
                            resultJson: >-
                              {"resultObject":{"layers_data":[{"z_index":0,"size":"1080x1080","output_format":"png","url":"https://tempfile.aiquickdraw.com/seedream55/1794408433585-buxhz9pdgj9.png"},{"z_index":1,"size":"1726x608","output_format":"png","bounding_box":{"absolute":[75,0,998,325],"normalized":[69,0,924,301]},"name":"Bright
                              yellow serif title text
                              “Seedream”","description":"Bright yellow serif
                              title text
                              “Seedream”","url":"https://tempfile.aiquickdraw.com/seedream55/1794408434582-mqvvxfi3d1.png"},{"z_index":2,"size":"823x1275","output_format":"png","bounding_box":{"absolute":[248,195,819,1080],"normalized":[230,181,758,1000]},"name":"Scarlet
                              macaw with red head, yellow-green and blue
                              gradient wings, perched on a moss-covered
                              branch","description":"Scarlet macaw with red
                              head, yellow-green and blue gradient wings,
                              perched on a moss-covered
                              branch","url":"https://tempfile.aiquickdraw.com/seedream55/1794408435078-xpwm3rwghhk.png"}]},"resultUrls":["https://tempfile.aiquickdraw.com/seedream55/1794408433585-buxhz9pdgj9.png","https://tempfile.aiquickdraw.com/seedream55/1794408434582-mqvvxfi3d1.png","https://tempfile.aiquickdraw.com/seedream55/1794408435078-xpwm3rwghhk.png"]}
                            completeTime: 1794408435748
                            createTime: 1794408417940
                            costTime: 17
                            creditsConsumed: 20.34
                            updateTime: 1794408435748
                      failure:
                        summary: Failure
                        value:
                          code: 501
                          msg: Playground task failed.
                          data:
                            taskId: 37431da86ba51e56243d5ed2b277053d
                            model: seedream/5-5-layer-decomposition
                            state: fail
                            param: >-
                              {"input": "{\"image_url\":
                              \"https://static.aiquickdraw.com/tools/example/1786019968051_cKRYLHHu.png\",
                              \"prompt\": \"Separate the title text <bbox>179 58
                              809 197</bbox> and the parrot <bbox>330 274 641
                              991</bbox> into independent layers\", \"size\":
                              \"auto\", \"output_format\": \"png\",
                              \"max_images\": 30, \"text_recognition\": false,
                              \"nsfw_checker\": false}", "callBackUrl":
                              "https://your-domain.com/api/callback", "model":
                              "seedream/5-5-layer-decomposition"}
                            failCode: '500'
                            failMsg: <error detail>
                            completeTime: 1794408435748
                            createTime: 1794408417940
                            costTime: 17
                            creditsConsumed: 0
                            updateTime: 1794408435748
              responses:
                '200':
                  description: Callback received successfully
      x-apidog-folder: docs/en/Market/Image    Models/Seedream
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1184766/apis/api-46825521-run
components:
  schemas:
    nsfw_checker:
      type: object
      properties:
        nsfw_checker:
          type: boolean
          description: >-
            Defaults to false. When false, no additional content filtering is
            applied and results are returned directly by the model.
      x-apidog-orders:
        - nsfw_checker
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    response not with recordId:
      type: object
      required:
        - data
      properties:
        code:
          type: integer
          description: >-
            Status code of the request. The HTTP status is 200 even when the
            request fails, so always check this field: 200 means success; any
            other value means the request failed and msg describes the reason.
            Common values: 401 invalid or missing API key; 402 insufficient
            credits; 429 rate limit exceeded; 422 or 500 the request could not
            be processed (read msg and check your parameters before retrying).
          enum:
            - 200
            - 401
            - 402
            - 404
            - 422
            - 429
            - 433
            - 455
            - 500
            - 501
            - 505
        msg:
          type: string
          description: Response message, error description upon failure
          examples:
            - success
        data:
          type: object
          required:
            - taskId
          properties:
            taskId:
              type: string
              description: >-
                The task ID can be used with the "Get Task Details" endpoint to
                query the task status.
              examples:
                - dc1928bfcbc77cb6c85f3359a9c718b3
          x-apidog-orders:
            - taskId
          x-apidog-ignore-properties: []
      x-apidog-orders:
        - code
        - msg
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    BearerAuth:
      type: bearer
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All API requests require a Bearer Token. Add the header `Authorization:
        Bearer YOUR_API_KEY` to authenticate requests.
    BearerAuth1:
      type: bearer
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 请求都需要 Bearer Token。请在请求头中添加 `Authorization: Bearer YOUR_API_KEY`
        进行身份验证。
servers:
  - url: https://api.kie.ai
    description: 正式环境
security:
  - BearerAuth: []
    x-apidog:
      schemeGroups:
        - id: kn8M4YUlc5i0A0179ezwx
          schemeIds:
            - BearerAuth
      required: true
      use:
        id: kn8M4YUlc5i0A0179ezwx
      scopes:
        kn8M4YUlc5i0A0179ezwx:
          BearerAuth: []

```
