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

# flux-1-kontext-pro — Image edit

> Edit an existing image with FLUX.1 Kontext [pro]. Upload via multipart form. This is a synchronous call and returns Base64-encoded image data directly.



## OpenAPI

````yaml en/api-reference/model-api/blackforestlabs/openapi/flux-1-kontext-pro-edit/openapi.yaml POST /v1/images/edits
openapi: 3.1.0
info:
  title: FLUX.1 Kontext [pro] — Image edit
  description: Call the Black Forest Labs FLUX.1 Kontext [pro] image-editing model
  version: 1.0.0
servers:
  - url: https://ai.cubeuaeai.com
security:
  - bearerAuth: []
paths:
  /v1/images/edits:
    post:
      summary: Image editing
      description: >-
        Edit an existing image with FLUX.1 Kontext [pro]. Upload via multipart
        form. This is a synchronous call and returns Base64 -encoded image data.
      operationId: editFlux1KontextPro
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - model
                - image
                - prompt
              properties:
                model:
                  type: string
                  enum:
                    - flux-1-kontext-pro
                  description: model ID
                image:
                  type: string
                  format: binary
                  description: The image file to edit.
                prompt:
                  type: string
                  description: Edit instruction. Must be in English.
                  example: Change the background to a sunset beach
                'n':
                  type: integer
                  minimum: 1
                  maximum: 1
                  default: 1
                  description: Number of images to generate. Only 1 is supported.
                size:
                  type: string
                  description: Output image size, e.g. `1024x1024`.
      responses:
        '200':
          description: Image edited successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ImageGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: Unix timestamp
          example: 1774002799
        data:
          type: array
          items:
            type: object
            properties:
              b64_json:
                type: string
                description: Base64-encoded image data.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````