Mage API · Image model
HiDream API
Fast and versatile, with negative prompts
POST https://api.mage.space/v1/hidream/generateAt a glance
The HiDream API runs HiDream through Mage at POST https://api.mage.space/v1/hidream/generate. A request at the default settings costs 20 Gems (about $0.02), with no subscription. HiDream takes no @handle mentions.
- ImageOutput
- 1Variant
- 20Gems per image, default
- $0.02About, in USD
Overview
What the HiDream API does
A quick general text-to-image model with a negative prompt. Great for everyday prompts, photoreal or illustrated.
A fast general image model with a negative prompt, photoreal or illustrated.
It generates from the prompt alone.
Quick start
Call the HiDream API
Set MAGE_API_KEY, submit to /hidream/generate, and poll status_url until the request completes.
cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/hidream/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": "hidream-fast"
}' | 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('hidream', {
prompt: 'Editorial portrait in soft daylight, 35mm film look',
aspect_ratio: '4:5',
model_id: 'hidream-fast',
});
console.log(request.result.url);Python
# pip install mage-space
from mage_space import Mage
mage = Mage() # reads MAGE_API_KEY
request = mage.run("hidream", {
"prompt": "Editorial portrait in soft daylight, 35mm film look",
"aspect_ratio": "4:5",
"model_id": "hidream-fast",
})
print(request["result"]["url"])Models
HiDream model_id values
Send model_id to pick a variant. A request without one runs the default.
| model_id | Name | Default |
|---|---|---|
| hidream-fast | HiDream | Yes |
Options
HiDream 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
Krea 2 API
Gorgeous aesthetics in seconds
Mango API
Our flagship image family
MOSS-Image API
Long prompts and bilingual text, open weights
Nano Banana 2 API
Crisp, readable text, up to 4K
SDXL Plus API
SDXL with faces and hands fixed
Seedream API
Seedream, with a strict filter
FAQ
Frequently asked questions
How much does the HiDream API cost?
What is the HiDream API endpoint?
Which HiDream models can I call?
Does HiDream support reference images or characters?
Can I use HiDream from Claude or ChatGPT?
How long are HiDream results kept?
Start building with Mage
One account, one Gems balance, every model. Pay only for what you generate.