Getting Started
Authentication
How API keys work and how to use them
Getting a key
API keys are issued in two ways:
- Dashboard — sign in with Google at prediction-router.kalashshah47.workers.dev/dashboard. Your key is provisioned automatically.
- Register endpoint —
POST /v1/auth/registerwith your email. The key is returned once in the response body and is not stored in plaintext.
Using your key
Pass the key as a Bearer token in every request:
Authorization: Bearer pr_<your-key>Example:
curl https://prediction-router-api.kalashshah47.workers.dev/v1/markets?platform=kalshi \
-H "Authorization: Bearer pr_..."Key format
Keys are 64-character hex strings prefixed with pr_. Example:
pr_a3f8b2c1d4e5f6078901a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHORIZED | No Authorization header |
| 403 | FORBIDDEN | Key is invalid or revoked |
Security
- Keys are stored as SHA-256 hashes in the database — we cannot recover a lost key
- If you lose your key, contact support or re-register with the same email
- Never commit your key to source control