API Keys
Create and manage API keys.
API keys authenticate your application with Risicare. Each key is scoped to exactly one project — this is how the gateway knows which project your traces belong to.
Key Format
rsk-a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
│ └── 32 hex characters (generated via secrets.token_hex(16))
└── Prefix (always "rsk-")
Keys are validated by SHA256 hash -- the plaintext key is never stored. On each request the hash is checked against a Redis cache (60s TTL, configurable) first, with a PostgreSQL fallback if the cache misses.
Key management is dashboard-only
Creating, listing, and revoking API keys must be done from the dashboard's OAuth-authenticated UI. The /api/v1/api-keys/* REST routes reject API-key authentication and return 403 by design — you cannot manage keys with a Bearer rsk-... token. Use Settings → API Keys in the dashboard.
Creating Keys
Via Dashboard
- Navigate to Settings → API Keys
- Click "Create API Key"
- Select the target project (if you have multiple projects)
- Enter a name (e.g., "production-sdk")
- Click "Create Key"
- Copy the key and quickstart snippet (shown only once!)
Auto-generated on project creation
When you create a new project, a default API key is generated automatically. You only need to manually create keys for additional access (e.g., key rotation, per-service keys).
No API path — use the dashboard
There is no API-key-authenticated way to create a key: POST /api/v1/api-keys with a Bearer rsk-... token returns 403. Create keys from Settings → API Keys in the dashboard. The full key is shown only once on creation — store it securely.
Using Keys
In SDK
import risicare
risicare.init(api_key="rsk-...")Environment Variable
export RISICARE_API_KEY="rsk-..."In API Requests
curl -X GET "https://app.risicare.ai/api/v1/traces" \
-H "Authorization: Bearer rsk-..."Key Security
Best Practices
- Never commit keys to version control
- Use environment variables or secrets managers
- Create separate keys for each environment
- Rotate keys periodically
- Revoke unused keys
Key Rotation
- Create a new key
- Update your application
- Verify new key works
- Revoke old key
Viewing Keys
The list of keys for your project (with prefixes and last-used timestamps) is shown on the dashboard's Settings → API Keys page. The GET /api/v1/api-keys REST route also denies API-key authentication and returns 403 — there is no Bearer-authenticated way to list keys.
Revoking Keys
Via Dashboard
- Navigate to Settings → API Keys
- Find the key
- Click "Revoke"
- Confirm
Revoked keys immediately stop working.
No API path — use the dashboard
DELETE /api/v1/api-keys/{key_id} with a Bearer rsk-... token returns 403. Revoke keys from the dashboard's OAuth-authenticated UI.
Rate Limits
API keys have rate limits based on your project configuration:
| Limit | Default |
|---|---|
| Ingestion | 1K spans/min |
| Query API | 100 requests/min |
Rate limit headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 950
X-RateLimit-Reset: 1705312800