Mage API · Image model

Mango API

Our flagship image family

Get an API keyTry Mango in the playground
POST https://api.mage.space/v1/mango/generate

At a glance

The Mango API runs Mango 3 and 3 other variants through Mage at POST https://api.mage.space/v1/mango/generate. A request at the default settings costs 135 Gems (about $0.135), with no subscription. Mango takes saved characters, references by @handle in the prompt.

Overview

What the Mango API does

Our image family for consistent characters, precise edits, and scenes merged from many references or Characters. Mango 3 leads the family; Mango 3S is faster and reaches 3K.

Mage's flagship image family, for consistent characters, precise edits, and scenes merged from many references. Mango 3 (`mango-v3`) is the current model; Mango 3S (`mango-v3s`) is faster and reaches 3K.

It accepts image, additional_images as inputs.

Quick start

Call the Mango API

Set MAGE_API_KEY, submit to /mango/generate, and poll status_url until the request completes.

cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/mango/generate' \
  --header "Authorization: Bearer $MAGE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "Editorial portrait in soft daylight, 35mm film look",
  "aspect_ratio": "4:5",
  "model_id": "mango-v3"
}' | jq -r '.status_url')

# Repeat until status is "completed"; result.url is the file
curl "$STATUS_URL" --header "Authorization: Bearer $MAGE_API_KEY"
Python
import os, time, requests

headers = {"Authorization": f"Bearer {os.environ['MAGE_API_KEY']}"}
request = requests.post(
    "https://api.mage.space/v1/mango/generate",
    headers=headers,
    json={
      "prompt": "Editorial portrait in soft daylight, 35mm film look",
      "aspect_ratio": "4:5",
      "model_id": "mango-v3"
    },
).json()

while request["status"] in ("queued", "in_progress"):
    time.sleep(3)
    request = requests.get(request["status_url"], headers=headers).json()

print(request["status"], request["result"] and request["result"]["url"])
JavaScript
const headers = {
  Authorization: `Bearer ${process.env.MAGE_API_KEY}`,
  'Content-Type': 'application/json',
};
let request = await fetch('https://api.mage.space/v1/mango/generate', {
  method: 'POST',
  headers,
  body: JSON.stringify({
    "prompt": "Editorial portrait in soft daylight, 35mm film look",
    "aspect_ratio": "4:5",
    "model_id": "mango-v3"
  }),
}).then((response) => response.json());

while (['queued', 'in_progress'].includes(request.status)) {
  await new Promise((resolve) => setTimeout(resolve, 3000));
  request = await fetch(request.status_url, { headers }).then((r) => r.json());
}

console.log(request.status, request.result?.url);

Models

Mango model_id values

Send model_id to pick a variant. A request without one runs the default.

model_idNameDefault
mangoMango
mango-v2Mango 2
mango-v3sMango 3S
mango-v3Mango 3Yes

Options

Mango parameters

Allowed values across all variants; a variant may offer fewer. The docs list the options per variant.

FieldValues
aspect_ratio21:9, 16:9, 3:2, 5:4, 1:1, 4:5, 2:3, 9:16, 9:21
resolution1K, 2K, 3K, 4K

Inputs

Media inputs Mango accepts

Send each as an https URL, a data URL, or an upload of up to 100 MB.

FieldRole
imageThe reference image.
additional_imagesAdditional reference images.

More image models

Other image generation APIs on Mage

Image · from 68 Gems

Nano Banana 2 API

Crisp, readable text, up to 4K

Image · from 15 Gems

SDXL Plus API

SDXL with faces and hands fixed

Image · from 10 Gems

Stable Diffusion v1.5 API

The classic, on a budget

Image · from 10 Gems

Stable Diffusion v3.5 Large API

The Stable Diffusion that listens best

Image · from 10 Gems

Stable Diffusion XL API

Photoreal-tuned SDXL

Image · from 10 Gems

Z-Image API

The fastest image model on Mage

FAQ

Frequently asked questions

How much does the Mango API cost?

A Mango request at the default settings (Mango 3) costs 135 Gems, about $0.135. Other resolutions, durations, and variants change the price; the response reports the exact charge. A generation that fails is refunded; one Mage's content policy blocks is not.

What is the Mango API endpoint?

POST https://api.mage.space/v1/mango/generate with an Authorization: Bearer header carrying your Mage API key. The response includes a status_url to poll for the result.

Which Mango models can I call?

mango (Mango), mango-v2 (Mango 2), mango-v3s (Mango 3S), mango-v3 (Mango 3). The default is Mango 3.

Does Mango support reference images or characters?

Mango accepts image, additional_images. Mango takes saved characters, references by @handle in the prompt.

Can I use Mango from Claude or ChatGPT?

Yes. Connect the Mage MCP server to Claude, ChatGPT, Claude Code, Grok, or Cursor and ask for Mango by name. Your assistant reads its options with get_model and quotes the price before it generates.

How long are Mango results kept?

Results and inputs are kept for 30 days. Download anything you want to keep to your own storage.

Start building with Mage

One account, one Gems balance, every model. Pay only for what you generate.

Get an API keyTry Mango in the playground

Related