Skip to content

Mage API · Image model

Guava API

Photorealism that passes for a photograph

POST https://api.mage.space/v1/guava/generate

At a glance

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

  • ImageOutput
  • 5Variants
  • 37Gems per image, default
  • $0.037About, in USD

Overview

What the Guava API does

Our photorealism family, for portraits, fashion, and product shots with true-to-life skin, fabric, and light. Takes references or Characters, up to 2K.

Mage's photorealism family, for portraits, fashion, and product shots that pass for photographs, with reference images. Guava 2 and Guava 2 Pro are the current pair.

It accepts image, additional_images as inputs.

Quick start

Call the Guava API

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

cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/guava/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": "guava"
}' | jq -r '.status_url')

# Repeat until status is "completed"; result.url is the file
curl "$STATUS_URL" --header "Authorization: Bearer $MAGE_API_KEY"
TypeScript
// npm install @mage-space/sdk
import Mage from '@mage-space/sdk';

const mage = new Mage(); // reads MAGE_API_KEY

const request = await mage.run('guava', {
  prompt: 'Editorial portrait in soft daylight, 35mm film look',
  aspect_ratio: '4:5',
  model_id: 'guava',
});

console.log(request.result.url);
Python
# pip install mage-space
from mage_space import Mage

mage = Mage()  # reads MAGE_API_KEY

request = mage.run("guava", {
    "prompt": "Editorial portrait in soft daylight, 35mm film look",
    "aspect_ratio": "4:5",
    "model_id": "guava",
})

print(request["result"]["url"])

Models

Guava model_id values

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

model_idNameDefault
guavaGuavaYes
guava-proGuava Pro
guava-pro-v1-5Guava Pro 1.5
guava-2Guava 2
guava-2-proGuava 2 Pro

Options

Guava 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

Inputs

Media inputs Guava 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 20 Gems

    HiDream API

    Fast and versatile, with negative prompts

  • Image · from 20 Gems

    Krea 2 API

    Gorgeous aesthetics in seconds

  • Image · from 42 Gems

    Mango API

    Our flagship image family

  • Image · from 25 Gems

    MOSS-Image API

    Long prompts and bilingual text, open weights

  • Image · from 51 Gems

    Nano Banana 2 API

    Crisp, readable text, up to 4K

  • Image · from 15 Gems

    SDXL Plus API

    SDXL with faces and hands fixed

FAQ

Frequently asked questions

How much does the Guava API cost?
A Guava request at the default settings (Guava) costs 37 Gems, about $0.037. 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 Guava API endpoint?
POST https://api.mage.space/v1/guava/generate with an Authorization: Bearer header carrying your Mage API key. The response includes a status_url to poll for the result.
Which Guava models can I call?
guava (Guava), guava-pro (Guava Pro), guava-pro-v1-5 (Guava Pro 1.5), guava-2 (Guava 2), guava-2-pro (Guava 2 Pro). The default is Guava.
Does Guava support reference images or characters?
Guava accepts image, additional_images. Guava takes saved characters, references by @handle in the prompt.
Can I use Guava from Claude or ChatGPT?
Yes. Connect the Mage MCP server to Claude, ChatGPT, Claude Code, Grok, or Cursor and ask for Guava by name. Your assistant reads its options with get_model and quotes the price before it generates.
How long are Guava 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.