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

# Edit Image

<Tip>
  This endpoint integrates a third-party model. For detailed parameter information, please refer to the official documentation at [OpenAI Docs](https://platform.openai.com/docs/api-reference/images/createEdit).
</Tip>


## OpenAPI

````yaml api-reference/endpoint/image/openai_openapi.json post /v1/images/edits
openapi: 3.0.1
info:
  title: AI model interface
  description: ''
  version: 1.0.0
servers:
  - url: https://api.ai.cc
security:
  - BearerAuth: []
tags:
  - name: OpenAI Image
paths:
  /v1/images/edits:
    post:
      tags:
        - OpenAI Image
      summary: Edit an image (OpenAI)
      operationId: editImage
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                model:
                  type: string
                prompt:
                  type: string
                image:
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                  format: binary
                  description: >-
                    The image(s) to edit. Must be a supported image file or an
                    array of images.


                    For the GPT image models (gpt-image-1, gpt-image-1-mini, and
                    gpt-image-1.5), each image should be a png, webp, or jpg
                    file less than 50MB
                background:
                  type: string
                  description: >-
                    Allows to set transparency for the background of the
                    generated image(s). This parameter is only supported for the
                    GPT image models. Must be one of transparent, opaque or auto
                    (default value). When auto is used, the model will
                    automatically determine the best background for the image.
                input_fidelity:
                  type: string
                  description: >-
                    Control how much effort the model will exert to match the
                    style and features, especially facial features, of input
                    images. This parameter is only supported for gpt-image-1.
                    Unsupported for gpt-image-1-mini. Supports high and low.
                    Defaults to low.
                'n':
                  type: integer
                  description: The number of images to generate. Must be between 1 and 10
                output_format:
                  type: string
                  description: >-
                    The format in which the generated images are returned. This
                    parameter is only supported for the GPT image models. Must
                    be one of png, jpeg, or webp.
                partial_images:
                  type: integer
                  description: >-
                    The number of partial images to generate. This parameter is
                    used for streaming responses that return partial images.
                    Value must be between 0 and 3. When set to 0, the response
                    will be a single image sent in one streaming event.
                quality:
                  type: string
                  description: >-
                    The quality of the image that will be generated. 

                    auto (default value) will automatically select the best
                    quality for the given model.

                    high, medium and low are supported for the GPT image models.

                    hd and standard are supported for dall-e-3.

                    standard is the only option for dall-e-2.
                response_format:
                  type: string
                  description: >-
                    The format in which generated images with dall-e-2 and
                    dall-e-3 are returned. Must be one of url or b64_json. URLs
                    are only valid for 60 minutes after the image has been
                    generated. This parameter isn't supported for the GPT image
                    models, which always return base64-encoded images.
                size:
                  type: string
                  description: >-
                    The size of the generated images. Must be one of 1024x1024,
                    1536x1024 (landscape), 1024x1536 (portrait), or auto
                    (default value) for the GPT image models, one of 256x256,
                    512x512, or 1024x1024 for dall-e-2, and one of 1024x1024,
                    1792x1024, or 1024x1792 for dall-e-3.
              required:
                - model
                - prompt
                - image
      responses:
        '200':
          description: Image generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    ImageResponse:
      type: object
      properties:
        created:
          type: integer
        data:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
              b64_json:
                type: string
              revised_prompt:
                type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Authentication is done using Bearer Token. 
        Format: `Authorization: Bearer sk-xxxxxx`

````