Documentation
Loading…
Authentication and keys
API keys, per-key limits, rotation and how browser sessions differ from keys.
Base URL for this deployment: https://www.aiteraiworld.com/api/v1
API keys
Send the key as a bearer token. Keys start with sk-ait-v1-, are shown once at creation and are stored only as SHA-256 digests, so a lost key must be rotated.
text
Authorization: Bearer sk-ait-v1-…| Limit | Effect |
|---|---|
| Monthly credit limit | Requests stop with 402 once the key has spent its monthly budget. Zero means no limit. |
| Model allowlist | Requests for other models are refused with 403 model_not_allowed. |
| Revocation | Revoked keys fail with 403 access_revoked immediately, including mid-stream. |
Managing keys
Keys are created and revoked from the dashboard or from the management API with a browser session. A key can read its own usage but cannot create or revoke keys.
| Endpoint | Purpose |
|---|---|
GET /keys | List keys with prefix, spend, limits and last use. |
POST /keys | Create a key: name, budget (micro-USD per month) and models. |
POST /keys/{id}/rotate | Issue a replacement with the same limits and revoke the old key. |
DELETE /keys/{id} | Revoke a key. |
GET /key | Usage and limit of the key making the request. |
Sessions and two-factor
The dashboard uses an HttpOnly session cookie with CSRF protection. Enable time-based one-time passwords under Account → Security; once enabled, sign-in and password resets require a code. Active sessions can be reviewed and revoked from the same page.