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

# Seedream 5.5 Edit

> ByteDance's image editing model for consistent visual revisions, reference-guided compositions, and reusable design layers. It blends multiple references, produces transparent assets, and separates a single image into layers with rich-text recognition for regular text.

> [!NOTE]
>
> Watermarks are always disabled. Image results use the platform URL resource format.

### Completed Task Result

Poll `GET /api/v1/tasks/{task_id}` using the task returned by this endpoint. Images appear in `data.result.resources[]`. Each resource preserves `format`, `width`, `height`, and the upstream `size` and actual `background` in `metadata`. The first resource additionally contains `metadata.response`: `created` (Unix seconds), upstream `model`, the optional echoed `safety_identifier`, and the complete `usage` object (`generated_images`, `input_images`, `output_tokens`, `total_tokens`). These fields remain available in the public task result.

> [accordion] Completed Result Example (data.result)
>
> ```json
> {
>   "resources": [
>     {
>       "type": "image",
>       "url": "https://cdn.example.com/output.png",
>       "format": "png",
>       "width": 2048,
>       "height": 2048,
>       "metadata": {
>         "size": "2048x2048",
>         "background": "transparent",
>         "response": {
>           "created": 1794556800,
>           "model": "dola-seedream-5-5-261028",
>           "safety_identifier": "hashed-user-1",
>           "usage": {
>             "generated_images": 1,
>             "input_images": 0,
>             "output_tokens": 16384,
>             "total_tokens": 16384
>           }
>         }
>       }
>     }
>   ]
> }
> ```

### Layer Decomposition and OCR Results

Set `layer_decomposition` to `true` and provide exactly one image. The prompt is optional. `layer_decomposition_max_images` includes the base image and is a maximum, not a promised output count. Each output is a separate resource; retain every layer when composing the result.

| Resource field | Meaning |
| - | - |
| `format` | Base format requested by the caller; layers always use PNG. |
| `metadata.z_index` | Stacking order; base image is 0, higher values are above lower values. |
| `metadata.bounding_box.absolute` | `[x1, y1, x2, y2]` in the output base-image pixel coordinate system. |
| `metadata.bounding_box.normalized` | The upstream normalized coordinates, preserved without conversion. |
| `metadata.name`, `metadata.description` | Upstream layer name and description, when present. |
| `metadata.text_recognition.text` | Full recognized text for the current regular text layer. |
| `metadata.text_recognition.lines[]` | Ordered lines, each with its own `bounding_box.absolute`, `bounding_box.normalized`, and `runs[]`. |
| `lines[].runs[].text` | Text belonging to one style run. |
| `lines[].runs[].style` | `similar_font_family`, `foreground_color`, `bold`, `italic`, `underline`, `strikethrough`, `shadow`, and `translucent`, including false values. |

Font and style matches are approximate. Base images, non-text layers, handwriting, and artistic text may have no OCR result. Absence of `text_recognition` is valid. All layer and OCR metadata stays attached to its resource after storage and public task-result cleanup. Request-level information remains in the first resource's `metadata.response`; `usage.generated_images` includes the base and layers.


## OpenAPI

````yaml /media-model-api/bytedance/bytedance-i2i.json post /bytedance/seedream-5.5-edit
openapi: 3.1.0
info:
  description: The image-to-image models API from ByteDance.
  version: 1.0.0
  contact:
    name: Modellix Support
    email: support@modellix.ai
  title: ByteDance Image-to-Image Models API
servers:
  - url: https://api.modellix.ai/api/v1
    description: The image-to-image models API from ByteDance.
security:
  - bearerAuth: []
paths:
  /bytedance/seedream-5.5-edit:
    post:
      summary: Seedream 5.5 Edit
      description: >-
        ByteDance's image editing model for consistent visual revisions,
        reference-guided compositions, and reusable design layers. It blends
        multiple references, produces transparent assets, and separates a single
        image into layers with rich-text recognition for regular text.
      operationId: seedream55EditI2iAsync
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Seedream55EditI2iRequest'
            examples:
              single_edit:
                summary: Edit one image
                value:
                  prompt: Retouch the product and preserve its shape
                  image: https://example.com/product.png
              multi_reference:
                summary: Combine references into a transparent image
                value:
                  prompt: >-
                    Combine the product from Image 1 with the ornament from
                    Image 2 on a transparent background
                  image:
                    - https://example.com/product.png
                    - https://example.com/ornament.png
                  background: transparent
                  output_format: png
                  size: 1.5K
              automatic_decomposition:
                summary: Automatic decomposition without a prompt
                value:
                  image: https://example.com/poster.png
                  layer_decomposition: true
              rich_text_ocr:
                summary: Decompose a poster and preserve text styles
                value:
                  image: https://example.com/poster.png
                  prompt: Separate the text and visual elements into layers
                  layer_decomposition: true
                  layer_decomposition_max_images: 100
                  layer_decomposition_text_recognition: true
                  size: 2K
                  output_format: png
                  safety_identifier: hashed-user-1
      responses:
        '200':
          description: Task submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncTaskResponse'
components:
  schemas:
    Seedream55EditI2iRequest:
      type: object
      required:
        - image
      additionalProperties: false
      properties:
        prompt:
          type: string
          minLength: 1
          maxLength: 10000
          description: >-
            Describe the desired image or editing instruction. Up to 10000
            characters. Keep the instructions focused; for automatic layer
            decomposition this field may be omitted.
          example: A detailed landscape in a 16:9 composition
        size:
          type: string
          enum:
            - 1K
            - 1.5K
            - 2K
          default: 2K
          description: >-
            Output resolution preset. Describe the aspect ratio in the prompt.
            Custom dimensions, auto, and 4K are rejected, including in layer
            decomposition.
        output_format:
          type: string
          enum:
            - png
            - jpeg
          default: png
          description: >-
            Output file format. Transparent backgrounds require PNG. In
            decomposition this affects only the base image; all layers remain
            PNG.
        background:
          type: string
          enum:
            - auto
            - transparent
            - opaque
          default: auto
          description: >-
            Generation background mode. transparent produces RGBA and requires
            PNG. Omit this parameter entirely for layer decomposition; its
            default is not sent in that mode.
        optimize_prompt_mode:
          type: string
          enum:
            - standard
          default: standard
          description: Prompt optimization mode. Seedream 5.5 supports standard only.
        safety_identifier:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^[\x20-\x7E]+$
          description: >-
            Optional stable English identifier for the end user. Prefer a hash
            instead of personal information. The upstream value is preserved in
            the completed result.
        image:
          description: >-
            One accessible image URL or an array of 1–10 URLs. Each image: at
            most 30 MB, aspect ratio 1/16–16. Generation accepts JPEG, PNG,
            WEBP, BMP, TIFF, GIF, HEIC, HEIF; width and height greater than 14
            px and 196–36000000 total pixels. Decomposition accepts one PNG/JPEG
            only, with 262144–36000000 total pixels.
          oneOf:
            - type: string
              minLength: 1
            - type: array
              minItems: 1
              maxItems: 10
              items:
                type: string
                minLength: 1
          example: https://example.com/input.png
        layer_decomposition:
          type: boolean
          enum:
            - true
            - false
          default: false
          description: >-
            Split one input image into a base image and up to 99 transparent PNG
            layers. Omit background in this mode. The prompt becomes optional.
        layer_decomposition_max_images:
          type: integer
          minimum: 2
          maximum: 100
          default: 30
          description: >-
            Maximum total output images including the base. Requires
            layer_decomposition=true. Mapped to upstream
            layer_decomposition_options.max_images.
        layer_decomposition_text_recognition:
          type: boolean
          enum:
            - true
            - false
          default: false
          description: >-
            Request rich-text OCR for regular text layers. Requires
            layer_decomposition=true. Mapped to upstream
            layer_decomposition_options.text_recognition.
      allOf:
        - not:
            required:
              - background
              - output_format
            properties:
              background:
                const: transparent
              output_format:
                const: jpeg
      oneOf:
        - required:
            - prompt
          properties:
            prompt:
              pattern: \S
            layer_decomposition:
              const: false
          not:
            anyOf:
              - required:
                  - layer_decomposition_max_images
              - required:
                  - layer_decomposition_text_recognition
        - required:
            - layer_decomposition
          properties:
            layer_decomposition:
              const: true
            image:
              oneOf:
                - type: string
                  minLength: 1
                - type: array
                  minItems: 1
                  maxItems: 1
                  items:
                    type: string
                    minLength: 1
          not:
            required:
              - background
    AsyncTaskResponse:
      type: object
      required:
        - code
        - message
        - data
      properties:
        code:
          type: integer
          description: Response code, 0 indicates success
          example: 0
        message:
          type: string
          description: Response message
          example: success
        data:
          type: object
          required:
            - status
            - task_id
            - model_id
          properties:
            status:
              type: string
              enum:
                - pending
                - processing
              description: Task status
              example: pending
            task_id:
              type: string
              description: Unique task identifier
              example: task-abc123
            model_id:
              type: string
              description: Model ID
              example: model-123
            get_result:
              type: object
              description: API information to query the task result
              properties:
                method:
                  type: string
                  description: HTTP method
                  example: GET
                url:
                  type: string
                  description: Full URL to query the task result
                  example: https://api.modellix.ai/api/v1/tasks/task-abc123
          description: Detailed data about the submitted asynchronous task.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API Key authentication. Format: `Bearer YOUR_API_KEY`.'

````

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