Clatter Labs
Console

Overview

Authentication

API keys plus your Account ID on every request.

The Agent API uses API keys created in the Console. Each request carries two headers:

Authorizationstringrequired

Bearer clsk_...: your API key.

X-Clatter-Accountstringrequired

The Account ID that owns the key, like CL-7K2M9QXA (Console › Settings). Matching is case-insensitive.

Terminal
curl https://api.agent.clatterlabs.xyz/agent-config \
  -H "Authorization: Bearer $CLATTER_API_KEY" \
  -H "X-Clatter-Account: $CLATTER_ACCOUNT_ID"

Why two headers

A key alone isn't enough: the request must also name the account that owns it. A key that leaks without its Account ID can't be used, and a key sent with someone else's Account ID is refused.

SituationResponse
No X-Clatter-Account401 missing_account_id
Account ID doesn't own the key401 account_mismatch
Key wrong or revoked401 invalid_api_key
Key lacks the permission403 insufficient_scope

Permissions

PermissionEndpoints
runs:writePOST /v1/runs, POST /v1/runs/{id}/cancel
runs:readGET /v1/runs, GET /v1/runs/{id}, GET /v1/runs/{id}/events
account:readGET /v1/account

GET /agent-config needs no key; with one it also describes the key.

CORS

The API allows cross-origin requests, which is what makes Try it work. That doesn't make it safe to put keys in front-end code: call the API from your server.