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 sets the key as the environment variable
ENCRATA_API_KEYwhere the agent runs. The key never goes into the chat. - 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. Don’t paste it into a chat with 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
Set the key as the environment variableENCRATA_API_KEY where the agent runs,
for example in your shell profile, an uncommitted .env file, or your tool’s
secrets settings. Never write it to logs, chat transcripts, URLs, or version control.
If a key is pasted into a chat by mistake, revoke it under API Keys and set a
new one as ENCRATA_API_KEY.
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.