AI Image Generation API | Magnific

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.

Open in our Playground Contact sales

cURLPythonJavaScriptPHP

1curl -X POST "https://api.magnific.com/v1/ai/mystic" \
2--header 'Content-Type: application/json' \
3--header 'Accept: application/json' \
4--header 'x-magnific-api-key: <PUT_YOUR_API_KEY>' \
5--data '{
6  "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.",
7  "aspect_ratio": "widescreen_16_9"
8}'

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, Magnific’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.

Learn More Contact sales

Full screen

cURLPythonJavaScriptPHP

1curl -X POST "https://api.magnific.com/v1/ai/mystic" \
2--header 'Content-Type: application/json' \
3--header 'Accept: application/json' \
4--header 'x-magnific-api-key: <PUT_YOUR_API_KEY>' \
5--data '{
6  "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.",
7  "aspect_ratio": "widescreen_16_9"
8}'

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.

Learn More Contact sales

Full screen

cURLPythonJavaScriptPHP

1curl -X POST "https://api.magnific.com/v1/ai/text-to-image/flux-dev" \
2--header 'Content-Type: application/json' \
3--header 'Accept: application/json' \
4--header 'x-magnific-api-key: <PUT_YOUR_API_KEY>' \
5--data '{
6  "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",
7  "aspect_ratio": "widescreen_16_9"
8}'

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.

Learn More Contact sales

Full screen

cURLPythonJavaScriptPHP

1curl -X POST "https://api.magnific.com/v1/ai/text-to-image" \
2--header 'Content-Type: application/json' \
3--header 'Accept: application/json' \
4--header 'x-magnific-api-key: <PUT_YOUR_API_KEY>' \
5--data '{
6  "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.",
7  "aspect_ratio": "widescreen_16_9"
8}'

Experiment with AI image generation

Try LoRAs and embeddings in a single API call. Use our Playground to fine-tune your prompts and create unique AI-driven images with ease.

Explore Docs

LoRAs—Precision in Every AI Image

Unmatched image consistency with LoRAs

LoRAs (Low-Rank Adaptation) simplifies generating consistent images. Whether you’re crafting unique styles or personalized characters, LoRAs turn your vision into reality with precision—every time.

Learn more Try custom LoRAs

CUSTOM CHARACTERS AND STYLES

Train AI models tailored to your vision

Take charge of your creative process with custom LoRAs. Train unique characters and styles that match your exact needs. Building personalized AI models has never been faster or easier.

View docs Start training your AI models

Train Custom Characters

Upload a few images of your character and train a LoRA to generate consistent, high-quality visuals across any scenario. Experience precision and complete creative control.

Full screen

cURLPythonJavaScriptPHP

1curl -X POST "https://api.magnific.com/v1/ai/text-to-image/flux-dev" \
2--header 'Content-Type: application/json' \
3--header 'Accept: application/json' \
4--header 'x-magnific-api-key: <PUT_YOUR_API_KEY>' \
5--data '{
6  "prompt": "@mary Cinematic still image glowing portrait in a surreal world with shining pink grass, face illuminated by soft pastel light, minimal soft studio light photography, fine art photo, dark pink and white, minimal outfit, pinkscale color light scheme, dramatic lighting with a dark background",
7  "aspect_ratio": "widescreen_16_9"
8}'

Define Custom Styles

Train the AI with your selected artworks or photos to create a custom style that’s truly yours. Every image will reflect your artistic direction down to the finest detail.

Full screen

cURLPythonJavaScriptPHP

1curl -X POST "https://api.magnific.com/v1/ai/text-to-image/flux-dev" \
2--header 'Content-Type: application/json' \
3--header 'Accept: application/json' \
4--header 'x-magnific-api-key: <PUT_YOUR_API_KEY>' \
5--data '{
6  "prompt": "A 3D character of a man with short, tousled hair, wearing a light denim shirt with rolled-up sleeves. The background features an abstract blend of dark blues and purples, representing a coastal evening. Cinematic lighting casts soft shadows and adds depth to the textures of the clothing.",
7  "aspect_ratio": "widescreen_16_9",
8  "styling": {
9    "effects": {
10      "camera": "midshot"
11    }
12  }
13}'

Custom pricing for every use case

Discover flexible pricing options for Magnific's AI Image Generation API. Need more details or a plan that fits your business needs? We're here to help—just reach out.

View API Pricing

Explore more Magnific APIs

Discover additional AI-powered tools and content services to enhance your projects.

API Playground\ \ Test image generation features instantly with real-time results and code snippets. Video generation API\ \ Generate high-quality videos from text prompts using fast, scalable AI models. Upscaler API—Magnific\ \ Upscale your images with Magnific, our top-tier AI model for ultra high-resolution results. Image editing API\ \ Automate image editing at scale—remove backgrounds, apply filters, and more. Relight and style transfer\ \ Apply lighting and style transformations to create striking, artistic effects. Stock content API\ \ Access Magnific's vast library of images, icons, and templates via API.

Get all your questions answered

It depends on your account type. New credit-based accounts share the same credit balance with Magnific.ai — credits are interchangeable across both products. Existing pay-as-you-go accounts use a separate billing system. Contact sales if you're unsure which model applies to you.

Magnific API access is provisioned by our team. Contact sales to share your use case and we'll get you set up with an API key. Once provisioned, you can manage and rotate the key from your dashboard.

New accounts are credit-based — contact sales to set up an account with API key access. Once your API key is provisioned, you can start developing and testing the API. Default rate limits vary by service — see the rate limits documentation for the current values. Reach out to our team whenever you need them raised.

It depends on your account type. New credit-based API accounts share the same credit balance with Magnific.ai, so credits from your Premium subscription can be spent through the API. Existing pay-as-you-go API accounts use a separate billing system. Contact sales if you're unsure which model applies.

A custom LoRA (Low-Rank Adaptation) is a smaller, specialized model that applies a specific style to images without requiring you to retrain the entire AI model. Instead, you can train the LoRA on a focused dataset of 10 to 50 images tailored to your desired look or style. This makes it faster and more efficient to create personalized outputs, whether you're aiming for unique artistic styles or consistent branding.

AI-generated content is an exciting new frontier, but copyright laws are still catching up. Regulations vary from country to country, so it’s important to check the specific rules that apply to your situation. As the user, you are responsible for ensuring the usability of AI-generated images, including seeking professional advice if you plan to reproduce, distribute, display, or perform the content. Rest assured, we’re committed to keeping you informed about any updates or changes to these regulations as they evolve.

If you need further information,

please contact us