API for AI media

AI-generated portrait of a queen in obsidian glass, made with the Mynth API
  • 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.

01

Unified API

One payload for every model. Switch providers without touching integration code — unsupported parameters are adapted automatically.

02

Fully-typed SDK

Model IDs, parameters, and responses are all typed. Autocomplete that actually knows which sizes FLUX accepts.

03

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.

04

Content Rating

Rate any image against built-in or custom scales. Enforce your app's content policy without running your own classifier.

05

Public Access Tokens

Scoped, single-use tokens your frontend can use to poll task status directly. No background workers, no proxy endpoints.

06

Webhooks

Register a URL and Mynth calls you when the generation completes. Your backend never polls.

07

Async & Sync Modes

Synchronous responses for quick results, async with webhooks and polling for production workloads. Same payload either way.

08

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.

magic_prompt:true

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..."

▼ magic_prompt: true

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.

autumn portrait, red hair against turning maple leaves

Grok Imagine

autumn portrait, red hair against turning maple leaves

bioluminescent leopard, glowing mushrooms, dark jungle

FLUX.2 [max]

bioluminescent leopard, glowing mushrooms, dark jungle

the word spelled out entirely in tropical fruit, studio light

Gemini 3 Pro Image

the word spelled out entirely in tropical fruit, studio light

low angle portrait in tall grass, windswept, overcast sky

Recraft V4

low angle portrait in tall grass, windswept, overcast sky

dragon embroidery on dark silk, obsidian sphere, macro detail

Qwen Image 2.0

dragon embroidery on dark silk, obsidian sphere, macro detail

floating crystal citadel, dragons circling at dawn

Seedream 5.0 Lite

floating crystal citadel, dragons circling at dawn

portrait, warm rim light, dark background, best quality

Bismuth Illustrious Mix

portrait, warm rim light, dark background, best quality

golden hour portrait, shadows through window blinds

FLUX.2 [pro]

golden hour portrait, shadows through window blinds

film still, woman at the shore at dusk

Z-Image Turbo

film still, woman at the shore at dusk

epic wallpaper, ancient forest, dark muted greens

Illustrious

epic wallpaper, ancient forest, dark muted greens

Generated with Recraft V4 Pro

Recraft V4 Pro

Generated with Gemini 3.1 Flash Image

Gemini 3.1 Flash Image

autumn portrait, red hair against turning maple leaves

Grok Imagine

autumn portrait, red hair against turning maple leaves

bioluminescent leopard, glowing mushrooms, dark jungle

FLUX.2 [max]

bioluminescent leopard, glowing mushrooms, dark jungle

the word spelled out entirely in tropical fruit, studio light

Gemini 3 Pro Image

the word spelled out entirely in tropical fruit, studio light

low angle portrait in tall grass, windswept, overcast sky

Recraft V4

low angle portrait in tall grass, windswept, overcast sky

dragon embroidery on dark silk, obsidian sphere, macro detail

Qwen Image 2.0

dragon embroidery on dark silk, obsidian sphere, macro detail

floating crystal citadel, dragons circling at dawn

Seedream 5.0 Lite

floating crystal citadel, dragons circling at dawn

portrait, warm rim light, dark background, best quality

Bismuth Illustrious Mix

portrait, warm rim light, dark background, best quality

golden hour portrait, shadows through window blinds

FLUX.2 [pro]

golden hour portrait, shadows through window blinds

film still, woman at the shore at dusk

Z-Image Turbo

film still, woman at the shore at dusk

epic wallpaper, ancient forest, dark muted greens

Illustrious

epic wallpaper, ancient forest, dark muted greens

Generated with Recraft V4 Pro

Recraft V4 Pro

Generated with Gemini 3.1 Flash Image

Gemini 3.1 Flash Image

Generated with GPT Image 2

GPT Image 2

Generated with Grok Imagine

Grok Imagine

Generated with Qwen Image 2.0 Pro

Qwen Image 2.0 Pro

Generated with GPT Image 2

GPT Image 2

Generated with Seedream 5.0 Lite

Seedream 5.0 Lite

Generated with GPT Image 2

GPT Image 2

Generated with GPT Image 2

GPT Image 2

Generated with GPT Image 2

GPT Image 2

Generated with Recraft V4 Pro

Recraft V4 Pro

Generated with Grok Imagine Image Quality

Grok Imagine Image Quality

Generated with Krea 2 Medium

Krea 2 Medium

Generated with Krea 2 Large

Krea 2 Large

Generated with GPT Image 2

GPT Image 2

Generated with Grok Imagine

Grok Imagine

Generated with Qwen Image 2.0 Pro

Qwen Image 2.0 Pro

Generated with GPT Image 2

GPT Image 2

Generated with Seedream 5.0 Lite

Seedream 5.0 Lite

Generated with GPT Image 2

GPT Image 2

Generated with GPT Image 2

GPT Image 2

Generated with GPT Image 2

GPT Image 2

Generated with Recraft V4 Pro

Recraft V4 Pro

Generated with Grok Imagine Image Quality

Grok Imagine Image Quality

Generated with Krea 2 Medium

Krea 2 Medium

Generated with Krea 2 Large

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

POST/image/rate

custom scale — 2 to 7 levels

GSuitable for all audiences
PGMild content, general audiences
PG-13Mature themes, not for children
RRestricted, adult themes
XExplicit adult content

response

// results[]
hero-banner.webpg
action-scene.webppg13
product-photo.webpg

07developer experience

Zero to image in three steps.

Install

01
$ bun add @mynthio/sdk

One dependency. Fully typed, zero config.

Generate

02
const task = await mynth.image.generate({prompt: "a fox in a cyberpunk city",});

Model, size, and prompt enhancement are handled automatically.

Receive

03
webhook: { url: "https://api.you.com/hook" }// or poll from the frontend with a// scoped public access token

No 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.

01

Early alpha — things may break at any time.

02

Need more credits to test? Ask on Discord and we'll top you up.

03

All data may be cleared during, and will be removed after, the alpha.

04

Save generations to your own storage — don't rely on Mynth's.