--- title: Hep.gg AI (LLM) description: An Anthropic-compatible Claude proxy, an OpenAI-compatible chat endpoint for self-service LLM keys, and a read-only usage API. --- # Hep.gg AI Two programmatic APIs share one account: an Anthropic-compatible proxy that meters Claude usage per machine, and an OpenAI-compatible chat endpoint for self-service LLM keys. A read-only usage API exposes cached account usage. Base URL: https://ai.hep.gg (every path is also mirrored under https://hep.gg/ai) ## Anthropic proxy (Claude) ### POST /anthropic/:proxy_token/v1/messages Anthropic Messages API, forwarded transparently. Use the proxy token as the URL segment (and optionally as Authorization: Bearer ). SSE streaming works when the body sets "stream": true. Most Anthropic headers (model, beta features) pass through; sensitive headers are stripped. Other Anthropic paths under /anthropic/:proxy_token/... (for example /v1/messages/count_tokens) are forwarded the same way. Proxy tokens are issued per machine and managed by the ccas CLI / the dashboard. Errors use the Anthropic shape, e.g. on an unknown token: { "type": "error", "error": { "type": "authentication_error", "message": "..." } } ## OpenAI-compatible API (self-service LLM keys) Auth: Authorization: Bearer sk-hyd-<...> (mint sk-hyd keys on the dashboard LLM Keys page). Non-admins may call user-allowed models (e.g. qwen3-8b). ### POST /v1/chat/completions OpenAI Chat Completions shape: body { model, messages, stream?, ... }. SSE streaming when "stream": true. Past the rolling 30-day USD cap this returns 429 with an OpenAI-style error body: { "error": { "message": "...", "type": "quota_exceeded", "code": "" } } where reason is one of quota_exhausted | overage_cap | no_hep_tokens. Opt into metered overage on the dashboard to keep serving past the cap. ### GET /v1/models List the models your key may call. A key is bound to its model(s) at creation, so this typically returns the single model that key is allowed to use. ## Usage API (read-only) Auth: a per-user usage token, usg_<...> (mint with "ccas usage-token" or on the dashboard). It only reads cached usage and can switch the active pooled account. ### GET /usage Cached usage for every pooled account: { version, fetched_at, accounts: [ ..., each carrying an "active" flag ] }. Supports ETag / 304. ### GET /usage/:id One account's snapshot by stable id. ### POST /usage/accounts/:id/activate Switch the globally-active pooled account. ## AI Skills (skills.hep.gg) A separate registry of Claude-compatible agent skills served as raw markdown at https://skills.hep.gg: fetch public skills, reach your private skills via a capability URL, or save a skill with POST /me/:accessKey/import. Full reference: https://docs.hep.gg/llms/ai/skills ## Hep.gg dashboard (cookie auth - not for programmatic use) GET /api/v1/ai/account POST /api/v1/ai/account/rotate GET /api/v1/ai/usage-token POST /api/v1/ai/usage-token (reveal / rotate) GET /api/v1/ai/machines (machines are created by the ccas CLI) GET /api/v1/ai/llm-keys POST /api/v1/ai/llm-keys { label?, model? } POST /api/v1/ai/llm-keys/:id/rotate DELETE /api/v1/ai/llm-keys/:id GET /api/v1/ai/accounts (pooled ccas accounts + live usage)