API reference
Base URL https://api.aiapikit.com/v1. JSON in and out. Errors use {"error": {"type", "message"}}.
Management API
| Method | Path | |
|---|---|---|
GET | /v1/me | Current workspace and plan |
GET | /v1/keys | List keys (prefix and last 4 only) |
POST | /v1/keys | Create a key |
POST | /v1/keys/{id}/rotate | Rotate a key |
DELETE | /v1/keys/{id} | Revoke a key |
GET | /v1/usage?from=&to=&group_by=model | Token usage and cost |
GET | /v1/projects | List projects |
GET | /v1/routes | Routing rules |
PUT | /v1/routes/{alias} | Create or replace a route |
GET | /v1/audit-log | Audit log (Team and Scale) |
POST | /v1/webhooks | Register a webhook |
Gateway
| Method | Path | |
|---|---|---|
POST | https://llm.aiapikit.com/v1/chat/completions | OpenAI format, streaming with "stream": true |
POST | https://llm.aiapikit.com/v1/messages | Anthropic format |
GET | https://llm.aiapikit.com/v1/models | Models your key can use |
Machine-readable: openapi.json
Internal endpoints (staff only)
Not covered by the SLA. Require a staff SSO session; requests with workspace keys are rejected.
GET | https://aiapikit.com/internal/api/v1/tenants | All workspaces with plan and spend |
POST | https://aiapikit.com/internal/api/v1/keys/{id}/impersonate | Short-lived key acting as a workspace (support) |
POST | https://aiapikit.com/internal/api/v1/credits | Grant credits |