Authentication
All API requests must include a valid API key in the Authorization header.
API Keys
API keys start with sk-mg- and are scoped to your account. You can create multiple keys with different limits in your dashboard settings.
| Header | Value |
|---|---|
Authorization | Bearer sk-mg-... |
Key limits
Every key has the following guardrails:
| Limit | Default | Description |
|---|---|---|
| Rate limit | 10,000 req/min | Per-key rolling window |
| Concurrency | 50 | Max parallel requests |
| Usage limit | None | Optional spend ceiling |
| Expiration | Never | Optional expiry date |
Never expose your API key in client-side code or public repositories. Use environment variables or a backend proxy.
Account balance
Every request debits your account balance. The minimum reserve is $0.10 and the hard ceiling per request is $10 (or 5× your current balance, whichever is smaller). If your balance is too low, you will receive a 402 error.
You can add credits via Stripe in your billing settings.