API keys
Every endpoint except/health and /ready needs an API key. Send it in the X-API-Key header:
Bearer tokens
POST /mcp also accepts your key as a bearer token, because many MCP clients only offer an Authorization field:
X-API-Key wins. This applies to /mcp only: REST endpoints need X-API-Key. See MCP server for client setup.
OAuth for apps
Apps that can’t hold an API key, such as Claude, ChatGPT and Claude Desktop, sign you in instead. You approve the app on prefetch.io, and it gets an access token that it sends as a bearer token:401 whose WWW-Authenticate header points at /.well-known/oauth-protected-resource (or /.well-known/oauth-protected-resource/mcp for the MCP server). That’s how an app finds where to sign you in.
To remove an app’s access, select Disconnect under Connected Apps on the dashboard. Its next call fails, even if its token hasn’t expired.
How keys are checked
Every request checks your key in this order:- Present: the key is in the header.
- Not revoked: nobody revoked it.
- Not expired: it hasn’t passed its expiry date.
- Within its credit limit: it hasn’t used its credits.
401. Every other failure returns 403.
Keeping keys safe
- Use separate keys for development and production.
- Set a credit limit on each key so a bug can’t spend your whole balance.
- Rotate keys regularly on the dashboard.
- Revoke a leaked key straight away.