MAGI-2 API Key
Get a MAGI-2 API key in about two minutes. One CheaperGen key calls MAGI-2 — 3 endpoints — and every other model in the catalog, from $0.08/s. Prepaid, no subscription needed.
- Key
- Free
- pay per use
- $10 of credits
- ≈ 31
- test clips
- First request
- $0.40
- text-to-video
- Models per key
- 48
- 14 developers
Step by step
How to get a MAGI-2 API key
- 1
Create an account
Sign up with Google or a magic link sent to your email. No sales call and no waitlist.
- 2
Add credits
Credits are prepaid in US dollars, by card. $10 covers about 31 4-second 1080p clips with MAGI-2 ($0.32 each). Turn on auto top-up if you don't want jobs to stop.
- 3
Create the key
Open Dashboard → API keys, name the key (e.g. “magi-prod”) and copy it. Keys start with
cg_live_, and the full key is shown only once. - 4
Store it as an environment variable
Put it in
CHEAPERGEN_API_KEYon your server or in your secrets manager — never in a browser bundle, mobile app or public repository. - 5
Call MAGI-2
Send the request below. It costs $0.40 and returns a generation id you can poll or receive by webhook.
Your first MAGI-2 request
curl -X POST https://cheapergen.com/api/v1/run/sand-ai/magi-2/text-to-video \
-H "Authorization: Bearer $CHEAPERGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A paper boat drifts across a pond as rain taps against the surface.",
"aspect_ratio": "16:9",
"resolution": "1080p",
"duration": 5
}'What the key unlocks
MAGI-2 endpoints on your key
Every MAGI-2 endpoint, with its starting price. The same key also runs the other 47 models.
| Task | Endpoint | From |
|---|---|---|
| Text to Video | POST /api/v1/run/sand-ai/magi-2/text-to-video | $0.08/s |
| Image to Video | POST /api/v1/run/sand-ai/magi-2/image-to-video | $0.08/s |
| Reference to Video | POST /api/v1/run/sand-ai/magi-2/reference-to-video | $0.08/s |
Security
Keep your key safe
Anyone with the key can spend your balance. Details in the authentication docs.
Server-side only
Call the API from your backend. Never ship a key in a browser bundle, mobile app or public repository.
One key per app
Separate keys for production, staging and each integration let you revoke one without touching the others.
Rotate without downtime
Create a new key, deploy it, then revoke the old one. Revocation takes effect immediately.
Watch last-used times
The dashboard shows when each key was last used, so unused or unexpected keys stand out.
Try it
Try MAGI-2 before you write code
The same model and price as the API. Press Code in the full-screen Studio to copy the request for any run.
Compared
A CheaperGen key vs a key from Sand.ai
| Aspect | CheaperGen | Sand.ai directly |
|---|---|---|
| Price | $0.08/s at 1080p | $0.08/s (official list) |
| Models on one key | 48 models from 14 developers | Sand.ai models |
| Billing | Prepaid USD credits, per use, failed runs refunded | Sand.ai's own billing |
| Same model | Yes — official MAGI-2 | Yes — official MAGI-2 |
FAQ