



const main = async () => {
const response = await fetch('https://api.ai.cc/v1/images/generations', {
method: 'POST',
headers: {
Authorization: 'Bearer ',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'flux/kontext-pro/text-to-image',
prompt: 'A jellyfish in the ocean',
}),
}).then((res) => res.json());
console.log('Generation:', response);
};
main();
import requests
def main():
response = requests.post(
"https://api.ai.cc/v1/images/generations",
headers={
"Authorization": "Bearer ",
"Content-Type": "application/json",
},
json={
"model": "flux/kontext-pro/text-to-image",
"prompt": "A jellyfish in the ocean",
},
)
response.raise_for_status()
data = response.json()
print("Generation:", data)
if __name__ == "__main__":
main()
-
AI Playground

Test all API models in the sandbox environment before you integrate.
We provide more than 300 models to integrate into your app.


Product Detail
Black Forest Labs introduces FLUX.1 Kontext Pro, an innovative AI model engineered for unparalleled precision in contextual image generation and editing. Leveraging a rectified flow architecture, this advanced tool ensures remarkable character consistency and allows for highly localized modifications across diverse visual content.
🚀 Technical Specifications
FLUX.1 Kontext Pro is rigorously optimized for in-context image generation, offering robust multimodal editing capabilities.
- Generation Speed: 8-10 seconds per image.
- Inference Performance: Up to 8x faster than leading competitive models.
- API Pricing: $0.042 per generation.
📊 Performance Metrics
FLUX models consistently demonstrate top-tier performance, with ELO ratings frequently exceeding 1100. This highlights the strong capabilities of the Flux.1 Kontext model family across a variety of image generation and editing benchmarks.
✨ Key Capabilities
FLUX.1 Kontext Pro provides exceptional precision for even the most complex image editing workflows.
- In-Context Generation: Seamlessly processes both text prompts and reference images for guided creative output.
- Character Consistency: Maintains facial features and object identity across vastly different environments and scenes, ensuring continuity.
- Localized Editing: Executes targeted modifications to specific elements without unintentionally affecting surrounding areas.
- Iterative Refinement: Facilitates step-by-step image creation with minimal latency, allowing for quick adjustments.
- Style Preservation: Generates entirely new scenes while faithfully retaining the unique visual styles from your reference images.
💡 Optimal Use Cases
Discover how FLUX.1 Kontext Pro can revolutionize various industries:
- Marketing: Create personalized brand avatars and effortlessly place products into multiple contexts without costly photoshoots.
- Content Creation: Develop engaging social media content, eye-catching YouTube thumbnails, and platform-optimized visuals with ease.
- Professional Editing: Handle complex image modifications that demand precise character continuity and pixel-level accuracy.
- Storytelling: Craft compelling visual narratives with consistently recognizable characters across diverse scenes and environments.
- Education: Produce custom visual aids and interactive learning materials with dynamic, contextual modifications.
🔗 API & Integration Details
Access FLUX.1 Kontext Pro seamlessly via its robust AI/ML API. For comprehensive documentation, please refer to the official documentation.
Code Sample: Text-to-Image Generation
<snippet data-name="image.flux" data-model="flux/kontext-pro/text-to-image"></snippet>
Text-to-Image Parameters
- prompt [str]: The textual description guiding the image's content, style, or composition.
- num_images [int]: The quantity of images to generate.
- seed [int]: The random seed used for deterministic image generation.
- aspect_ratio [21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21]: Defines the image's aspect ratio.
- guidance_scale [1-20]: CFG (Classifier Free Guidance) scale, influencing adherence to the prompt.
- safety_tolerance [1-6]: Controls the safety filtering level (1 = strictest, 6 = most permissive).
Code Sample: Image-to-Image Generation
<snippet data-name="image.flux-image-to-image" data-model="flux/kontext-pro/image-to-image"></snippet>
Image-to-Image Parameters
- prompt [str]: Text prompt describing the desired content, style, or composition for the generated image.
- image_url [str | list of str]: One or more image URLs serving as visual references, merged by the model per prompt instructions.
- num_images [int]: Number of image variations to generate from the combined references and prompt.
- seed [int]: The random seed for image generation.
- aspect_ratio [21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21]: The aspect ratio for the image.
- guidance_scale [1-20]: CFG scale, dictating how closely the model adheres to the prompt.
- safety_tolerance [1-6]: The safety tolerance level for the generated image (1 = strictest, 5 = most permissive).
✅ Comparison with Other Leading Models
- Vs. ByteDance BAGEL: FLUX.1 Kontext Pro offers 4x faster generation speed (8-10s vs. 40s), coupled with superior character consistency and available commercial licensing.
- Vs. OpenAI GPT-4o Image: Benefits from better character preservation, faster inference (8-10s vs. 30s), and competitive pricing.
- Vs. FLUX.1 Kontext Max: While Max targets maximum quality output, FLUX.1 Kontext Pro is specifically optimized for production workflows with significantly faster iteration capabilities.
📄 Licensing
Flux.1 Kontext Pro is available under a commercial license. This license grants both commercial and non-commercial usage rights, ensuring adherence to ethical standards.
❓ Frequently Asked Questions (FAQ)
A: It's designed for advanced contextual image generation and editing, focusing on precise character consistency and localized modifications using AI.
A: It generates images in 8-10 seconds and boasts up to 8x faster inference speeds than many leading competitive AI image models.
A: Yes, a key capability is maintaining facial features and object identity consistently across various environments and scenes, making it ideal for visual storytelling.
A: FLUX.1 Kontext Pro is optimized for production workflows with faster iteration, while FLUX.1 Kontext Max focuses on delivering the highest possible quality output.
A: Yes, it is available under a commercial license that permits both commercial and non-commercial usage rights, adhering to ethical standards.
Learn how you can transformyour company with AICC APIs



Log in