zot providers
zot ships with built-in providers and a model catalog. You can select models
with /model, list them with zot --list-models, and add private models in
$ZOT_HOME/models.json.
HTTP proxy
Set one global proxy for zot-managed HTTP and HTTPS traffic with the http_proxy key in $ZOT_HOME/config.json:
{
"http_proxy": "http://127.0.0.1:7890"
}
zot applies this setting at startup. Existing HTTP_PROXY, HTTPS_PROXY, http_proxy, and https_proxy environment variables take precedence for their corresponding protocol. Standard NO_PROXY and no_proxy bypass lists remain effective. Restart zot after changing the setting.
config.json is not a credential store. If the proxy URL contains a username or password, prefer setting the proxy environment variables in a protected shell or service configuration rather than saving those credentials in config.json.
Login methods
Use /login in interactive mode. Type in either provider picker to filter the list by provider ID or display name.
api key: stores an API key in $ZOT_HOME/auth.json when the provider uses a normal key.
subscription: stores OAuth credentials for subscription-backed providers.
Use /logout to remove stored credentials.
Some providers need more than a single pasted key. For those providers,
/login shows setup instructions instead of opening a localhost browser form.
This avoids broken browser flows in SSH, containers, and kubectl exec
sessions.
Command-backed API keys
A provider can obtain its API key from a password manager or another local program. Configure this directly in $ZOT_HOME/auth.json:
{
"openai": {
"api_key_command": {
"program": "op",
"args": ["read", "op://Work/OpenAI/credential"],
"timeout_ms": 120000
}
}
}
Custom provider credentials use the same object under additional_api_key_creds:
{
"additional_api_key_creds": {
"my-company": {
"api_key_command": {
"program": "secret-tool",
"args": ["read", "my-company-api-key"]
}
}
}
}
The program is started directly rather than through a shell. The timeout defaults to 120 seconds. It must write one non-empty line to stdout, with no more than 64 KiB of output. Trailing CR/LF characters are removed. Successful results stay only in process memory and are reused until zot exits.
Command-backed credentials count as logged in without being executed. zot materializes one only when selecting that provider; background model discovery skips it. /login with a normal key replaces the command, while /logout clears it. Because auth.json can cause program execution, keep it user-writable only and do not use files from untrusted sources.
Setup-instruction providers:
- Amazon Bedrock
- Google Vertex AI
- Cloudflare Workers AI
- Cloudflare AI Gateway
- Azure OpenAI Responses
Subscription providers
These providers support subscription login:
| Provider |
Notes |
| Anthropic |
Claude Pro/Max OAuth credentials. |
| OpenAI Codex |
ChatGPT Plus/Pro Codex subscription route. Separate from the OpenAI API-key provider. |
| Kimi |
Kimi subscription login. |
| xAI |
SuperGrok or X Premium device-code login. The browser URL is prefilled with the device code. |
| GitHub Copilot |
GitHub Copilot token flow. |
OAuth tokens are stored in $ZOT_HOME/auth.json and refreshed when refresh is
available.
GPT-6 Astra
Select gpt-6-astra with provider openai, openai-responses,
openai-codex, or github-copilot, for example:
zot --provider github-copilot --model gpt-6-astra
Astra uses the Responses API and supports low, medium, high, xhigh,
and max reasoning. OpenAI API-key and Codex subscription entries use the
272,000-token short-context tier by default; the Copilot entry uses a
1,050,000-token context window. All entries include the 128,000-token output
limit and standard token prices, including the higher rates for prompts above
272,000 tokens. Subscription access depends on your
plan, rollout, and organization policy; catalog availability does not grant access.
See the OpenAI model specifications
and GitHub Copilot availability.
API-key providers
These providers can use environment variables. Simple API-key providers can
also be configured through /login. Providers that require extra cloud setup
show instructions and should be configured with environment variables.
| Provider |
Environment variable |
Stored key |
| Anthropic |
ANTHROPIC_API_KEY |
anthropic |
| OpenAI |
OPENAI_API_KEY |
openai |
| OpenAI Responses |
OPENAI_API_KEY |
openai-responses |
| Kimi |
KIMI_API_KEY or MOONSHOT_API_KEY |
kimi |
| Google Gemini |
GEMINI_API_KEY or GOOGLE_API_KEY |
google |
| DeepSeek |
DEEPSEEK_API_KEY |
deepseek |
| Moonshot AI |
MOONSHOT_API_KEY |
moonshotai |
| Moonshot AI China |
MOONSHOT_API_KEY |
moonshotai-cn |
| Groq |
GROQ_API_KEY |
groq |
| xAI |
XAI_API_KEY |
xai |
| Cerebras |
CEREBRAS_API_KEY |
cerebras |
| Together AI |
TOGETHER_API_KEY |
together |
| Hugging Face |
HF_TOKEN |
huggingface |
| OpenRouter |
OPENROUTER_API_KEY |
openrouter |
| Gondola |
GONDOLA_API_KEY |
gondola |
| Mistral |
MISTRAL_API_KEY |
mistral |
| ZAI |
ZAI_API_KEY |
zai |
| Xiaomi MiMo |
XIAOMI_API_KEY |
xiaomi |
| Xiaomi Token Plan Amsterdam |
XIAOMI_TOKEN_PLAN_AMS_API_KEY |
xiaomi-token-plan-ams |
| Xiaomi Token Plan China |
XIAOMI_TOKEN_PLAN_CN_API_KEY |
xiaomi-token-plan-cn |
| Xiaomi Token Plan Singapore |
XIAOMI_TOKEN_PLAN_SGP_API_KEY |
xiaomi-token-plan-sgp |
| MiniMax |
MINIMAX_API_KEY |
minimax |
| MiniMax China |
MINIMAX_CN_API_KEY or MINIMAX_API_KEY |
minimax-cn |
| Fireworks |
FIREWORKS_API_KEY |
fireworks |
| Vercel AI Gateway |
AI_GATEWAY_API_KEY |
vercel-ai-gateway |
| OpenCode Zen |
OPENCODE_API_KEY |
opencode |
| OpenCode Go |
OPENCODE_API_KEY |
opencode-go |
| GitHub Copilot token |
COPILOT_GITHUB_TOKEN or GITHUB_COPILOT_TOKEN |
github-copilot |
| Cloudflare Workers AI |
CLOUDFLARE_API_KEY |
cloudflare-workers-ai |
| Cloudflare AI Gateway |
CLOUDFLARE_API_KEY |
cloudflare-ai-gateway |
| Azure OpenAI Responses |
AZURE_OPENAI_API_KEY |
azure-openai-responses |
When Gondola credentials are available, zot refreshes its public text-model
catalog in the background and adds the discovered models to /model.
Example:
export OPENROUTER_API_KEY=...
zot --provider openrouter
Local llama.cpp router
The llama.cpp provider connects to a multi-model router and is separate from the ollama provider. Ollama normally uses http://localhost:11434; entering that URL for llama.cpp management produces a 404 because Ollama does not implement the router endpoints.
Install a current llama.cpp build. On macOS:
brew install llama.cpp
# use `brew upgrade llama.cpp` for an existing installation
Start llama-server without --model, -m, or -hf. Those flags select one model and disable the router behavior zot expects.
mkdir -p ~/llama-models
llama-server \
--models-dir ~/llama-models \
--no-models-autoload \
--jinja \
--host 127.0.0.1 \
--port 8080 \
-ngl 999 \
-c 32768
This configuration discovers GGUF files below ~/llama-models, leaves model loading under explicit user control, enables chat templates, requests GPU offload, and sets a 32K context. Tune the GPU layers and context size for the available memory.
Check the management API before opening zot:
curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/models
/models must return JSON with a data array. A 404 indicates the wrong URL, an older server build, or single-model mode.
To save the connection, run /login, choose api key, and select llama.cpp. Enter http://127.0.0.1:8080, without /v1, followed by an optional bearer key. zot validates the URL and stores both values in $ZOT_HOME/auth.json. Environment variables override the saved connection:
export LLAMA_BASE_URL=http://127.0.0.1:8080
export LLAMA_API_KEY=optional-secret
If a key is configured, start the router with the same --api-key value. A server bound only to 127.0.0.1 normally does not need authentication.
After login, /llama becomes visible. It shows model state, searches Hugging Face for GGUF repositories, offers available quantizations, reports download and load progress, and explicitly loads or unloads models. Press d on a router-downloaded cache model to ask the router to remove it after confirmation. Models discovered through --models-dir or a preset are not removable through the router API and must be deleted from their configured source. Some llama.cpp versions retain shared Hugging Face repository artifacts such as mmproj files after removing the selected GGUF; remove that repository's cache directory manually if those artifacts are no longer needed. HF_TOKEN raises Hugging Face API limits and may be required for repository metadata. For gated files, approve access first and provide the authorized token to the llama-server process because the router performs the download.
Opening /model refreshes the router and displays its loaded models under provider llama.cpp. Unloaded models cannot handle inference and therefore remain exclusive to /llama until loaded. Inference is sent to the router's derived /v1 endpoint.
Ollama downloads are stored in Ollama's internal layout and do not automatically become llama.cpp models. Obtain a GGUF copy through /llama or place GGUF files under ~/llama-models, then restart the router after adding files manually.
Cloud providers
Amazon Bedrock
Bedrock is configured with AWS credentials, not a generic zot API-key entry.
Use one of these credential sources:
# AWS profile
export AWS_PROFILE=your-profile
# IAM access keys
export AWS_ACCESS_KEY_ID=AKIA...
export AWS_SECRET_ACCESS_KEY=...
export AWS_SESSION_TOKEN=... # only for temporary credentials
# Bedrock API key bearer token
export AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-...
# Region
export AWS_REGION=us-east-1
ECS task roles, IRSA, and other AWS SDK credential-chain sources are also
supported.
Example:
AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-... AWS_REGION=us-east-1 \
zot --provider amazon-bedrock --model anthropic.claude-sonnet-4-5-20250929-v1:0
Some Bedrock models require regional inference-profile IDs for on-demand
throughput, such as us. or eu. prefixed model IDs. zot rewrites known
families automatically where possible. Claude Opus 5 uses
global.anthropic.claude-opus-5; zot maps the bare foundation-model ID to that
global profile and supports its adaptive reasoning levels. Explicit profile IDs
and ARNs are left unchanged.
Google Vertex AI
Vertex can use a Google API key when available:
export GOOGLE_CLOUD_API_KEY=...
zot --provider google-vertex
For service-account or application-default credentials, set the standard
Google environment variables used by your deployment.
Cloudflare AI Gateway
Cloudflare AI Gateway needs a Cloudflare token plus account and gateway IDs:
export CLOUDFLARE_API_KEY=...
export CLOUDFLARE_ACCOUNT_ID=...
export CLOUDFLARE_GATEWAY_ID=...
zot --provider cloudflare-ai-gateway
Cloudflare Workers AI
Workers AI needs a Cloudflare token and account ID:
export CLOUDFLARE_API_KEY=...
export CLOUDFLARE_ACCOUNT_ID=...
zot --provider cloudflare-workers-ai
Azure OpenAI Responses
export AZURE_OPENAI_API_KEY=...
export AZURE_OPENAI_BASE_URL=https://your-resource.openai.azure.com
export AZURE_OPENAI_API_VERSION=v1 # optional, v1 is the default
zot --provider azure-openai-responses
The provider uses Azure's Responses API. If deployment names differ from zot
model IDs, map them without changing the catalog:
export AZURE_OPENAI_DEPLOYMENT_NAME_MAP='gpt-5.6-luna=luna-preview,gpt-5.6-sol=sol-preview'
Auth file
Credentials are stored in $ZOT_HOME/auth.json with user-only permissions
when zot creates the file.
Example:
{
"anthropic": { "api_key": "sk-ant-..." },
"openai": { "api_key": "sk-..." },
"google": { "api_key": "..." },
"additional_api_key_creds": {
"openrouter": { "api_key": "..." },
"mistral": { "api_key": "..." }
}
}
The top-level keys are used for providers with dedicated credential fields.
Other API-key providers are stored under additional_api_key_creds. Prefer
/login so zot writes the correct schema.
Custom providers and models
Use $ZOT_HOME/models.json for private models, deployment aliases, local
servers, or OpenAI-compatible gateways that are not in the built-in catalog.
User entries override built-in entries with the same provider and model ID, and
adding a models.json no longer hides the built-in catalog: your entries are
merged on top of the baked-in and live-discovered models.
A top-level provider key that is not a built-in id defines a custom provider.
Give it a provider-level baseUrl and an api wire format (openai for
OpenAI-compatible Chat Completions, the default, openai-responses for the
OpenAI Responses API, or anthropic for the Anthropic Messages API). A
model-level baseUrl overrides the provider-level one for that model, and an
unknown api value falls back to openai with a warning.
{
"providers": {
"my-company": {
"baseUrl": "https://llm.mycompany.com/v1",
"api": "openai",
"models": [
{ "id": "company-llm-v2", "name": "Company LLM v2" }
]
}
}
}
Custom providers are first-class: they appear in --list-models, /model, and
/login. models.json never stores secrets. Supply the key through /login,
--api-key, or a derived environment variable in upper snake case, so
my-company reads MY_COMPANY_API_KEY. Because many self-hosted gateways do
not expose a model-list endpoint, custom provider keys are accepted and stored
without a verification probe; an invalid key surfaces on the first model call.
To retrieve this custom provider's key from a password manager, add a matching
entry to $ZOT_HOME/auth.json:
{
"additional_api_key_creds": {
"my-company": {
"api_key_command": {
"program": "op",
"args": ["read", "op://Work/OpenAI/credential"],
"timeout_ms": 120000
}
}
}
}
The provider IDs in models.json and auth.json must match. Then select the
custom model directly:
zot --provider my-company --model company-llm-v2
Credential resolution
For each request, zot checks credentials in this order:
- Explicit CLI key, such as
--api-key.
- Provider-specific environment variables (including derived custom-provider
variables such as
MY_COMPANY_API_KEY).
$ZOT_HOME/auth.json, including custom provider keys saved by /login.
models.json itself never stores credentials; it only describes models and
their endpoints.
Bedrock then uses the AWS SDK credential chain for the actual request.
source
1# zot providers
2
3zot ships with built-in providers and a model catalog. You can select models
4with `/model`, list them with `zot --list-models`, and add private models in
5`$ZOT_HOME/models.json`.
6
7## HTTP proxy
8
9Set one global proxy for zot-managed HTTP and HTTPS traffic with the `http_proxy` key in `$ZOT_HOME/config.json`:
10
11```json
12{
13 "http_proxy": "http://127.0.0.1:7890"
14}
15```
16
17zot applies this setting at startup. Existing `HTTP_PROXY`, `HTTPS_PROXY`, `http_proxy`, and `https_proxy` environment variables take precedence for their corresponding protocol. Standard `NO_PROXY` and `no_proxy` bypass lists remain effective. Restart zot after changing the setting.
18
19`config.json` is not a credential store. If the proxy URL contains a username or password, prefer setting the proxy environment variables in a protected shell or service configuration rather than saving those credentials in `config.json`.
20
21## Login methods
22
23Use `/login` in interactive mode. Type in either provider picker to filter the list by provider ID or display name.
24
25- `api key`: stores an API key in `$ZOT_HOME/auth.json` when the provider uses a normal key.
26- `subscription`: stores OAuth credentials for subscription-backed providers.
27
28Use `/logout` to remove stored credentials.
29
30Some providers need more than a single pasted key. For those providers,
31`/login` shows setup instructions instead of opening a localhost browser form.
32This avoids broken browser flows in SSH, containers, and `kubectl exec`
33sessions.
34
35### Command-backed API keys
36
37A provider can obtain its API key from a password manager or another local program. Configure this directly in `$ZOT_HOME/auth.json`:
38
39```json
40{
41 "openai": {
42 "api_key_command": {
43 "program": "op",
44 "args": ["read", "op://Work/OpenAI/credential"],
45 "timeout_ms": 120000
46 }
47 }
48}
49```
50
51Custom provider credentials use the same object under `additional_api_key_creds`:
52
53```json
54{
55 "additional_api_key_creds": {
56 "my-company": {
57 "api_key_command": {
58 "program": "secret-tool",
59 "args": ["read", "my-company-api-key"]
60 }
61 }
62 }
63}
64```
65
66The program is started directly rather than through a shell. The timeout defaults to 120 seconds. It must write one non-empty line to stdout, with no more than 64 KiB of output. Trailing CR/LF characters are removed. Successful results stay only in process memory and are reused until zot exits.
67
68Command-backed credentials count as logged in without being executed. zot materializes one only when selecting that provider; background model discovery skips it. `/login` with a normal key replaces the command, while `/logout` clears it. Because `auth.json` can cause program execution, keep it user-writable only and do not use files from untrusted sources.
69
70Setup-instruction providers:
71
72- Amazon Bedrock
73- Google Vertex AI
74- Cloudflare Workers AI
75- Cloudflare AI Gateway
76- Azure OpenAI Responses
77
78## Subscription providers
79
80These providers support subscription login:
81
82| Provider | Notes |
83| --- | --- |
84| Anthropic | Claude Pro/Max OAuth credentials. |
85| OpenAI Codex | ChatGPT Plus/Pro Codex subscription route. Separate from the OpenAI API-key provider. |
86| Kimi | Kimi subscription login. |
87| xAI | SuperGrok or X Premium device-code login. The browser URL is prefilled with the device code. |
88| GitHub Copilot | GitHub Copilot token flow. |
89
90OAuth tokens are stored in `$ZOT_HOME/auth.json` and refreshed when refresh is
91available.
92
93## GPT-6 Astra
94
95Select `gpt-6-astra` with provider `openai`, `openai-responses`,
96`openai-codex`, or `github-copilot`, for example:
97
98```bash
99zot --provider github-copilot --model gpt-6-astra
100```
101
102Astra uses the Responses API and supports `low`, `medium`, `high`, `xhigh`,
103and `max` reasoning. OpenAI API-key and Codex subscription entries use the
104272,000-token short-context tier by default; the Copilot entry uses a
1051,050,000-token context window. All entries include the 128,000-token output
106limit and standard token prices, including the higher rates for prompts above
107272,000 tokens. Subscription access depends on your
108plan, rollout, and organization policy; catalog availability does not grant access.
109See the [OpenAI model specifications](https://developers.openai.com/api/docs/models/gpt-6-astra)
110and [GitHub Copilot availability](https://github.blog/changelog/2026-09-04-gpt-6-astra-is-generally-available-in-github-copilot/).
111
112## API-key providers
113
114These providers can use environment variables. Simple API-key providers can
115also be configured through `/login`. Providers that require extra cloud setup
116show instructions and should be configured with environment variables.
117
118| Provider | Environment variable | Stored key |
119| --- | --- | --- |
120| Anthropic | `ANTHROPIC_API_KEY` | `anthropic` |
121| OpenAI | `OPENAI_API_KEY` | `openai` |
122| OpenAI Responses | `OPENAI_API_KEY` | `openai-responses` |
123| Kimi | `KIMI_API_KEY` or `MOONSHOT_API_KEY` | `kimi` |
124| Google Gemini | `GEMINI_API_KEY` or `GOOGLE_API_KEY` | `google` |
125| DeepSeek | `DEEPSEEK_API_KEY` | `deepseek` |
126| Moonshot AI | `MOONSHOT_API_KEY` | `moonshotai` |
127| Moonshot AI China | `MOONSHOT_API_KEY` | `moonshotai-cn` |
128| Groq | `GROQ_API_KEY` | `groq` |
129| xAI | `XAI_API_KEY` | `xai` |
130| Cerebras | `CEREBRAS_API_KEY` | `cerebras` |
131| Together AI | `TOGETHER_API_KEY` | `together` |
132| Hugging Face | `HF_TOKEN` | `huggingface` |
133| OpenRouter | `OPENROUTER_API_KEY` | `openrouter` |
134| Gondola | `GONDOLA_API_KEY` | `gondola` |
135| Mistral | `MISTRAL_API_KEY` | `mistral` |
136| ZAI | `ZAI_API_KEY` | `zai` |
137| Xiaomi MiMo | `XIAOMI_API_KEY` | `xiaomi` |
138| Xiaomi Token Plan Amsterdam | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` | `xiaomi-token-plan-ams` |
139| Xiaomi Token Plan China | `XIAOMI_TOKEN_PLAN_CN_API_KEY` | `xiaomi-token-plan-cn` |
140| Xiaomi Token Plan Singapore | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` | `xiaomi-token-plan-sgp` |
141| MiniMax | `MINIMAX_API_KEY` | `minimax` |
142| MiniMax China | `MINIMAX_CN_API_KEY` or `MINIMAX_API_KEY` | `minimax-cn` |
143| Fireworks | `FIREWORKS_API_KEY` | `fireworks` |
144| Vercel AI Gateway | `AI_GATEWAY_API_KEY` | `vercel-ai-gateway` |
145| OpenCode Zen | `OPENCODE_API_KEY` | `opencode` |
146| OpenCode Go | `OPENCODE_API_KEY` | `opencode-go` |
147| GitHub Copilot token | `COPILOT_GITHUB_TOKEN` or `GITHUB_COPILOT_TOKEN` | `github-copilot` |
148| Cloudflare Workers AI | `CLOUDFLARE_API_KEY` | `cloudflare-workers-ai` |
149| Cloudflare AI Gateway | `CLOUDFLARE_API_KEY` | `cloudflare-ai-gateway` |
150| Azure OpenAI Responses | `AZURE_OPENAI_API_KEY` | `azure-openai-responses` |
151
152When Gondola credentials are available, zot refreshes its public text-model
153catalog in the background and adds the discovered models to `/model`.
154
155Example:
156
157```bash
158export OPENROUTER_API_KEY=...
159zot --provider openrouter
160```
161
162## Local llama.cpp router
163
164The `llama.cpp` provider connects to a multi-model router and is separate from the `ollama` provider. Ollama normally uses `http://localhost:11434`; entering that URL for llama.cpp management produces a 404 because Ollama does not implement the router endpoints.
165
166Install a current llama.cpp build. On macOS:
167
168```bash
169brew install llama.cpp
170# use `brew upgrade llama.cpp` for an existing installation
171```
172
173Start `llama-server` without `--model`, `-m`, or `-hf`. Those flags select one model and disable the router behavior zot expects.
174
175```bash
176mkdir -p ~/llama-models
177
178llama-server \
179 --models-dir ~/llama-models \
180 --no-models-autoload \
181 --jinja \
182 --host 127.0.0.1 \
183 --port 8080 \
184 -ngl 999 \
185 -c 32768
186```
187
188This configuration discovers GGUF files below `~/llama-models`, leaves model loading under explicit user control, enables chat templates, requests GPU offload, and sets a 32K context. Tune the GPU layers and context size for the available memory.
189
190Check the management API before opening zot:
191
192```bash
193curl http://127.0.0.1:8080/health
194curl http://127.0.0.1:8080/models
195```
196
197`/models` must return JSON with a `data` array. A 404 indicates the wrong URL, an older server build, or single-model mode.
198
199To save the connection, run `/login`, choose `api key`, and select `llama.cpp`. Enter `http://127.0.0.1:8080`, without `/v1`, followed by an optional bearer key. zot validates the URL and stores both values in `$ZOT_HOME/auth.json`. Environment variables override the saved connection:
200
201```bash
202export LLAMA_BASE_URL=http://127.0.0.1:8080
203export LLAMA_API_KEY=optional-secret
204```
205
206If a key is configured, start the router with the same `--api-key` value. A server bound only to `127.0.0.1` normally does not need authentication.
207
208After login, `/llama` becomes visible. It shows model state, searches Hugging Face for GGUF repositories, offers available quantizations, reports download and load progress, and explicitly loads or unloads models. Press `d` on a router-downloaded cache model to ask the router to remove it after confirmation. Models discovered through `--models-dir` or a preset are not removable through the router API and must be deleted from their configured source. Some llama.cpp versions retain shared Hugging Face repository artifacts such as `mmproj` files after removing the selected GGUF; remove that repository's cache directory manually if those artifacts are no longer needed. `HF_TOKEN` raises Hugging Face API limits and may be required for repository metadata. For gated files, approve access first and provide the authorized token to the `llama-server` process because the router performs the download.
209
210Opening `/model` refreshes the router and displays its loaded models under provider `llama.cpp`. Unloaded models cannot handle inference and therefore remain exclusive to `/llama` until loaded. Inference is sent to the router's derived `/v1` endpoint.
211
212Ollama downloads are stored in Ollama's internal layout and do not automatically become llama.cpp models. Obtain a GGUF copy through `/llama` or place GGUF files under `~/llama-models`, then restart the router after adding files manually.
213
214## Cloud providers
215
216### Amazon Bedrock
217
218Bedrock is configured with AWS credentials, not a generic zot API-key entry.
219Use one of these credential sources:
220
221```bash
222# AWS profile
223export AWS_PROFILE=your-profile
224
225# IAM access keys
226export AWS_ACCESS_KEY_ID=AKIA...
227export AWS_SECRET_ACCESS_KEY=...
228export AWS_SESSION_TOKEN=... # only for temporary credentials
229
230# Bedrock API key bearer token
231export AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-...
232
233# Region
234export AWS_REGION=us-east-1
235```
236
237ECS task roles, IRSA, and other AWS SDK credential-chain sources are also
238supported.
239
240Example:
241
242```bash
243AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-... AWS_REGION=us-east-1 \
244 zot --provider amazon-bedrock --model anthropic.claude-sonnet-4-5-20250929-v1:0
245```
246
247Some Bedrock models require regional inference-profile IDs for on-demand
248throughput, such as `us.` or `eu.` prefixed model IDs. zot rewrites known
249families automatically where possible. Claude Opus 5 uses
250`global.anthropic.claude-opus-5`; zot maps the bare foundation-model ID to that
251global profile and supports its adaptive reasoning levels. Explicit profile IDs
252and ARNs are left unchanged.
253
254### Google Vertex AI
255
256Vertex can use a Google API key when available:
257
258```bash
259export GOOGLE_CLOUD_API_KEY=...
260zot --provider google-vertex
261```
262
263For service-account or application-default credentials, set the standard
264Google environment variables used by your deployment.
265
266### Cloudflare AI Gateway
267
268Cloudflare AI Gateway needs a Cloudflare token plus account and gateway IDs:
269
270```bash
271export CLOUDFLARE_API_KEY=...
272export CLOUDFLARE_ACCOUNT_ID=...
273export CLOUDFLARE_GATEWAY_ID=...
274zot --provider cloudflare-ai-gateway
275```
276
277### Cloudflare Workers AI
278
279Workers AI needs a Cloudflare token and account ID:
280
281```bash
282export CLOUDFLARE_API_KEY=...
283export CLOUDFLARE_ACCOUNT_ID=...
284zot --provider cloudflare-workers-ai
285```
286
287### Azure OpenAI Responses
288
289```bash
290export AZURE_OPENAI_API_KEY=...
291export AZURE_OPENAI_BASE_URL=https://your-resource.openai.azure.com
292export AZURE_OPENAI_API_VERSION=v1 # optional, v1 is the default
293zot --provider azure-openai-responses
294```
295
296The provider uses Azure's Responses API. If deployment names differ from zot
297model IDs, map them without changing the catalog:
298
299```bash
300export AZURE_OPENAI_DEPLOYMENT_NAME_MAP='gpt-5.6-luna=luna-preview,gpt-5.6-sol=sol-preview'
301```
302
303## Auth file
304
305Credentials are stored in `$ZOT_HOME/auth.json` with user-only permissions
306when zot creates the file.
307
308Example:
309
310```json
311{
312 "anthropic": { "api_key": "sk-ant-..." },
313 "openai": { "api_key": "sk-..." },
314 "google": { "api_key": "..." },
315 "additional_api_key_creds": {
316 "openrouter": { "api_key": "..." },
317 "mistral": { "api_key": "..." }
318 }
319}
320```
321
322The top-level keys are used for providers with dedicated credential fields.
323Other API-key providers are stored under `additional_api_key_creds`. Prefer
324`/login` so zot writes the correct schema.
325
326## Custom providers and models
327
328Use `$ZOT_HOME/models.json` for private models, deployment aliases, local
329servers, or OpenAI-compatible gateways that are not in the built-in catalog.
330User entries override built-in entries with the same provider and model ID, and
331adding a `models.json` no longer hides the built-in catalog: your entries are
332merged on top of the baked-in and live-discovered models.
333
334A top-level provider key that is not a built-in id defines a custom provider.
335Give it a provider-level `baseUrl` and an `api` wire format (`openai` for
336OpenAI-compatible Chat Completions, the default, `openai-responses` for the
337OpenAI Responses API, or `anthropic` for the Anthropic Messages API). A
338model-level `baseUrl` overrides the provider-level one for that model, and an
339unknown `api` value falls back to `openai` with a warning.
340
341```json
342{
343 "providers": {
344 "my-company": {
345 "baseUrl": "https://llm.mycompany.com/v1",
346 "api": "openai",
347 "models": [
348 { "id": "company-llm-v2", "name": "Company LLM v2" }
349 ]
350 }
351 }
352}
353```
354
355Custom providers are first-class: they appear in `--list-models`, `/model`, and
356`/login`. `models.json` never stores secrets. Supply the key through `/login`,
357`--api-key`, or a derived environment variable in upper snake case, so
358`my-company` reads `MY_COMPANY_API_KEY`. Because many self-hosted gateways do
359not expose a model-list endpoint, custom provider keys are accepted and stored
360without a verification probe; an invalid key surfaces on the first model call.
361
362To retrieve this custom provider's key from a password manager, add a matching
363entry to `$ZOT_HOME/auth.json`:
364
365```json
366{
367 "additional_api_key_creds": {
368 "my-company": {
369 "api_key_command": {
370 "program": "op",
371 "args": ["read", "op://Work/OpenAI/credential"],
372 "timeout_ms": 120000
373 }
374 }
375 }
376}
377```
378
379The provider IDs in `models.json` and `auth.json` must match. Then select the
380custom model directly:
381
382```sh
383zot --provider my-company --model company-llm-v2
384```
385
386## Credential resolution
387
388For each request, zot checks credentials in this order:
389
3901. Explicit CLI key, such as `--api-key`.
3912. Provider-specific environment variables (including derived custom-provider
392 variables such as `MY_COMPANY_API_KEY`).
3933. `$ZOT_HOME/auth.json`, including custom provider keys saved by `/login`.
394
395`models.json` itself never stores credentials; it only describes models and
396their endpoints.
397
398Bedrock then uses the AWS SDK credential chain for the actual request.