HaltState AI: API Keys
HaltState API keys authenticate your agents with the governance system.
Key Format
HaltState API keys use the hs_ prefix:
hs_a13950e5214c5058565aa84a2806fe3cd215d4570ef47a51
Generating Keys
- Log in to the HaltState Dashboard
- Go to Settings → API Keys
- Click Generate New Key
- Copy the key immediately - it won't be shown again
Key Security
- Never commit keys to git - Use environment variables
- Rotate regularly - Generate new keys periodically
- Use separate keys per environment - Dev, staging, production
- Revoke compromised keys immediately - In dashboard settings
Environment Variables
export HALTSTATE_TENANT_ID="your-tenant-id"
export HALTSTATE_API_KEY="hs_your_api_key"
import os
from haltstate import HaltStateClient
client = HaltStateClient(
tenant_id=os.environ["HALTSTATE_TENANT_ID"],
api_key=os.environ["HALTSTATE_API_KEY"]
)
Key Scopes (Enterprise)
Enterprise plans support scoped API keys:
| Scope | Permissions |
|---|---|
agent:check |
Can call guard() and check() |
agent:report |
Can report action outcomes |
admin:read |
Can read policies and logs |
admin:write |
Can modify policies |
Contact sales for enterprise key management.