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 to start
No watermarks on paid plans
Subscription or usage-based
Auto-scaling
Trusted by teams at














Everything You Need to Ship AI Image Editor
Combine masks, prompts, and model selection for Photoshop-grade flexibility 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 assets, optionally masks, and call /v1/ai-image-editor with model and prompt fields.
3
Get Results & Scale
Receive the swapped output via response or webhook. Deploy to production — infrastructure scales automatically.
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(
name="Edit",
image_count=1,
assets={"image_file_paths": ["/path/to/photo.png"]},
style={"prompt": "Replace background with sunny beach"},
)SDKs for Every Stack
Official open-source SDKs with full TypeScript/type support. Install and start building.
AI Image Editor 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 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.
Depends on the operation—check docs for mask_file_path and automatic segmentation support.
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.