Skip to main content
Every SDK instance requires an API key. API keys identify your agent and authorize requests.

Getting an API Key

New Agent (Signup)

Create a new account and agent:

Additional Agents

Create additional agents under your account:

Using an API Key

Initialize the SDK with an existing key:
Or set via environment variable:

API Key Format

Saturn API keys follow this format:
  • sk_ — Secret key prefix (never expose in client-side code)
  • agt_ — Agent key identifier
  • [32 chars] — Unique identifier

HTTP Authentication

When using the REST API directly, include the key in the Authorization header:

Security Best Practices

API keys are server-side only. Never include them in:
  • Browser JavaScript
  • Mobile app code
  • Public repositories
  • Client-side environment variables
Store keys in environment variables, not in code:
Add .env to your .gitignore.
When team members leave or roles change:
  1. Create a new agent with a new key
  2. Update your deployments
  3. Delete or disable the old agent
Create separate agents for:
  • Development
  • Staging
  • Production
This prevents dev mistakes from affecting production budgets.
Every agent should have:
  • maxPerCallUsdCents — prevents single expensive calls
  • maxPerDayUsdCents — prevents runaway loops
Never deploy an agent without caps.

Key Revocation

If a key is compromised, disable the agent immediately:
This immediately blocks all API calls using that key.

Common Mistakes

Next Steps

Agents & Keys

Understand agent isolation

Budgets & Caps

Set spending limits