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.

HeaderValue
AuthorizationBearer sk-mg-...

Key limits

Every key has the following guardrails:

LimitDefaultDescription
Rate limit10,000 req/minPer-key rolling window
Concurrency50Max parallel requests
Usage limitNoneOptional spend ceiling
ExpirationNeverOptional 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.