Overview
Requests to the REST API authenticate with an API key in theX-API-Key header. The MCP endpoint accepts the same key as a bearer token — or an OAuth 2.0 sign-in, which needs no key at all.
For MCP, prefer OAuth where the client supports it — there’s no key to copy, leak, or rotate. Reach for an API key when the client can’t run an OAuth flow, or for headless and CI runs where no browser is available. See Add to Agents.
alch_ followed by 32 random URL-safe characters. The full raw key is shown once at creation and is never stored — only a hash is kept.
Provisioning a key
Via the app (recommended)
- Go to app.askalchemist.com/settings/api-keys
- Click Create key
- Enter a name (e.g.
cursor-dev,prod-agent) - Copy the key immediately — it won’t be shown again
Via the API
If you’re already authenticated via the app session (Clerk JWT), you can create keys programmatically:Listing your keys
raw_key — only the prefix (first 12 characters) is shown to help you identify keys.
Revoking a key
204 No Content on success. Revoked keys are rejected immediately on the next request.
Tiers
Keys carry atier field that controls rate limits and access scope.
Higher tiers are available for production workloads — contact us at hello@askalchemist.com.
Rate limit headers
Every API response includes rate limit state:429 Too Many Requests response means you’ve hit the limit for the current window. Wait until X-RateLimit-Reset (Unix timestamp) before retrying.
Security practices
- One key per integration — name keys after where they’re used (
cursor-dev,prod-pipeline). This makes it easy to rotate a compromised key without disrupting other integrations. - Never commit keys to version control. Use environment variables or a secrets manager.
- Rotate regularly. Revoke and reissue keys quarterly or after any suspected exposure.