Skip to main content

Generate or Edit Image

Create a new image generation or editing task using the Flux Kontext AI model.

Usage Modes

  1. Text-to-Image Generation
    • Provide prompt and aspectRatio
    • Model will generate a new image based on the text description
  2. Image Editing
    • Provide prompt and inputImage
    • You can optionally provide an aspectRatio.
      • If supplied, the output will be cropped or padded to match this ratio.
      • If omitted, the original image’s ratio will be preserved.
    • Model will edit the input image according to the prompt

Important Notes

  • Generated images will expire after 14 days
  • Prompts only support English
  • Choose the appropriate model based on your needs:
    • flux-kontext-pro: Standard model for most use cases
    • flux-kontext-max: Enhanced model for complex scenes
Rate limits and quotas are enforced by Apikley and may differ from upstream providers.

OpenAPI

flux-kontext-api/flux-kontext-api.json post /api/v1/flux/kontext/generate

To find navigation and other pages in this documentation, fetch the llms.txt file at: https://docs.apikley.ru/llms.txt