Add a provider API key
Add an Anthropic, OpenAI, Google AI, Alibaba DashScope, OpenCode Go or AWS Bedrock API key to OpenLLM, and a Brave Search key for web search.
Add an API key from a model provider so its models become available through your OpenLLM key. The provider bills you directly. Available on every plan. Your vault must be unlocked, because the key is encrypted in your browser before it's saved. See Security and vault.
| Provider | What to paste | Used for |
|---|---|---|
| Anthropic | A Console API key (sk-ant-api03-…) | Chat |
| OpenAI | A platform API key (sk-…) | Chat, embeddings, image, video, audio |
| Google AI | A Gemini API key (AIza…) | Chat, embeddings, image, video, audio |
| Alibaba DashScope | A DashScope or Coding Plan key (sk-…). Requests go to Alibaba's international Coding Plan endpoint, coding-intl.dashscope.aliyuncs.com. | Chat |
| OpenCode Go | Your OpenCode Go key. Enable Go at opencode.ai/go first. | Chat |
| AWS Bedrock | Access key ID, Secret access key, and Region | Embeddings (bedrock/titan-embed-v2) |
Each row on the API keys tab shows a badge with the surfaces that provider covers.
Claude Pro or Max
A Claude Pro or Max token (sk-ant-oat01-…) isn't an API key, and the app won't save it.
To use your Claude subscription, connect Claude Code instead. See
Subscriptions.
Add a key
- Open Providers and select the API keys tab.
- Select Connect on the provider's row.
- Paste the key. For AWS Bedrock, fill in Access key ID, Secret access key, and
Region (the default is
us-east-1). - Select Save. The dialog confirms the key is encrypted, and the row shows Encrypted key stored.
- Select Done.
There's no CLI command for this step. Keys are encrypted with your vault key, which only your browser holds while the vault is unlocked.
OpenLLM doesn't test the key when you save it. A wrong or expired key shows up as an error on the first request that uses it.
Replace or remove a key
To replace a key:
- On the provider's row, open the ⋯ menu and select View or update key.
- The dialog shows your stored key, decrypted in this browser. Paste the new one.
- Select Update.
To remove a key, open the ⋯ menu, select Remove key, and confirm. Requests that route to that provider fail, or move on to the next model in the chain, until you add a key again.
How keys are stored
Your browser encrypts the key with your vault key (AES-256-GCM) and sends only the ciphertext.
OpenLLM's servers store that ciphertext and decrypt it in memory for each request that needs it.
Each sk-llm key you create carries a wrapped copy of the vault key, which is how the gateway
can decrypt your provider keys without your browser. If an sk-llm key leaks, revoke it. See
If a key leaks.
Requests that use an API key always run on the hosted gateway, even when they reach OpenLLM through the daemon on your device.
Web search
Web search uses a Brave Search API key. It powers POST /v1/search and the search tool in the
OpenLLM MCP server. Model requests don't run searches on their own: if a model wants to search,
the tool or agent that called it makes the search call.
To set up web search:
- Get an API key at api.search.brave.com. Brave offers a free tier.
- Open Providers, select the Web search tab, and select Connect on Brave Search API.
- Paste the key (
BSAo…) and select Save. - Open Configuration and select the Web search tab.
- Under Search provider, select Brave Search API. It's the only option and the default.
- If you changed anything, select Save changes.
The footer on that tab shows Connected — credential found for this provider when the key is in place.
To search, send a query with your OpenLLM key:
curl https://www.openllm.sh/v1/search \
-H "Authorization: Bearer $OPENLLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "openllm routing", "max_results": 5}'The body takes query (required), max_results, and country. The response has query and a
results list, each with title, url, and, when Brave returns them, snippet and
page_age. Searches don't count toward the Free plan's monthly token cap. For the full schema,
see API.
Check that it works
- Call
GET https://www.openllm.sh/v1/modelswith your OpenLLM key and confirm the provider's models are listed. - Send a request with one of them, for example
"model": "openai/gpt-5". - Check that the
x-openllm-resolved-modelresponse header names that model.
Common problems
| Symptom | Cause | Fix |
|---|---|---|
| The app won't save an Anthropic key and points you to subscriptions | You pasted a Claude Pro or Max token (sk-ant-oat01-…). | Use a Console key, or connect Claude Code. |
| Requests to the provider fail with an authentication error | The key is wrong, expired, or revoked at the provider. | Replace the key with View or update key. |
| The API keys tab asks you to unlock | Your vault is locked in this browser. | Unlock it with your PIN or passkey. See Troubleshooting. |
/v1/search returns 404 search_credential_missing | No Brave Search key is saved. | Add the key on the Web search tab. See Errors. |
/v1/search returns 502 search_upstream_error | Brave Search returned an error. | Check your Brave key and quota, then retry. |
Related
Last updated on
Connect a subscription
Use your Claude Pro or Max, ChatGPT, Kimi Code or Grok plan through OpenLLM by signing in to the vendor's own CLI on a device that runs the daemon.
Use local models
Use Ollama, LM Studio, llama.cpp, vLLM and other local model servers through the OpenLLM daemon, in fallback chains and in clients such as Claude Code.