AI Image Editor API for Developers

AI Image Editor API

Describe the change you want—remove objects, swap colors, or restyle scenes—without manual masking labor.

Free credits on signup
Transparent per-credit pricing
No watermarks with paid plans or credit packs
Subscriptions, credit packs, or usage-based billing
Auto-scaling

Trusted by teams at

Everything You Need to Ship AI Image Editor

Combine source images, edit prompts, and model selection via HTTPS.

Prompt-Driven Edits
Replace skies, outfits, or props using language instead of painstaking selections.
Creative Iteration
Great for storyboard revisions, ad variant factories, and rapid prototyping.
Guided Transformations
Pair reference images with prompts for controlled restyling.
Fast Processing
Iterate quickly in collaborative design sessions or automated asset pipelines.
Auto-Scaling Infrastructure
Burst through thousands of creative requests during campaign launches.
Commercial-Ready
Ship edits inside paid creative suites with dependable SLAs on higher tiers.

Integrate in 3 Steps

Bring generative Photoshop-style actions to your backend.

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 Image & Edit Prompt
Upload source images, then call /v1/ai-image-editor with assets.image_file_paths, style.prompt, and an optional model.
3
Get Results & Scale
Receive the output via response or webhook. Deploy to production — infrastructure scales automatically.
Get Started Free

Code Examples

AI Image Editor 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_editor.generate(
    assets={"image_file_paths": ["/path/to/1234.png"]},
    style={"prompt": "Give me sunglasses"},
    name="Ai Image Editor image",
    wait_for_completion=True,
    download_outputs=True,
    download_directory="."
)
API Docs

Edit Images with Leading AI Models

Edit images using Magic Hour's supported image editing models. View each model's API page for inputs, examples, and usage details.

Estimate Your API Costs

Every generation uses credits. Prepay with a subscription or one-time credit packs, or request usage-based billing for monthly invoicing and volume discounts.
USD subscription prices. Image allowances use Z-Image Turbo at 1K (5 credits/image); video allowances use LTX-2.5 at 480p. These reference allowances do not describe every endpoint. Choose your tool, model, and settings below for its estimate.
Images Per Month
10 images
images
Recommended plan
Creator Yearly
$144
/year
144,000 credits per year
Up to 1.7 hours of video
Up to 28,800 images
Selected plan: Pro Yearly
PRO YEARLY covers your usage
Estimated usage
5,000credits / month
Included
25,000credits / month
Remaining headroom
20,000credits / month
TOTAL BILL
$300
/year

AI Image Editor API Pricing

Subscription plans for standard usage.

Need usage-based billing?

Email us or message us in Intercom for monthly billing with graduated volume discounts.

Built for Builders

See how developers use the AI Image Editor API to power real products.

Ad Variant Factories
Swap backgrounds and props per audience segment automatically.
Catalog Cleanup
Remove distractions or update sets without reshooting products.
Previs & Storyboards
Iterate frames faster than manual paint-overs.
Creator Suites
Offer magic-edit buttons in browser tools.
Games
Let modders retexture screenshots for community events.
Education
Annotate instructional diagrams with generative fixes.
Try before integrating

Try AI Image Editor 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 Editor API — Frequently Asked Questions

Editors start from an existing photo and apply localized or global changes, while generators synthesize from scratch.

No. Provide source images in assets.image_file_paths and describe your edit in style.prompt. This endpoint does not accept a separate mask_file_path.

Pass supported model identifiers to balance quality, speed, and credit usage.

Yes. Pipe outputs into subsequent jobs to build multi-step creative workflows.

Python and Node expose ai_image_editor / aiImageEditor.

Validation errors return 4xx with descriptive messages; retry with adjusted prompts.

Review Magic Hour security docs for retention, encryption, and compliance posture.

docs.magichour.ai includes JSON samples for common edit scenarios.

Magic Hour offers subscription plans starting at $19/month (Creator), $39/month (Pro), and $99/month (Business), each including a monthly credit allotment. Credits are consumed per generation based on output length and model. One-time credit packs add credits without a subscription. Usage-based billing with graduated volume discounts is available by request. A free tier with credits is available on signup — no credit card required.

Sign up at magichour.ai/developer — no credit card required. You'll receive free credits and an API key immediately. The key works across all Magic Hour API endpoints including AI Image Editor. Start making API calls in minutes using our Python, Node.js, Go, or Rust SDKs.

New accounts get free credits to test supported free-tier API endpoints. Some models and resolutions require a paid plan; check the current endpoint page and pricing before integrating.

Start Building with the Magic Hour AI Image Editor API

Free credits on signup. SDKs for Python, Node.js, Go, and Rust. Production-ready in minutes.