> ## 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

> Generate an image from a text description with FLUX.1 Kontext [pro]. 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/openapi.yaml POST /v1/images/generations
openapi: 3.1.0
info:
  title: FLUX.1 Kontext [pro]
  description: Call the Black Forest Labs FLUX.1 Kontext [pro] text-to-image model
  version: 1.0.0
servers:
  - url: https://ai.cubeuaeai.com
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      summary: Text-to-image
      description: >-
        Generate an image from a text description with FLUX.1 Kontext [pro].
        This is a synchronous call and returns Base64-encoded image data
        directly.
      operationId: createFlux1KontextProTextToImage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  enum:
                    - flux-1-kontext-pro
                  description: model ID
                  example: flux-1-kontext-pro
                prompt:
                  type: string
                  description: Image description. Must be in English.
                  example: A cute baby polar bear
                '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`.
                  example: 1024x1024
                output_format:
                  type: string
                  enum:
                    - jpeg
                    - png
                  description: Output image format.
                seed:
                  type: integer
                  description: Random seed, used to reproduce generation results.
      responses:
        '200':
          description: Image generated 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

````