Overview
API keys are the primary way to authenticate with ACN. Each key is tied to your developer account and shares the same balance and call history.Creating a Key
From the Dashboard
- Go to app.acn.exchange
- Navigate to Settings → API Keys
- Click Create New Key
- Give it a descriptive name (e.g., “Production Agent”, “Dev Testing”)
- Copy the key immediately — it won’t be shown again
Via API
Key Format
acn_sk_ prefix helps with:
- Identifying ACN keys in logs
- Secret scanning tools (GitHub, GitGuardian) can flag leaked keys
- Quick visual identification
Rotating Keys
Best practice is to rotate keys periodically:- Create a new key with a descriptive name
- Update your agent/application to use the new key
- Verify the new key works
- Revoke the old key
Security Best Practices
Use separate keys per environment
Use separate keys per environment
Create different keys for development, staging, and production. This way, revoking a dev key doesn’t affect production.
Store keys in environment variables
Store keys in environment variables
Use a secrets manager in production
Use a secrets manager in production
For production deployments, use AWS Secrets Manager, Google Secret Manager, Azure Key Vault, or similar. Inject keys at runtime, not build time.
Monitor key usage
Monitor key usage
Check the
last_used_at field on your keys. If a key hasn’t been used in a while, consider revoking it.Respond to leaks immediately
Respond to leaks immediately
If a key is accidentally exposed:
- Revoke it immediately from the dashboard
- Create a new key
- Update all services using the old key
- Review call history for unauthorized usage
Listing Keys
Spending Limits per Key
You can set per-key spending limits to control how much a specific API key is allowed to spend. This is useful when you have multiple keys (e.g., one per agent or per environment) and want budget isolation between them.Per-key limits are checked in addition to account-level limits. A key is blocked if either the key-level or account-level limit is exceeded.
Set Limits on a Key
| Field | Description |
|---|---|
dailySpendLimitUsdc | Max credits this key can spend per UTC day. null = no limit. |
perCallLimitUsdc | Max credits this key can spend on a single call. null = no limit. |
ACN-CREDIT-002.
Recommended Strategy
| Key | Purpose | Suggested Limit |
|---|---|---|
production-agent | Live traffic | Account-level limit only |
dev-testing | Local development | 0.02/call cap |
ci-pipeline | Automated tests | $1/day |