Continue (the open-source IDE extension for VS Code and JetBrains) configures each model with a provider, a key and, for OpenAI-compatible endpoints, a base URL. That is exactly the shape zer0pii needs.
Field names below are from Continue's official documentation, read 2026-09-22:
- OpenAI provider: docs.continue.dev/customize/model-providers/top-level/openai, which shows
apiKeyandapiBaseand says "if you are using an OpenAI API compatible providers, you can change theapiBase". - Config reference: docs.continue.dev/reference, where
apiBaseis described as "Can be used to override the default API base that is specified per model". - Anthropic provider: docs.continue.dev/customize/model-providers/top-level/anthropic, which shows
apiKeybut does not showapiBasein its examples.
OpenAI models (verified path)
~/.continue/config.yaml:
models:
- name: GPT via zer0pii
provider: openai
model: gpt-4o
apiBase: https://api.zer0pii.com/v1
apiKey: zpii_...
roles:
- chat
- edit
- apply
requestOptions:
headers:
X-zer0pii-Upstream-Key: sk-...
What each line does:
apiBase: the gateway's/v1root. Continue appends/chat/completions, which is zer0pii's OpenAI-shaped route (source:apps/gateway/api/v1/proxy.py). Self-hosted: usehttps://<your-gateway>/v1.apiKey: your zer0pii key. Continue sends it asAuthorization: Bearer ..., which is where the gateway reads its key (source:apps/gateway/core/auth.py).requestOptions.headers.X-zer0pii-Upstream-Key: your OpenAI key, forwarded by the gateway to OpenAI asAuthorization: Bearer(source:core/providers.py). Omit this block entirely if your admin configuredUPSTREAM_API_KEYon the gateway; then the developer's config holds only the zer0pii key.requestOptions.headersis the mechanism the config reference shows for custom headers.
Streaming and tool calls work through this route.
Anthropic models (documented with a caveat)
Continue's Anthropic provider page does not show apiBase. The config reference lists apiBase as a general per-model override without restricting it to a provider, so the following is expected to work, but it was not confirmed against the Anthropic provider page and you should run verify.md before relying on it:
models:
- name: Claude via zer0pii
provider: anthropic
model: claude-sonnet-4-5
apiBase: https://api.zer0pii.com/v1
apiKey: zpii_...
requestOptions:
headers:
X-zer0pii-Upstream-Key: sk-ant-...
Two things to know about this path:
The Anthropic SDK sends the key in
x-api-key, notAuthorization. zer0pii reads its own key fromAuthorization: Beareronly. If Continue's Anthropic provider sendsapiKeyasx-api-key, the gateway answers401 INVALID_API_KEY. In that case add the zer0pii key as an explicit header instead and leaveapiKeyas a placeholder:requestOptions: headers: Authorization: Bearer zpii_... X-zer0pii-Upstream-Key: sk-ant-...The gateway sets
anthropic-version: 2023-06-01itself and does not forwardanthropic-beta, so Anthropic features gated on a beta header are unavailable through it.
If neither variant works for you, the OpenAI-compatible route above is the verified path.
Legacy config.json
Older Continue installs use ~/.continue/config.json with the same field names in JSON:
{
"models": [
{
"title": "GPT via zer0pii",
"provider": "openai",
"model": "gpt-4o",
"apiBase": "https://api.zer0pii.com/v1",
"apiKey": "zpii_...",
"requestOptions": {
"headers": { "X-zer0pii-Upstream-Key": "sk-..." }
}
}
]
}
Continue's docs treat config.yaml as current; use it for new setups.
Optional headers
Add these under the same requestOptions.headers block when you need them (source: proxy.py):
X-zer0pii-Conversation-ID: keep masked tokens stable across one conversation so the provider's prompt cache keeps hitting.X-zer0pii-Policy-Group:healthcare,clinical,financeorhrfor fail-closed handling.X-zer0pii-Upstream-URL: route to a different OpenAI-compatible endpoint (public hostnames only).
Autocomplete and embeddings
- Autocomplete (the
autocompleterole) sends code, which the gateway deliberately does not mask. Routing it through zer0pii adds latency for no privacy gain unless your completions contain prose with personal data. Leave it on a direct provider or a local model. - Embeddings (the
embedrole) change meaning when their input is masked, so the gateway's embeddings route is not generally enabled. Ask your admin before pointingembedat the gateway.