Every API request is authenticated with a bearer key. Keys are prefixed rvn_, are scoped to your plan, and carry your rate limits and monthly quota with them.
Authorization: Bearer rvn_...
Missing or unknown keys return HTTP 401 with NO_AUTH / INVALID_KEY — see Errors.
The console at console.rivenai.io is the primary place to manage keys. The same operations are available programmatically at https://platform.rivenai.io, authenticated with your Riven sign-in token (the OIDC access token issued by auth.rivenai.io for audience https://api.rivenai.io).
Mints your developer API key, scoped to your current plan. Idempotent — calling it again returns your existing active key rather than creating a new one.
curl -X POST https://platform.rivenai.io/v1/keys/developer \
-H "Authorization: Bearer $RIVEN_SIGNIN_TOKEN" \
-H "Content-Type: application/json" -d '{}'{ "key": "rvn_...", "plan": "free" }Replaces your key with a fresh value. The old key stops working immediately; plan, quota standing, and usage history carry over to the new key.
curl -X POST https://platform.rivenai.io/v1/keys/developer/rotate \
-H "Authorization: Bearer $RIVEN_SIGNIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "rvn_<current key>"}'{ "key": "rvn_<new key>", "plan": "free", "rotated": true }Deactivates your key without issuing a replacement.
curl -X POST https://platform.rivenai.io/v1/keys/developer/revoke \
-H "Authorization: Bearer $RIVEN_SIGNIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "rvn_<current key>"}'Lists your developer keys (values masked to a prefix).
For try-before-signup flows, a device can mint a tightly rate-limited guest key without an account. Guest keys are capped per-device and can only use guest-tier models — production workloads should use a developer key.
curl -X POST https://api.rivenai.io/v1/keys/guest \
-H "Content-Type: application/json" \
-d '{"device_id": "<stable unique device identifier>"}'{ "key": "rvn_...", "plan": "guest-device", "rate_limit_per_day": 7200 }Minting is idempotent per device_id — repeat calls return the same key.
GET /billing/quota and the x-riven-quota-* response headers.