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

# gpt-image-2-c-edit

> Edit an existing image with gpt-image-2-c, the cost-effective variant of GPT Image 2, using a text prompt. Accepts a multipart/form-data body.

Supports up to 16 input images per request (`image[]`). Input formats: PNG, JPEG. Images must be provided as multipart/form-data file uploads.

Supports `response_format`. Does not support the `n` parameter (one image per request).



## OpenAPI

````yaml api-reference/model-api/openai/openapi/gpt-image-2-c-edit/openapi.yaml POST /v1/images/edits
openapi: 3.1.0
info:
  title: gpt-image-2-c — Edit
  description: >-
    Edit an existing image using gpt-image-2-c (cost-effective variant) via
    Anyfast API
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/images/edits:
    post:
      summary: Edit Image
      description: >-
        Edit an existing image with gpt-image-2-c, the cost-effective variant of
        GPT Image 2, using a text prompt. Accepts a multipart/form-data body.


        Supports up to 16 input images per request (`image[]`). Input formats:
        PNG, JPEG. Images must be provided as multipart/form-data file uploads.


        Supports `response_format`. Does not support the `n` parameter (one
        image per request).
      operationId: editGptImage2c
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                image:
                  type: string
                  format: binary
                  description: >-
                    Single source image file to edit (PNG or JPEG). Use
                    `image[]` instead when providing multiple images.
                image[]:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: >-
                    Multiple source image files (PNG or JPEG). Up to 16 images
                    per request. Use instead of `image` for multi-image input.
                mask:
                  type: string
                  format: binary
                  description: >-
                    Mask image file with an alpha channel. Indicates which areas
                    of the source image to edit. Must be the same format and
                    same size as the source image (< 50MB). **Requires selecting
                    the Direct group.**
                model:
                  type: string
                  enum:
                    - gpt-image-2-c
                  description: Model ID.
                  example: gpt-image-2-c
                prompt:
                  type: string
                  description: Text description of the edit you want to apply.
                  example: Change the background to a sunset over the ocean
                output_format:
                  type: string
                  enum:
                    - png
                    - jpeg
                  default: png
                  description: 'Output image format. Default: `png`.'
                output_compression:
                  type: integer
                  minimum: 0
                  maximum: 100
                  description: Compression level for jpeg output (0–100).
                size:
                  type: string
                  default: 1024x1024
                  description: >-
                    Output image size in `{width}x{height}` format. Same
                    flexible-resolution constraints as image generation.
                  example: 1024x1024
                response_format:
                  type: string
                  enum:
                    - url
                    - b64_json
                  default: url
                  description: Response format. Either `url` or `b64_json`.
                  example: url
      responses:
        '200':
          description: Image edited successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of edited images.
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: >-
                            Pre-signed URL of the edited image (when
                            `response_format=url`).
                        b64_json:
                          type: string
                          description: >-
                            Base64-encoded image data (when
                            `response_format=b64_json`).
                        revised_prompt:
                          type: string
                          description: The revised prompt actually used by the model.
        '400':
          description: Bad request. Invalid parameters.
        '401':
          description: Unauthorized. Invalid or missing API key.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````