Skip to main content

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_.
You can also use the Authorization: Bearer header:

Getting a key

Self-register (no account needed):
Response:
Your key is returned immediately but inactive until you verify your email. Check your inbox for a verification link from Inkwell. The link expires after 24 hours.
Store your API key securely. It cannot be retrieved after creation. If lost, use key rotation to generate a new one.

Email verification

After registering, click the verification link sent to your email. You can also verify programmatically:
Until verified, any request using the key will return 401 Unauthorized.

Key rotation

This invalidates the old key immediately and returns a new one.

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 returns 503 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:
Standard error codes: invalid_input, rate_limited, store_not_ready, rpc_unavailable, not_found, unauthorized, forbidden, timeout, service_overloaded, internal_error.