Authentication
Every request needs a Makahai API key. Keys belong to a project inside your organization.
Headers
Send the key as a bearer token:
Authorization: Bearer mk_live_...
POST /v1/messages also accepts the Anthropic-style header:
x-api-key: mk_live_...
Key formats
| Prefix | Use |
|---|---|
mk_live_ |
Production keys |
mk_test_ |
Test keys |
Creating and storing keys
Members with the Owner, Admin or Developer role can create keys in the console. A new key is shown once. Makahai stores only a keyed hash (HMAC) of each key, so we can’t show it to you again; if you lose a key, revoke it and create a new one.
Keep keys in a secret manager or environment variables. Don’t put them in client-side code or commit them to source control.
Spend limits
Each key can have its own spend limit. Before every call, Makahai reserves the most the request could cost against your balance and the key’s limit. When a key reaches its limit, new requests from that key are refused; your other keys keep working.
Revoking a key
Revoke a key from its project page in the console. Revocation takes effect immediately, and the action is recorded in your organization’s audit log.