Native protocols
Beyond OpenAI chat completions, your key speaks three more protocols natively. Same key, same models, same billing.
| Protocol | Base URL | Who uses it |
|---|---|---|
| OpenAI chat completions | https://api.pgsgrove.com/v1 |
Any OpenAI SDK, opencode, OpenClaw, Hermes, VS Code BYOK |
| Anthropic Messages | https://api.pgsgrove.com/anthropic (bare /v1/messages also served) |
Claude Code, Anthropic SDKs, Zed, LibreChat |
| OpenAI Responses | https://api.pgsgrove.com/v1/responses |
Codex CLI (requires it), OpenAI Agents SDK |
| Ollama native | https://api.pgsgrove.com/api/* |
Open WebUI, Msty, Page Assist, Continue, Home Assistant, n8n |
Claude Code
export ANTHROPIC_BASE_URL="https://api.pgsgrove.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="pgsk_YOUR_KEY"
# optional, pick models (defaults: minimax-m3, background on deepseek-v4.1-flash):
export ANTHROPIC_MODEL="glm-5.2"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4.1-flash"
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=1000000 # your model's real context window
claude
Notes: claude-* model ids are aliased server-side (haiku-class to
deepseek-v4.1-flash, everything else to minimax-m3) so a zero-config first run
works; set the env vars to choose your own. count_tokens is served
(estimator). Unset any stale ANTHROPIC_API_KEY in your shell. It shadows
ANTHROPIC_AUTH_TOKEN and is the most common setup failure.
Codex CLI (~/.codex/config.toml)
model = "minimax-m3"
model_provider = "pgs"
[model_providers.pgs]
name = "PGS AI"
base_url = "https://api.pgsgrove.com/v1"
env_key = "PGS_API_KEY"
Then export PGS_API_KEY=pgsk_.... The endpoint serves the stateless Responses
subset Codex uses (store: false, full history each turn).
previous_response_id is not supported and returns a clear 400.
Ollama-compatible apps
Point the app's Ollama host at https://api.pgsgrove.com and supply your key as
the API key (sent as a Bearer token, which Open WebUI's per-connection key
field, Continue's apiKey, Home Assistant's API-key field and both official
Ollama SDKs all support). /api/tags fills the app's model picker automatically;
ids accept an optional :latest tag. Fill-in-the-middle autocomplete is
deliberately not offered (/api/show advertises no suffix template).
Which key works where
Both key families speak all four protocols:
- Per-token keys (
pgsk_..., created on the Keys page) draw down your prepaid balance at the published per-model rates. - Coding plan keys (
pgsk_plan_..., created on the Coding Plan page) draw from your subscription allowance, shared with the app.
Everything else in these docs, including request parameters, streaming and errors, applies to all four protocols.