AI Image Generator API for Developers
AI Image Generator API
Create illustrations, photos, and concept art from prompts—tuned for apps that need many variants fast.
Free to start
No watermarks on paid plans
Subscription or usage-based
Auto-scaling
Trusted by teams at














Everything You Need to Ship AI Image Generator
Model selection, resolutions, and aspect ratios to cover marketing, gaming, and design workflows.
Prompt-to-Image
Describe a scene; receive high-resolution stills ready for download or further editing.
Creative Controls
Pick models and aspect ratios aligned to ads, icons, storyboards, and UI art.
Variant Generation
Great for brainstorming, A/B hero images, and automated template fills.
Fast Generation
Low-latency inference tiers for interactive experiences and batch overnight jobs alike.
Auto-Scaling Infrastructure
No need to deploy diffusion servers—Magic Hour scales with your MAU.
Commercial-Ready
Use paid plans to ship customer-facing generation with appropriate licensing.
Integrate in 3 Steps
Add generative stills to any product surface.
1
Get Your API Key
Sign up free and generate an API key from the Developer dashboard. You get free credits to start.
2
Send Prompts & Parameters
Call /v1/ai-image-generator with prompt text, model, resolution, and aspect ratio fields.
3
Get Results & Scale
Receive the swapped output via response or webhook. Deploy to production — infrastructure scales automatically.
Code Examples
AI Image Generator in a few lines of code. Install an SDK or use the REST API directly.
from magic_hour import Client
from os import getenv
client = Client(token=getenv("MAGIC_HOUR_API_KEY"))
res = client.v1.ai_image_generator.generate(
name="Concept Art",
image_count=1,
aspect_ratio="16:9",
style={
"prompt": "Futuristic city at dusk, cinematic lighting",
"tool": "general",
},
)SDKs for Every Stack
Official open-source SDKs with full TypeScript/type support. Install and start building.
AI Image Generator API Pricing
Subscription plans for standard usage.
Prefer usage-based pricing?
Email us or message us in Intercom and we will set up your usage-based pricing.
API Calculator
Use our calculator to estimate your API costs.
Tier
Estimated monthly cost
$1.73
Based on 24 FPS
Built for Builders
See how developers use the AI Image Generator API to power real products.
Marketing & Ads
Generate endless hooks, backgrounds, and product scenes for paid social.
E-Commerce
Illustrate categories, lookbooks, and email hero art without photoshoots.
Games & Apps
Prototype icons, splash art, and NPC concepts directly from design tools.
Entertainment
Storyboard frames and poster explorations for pitches.
Studios
Augment art departments with AI-first mood boards.
Education
Visualize lesson prompts for interactive courseware.
Try before integrating
Try AI Image Generator Free — No Code Required
Test quality first with the free tool, then plug the same output quality into your app with the API when you are ready.
AI Image Generator API — Frequently Asked Questions
It creates raster images from text prompts with selectable models and output geometry.
Pass the model field documented in the API reference; defaults exist for quick starts.
Yes. Use supported aspect ratio enums to target square, portrait, or landscape outputs.
Fair-use and plan-based limits apply; enterprise customers receive higher ceilings.
Magic Hour applies policy filters—see acceptable use documentation for details.
Python and Node SDKs wrap ai_image_generator / aiImageGenerator.
Poll image project endpoints or rely on webhooks when configured.
docs.magichour.ai includes sample JSON bodies and response shapes.