Authentication
The Inkwell Agent API uses two authentication methods depending on the endpoint.API Key (Agent endpoints)
All/api/v1/ika/agent/* endpoints require an API key in the X-API-Key header. Keys are prefixed with lev_.
Authorization: Bearer header:
Getting a key
Self-register (no account needed):Email verification
After registering, click the verification link sent to your email. You can also verify programmatically:401 Unauthorized.
Key rotation
Bearer Token (Management endpoints)
Agent management endpoints (/api/v1/agents/* except self-register and verify) require a user JWT:
Public endpoints (no auth)
All/api/v1/ika/* endpoints (without /agent/) are public and require no authentication:
Rate limits
Rate limit headers are included on every authenticated response:
When rate limited, the API returns
429 Too Many Requests with a Retry-After header.
Rate limits are persisted — restarting the server does not reset your limits.
Limits by tier
Self-registration always creates a free tier key. There is no automatic upgrade — tier promotion requires an admin to re-register the agent via
POST /agents/register.
Registration limits
Self-registration is rate limited to prevent abuse:Global protection
The API includes a global circuit breaker. If total request volume exceeds 10,000 requests per minute across all agents, the API returns503 Service Overloaded until traffic subsides. Individual IP addresses are also throttled at 100 requests per minute regardless of agent identity.
Error responses
All errors follow a consistent format:invalid_input, rate_limited, store_not_ready, rpc_unavailable, not_found, unauthorized, forbidden, timeout, service_overloaded, internal_error.