API Keys
Create and manage API keys.
Risicare is in closed beta
Access is by invitation. The link in your invitation email opens the sign-in page — start there rather than from the addresses on this page. The link does not sign you in by itself: sign in with the same email address the invitation was sent to, or it is not accepted. If a step here does not work for you during the beta, write to support@risicare.ai.
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
Treat an API key as an opaque string. Copy it exactly as the dashboard shows it, and do not check its format in your code.
Keys are validated by SHA256 hash -- the plaintext key is never stored. The ingest gateway caches a validated key for up to 60 seconds. The scores route checks the key on every request.
Key management is dashboard-only
Creating, listing, and revoking API keys must be done from the dashboard's OAuth-authenticated UI. No route manages keys for a request that carries an API key — you cannot manage keys with a Bearer rsk-... token. Use Settings → API Keys in the dashboard.
Creating Keys
Via Dashboard
Owners and admins can create keys; members and viewers cannot. Creating a key needs a recent sign-in — if you are asked to re-authenticate, sign in again and retry.
- Pick the project in the project selector, and navigate to Settings → API Keys
- Click Create API Key
- Enter a name (e.g., "production-sdk")
- Choose the Key class: Ingest (the default) or Secret — see Key Classes and Scopes
- Create the key
- Copy the key and quickstart snippet. The dialog says: "This is the only time you will see this API key." While the key shows, Escape and a click outside the dialog do not close it
The dashboard has no control that sets an expiry date for a key.
Auto-generated on project creation
When you create a new project from the project dropdown, a default API key is generated automatically and shown once, in the dialog that opens after the project is created — copy it there. The first person to sign in to a new organization also gets a default project whose key is shown once, in the Your API key card on the dashboard home page (the same key can also show as a banner at the top of Settings → API Keys). Create keys manually for additional access (e.g., key rotation, per-service keys), to replace a key you did not save, or when you joined an organization that already has a project — the key list shows prefixes only and cannot reveal a key again.
The first key of a new project is an Ingest key. It is the key for your application. It sends spans and scores and pulls prompts and active fixes, and it cannot read your traces. Make a Secret key in Settings → API Keys for risicare eval gate, evals.run, dataset import by key and the MCP server, and keep it out of your application. An older project can still hold a Secret key as its first key. The key list shows the class of each key.
No API path — use the dashboard
There is no API-key-authenticated way to create a key. Create keys from Settings → API Keys in the dashboard. The full key is shown only once on creation — store it securely.
Key Classes and Scopes
A key has a class, and the class sets the most that the key can do. The dashboard offers two classes. A third class, ci, is held for the beta.
| Class | Scopes | What it is for |
|---|---|---|
ingest (the default) | fixes:read, ingest:write, prompts:read, scores:write | Sends spans and scores from your code and reads active fixes and prompts, so use it in the SDK. It cannot read traces, sessions, agents, cost, releases or detections, also not through the MCP server |
secret | alerts:read, alerts:write, datasets:read, datasets:write, deployments:read, diagnoses:read, evaluations:read, evaluations:write, fixes:read, ingest:write, projects:read, prompts:read, scorers:read, scorers:write, scores:read, scores:write, webhooks:read | Does all that an ingest key does, and reads and writes project data. It is the only class that reads traces, sessions, agents, cost, releases and detections (scope projects:read). It cannot manage the team, API keys or billing |
The table lists the scopes of each class. The REST API has no alert or notification-channel route for an API key in this release. Use the Alerts page of the dashboard. See Alerts. A secret key reads alert rules through the MCP server.
A key gets only the scopes that all three of these allow: the role of the person who created it, the scopes stored on the key, and the scopes of its class. Hover over the class badge of a key in the list to see its scopes.
Using Keys
Environment Variable
Put the key in the environment of your application. Do not write a key in your code, and do not commit one.
export RISICARE_API_KEY="rsk-..."In SDK
import risicare
risicare.init() # reads RISICARE_API_KEY from the environmentIn JavaScript, pass process.env.RISICARE_API_KEY as apiKey. rsk-... in these docs is a placeholder.
In API Requests
Send the key in the Authorization header: Authorization: Bearer rsk-.... An API key reaches these routes — see REST API. What a key may do inside a route depends on its class and scopes.
- Ingest host,
https://ingest.risicare.ai:POST /v1/spans,POST /v1/spans/batch,POST /v1/traces(OTLP over HTTP, JSON or protobuf) andPOST /v1/otlp/v1/traces(OTLP JSON only). - API host,
https://api.risicare.ai:GETandPOST /v1/datasets,GET /v1/datasets/{dataset_id}/export,POST /v1/datasets/{dataset_id}/items,POST /v1/datasets/{dataset_id}/imports,POST /v1/evaluations,GETandPATCH /v1/evaluations/{evaluation_id},GET /v1/evaluations/{evaluation_id}/cases,POST /v1/evaluations/{evaluation_id}/cases/copy,GET /v1/evaluations/{evaluation_id}/inputs,GETandPOST /v1/evaluations/{evaluation_id}/results,GET /v1/evaluations/{evaluation_id}/verdict,GET /v1/fixes/active,GET /v1/prompts/resolveandPOST /v1/scores.
These are the routes that the docs cover for an API key. For the rest, use the dashboard.
The MCP server, https://app.risicare.ai/api/mcp, takes the key too. Its 25 tools read the project. Every read of project data needs a secret key: traces, sessions, agents, cost, releases and detections need the scope projects:read, and runs, datasets and alert rules need their own read scopes. An ingest key reads only prompts, and the model price table works with any key.
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
- Put an
ingestkey in your application, and keep asecretkey out of it. Asecretkey reads the traces, datasets and scores of its project, so keep it in the secret store of your CI or in your own tools - Do not publish an
ingestkey on purpose either. It cannot read traces, but anyone who holds it can send spans and scores to your project and can read your prompts and active fixes, so a prompt must hold no secret
Key Rotation
- Create a new key
- Update your application
- Verify new key works
- Revoke old key
Keys of a person you remove
The dialog that removes a person from the team says that API keys they created here will stop working. Before you remove someone, create a replacement for any key they created that your applications still use.
Viewing Keys
The list of keys for your project is on the dashboard's Settings → API Keys page. Each row shows the key prefix (rsk-xxxx...), a badge with the key class, Created and Last used. There is no Bearer-authenticated way to list keys.
Revoking Keys
Via Dashboard
- Navigate to Settings → API Keys
- Click the trash icon next to the key
- Confirm in the Delete API Key dialog
Deleting a key revokes it. The dialog says that this cannot be undone and that any application that uses the key will stop working. Owners and admins can revoke keys. Revoking needs a recent sign-in, like creating a key. The ingest gateway can keep accepting spans from a revoked key for up to 60 seconds, until its cached copy expires.
No API path — use the dashboard
There is no API-key-authenticated way to revoke a key. Revoke keys from the dashboard's OAuth-authenticated UI.
Rate Limits
| Surface | Default | Scope |
|---|---|---|
Ingest gateway (https://ingest.risicare.ai/v1/..., where the SDK sends spans) | Limited | Per project, and per client IP address |
A request over the gateway's own limit is refused with 429 Too Many Requests and a Retry-After header — back off and retry. A limit at the network edge can answer 429 without that header.
No per-key limit is enforced.