API for AI media

Your app needs AI media.
You send one request.
One API, same for every model — Mynth translates it to what the provider needs.
Mynth validates it and locks a fixed price.
A background job takes over.
Inputs are resized and classified for the model.
Your prompt is rewritten with curated style tags.
Routed to the fastest available provider.
Failures retry across providers. You never see them.
Your media is generated.
The result is content-rated and formatted.
Delivered to the CDN, your storage, your webhooks.
const task = await mynth.image.generate({model: "openai/gpt-image-2",size: "auto",prompt: "our product, studio light",rate: true,inputs: ["https://acme.dev/refs/product.png","https://acme.dev/refs/style.png",],});{images: [{url: "https://cdn.mynth.io/m/img_8f3kp2.png",mynthUrl: "https://cdn.mynth.io/m/img_8f3kp2.png",rate: { level: "sfw" },...rest,},],...rest,}03the toolkit
Built for real work.
Every feature exists because we needed it ourselves. No bloat — just the tools that make image generation in production painless.
Unified API
One payload for every model. Switch providers without touching integration code — unsupported parameters are adapted automatically.
Fully-typed SDK
Model IDs, parameters, and responses are all typed. Autocomplete that actually knows which sizes FLUX accepts.
Magic Prompts
Leave it on for every request. Good prompts pass through untouched; rough ones get rewritten and tuned to the model — behind one flag.
Content Rating
Rate any image against built-in or custom scales. Enforce your app's content policy without running your own classifier.
Public Access Tokens
Scoped, single-use tokens your frontend can use to poll task status directly. No background workers, no proxy endpoints.
Webhooks
Register a URL and Mynth calls you when the generation completes. Your backend never polls.
Async & Sync Modes
Synchronous responses for quick results, async with webhooks and polling for production workloads. Same payload either way.
Auto Size Selection
Pass size: "auto" and Mynth picks optimal dimensions for the prompt and model. One less decision per request.
04magic prompts
The prompt that adjusts itself.
Magic Prompt is a single flag you turn on for every request. Send a clean, model-ready prompt and it proxies straight through, untouched. Send something rough — another language, typos, a paragraph of story with one image buried inside — and Mynth rewrites it into a prompt the model can actually use, tuned to the model you picked.
You never have to decide which case you're in. It's the prompt-engineering layer you'd otherwise build, branch, and maintain yourself — replaced by a boolean.
one example — when it has work to do
you send
Create a full-body shot of the woman described below:
"maren had spent thirty winters on the northern coast. her copper hair was going grey at the temples now, and a pale scar ran from her cheekbone to her jaw — a souvenir from the siege at Hollow Bay. she pulled her salt-stained wool cloak tight against the wind..."
mynth sends to the model
Full-body portrait of a weathered woman in her fifties, long copper hair greying at the temples, a pale scar running from cheekbone to jaw, wearing a salt-stained grey wool cloak, standing on a rugged windswept northern coastline, overcast light, photorealistic, sharp detail
Pointed at a tag-based model like Illustrious? Magic Prompt returns weighted tags and model-specific keywords instead — same flag, no extra work.
Already good? Untouched.
A clean, model-ready prompt proxies straight through. You pay no tax for getting it right.
Messy content, handled
Wrap a story, a product description, or raw LLM output in an instruction. Magic Prompt finds the image you actually want — typos and all.
Any language
Prompt in German, Japanese, or anything else. Mynth translates to English before the model ever sees it.
Model-aware phrasing
Natural language for SOTA models. Tag-based prompting and model-specific keywords for SDXL families like Illustrious.
06output
Made with one payload.
Every image below was generated through the Mynth API — different models, identical integration. Hover for the model behind each one.

Grok Imagine
autumn portrait, red hair against turning maple leaves

FLUX.2 [max]
bioluminescent leopard, glowing mushrooms, dark jungle

Gemini 3 Pro Image
the word spelled out entirely in tropical fruit, studio light

Recraft V4
low angle portrait in tall grass, windswept, overcast sky

Qwen Image 2.0
dragon embroidery on dark silk, obsidian sphere, macro detail

Seedream 5.0 Lite
floating crystal citadel, dragons circling at dawn

Bismuth Illustrious Mix
portrait, warm rim light, dark background, best quality

FLUX.2 [pro]
golden hour portrait, shadows through window blinds

Z-Image Turbo
film still, woman at the shore at dusk

Illustrious
epic wallpaper, ancient forest, dark muted greens

Recraft V4 Pro

Gemini 3.1 Flash Image

Grok Imagine
autumn portrait, red hair against turning maple leaves

FLUX.2 [max]
bioluminescent leopard, glowing mushrooms, dark jungle

Gemini 3 Pro Image
the word spelled out entirely in tropical fruit, studio light

Recraft V4
low angle portrait in tall grass, windswept, overcast sky

Qwen Image 2.0
dragon embroidery on dark silk, obsidian sphere, macro detail

Seedream 5.0 Lite
floating crystal citadel, dragons circling at dawn

Bismuth Illustrious Mix
portrait, warm rim light, dark background, best quality

FLUX.2 [pro]
golden hour portrait, shadows through window blinds

Z-Image Turbo
film still, woman at the shore at dusk

Illustrious
epic wallpaper, ancient forest, dark muted greens

Recraft V4 Pro

Gemini 3.1 Flash Image

GPT Image 2

Grok Imagine

Qwen Image 2.0 Pro

GPT Image 2

Seedream 5.0 Lite

GPT Image 2

GPT Image 2

GPT Image 2

Recraft V4 Pro

Grok Imagine Image Quality

Krea 2 Medium

Krea 2 Large

GPT Image 2

Grok Imagine

Qwen Image 2.0 Pro

GPT Image 2

Seedream 5.0 Lite

GPT Image 2

GPT Image 2

GPT Image 2

Recraft V4 Pro

Grok Imagine Image Quality

Krea 2 Medium

Krea 2 Large
05content safety api
Rate any image.
Define your own scale.
POST /image/rate accepts up to 10 image URLs and returns a content rating for each, in the same response. Use the built-in sfw / nsfw scale or define 2–7 custom levels that map exactly to your app's content policy.
- Batch up to 10 images per request
- Custom rating scales with natural-language descriptions
- Per-image error handling — one failure doesn't block the rest
- Rate images from any source, not just Mynth generations
pricing
$0.0002/ image rated
5,000 images per $1 — flat rate, no minimum
custom scale — 2 to 7 levels
response
07developer experience
Zero to image in three steps.
Install
01$ bun add @mynthio/sdkOne dependency. Fully typed, zero config.
Generate
02const task = await mynth.image.generate({prompt: "a fox in a cyberpunk city",});Model, size, and prompt enhancement are handled automatically.
Receive
03webhook: { url: "https://api.you.com/hook" }// or poll from the frontend with a// scoped public access tokenNo queues, no workers, no infrastructure to babysit.
open alpha
Ship media generation this afternoon.
Sign up and get $1 in free credits to test the API. No credit card required.
Early alpha — things may break at any time.
Need more credits to test? Ask on Discord and we'll top you up.
All data may be cleared during, and will be removed after, the alpha.
Save generations to your own storage — don't rely on Mynth's.