Hero image

AI Image Generation API

Generate ultra-realistic visuals with our advanced text-to-image API. Built for developers and AI enthusiasts, it’s intuitive, efficient, and ready to integrate into your workflow.

1curl -X POST "https://api.freepik.com/v1/ai/mystic" \
2--header 'Content-Type: application/json' \
3--header 'Accept: application/json' \
4--header 'x-freepik-api-key: <PUT_YOUR_API_KEY>' \
5--data '{
6{
7 "prompt": "Ultra-detailed cinematic artwork of a young Caucasian woman with long dark hair, wearing a blue hooded jacket. She stands in the foreground with a serious expression, illuminated by soft, diffused light during a cloudy afternoon. The rain-soaked streets reflect neon lights in electric blue, vibrant purples, and fiery oranges, creating a mirror-like effect. Behind her, a futuristic cyberpunk cityscape emerges with towering skyscrapers adorned with glowing holographic ads and digital ripples. Blurred, misty trees line the edges of the scene, adding surreal depth. Dramatic lighting highlights the contrast between her contemplative demeanor and the vivid, atmospheric surroundings. Depth of field: sharp on the woman, softly blurred background for dynamic cinematic depth. Style: hyperrealism mixed with sci-fi digital surrealism, inspired by cyberpunk and cinematic visuals. Perfect for a striking Twitter post that captivates with mood, detail, and storytelling.",
8 "aspect_ratio": "widescreen_16_9"
9}
10}'

MULTIPLE AI MODELS

The right text-to-image model for every project

Access a suite of AI-powered models designed to meet your project’s needs. From fast results to ultra-realistic visuals and advanced customization, Freepik’s API has the tools you need to build smarter and faster.

Mystic: Ultra-realistic, HQ visuals for professional use

Create stunning visuals with resolutions up to 4K, enhanced realism, and advanced customization. Perfect for professional-grade designs, marketing campaigns, and creative workflows.

  • High-resolution output (2K and 4K).
  • Flexible aspect ratios, including wide and square formats.
  • Enhance realism for lifelike, professional-quality results.
  • Customizable styles to match your creative vision.
Mystic: Ultra-realistic, HQ visuals for professional use
1curl -X POST "https://api.freepik.com/v1/ai/mystic" \
2--header 'Content-Type: application/json' \
3--header 'Accept: application/json' \
4--header 'x-freepik-api-key: <PUT_YOUR_API_KEY>' \
5--data '{
6{
7 "prompt": "Fashion editorial photo, an redhead androgynous model posing, the scene is illuminated by soft pastel pink and purple lighting, creating a dreamy, ethereal atmosphere, denim outfit.",
8 "aspect_ratio": "widescreen_16_9"
9}
10}'

Flux: Versatile image generation with advanced realism

Experience the perfect synergy of speed and quality. Designed for both creative and professional projects, it delivers sharp, vibrant visuals that stay true to your text prompts.

  • High-quality images with rich details and bold colors.
  • Photorealistic results with enhanced realism.
  • Combines fast generation times with precision output.
  • Flexible controls for style, resolution, and aspect ratio customization.
Flux: Versatile image generation with advanced realism
1curl -X POST "https://api.freepik.com/v1/ai/text-to-image/flux-dev" \
2--header 'Content-Type: application/json' \
3--header 'Accept: application/json' \
4--header 'x-freepik-api-key: <PUT_YOUR_API_KEY>' \
5--data '{
6{
7 "prompt": "Red pomegranates on a gray plate with green leaves, against a dark background illuminated by soft pastel light, shades of pink and purple, dramatic lighting with a dark background",
8 "aspect_ratio": "widescreen_16_9"
9}
10}'

Google Imagen 3: AI-Powered image generation

Experience cutting-edge image creation with Google Imagen 3, our most advanced text-to-image model. Generate high-quality visuals with enhanced detail, rich lighting, and minimal artifacts. Ideal for developers and designers seeking superior image generation capabilities.

  • Improved color balance for vibrant images.
  • Accurate rendering across diverse art styles, from photorealism to anime.
  • High-fidelity details for compelling visuals.
  • Efficient performance suitable for various applications.
Google Imagen 3: AI-Powered image generation
1curl -X POST "https://api.freepik.com/v1/ai/text-to-image/imagen3" \
2--header 'Content-Type: application/json' \
3--header 'Accept: application/json' \
4--header 'x-freepik-api-key: <PUT_YOUR_API_KEY>' \
5--data '{
6{
7 "prompt": "Red pomegranates on a gray plate with green leaves, against a dark background illuminated by soft pastel light, shades of pink and purple, dramatic lighting with a dark background",
8 "aspect_ratio": "widescreen_16_9"
9}
10}'

Classic Fast: Instant image generation for real-time needs

Accelerate your workflow with near-instant image generation and versatile customization options. Ideal for rapid prototyping and dynamic apps demanding fast results.

  • Lightning-fast image generation with minimal delay.
  • Customizable styling for colors, lighting, and framing.
  • Flexible image size support, including square formats.
  • Adjustable guidance scale to balance creativity and precision.
Classic Fast: Instant image generation for real-time needs
1curl -X POST "https://api.freepik.com/v1/ai/text-to-image" \
2--header 'Content-Type: application/json' \
3--header 'Accept: application/json' \
4--header 'x-freepik-api-key: <PUT_YOUR_API_KEY>' \
5--data '{
6{
7 "prompt": "Futuristic interior design, minimalist and elegant living room, centered composition. Soft pastel color palette dominated by pink, blue, and purple hues. Curved, organic furniture with smooth, glossy surfaces. A central floating coffee table made of translucent glass with soft underlighting. The walls have embedded ambient LED strips that shift subtly between pastel shades. A large, floor-to-ceiling window reveals a dreamy cityscape with futuristic architecture. Plush pastel rugs and decorative pillows add warmth. Soft diffused lighting from a modern chandelier with glowing orbs. Photorealistic, 35mm lens, shallow depth of field, cinematic framing.",
8 "aspect_ratio": "widescreen_16_9"
9}
10}'