Key types
Proxy keys
Prefix:
ms-Used for all AI inference requests to /v1/* endpoints. This is the key you pass as Authorization: Bearer ms-... when calling the API.Create these in Dashboard → API Keys.Billing keys
Prefix:
mk-Used for account management requests to /api/* endpoints — checking your balance, listing transactions, managing subscriptions, and similar operations.Create these in Dashboard → Billing Keys.Keep these two key types separate. Proxy keys cannot access billing endpoints, and billing keys cannot be used to make AI inference requests.
Key properties
Each key has the following attributes:| Field | Description |
|---|---|
id | Unique numeric identifier |
name | Label you assign at creation — use this to identify keys by app or environment |
prefix | First 8 characters of the key, shown in the dashboard after creation |
active | Whether the key can currently be used. Inactive keys return 403. |
createdAt | Timestamp when the key was created |
expiresAt | Optional expiry date. After this date the key is automatically deactivated. |
Key lifecycle
Create the key
Go to Dashboard → API Keys (for proxy keys) or Dashboard → Billing Keys (for billing keys). Click Create key and give it a descriptive name.
Copy the full key immediately
The full key value is shown only once at creation time. Copy it and store it securely. After you close the dialog, only the 8-character prefix is visible.
Use the key
Pass the key in the
Authorization header of your requests. See Authentication for details.Best practices
- One key per environment. Use separate keys for development, staging, and production so you can revoke one without affecting the others.
- Set expiry dates. For temporary access (contractors, one-off scripts), set an
expiresAtwhen creating the key. - Delete unused keys. Fewer active keys means a smaller attack surface if a key is ever compromised.
- Use environment variables. Store keys in environment variables or a secrets manager, not in your source code.
- Monitor via security log. The Dashboard security log records key creation and deletion events.
Related
Authentication
How to pass keys in API requests
Manage keys
Create, update, and delete keys via the API