Mage API · Image model
Guava API
Photorealism that passes for a photograph
POST https://api.mage.space/v1/guava/generateAt 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_id | Name | Default |
|---|---|---|
| guava | Guava | Yes |
| guava-pro | Guava Pro | |
| guava-pro-v1-5 | Guava Pro 1.5 | |
| guava-2 | Guava 2 | |
| guava-2-pro | Guava 2 Pro |
Options
Guava parameters
Allowed values across all variants; a variant may offer fewer. The docs list the options per variant.
| Field | Values |
|---|---|
| aspect_ratio | 21:9, 16:9, 3:2, 5:4, 1:1, 4:5, 2:3, 9:16, 9:21 |
| resolution | 1K, 2K |
Inputs
Media inputs Guava accepts
Send each as an https URL, a data URL, or an upload of up to 100 MB.
| Field | Role |
|---|---|
| image | The reference image. |
| additional_images | Additional reference images. |
More image models
Other image generation APIs on Mage
HiDream API
Fast and versatile, with negative prompts
Krea 2 API
Gorgeous aesthetics in seconds
Mango API
Our flagship image family
MiniMax H3 Image API
Native 16-megapixel images, open weights
MOSS-Image API
Long prompts and bilingual text, open weights
Nano Banana 2 API
Crisp, readable text, up to 4K
FAQ
Frequently asked questions
How much does the Guava API cost?
What is the Guava API endpoint?
Which Guava models can I call?
Does Guava support reference images or characters?
Can I use Guava from Claude or ChatGPT?
How long are Guava results kept?
Start building with Mage
One account, one Gems balance, every model. Pay only for what you generate.