Use an account API key to read your account data and chat with your own API-enabled Charigents.
Last verified:
Authentication
Use an account key (chgk_…) for account reads and the account chat route. Use the matching Character key (char_…) for /api/v1/characters/{id}/chat, or the matching Charigent key (rag_…) for /api/v1/charigents/{id}/chat. Send each key as a Bearer token; the header alternatives are listed on each operation. Keep keys on your server. Read routes reject requests with an Origin header.
Every account-key call is scoped to the account that created the key. Each entity chat key resolves one Character or Charigent, and its ID in the URL must match that key. A key cannot reach another account’s entity.
Customer API endpoints
The list includes account-key reads and chat routes for an individual Character or Charigent. Entity chat requires a message, an opaque visitorId, and an Idempotency-Key header. Request and response fields come from the schemas used by the route handlers.
GET /api/v1/me
Read the profile and plan for the account that owns the key.
Account key: Authorization: Bearer chgk_… or X-API-Key.
Response fields: id, email, displayName, company, plan
Account-key authentication errors return JSON with error and code fields. Chat errors also return an error field and may include code or retry_after. A 429 response includes Retry-After when the caller should wait.
Authentication error shape
{
"error": "This API key is not valid.",
"code": "INVALID_API_KEY"
}
Rate limits
Each account key is limited to 120 requests per minute.
Before key verification, requests from one network address are limited to 60 attempts per minute.
Before an entity key is checked, requests from one network address are limited to 60 attempts per 60 seconds.
Account-key chat also uses a per-visitor limit configured for the Charigent, with a default of 10 and a maximum of 60 requests per minute. Its shared agent ceiling scales at 12 times that limit and is clamped from 120 to 600 requests per minute.
Entity-key chat allows 10 requests per sender and 30 requests per entity in each 60 second window.
Account-key chat checks an additional limit before API-key verification. Its effective threshold can vary, so use Retry-After when present. Its per-visitor and shared Charigent limits include X-RateLimit-Scope. Entity-key chat returns Retry-After when a limit is reached.
Versioning
Account reads and entity chat routes are under /api/v1. Account-key chat also uses /api/rag-agent/chat/{charigentId}. Keep endpoint paths in your integration configuration.