Authorization header of every /v1 request:
Getting a key
Krun is in closed beta. API keys are issued per project: request access. Keys start withkrun_live_.
Every key of a project shares the project’s quotas and can send feedback for the project’s decisions. Rate limits apply per key. See Rate limits and quotas.
Keep keys on the server
Never expose a Krun API key in browser or client-side code. Anyone who can read the key can make requests with it and use your quota.
- Call it from your backend, a serverless function or a worker, never from a web page, mobile app or desktop app.
- There is no browser SDK, and the API does not send CORS headers.
- Store the key in an environment variable (
KRUN_API_KEY) or a secret manager. Don’t commit it to source control. - Use a separate key per service or environment, so you can revoke one without affecting the others.
Authentication errors
A missing, malformed, unknown or revoked key returns401:
krun.AuthenticationError. Don’t retry it: fix the key first.