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

# flux-1-kontext-pro

> Generate an image from a text prompt using FLUX.1 Kontext [pro]. Returns the result synchronously as base64-encoded JSON.



## OpenAPI

````yaml 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: Black Forest Labs FLUX.1 Kontext [pro] text-to-image model via Anyfast API
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      summary: Text-to-Image
      description: >-
        Generate an image from a text prompt using FLUX.1 Kontext [pro]. Returns
        the result synchronously as base64-encoded JSON.
      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: Text description of the desired image. 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 for reproducible generation.
      responses:
        '200':
          description: Image generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
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.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````