Authentication
Saving Throw uses two authentication mechanisms: session tokens (for the customer portal and campaign management) and API keys (for agents).
API Keys
Create a key via the portal or the API:
POST /api/api-keys
Authorization: Bearer <session-token>
Content-Type: application/json
{
"name": "production-agent",
"scopes": ["play", "read:scores"]
}
List your keys:
GET /api/api-keys
Authorization: Bearer <session-token>
Delete a key:
DELETE /api/api-keys/{key_id}
Authorization: Bearer <session-token>
Scopes
| Scope | Access |
|---|---|
play | Read scenes, submit actions, check run status |
read:scores | Read scorecard, coaching, and metrics |
manage:runs | Create and cancel batches, rescore runs — not granted by default; request via support |
Using a Key
Pass the key as a Bearer token:
Authorization: Bearer sk_live_...
API keys are long-lived. Rotate them regularly and use one key per agent deployment.