FLUX Kontext Pro integration
Advanced text-to-image model that excels at understanding context and generating high-quality images with optional image input guidance.
Key capabilities
- Context-aware generation: Advanced understanding of complex text descriptions for accurate image synthesis
- Optional image guidance: Provide a reference image URL to guide the generation toward desired visual styles
- Prompt upsampling: Automatic prompt modification for more creative and detailed outputs
- Fine-grained control: Adjustable guidance scale (1-10) and inference steps (1-100) for quality tuning
- Multiple aspect ratios: Support for square (1:1), widescreen (16:9), social story (9:16), classic (4:3, 3:4), and standard (3:2)
- Reproducible results: Optional seed parameter for consistent generation across requests
Use cases
- Marketing and advertising: Generate product visuals and campaign imagery from descriptions
- Content creation: Create unique illustrations and graphics for blogs, social media, and websites
- Design prototyping: Quickly visualize concepts before detailed design work
- E-commerce: Generate product mockups and lifestyle imagery at scale
- Creative exploration: Experiment with visual ideas using text prompts and reference images
Generate images with Flux Kontext Pro
Create images by submitting a request to the API. The service returns a task ID for async polling or webhook notification.Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | - | Text description of the image to generate |
input_image | string | No | - | URL to a reference image for guided generation |
prompt_upsampling | boolean | No | false | Enable automatic prompt modification for creative results |
seed | integer | No | random | Seed for reproducible generation |
guidance | number | No | 3.0 | Guidance scale (1-10), higher values follow prompt more closely |
steps | integer | No | 50 | Inference steps (1-100), more steps produce higher quality |
aspect_ratio | string | No | square_1_1 | Output aspect ratio: square_1_1, classic_4_3, traditional_3_4, widescreen_16_9, social_story_9_16, standard_3_2 |
Frequently Asked Questions
What is Flux Kontext Pro and how does it work?
What is Flux Kontext Pro and how does it work?
Flux Kontext Pro is an advanced text-to-image AI model that excels at understanding context from text descriptions. You submit a prompt via the API, optionally include a reference image URL, receive a task ID, and then poll for results or receive a webhook notification when the image is ready.
How does the image input guidance work?
How does the image input guidance work?
When you provide an
input_image URL, the model uses that image as a reference to guide the generation process. This helps achieve specific visual styles, color palettes, or compositional elements in the output while still following your text prompt.What does prompt upsampling do?
What does prompt upsampling do?
Prompt upsampling automatically modifies your prompt to add more creative details and variations. Enable it when you want the model to expand on your description for more elaborate and artistic results.
How do guidance and steps affect the output?
How do guidance and steps affect the output?
The
guidance parameter (1-10, default 3.0) controls how closely the model follows your prompt. Higher values produce images more faithful to the description. The steps parameter (1-100, default 50) controls quality: more steps produce finer details but take longer to process.What aspect ratios are available?
What aspect ratios are available?
Flux Kontext Pro supports six aspect ratios:
square_1_1 (default), classic_4_3, traditional_3_4, widescreen_16_9, social_story_9_16, and standard_3_2. Choose based on your intended use case.Can I reproduce the same image?
Can I reproduce the same image?
Yes, use the
seed parameter with the same value across requests to generate reproducible results. Combined with identical prompts and settings, you will get consistent outputs.Best practices
- Prompt writing: Be specific about subjects, scenes, lighting, atmosphere, and art style for better results
- Guidance tuning: Start with the default guidance (3.0) and increase for more literal prompt adherence
- Image guidance: Use reference images when you need specific visual styles or want to maintain consistency across generations
- Production integration: Use webhooks instead of polling for scalable applications
- Error handling: Implement retry logic for 503 errors during high traffic
Related APIs
- Flux 2 Pro: High-quality text-to-image generation without image input support
- Flux 2 Turbo: Faster generation with Flux 2 for time-sensitive workflows
- Seedream 4.5: Alternative text-to-image model with different capabilities