Mage API · Image model
Chroma API
Open-weights, built on Flux
POST https://api.mage.space/v1/chroma/generateAt a glance
The Chroma API runs Chroma through Mage at POST https://api.mage.space/v1/chroma/generate. A request at the default settings costs 35 Gems (about $0.035), with no subscription. Chroma takes no @handle mentions.
- ImageOutput
- 1Variant
- 35Gems per image, default
- $0.035About, in USD
Overview
What the Chroma API does
An open-weights general image model on the Flux architecture. Text-to-image, with steps and guidance in your hands.
An open-weights general-purpose image model on the Flux architecture.
It generates from the prompt alone.
Quick start
Call the Chroma API
Set MAGE_API_KEY, submit to /chroma/generate, and poll status_url until the request completes.
cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/chroma/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": "chroma-v1-hd"
}' | 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('chroma', {
prompt: 'Editorial portrait in soft daylight, 35mm film look',
aspect_ratio: '4:5',
model_id: 'chroma-v1-hd',
});
console.log(request.result.url);Python
# pip install mage-space
from mage_space import Mage
mage = Mage() # reads MAGE_API_KEY
request = mage.run("chroma", {
"prompt": "Editorial portrait in soft daylight, 35mm film look",
"aspect_ratio": "4:5",
"model_id": "chroma-v1-hd",
})
print(request["result"]["url"])Models
Chroma model_id values
Send model_id to pick a variant. A request without one runs the default.
| model_id | Name | Default |
|---|---|---|
| chroma-v1-hd | Chroma | Yes |
Options
Chroma 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 |
More image models
Other image generation APIs on Mage
Flux 2 API
Long prompts and multi-reference edits
GPT Image 2 API
Precise prompts and readable text
Grok Image API
Grok Imagine, in two tiers
Guava API
Photorealism that passes for a photograph
HiDream API
Fast and versatile, with negative prompts
Krea 2 API
Gorgeous aesthetics in seconds
FAQ
Frequently asked questions
How much does the Chroma API cost?
What is the Chroma API endpoint?
Which Chroma models can I call?
Does Chroma support reference images or characters?
Can I use Chroma from Claude or ChatGPT?
How long are Chroma results kept?
Start building with Mage
One account, one Gems balance, every model. Pay only for what you generate.