Generate or Edit Image
POST/api/v1/flux/kontext/generate
Create a new image generation or editing task using the Flux Kontext AI model.
Usage Modes
-
Text-to-Image Generation
- Provide
prompt
andaspectRatio
- Model will generate a new image based on the text description
- Provide
-
Image Editing
- Provide
prompt
andinputImage
- Model will edit the input image according to the prompt
- Provide
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
Request
Responses
- 200
- 500
Request successful
Server Error