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

# Create SeedEdit image edits

> Use CometAPI POST /v1/images/edits for ByteDance SeedEdit (Seedream) image editing—apply prompt-guided edits, masks, and variations with fast outputs.

## Overview

Edit images using ByteDance's SeedEdit model through the standard OpenAI-compatible `/v1/images/edits` endpoint. Apply prompt-guided edits, masks, and variations.

For detailed parameter documentation, see the [VolcEngine SeedEdit documentation](https://www.volcengine.com/docs/82379/1666946).

## When to use it

Use this endpoint when you already have an image and want to change part of it with a prompt. Typical cases include product image cleanup, background edits, local style changes, and prompt-guided variations.

## First request

Start with one source image and a direct edit prompt. Add a mask only after the basic edit works, because masks introduce another failure point in file upload, transparency, and alignment.

## Read the response

The API playground shows the exact response fields for generated images. Save the returned image URL or base64 payload according to your storage policy before you show it to users.


## OpenAPI

````yaml api/openapi/image/seededit-seedream/post-bytedance-image-editing.openapi.json POST /v1/images/edits
openapi: 3.1.0
info:
  title: bytedance-Image Editing (seededit) API
  version: 1.0.0
servers:
  - url: https://api.cometapi.com
security:
  - bearerAuth: []
paths:
  /v1/images/edits:
    post:
      summary: bytedance-Image Editing (seededit)
      operationId: bytedance_image_editing
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: >-
                    Model to use, such as `doubao-seededit-3-0-i2i-250628`.
                    Choose a current image editing model from the [Models
                    page](/overview/models).
                  example: doubao-seededit-3-0-i2i-250628
                image:
                  format: binary
                  type: string
                  description: |-
                    Incoming images need to fulfill the following conditions: 
                    Image format: jpeg, png. 
                    Aspect ratio (width/height): in the range (1/3, 3).
                    Aspect length (px) > 14. 
                    Size: no more than 10MB.
                  example: MQ==/test.png
                prompt:
                  type: string
                  description: >-
                    A text description of the desired image(s).

                    - Max length: 1000 chars for dall-e-3, 32000 chars for
                    gpt-image-1.
                  example: Put on glasses
                response_format:
                  type: string
                  enum:
                    - url
                    - b64_json
                  x-apidog-enum:
                    - value: url
                      name: ''
                      description: ''
                    - value: b64_json
                      name: ''
                      description: ''
                  description: |-
                    Response format. Options: "url" or "b64_json".
                    Only "dall-e-3" supports "url" (valid for 60 minutes).
                size:
                  type: string
                  description: >-
                    Output image size. Use `adaptive` to match the input image
                    dimensions.
                  example: adaptive
                seed:
                  type: integer
                  default: -1
                  description: >-
                    Random seed for reproducible outputs. Range: -1 to
                    2147483647. Use -1 (default) for random generation.
                guidance_scale:
                  type: number
                  description: >-
                    Controls how strongly the prompt influences the result vs.
                    the input image. Range: 1.0–10.0. Higher values follow the
                    prompt more closely.
                watermark:
                  type: boolean
                  default: true
                  description: >-
                    When `true`, adds an 'AI Generated' watermark to the
                    bottom-right corner of the output image.
              required:
                - image
                - prompt
              default:
                image: MQ==/test.png
                prompt: Put on glasses
          application/json:
            schema:
              type: object
              required:
                - image
                - prompt
              properties:
                model:
                  type: string
                  description: >-
                    Model to use, such as `doubao-seededit-3-0-i2i-250628`.
                    Choose a current image editing model from the [Models
                    page](/overview/models).
                  example: doubao-seededit-3-0-i2i-250628
                image:
                  type: string
                  description: >-
                    Source image as a public HTTPS URL or base64 data. Image
                    format: jpeg, png. Aspect ratio (width/height) in the range
                    (1/3, 3). Side length > 14 px. Size: no more than 10 MB.
                prompt:
                  type: string
                  description: >-
                    A text description of the desired image(s).

                    - Max length: 1000 chars for dall-e-3, 32000 chars for
                    gpt-image-1.
                  example: Put on glasses
                response_format:
                  type: string
                  enum:
                    - url
                    - b64_json
                  x-apidog-enum:
                    - value: url
                      name: ''
                      description: ''
                    - value: b64_json
                      name: ''
                      description: ''
                  description: |-
                    Response format. Options: "url" or "b64_json".
                    Only "dall-e-3" supports "url" (valid for 60 minutes).
                size:
                  type: string
                  description: >-
                    Output image size. Use `adaptive` to match the input image
                    dimensions.
                  example: adaptive
                seed:
                  type: integer
                  default: -1
                  description: >-
                    Random seed for reproducible outputs. Range: -1 to
                    2147483647. Use -1 (default) for random generation.
                guidance_scale:
                  type: number
                  description: >-
                    Controls how strongly the prompt influences the result vs.
                    the input image. Range: 1.0–10.0. Higher values follow the
                    prompt more closely.
                watermark:
                  type: boolean
                  default: true
                  description: >-
                    When `true`, adds an 'AI Generated' watermark to the
                    bottom-right corner of the output image.
            examples:
              Image URL:
                summary: >-
                  Edit an image referenced by URL (replace the URL with your
                  image)
                value:
                  model: doubao-seededit-3-0-i2i-250628
                  image: https://your-image-host/source.jpg
                  prompt: Add warm sunset light
                  response_format: url
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                required:
                  - model
                  - created
                  - data
                  - usage
                properties:
                  model:
                    type: string
                  created:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                  usage:
                    type: object
                    required:
                      - generated_images
                      - output_tokens
                      - total_tokens
                    properties:
                      generated_images:
                        type: integer
                      output_tokens:
                        type: integer
                      total_tokens:
                        type: integer
      x-codeSamples:
        - lang: Shell
          label: Image URL (JSON)
          source: |
            curl https://api.cometapi.com/v1/images/edits \
              -H "Authorization: Bearer $COMETAPI_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "model": "doubao-seededit-3-0-i2i-250628",
                "image": "https://your-image-host/source.jpg",
                "prompt": "Add warm sunset light",
                "response_format": "url"
              }'
        - lang: Shell
          label: Upload file
          source: |
            curl https://api.cometapi.com/v1/images/edits \
              -H "Authorization: Bearer $COMETAPI_KEY" \
              -F model=doubao-seededit-3-0-i2i-250628 \
              -F image=@source.jpg \
              -F prompt="Add warm sunset light" \
              -F response_format=url
        - lang: Python
          label: Image URL (JSON)
          source: |
            import os
            import requests

            response = requests.post(
                "https://api.cometapi.com/v1/images/edits",
                headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
                json={
                    "model": "doubao-seededit-3-0-i2i-250628",
                    "image": "https://your-image-host/source.jpg",
                    "prompt": "Add warm sunset light",
                    "response_format": "url",
                },
            )

            print(response.json()["data"][0]["url"])
        - lang: Python
          label: Upload file
          source: |
            import os
            import requests

            with open("source.jpg", "rb") as image_file:
                response = requests.post(
                    "https://api.cometapi.com/v1/images/edits",
                    headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
                    data={
                        "model": "doubao-seededit-3-0-i2i-250628",
                        "prompt": "Add warm sunset light",
                        "response_format": "url",
                    },
                    files={"image": image_file},
                )

            print(response.json()["data"][0]["url"])
        - lang: JavaScript
          label: Image URL (JSON)
          source: >
            const response = await
            fetch("https://api.cometapi.com/v1/images/edits", {
                method: "POST",
                headers: {
                    Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
                    "Content-Type": "application/json",
                },
                body: JSON.stringify({
                    model: "doubao-seededit-3-0-i2i-250628",
                    image: "https://your-image-host/source.jpg",
                    prompt: "Add warm sunset light",
                    response_format: "url",
                }),
            });


            const result = await response.json();

            console.log(result.data[0].url);
        - lang: JavaScript
          label: Upload file
          source: >
            import { readFile } from "node:fs/promises";


            const form = new FormData();

            form.append("model", "doubao-seededit-3-0-i2i-250628");

            form.append("prompt", "Add warm sunset light");

            form.append("response_format", "url");

            form.append("image", new Blob([await readFile("source.jpg")], {
            type: "image/jpeg" }), "source.jpg");


            const response = await
            fetch("https://api.cometapi.com/v1/images/edits", {
                method: "POST",
                headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}` },
                body: form,
            });


            const result = await response.json();

            console.log(result.data[0].url);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication. Use your CometAPI key.

````