Skip to content

API keys

The Klaris APIs, such as the Klaris Agent API, use workspace keys. Every request carries one:

Authorization: Bearer klk_live_...

MCP doesn't use API keys: each person signs in, or your server vouches for them. See Sign your people in.

Make keys on Settings → API Keys. A key is shown once, when it's made; Klaris keeps only a fingerprint of it, so a lost key can't be shown again. Make a new one and revoke the old.

Each key has scopes, which say what it may do. A key can only do what its scopes allow, whichever API it calls.

Klaris Agent API scopes

Scope Lets the key…
responses Ask the agent, read and cancel responses
conversations Start, list, read and delete conversations
memories See, add, change and delete what the agent remembers
connections Add, check, change and remove connections, and make sign-in links
usage Read usage and cost

New keys get every scope except usage. A reporting tool that only needs cost can have a key with only usage.

Keep keys on your server

A key acts for the whole workspace. Call the API from your server, never from a browser or a phone app.

People

APIs that act for a person, such as the Klaris Agent, say who each request is for with user: your own id for that person, up to 255 characters. Use something stable, such as their email or their id in your app.

  • Klaris keeps each person's conversations, memory and personal connections separate. A request for one person can never see another's.
  • The first time Klaris sees a user, it adds them. There's nothing to set up first.
  • You may also send user_email and user_name. They make Klaris's activity and cost pages easier to read ("Nick Shah" rather than an id).
{
  "user": "u_4821",
  "user_email": "nick@example.com",
  "user_name": "Nick Shah",
  "input": "…"
}