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

# Seedream Seededit

> Use DeerAPI to call the Seedream Seededit endpoint with request details, response details, examples, and an OpenAPI playground.

## Overview

Use this endpoint to call the Seedream Seededit workflow through DeerAPI. The API reference on this page shows the request schema, response schema, authentication requirements, and runnable examples for the configured endpoint.

## Before you start

Use the DeerAPI base URL and pass your API Key in the `Authorization` header:

```text theme={null}
https://api.deerapi.com
```

```text theme={null}
Authorization: Bearer $DEERAPI_KEY
```

## Model selection

Choose a current model ID from the [live pricing page](https://api.deerapi.com/pricing). Model availability changes over time, so avoid copying a model ID from an old project without checking the live list first.

## Implementation notes

* Use the OpenAPI playground for the exact request fields accepted by this endpoint.
* Keep API Keys on the server side when you build production applications.
* Log the request ID from failed calls so support can investigate the request.
* Retry `429`, `500`, and `503` responses with exponential backoff.


## OpenAPI

````yaml /api/openapi/image/doubao/post-seededit.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.deerapi.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: bytedance-seedEdit-3.0-i2i,
                    doubao-seededit-3-0-i2i-250628, seedream-4-0-250828
                  example: bytedance-seedEdit-3.0-i2i
                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
            example:
              prompt: Put on glasses
              model: bytedance-seedEdit-3.0-i2i
              response_format: json
              image: '@/path/to/image.png'
            examples:
              Default:
                summary: Default request
                value:
                  prompt: Put on glasses
                  model: bytedance-seedEdit-3.0-i2i
                  response_format: json
                  image: '@/path/to/image.png'
      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: cURL
          source: |
            curl -s 'https://api.deerapi.com/v1/images/edits' \
              -H "Authorization: Bearer $DEERAPI_KEY" \
              -F 'prompt=Put on glasses' \
              -F 'model=bytedance-seedEdit-3.0-i2i' \
              -F 'response_format=json' \
              -F 'image=@/path/to/image.png'
        - lang: Python
          label: requests
          source: >
            import os

            import requests


            url = "https://api.deerapi.com/v1/images/edits"

            headers = {"Authorization": "Bearer " + os.environ["DEERAPI_KEY"]}

            data = {
              "prompt": "Put on glasses",
              "model": "bytedance-seedEdit-3.0-i2i",
              "response_format": "json"
            }

            files = {"image": open("/path/to/image.png", "rb")}


            response = requests.post(url, headers=headers, data=data,
            files=files)

            print(response.json())
        - lang: JavaScript
          label: fetch
          source: >
            const form = new FormData();

            form.append("prompt", "Put on glasses");

            form.append("model", "bytedance-seedEdit-3.0-i2i");

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

            form.append("image", new Blob(["replace with file bytes"]),
            "image.png");


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


            console.log(await response.json());
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use a DeerAPI API Key as a Bearer token.

````