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

# Seedream 5.5 图层拆分

> Seedream 5.5 图层拆分 API 把一张图片拆成 2–100 个独立图层图片，每个图层附带位置和名称信息，可选 OCR 文字。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)接口获取结果。

Seedream 5.5 图层拆分把一张合成图片（如海报、横幅、UI 稿或插画）拆成一张底图和多个独立的透明图层。每个图层作为单独的文件返回，并附带位置和名称信息，便于重新排布或编辑。开启 `text_recognition` 还能得到文字图层的识别文本。

Seedream 5.5 是字节跳动的图像模型。Vidgo 提供三个模型 ID：[文生图](https://docs.vidgo.ai/zh/api-manual/image-series/bytedance-seedream-v5-5-text-to-image.md)、[图像编辑](https://docs.vidgo.ai/zh/api-manual/image-series/bytedance-seedream-v5-5-edit.md)和[图层拆分](https://docs.vidgo.ai/zh/api-manual/image-series/bytedance-seedream-v5-5-layerize.md)。

## 模型

* **bytedance/seedream-v5.5/layerize** — Seedream 5.5 图层拆分，输入一张图片，输出 2–100 张图片。

## 功能

* 把一张图片拆成 2–100 张图片：一张底图加多个独立图层。
* 每个图层的元信息：`files[].layer` 中的位置和图层名称。
* 用 `text_recognition` 为文字图层做 OCR 识别。
* 可用提示词指定要拆分的元素。

## 必填参数

* `image_urls` (string\[])：恰好一个公开的 HTTP(S) 图片 URL。

## 可选参数

* `prompt` (string)：说明要拆分出哪些元素，最多 2,000 个字符。
* `resolution` (string)：`auto`、`1K`、`1.5K` 或 `2K`。默认 `auto`。
* `max_images` (integer)：返回图片数量上限（包含底图），`2`–`100`。默认 `30`。
* `output_format` (string)：`png` 或 `jpeg`。默认 `png`。
* `text_recognition` (boolean)：把识别出的文字写入文字图层的元信息。默认 `false`。
* `enable_safety_checker` (boolean)：默认 `true`。

## 输出

任务完成后，[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)接口和回调内容的 `files` 数组中分别返回底图和各个图层。每一项除 `file_url` 和 `file_type` 外，还带有 `layer` 对象，包含该图层的位置和名称；`text_recognition` 为 `true` 时还包含识别文本。返回的图层数量由模型决定，最多 `max_images` 张。

## 示例

* **场景拆分并识别文字**：把火车站候车室图片中的乘客、站务员、长椅、窗户、墙上标牌和背景拆成图层，`max_images: 8`，`1K`，`text_recognition: true`；该任务返回了 6 张图片 ([结果](https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.5/layerize/v1/01/layer-01.png))。

## 注意事项

* `model` 和 `callback_url` 放在请求根级，与 `input` 并列。`input` 接收上文列出的字段，其他字段返回 400。
* 积分在提交时按 `max_images` 张图片、以 `resolution` 对应费率预扣（`auto` 按 2K 费率），另加输入图片的费用。返回图片少于 `max_images` 时，任务完成后退还差额。任务失败全额退还。当前费率见[定价页](https://vidgo.ai/apis/api-pricing)。


## OpenAPI

````yaml zh/api-manual/image-series/bytedance-seedream-v5-5-layerize.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Seedream 5.5 图层拆分
  description: Seedream 5.5 图层拆分 API 把一张图片拆成 2–100 个独立图层图片，每个图层附带位置和名称信息，可选 OCR 文字。
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境服务器
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Seedream 5.5 Layerize
      summary: 提交 Seedream 5.5 图层拆分 任务
      operationId: submitSeedream55LayerizeTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              layerize-with-ocr:
                summary: 拆分图层并识别文字
                value:
                  model: bytedance/seedream-v5.5/layerize
                  input:
                    prompt: >-
                      Separate the foreground passengers, station attendant,
                      bench, window, wall sign text, and background into
                      editable layers.
                    image_urls:
                      - >-
                        https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png
                    max_images: 8
                    resolution: 1K
                    output_format: png
                    text_recognition: true
      responses:
        '200':
          description: 任务提交结果。任务 ID 标识一项异步任务；生成可能仍在进行中。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      additionalProperties: false
      properties:
        model:
          type: string
          example: bytedance/seedream-v5.5/layerize
        callback_url:
          type: string
          format: uri
          description: 可选的 Webhook URL，用于接收完成或失败通知。
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - image_urls
          additionalProperties: false
          properties:
            image_urls:
              type: array
              minItems: 1
              maxItems: 1
              items:
                type: string
                format: uri
                description: 使用公开可访问的 HTTP(S) 下载链接。
              description: 恰好一张要拆分图层的图片。
            prompt:
              type: string
              maxLength: 2000
              description: 可选，说明要拆分出哪些元素。最多 2,000 个字符。
            resolution:
              type: string
              enum:
                - auto
                - 1K
                - 1.5K
                - 2K
              default: auto
              description: 图层分辨率。`auto` 按 2K 费率计费。
            max_images:
              type: integer
              minimum: 2
              maximum: 100
              default: 30
              description: 返回图片数量上限，包含底图。
            output_format:
              type: string
              enum:
                - png
                - jpeg
              default: png
              description: 输出文件格式。
            text_recognition:
              type: boolean
              default: false
              description: 为 true 时，文字图层的识别文本会写入图层元信息。
            enable_safety_checker:
              type: boolean
              default: true
              description: 开启或关闭内容安全检查。
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: JTQCYR7TANN6PAZZ
            status:
              type: string
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-11-25T11:13:00'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: 错误信息。参见[错误码](/zh/api-manual/error-codes)。
          example: image_urls must contain exactly 1 item
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '使用 `Authorization: Bearer VIDGO_API_KEY`。'

````

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