When to use it
- Your agent needs long-lived access to Encrata’s lookup APIs.
- You want each agent or service to use a separately named key.
- You need to disable or delete one agent’s access without affecting other integrations.
How it works
- The user creates an API key in the dashboard.
- The user provides the key to the agent through a secure configuration channel.
- The agent sends the key as a Bearer credential on each request.
Step 1: Create a key
Sign in to the Encrata dashboard, open API Keys, and click Create API key. Copy the key and give it to the agent. If you already have a valid API key, you can create another one programmatically:enc_ followed by 32 hexadecimal characters.
Step 2: Configure the agent
Store the key in an environment variable such asENCRATA_API_KEY, or in a
secret manager. Never write it to logs, chat transcripts, URLs, or version control.
Step 3: Verify the key
Before running a batch, confirm the key works. This call is free.200 means the key is valid. credits_remaining is the account balance.
Step 4: Make API calls
Send the key as a Bearer token on every request. Never put it in a query string.Key facts
Credential lifecycle
Security considerations
- Store keys in an environment variable or secret manager.
- Create a separately named key for each agent.
- Set a credit limit to cap the key’s spend.
- Permanently delete a compromised key with
DELETE /api/account/keys?id={id}&permanent=true.