API Keys
Creating an API key
Section titled “Creating an API key”The Free plan does not include API keys; they are on Pro and up. Owners and admins create and revoke keys.
- Go to Settings → Security
- Under API keys, click New key
- Enter a Name (e.g., “Production Backend”)
- Choose a Role. An Agent key runs agents through the API; Member and Customer keys get tokens that act as a person on your team or as one of your customers
- Choose when it Expires: 30, 90, 180 or 365 days, or never
- Click Create key
- Copy the key now. You won’t see it again
Keys start with sk_live_ and look like: sk_live_abc123xyz789...
Key scope
Section titled “Key scope”An API key is scoped to your organization, not to a single agent. With an Agent key you choose which agent to act as at exchange time by passing its agent_id, so one key can run any agent in the org. The token you get back carries the agent_id you supplied and expires after one hour. It can call only the run endpoints for that agent (what it can call).
Because a key can reach every agent in the org, treat it as an org-level secret: create one key per environment and revoke any key that may have leaked.
Using an API key
Section titled “Using an API key”API keys are not sent directly to the agent API. Exchange the key for a JWT first:
# 1. Exchange API key for JWTcurl -X POST https://profile-api.auteryn.ai/api/v1/auth/exchange/agent-token \ -H "X-API-Key: sk_live_your_key" \ -H "Content-Type: application/json" \ -d '{"agent_id": "your-agent-uuid"}'
# 2. Call agent API with JWTcurl -X POST https://agent-api.auteryn.ai/api/run \ -H "Authorization: Bearer eyJ..." \ -H "X-Agent-Id: your-agent-uuid" \ -H "Content-Type: application/json" \ -d '{"messages": [{"role": "user", "content": "Hello"}], "stream": false}'See Authentication → for the full flow.
Best practices
Section titled “Best practices”- Never commit keys to version control — use environment variables
- One key per environment — separate keys for dev, staging, and production
- Set expiry dates for keys needed only temporarily
- Rotate keys regularly, especially if a team member with key access leaves
Revoking a key
Section titled “Revoking a key”In Settings → Security, click Revoke next to the key and confirm.
A revoked key can’t be exchanged again. A token already issued from it keeps working until it expires, within the hour.

