Skip to main content

FLUX Kontext Pro integration

Advanced text-to-image model that excels at understanding context and generating high-quality images with optional image input guidance.
Flux Kontext Pro is a state-of-the-art text-to-image model that combines superior context understanding with flexible generation controls. It supports optional image input to guide the generation process, enabling more precise control over the output. The model produces high-quality images across multiple aspect ratios, suitable for professional creative workflows.

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

ParameterTypeRequiredDefaultDescription
promptstringYes-Text description of the image to generate
input_imagestringNo-URL to a reference image for guided generation
prompt_upsamplingbooleanNofalseEnable automatic prompt modification for creative results
seedintegerNorandomSeed for reproducible generation
guidancenumberNo3.0Guidance scale (1-10), higher values follow prompt more closely
stepsintegerNo50Inference steps (1-100), more steps produce higher quality
aspect_ratiostringNosquare_1_1Output aspect ratio: square_1_1, classic_4_3, traditional_3_4, widescreen_16_9, social_story_9_16, standard_3_2

Frequently Asked Questions

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