Skip to main content

Your API key

Create a key in Settings → API keys. Give it a name, choose its scopes, and copy the value; it’s shown once. Keys start with chr_. Pass it when you create the client, or set CHRONICLE_API_KEY and CHRONICLE_API_URL in the environment and the client picks them up:
Python
For Go and Rust, use the function context and imports in SDK setup when continuing to the key-creation example below. A key belongs to one organization, and everything you create or read is scoped to it. You never pass an organization ID.

Scopes

Pick the scopes a key needs when you create it: A CI key typically has platform. A key supplied to your agent process typically has agents:write and traces:write. You can also create keys from code:
Python

Twin tokens

A running twin (a fake Slack, Linear, and so on) has its own base_url and token. Use that token, not your Chronicle key, when your agent calls the twin’s vendor API. Read them from the world’s twins list or client.twins.retrieve(twin_id). See Twins.

Errors

The SDK raises APIError with the status and message. See Errors and retries.