
Text to Image
Generate high-quality images from text prompts. Create anything from photorealistic images to artistic illustrations with state-of-the-art AI models.Text to Image
Generate high-quality images from text prompts. Create anything from photorealistic images to artistic illustrations with state-of-the-art AI models.Popular Models
Flux
Fast, versatile generation with extensive style support and custom ratios.Nano Banana Pro
Google's latest model with superior typography and photorealistic detail.Seedream 4
High quality text-to-image and image-to-image, photorealistic detail and flexible resolution.ChatGPT Image
Upscale and enhance your images with AI-powered quality improvementsFlux
Fast, versatile generation with extensive style support and custom ratios.Nano Banana Pro
Google's latest model with superior typography and photorealistic detail.Seedream 4
High quality text-to-image and image-to-image, photorealistic detail and flexible resolution.ChatGPT Image
Upscale and enhance your images with AI-powered quality improvementsOverview
Generate images from text descriptions using Flux, Nano Banana Pro, and other state-of-the-art AI models. This example walks you through the complete workflow from submitting a generation request to retrieving the final image.Image generation is asynchronous. You’ll receive a job ID immediately, then poll for results until the image is ready.
Interactive Playground
Here’s a complete example in different languages:Replace with your API TokenTo replace the YOUR_API_TOKEN placeholder in the above examples, you’ll need to generate an API token in krea.ai/settings/api-tokens. Follow the instructions on the API Keys & Billing page if you need help.
Breakdown
Below, we’ll walk you through the complete workflow from submitting a generation request to retrieving the final image.Step 1: Create an Image Generation Job
Make a POST request to/generate/image/krea-1 with your prompt and parameters. The API returns a job ID immediately—generation happens asynchronously.
Step 2: Poll for Results
Poll/jobs/{job_id} every 2 seconds until the job completes. The Krea API provides intermediate generation outputs for some models.
Webhooks available!Set up webhooks to receive notifications when jobs complete. See the Webhooks guide to get started.