Provider key reference
Pi Agent uses a Bring Your Own Key (BYOK) model; it does not sell AI access. This appendix brings together the sign-up pages, key locations, Pi Agent settings, pricing pages, and common pitfalls for seven providers: GLM, OpenAI, Anthropic, DeepSeek, Groq, MiniMax, and OpenRouter. Begin with OpenRouter in Chapters 5–6. When you later need another provider, you can consult its section independently rather than reading this appendix from beginning to end.
Why use this reference
Pi Agent supports a growing number of providers, but adding any of them raises the same three questions:
- Where is the official sign-up page? A search for “GLM API,” for example, returns many similar-looking pages. Zhipu Open Platform and Zhipu Qingyan, its chat service, look alike but use entirely different URLs.
- Where is the API keys menu? Each dashboard organizes it differently. OpenAI uses
Settings → API keys, and Anthropic usesSettings → API keysbehind the gear in the lower-left corner. GLM calls the page “API Key Management,” while DeepSeek putsAPI keysin the left sidebar. - What should I enter in Pi Agent? A key alone is not enough. In the Models panel, you must also choose the correct
API mode—openai-completions,openai-responses,anthropic-messages, orgoogle-generative-ai—and provide the correctbaseUrlandmodelID. A mistake in any field can make Test fail.
Chapter 5 creates your first OpenRouter key, and Chapter 6 adds it to Pi Agent. Chapter 10 explains when an additional provider is worthwhile, while Chapter 11 compares the available routes.
/data/pi-agent/models.json. You choose the providers and settle all usage charges directly with them; Pi Agent does not process those payments.Four steps for configuring a provider
Although the seven providers have different dashboards, the setup process is broadly the same:
-
Create an account
Registration requirements vary by provider and region. Some providers support email, Google, Apple, or GitHub sign-in; others require phone or identity verification. Check the provider’s current eligibility requirements instead of assuming that a particular country code or sign-in method is supported.
-
Set up billing or use an available free allowance
Trial credit, free requests, rate limits, payment methods, currencies, and regional eligibility change over time. Review the provider’s current pricing and account pages. A payment method accepted by one provider may not be accepted by another.
-
Create a key under “API keys” or “Developer Center”
The exact location differs by dashboard and is listed in each provider section below. The shared rule is important: the complete key is normally shown only when it is created. After you leave the page, the dashboard usually displays only a few identifying characters. Copy the key immediately and save it in a password manager such as Bitwarden, 1Password, or Keychain.
-
Add the key in the Pi Agent Models panel, then run Test
Open Models in the upper-right corner of Pi Agent, select Add Provider, enter the name, API mode, base URL, and API key, add a model entry, and select Test. A green check within 3–5 seconds means the connection succeeded; a failure indicator means that at least one field needs attention. Chapter 6 walks through the process in detail.
GLM (Zhipu Qingyan)
GLM is Zhipu AI’s flagship model family, positioned as a cost-effective option with reasoning support and a 200k context window. OpenRouter is the recommended first route in this guide; see Chapter 5. Configure GLM directly only when its native service meets a specific need, and confirm current models, limits, pricing, and account eligibility in the official documentation.
| Item | Details |
|---|---|
| Sign-up page | https://open.bigmodel.cn/ (Zhipu Open Platform, not the Zhipu Qingyan chat site). The platform may require SMS verification. |
| API key location | After signing in, open the avatar in the upper-right corner → Personal Center → API Key Management → Add. Copy the key immediately; its complete value is shown only once. |
| Pricing page | https://open.bigmodel.cn/pricing |
| Pi Agent API mode | openai-completions (OpenAI-compatible format) |
| Pi Agent base URL | https://open.bigmodel.cn/api/paas/v4 (do not add a trailing slash) |
| Example models | glm-4.6 (flagship reasoning model with a 200k context window); glm-4.7 (introduced in 2026 for agentic coding); glm-4-air (lighter and less expensive); and glm-4-flash (fast chat model with free access where offered) |
| thinkingFormat | zai, Pi Agent’s Zhipu thinking-block parser for <think>…</think> tags |
Typical Add Provider settings:
Name: GLM
API mode: openai-completions
Base URL: https://open.bigmodel.cn/api/paas/v4
API key: (paste the value you just copied)
Model name: glm-4.6
thinkingFormat: zai
meta-llama/llama-3.3-70b-instruct from OpenRouter, remember that it is a separate Meta model, not a GLM route.OpenAI
OpenAI operates the API behind ChatGPT. The main 2026 examples listed here are the gpt-5.6 family—gpt-5.6-sol, gpt-5.6-terra, and gpt-5.6-luna—while the earlier gpt-4o family remains available but is no longer the first choice for new projects. Model IDs, pricing, availability, and regional billing support can change, so verify each one in OpenAI’s current documentation.
| Item | Details |
|---|---|
| Sign-up page | https://platform.openai.com/ (the developer platform is separate from chatgpt.com, although the services can share a sign-in) |
| API key location | After signing in, open Settings → API keys → Create new secret key in the left sidebar. The direct page is platform.openai.com/settings/organization/api-keys. The former “avatar → View API keys” route has been retired. |
| Pricing page | https://openai.com/api/pricing/ |
| Pi Agent API mode | openai-completions, or openai-responses when you intend to use the newer Responses endpoint |
| Pi Agent base URL | https://api.openai.com/v1 |
| Example models | gpt-5.6-terra (balanced default); gpt-5.6-luna (faster, lower-cost option); and gpt-5.6-sol (reasoning and complex tasks) |
| thinkingFormat | Leave blank for this configuration; Pi Agent does not need a separate parser for OpenAI reasoning output |
gpt-4o-mini price of $0.15 per million tokens is still current before adding funds.Anthropic
Anthropic develops the Claude family, which is particularly strong at programming and long-form reasoning. Its API supports native thinking blocks, which return reasoning in structured form, and prompt caching, which can reduce the cost of repeated prefixes. In this appendix, it is the only provider that does not use openai-completions for a direct connection.
| Item | Details |
|---|---|
| Sign-up page | https://console.anthropic.com/. Sign in with Google or email. |
| API key location | Open the gear in the lower-left corner → Settings → API keys → Create Key. The direct page is console.anthropic.com/settings/keys. Keys begin with sk-ant-. |
| Pricing page | https://www.anthropic.com/pricing |
| Pi Agent API mode | anthropic-messages, not openai-completions. The Add Provider menu uses the exact name anthropic-messages. |
| Pi Agent base URL | Use the official default by leaving the field blank, or enter https://api.anthropic.com. |
| Example models | claude-sonnet-4-6 (balanced); claude-opus-4-7, claude-opus-4-8, and claude-opus-5 (higher-capability, higher-cost examples); and claude-haiku-4-5 (faster, lower-cost example). Confirm current availability and pricing. |
| thinkingFormat | With the anthropic-messages API mode, Pi Agent automatically uses the native format because thinking blocks are native Messages API fields; no manual change is needed |
Typical Add Provider settings:
Name: Anthropic
API mode: anthropic-messages <- Important: not openai-completions
Base URL: (leave blank to use the official default)
API key: sk-ant-...
Model name: claude-sonnet-4-6
openai-completions request to Anthropic’s endpoint can produce a 401 because the Anthropic Messages protocol differs. This is one of the most common configuration mistakes. Payment methods and regional availability remain subject to Anthropic’s current policies.DeepSeek
DeepSeek is an AI laboratory founded by the Chinese company High-Flyer. Its API is OpenAI-compatible and is known for competitive pricing. Warning: Model catalogs change. This configuration uses the official direct IDs deepseek-chat and deepseek-reasoner; verify their status in the current documentation, especially when consulting lifecycle notices dated 2026-07-24 or later.
| Item | Details |
|---|---|
| Sign-up page | https://platform.deepseek.com/. Register by phone or email where supported. |
| API key location | In the left sidebar, select API keys → Create API Key. Keys begin with sk-. |
| Pricing page | https://api-docs.deepseek.com/quick_start/pricing |
| Pi Agent API mode | openai-completions |
| Pi Agent base URL | https://api.deepseek.com/v1 |
| Example models | deepseek-chat (lower-cost chat model, listed here with a 1M context window) and deepseek-reasoner (complex reasoning). The documented direct IDs are deepseek-chat and deepseek-reasoner; copy current IDs from the official documentation before saving the provider. |
| thinkingFormat | Leave blank for deepseek-chat. For deepseek-reasoner, use deepseek so Pi Agent can process the reasoning_content field. |
deepseek-chat or deepseek-reasoner with a different lifecycle status, compare the documented direct IDs deepseek-chat and deepseek-reasoner with the current catalog before replacing a working ID; the base URL and request format may remain unchanged even when a model ID changes.Groq
Groq—not xAI’s Grok—is a US company known for LPU inference hardware and speed. Some large open models are described as achieving throughput above 500 tokens per second, or 5–10 times that of some alternatives, but actual performance and free-tier availability vary. Warning: Groq’s catalog changes frequently; several Llama 3.x and older Kimi models were retired during the first half of 2026.
| Item | Details |
|---|---|
| Sign-up page | https://console.groq.com/. Sign in with GitHub or Google. |
| API key location | In the left sidebar, select API keys → Create API Key. Keys begin with gsk_. |
| Pricing page | https://groq.com/pricing/ (the free tier has rate limits; check current paid-tier pricing) |
| Pi Agent API mode | openai-completions |
| Pi Agent base URL | https://api.groq.com/openai/v1 |
| Example models | openai/gpt-oss-120b (large open model); openai/gpt-oss-20b (lighter, lower-cost option); google/gemini-2.5-flash (listed here with a 256K context window for agentic coding; the older kimi-k2-instruct has been retired); and qwen/qwen3.6-27b (Qwen open model) |
| thinkingFormat | Leave blank for most models. For reasoning models such as deepseek-r1-distill-llama-70b or qwen-qwq-32b, use deepseek. |
llama-3.3-70b-versatile, moonshotai/kimi-k2-instruct, and mixtral-8x7b have all been removed. If a previously working model stops connecting, check console.groq.com/docs/models and /deprecations, then replace the ID with the officially designated successor.MiniMax
MiniMax develops models with long-context and reasoning capabilities. This edition uses MiniMax-M3, a 2025–2026 flagship example with a 1M context window and OpenAI- and Anthropic-compatible routes. The international and mainland-China services use separate endpoints.
| Item | Details |
|---|---|
| Sign-up page | International service: https://platform.minimax.io/ (recommended for users outside mainland China where supported); mainland-China service: https://platform.minimaxi.com/. The accounts are entirely separate, so continue using the service where you registered. |
| API key location | After signing in, select Account Settings → API Key → New. |
| Pricing page | Use the official pricing page for the service where you registered; the international and mainland-China services have separate price lists. |
| Pi Agent API mode | openai-completions for the /v1 endpoint |
| Pi Agent base URL | International: https://api.minimax.io/v1; mainland China: https://api.minimaxi.com/v1. The additional i in the mainland-China domain is intentional, not a typo. |
| Example models | MiniMax-M3 (2026 flagship example with a 1M context window, thinking blocks, and strong agentic performance) and abab7-chat-preview (previous-generation general model) |
| thinkingFormat | For MiniMax-M3, Pi Agent uses deepseek. M2 returned <think>…</think> content; keep deepseek selected for this M3 route so Pi Agent can handle the documented reasoning_content response. Do not assume that the M2 parser applies to M3. For abab7, follow the current model-specific documentation. |
MiniMax-M3 and approximately 32k for abab7 are model-specific. M2, <think>, and deepseek are also version-specific references; use the documented format for your current model and endpoint.OpenRouter
OpenRouter is an API gateway rather than a model developer. One key and one base URL provide access to models from many providers, including OpenAI, Anthropic, Google, Meta, Mistral, xAI, Perplexity, DeepSeek, GLM, and Cohere. It is the recommended first provider for this guide because it reduces initial account setup. Model availability, routing, and billing terms depend on the current OpenRouter catalog.
| Item | Details |
|---|---|
| Sign-up page | https://openrouter.ai/. Sign in with Google or GitHub. |
| API key location | After signing in, open the avatar in the upper-right corner → Keys → Create Key. Keys begin with sk-or-v1-. |
| Pricing page | At the time of writing, model token rates are described as matching the original providers, while adding credit incurs a 5.5% platform fee, or 5.0% for cryptocurrency, plus a $0.80 minimum card fee. For small purchases, the effective fee can reach 10–20%. Confirm every figure on OpenRouter’s current billing page before paying. |
| Pi Agent API mode | openai-completions. OpenRouter uses an OpenAI-compatible format even when routing to an Anthropic model. |
| Pi Agent base URL | https://openrouter.ai/api/v1 |
| Example models | Use the provider/model format: anthropic/claude-sonnet-4, openai/gpt-4o, deepseek/deepseek-chat, google/gemini-2.5-pro, and meta-llama/llama-3.3-70b-instruct |
| thinkingFormat | It depends on the selected model. OpenRouter generally standardizes thinking output, so leave this field blank unless the model documentation says otherwise. |
anthropic-messages API may differ. Use a direct Anthropic key when those provider-specific features are required.Provider comparison
Start with OpenRouter, then use this table for a quick scan when you need a direct connection. Confirm every model ID and account requirement in the provider’s current documentation:
| Provider | API mode | Base URL | Example model | thinkingFormat | Billing note |
|---|---|---|---|---|---|
| GLM | openai-completions |
https://open.bigmodel.cn/api/paas/v4 |
glm-4.6 |
zai |
Check regional eligibility and supported payment methods |
| OpenAI | openai-completions |
https://api.openai.com/v1 |
gpt-5.6-luna |
Leave blank | Check supported regions and payment methods |
| Anthropic | anthropic-messages |
(official default) | claude-sonnet-4-6 |
Automatic (native) | Check supported regions and payment methods |
| DeepSeek | openai-completions |
https://api.deepseek.com/v1 |
deepseek-chat |
Use deepseek for the reasoning model; leave blank for the chat model |
Check regional eligibility and supported payment methods |
| Groq | openai-completions |
https://api.groq.com/openai/v1 |
openai/gpt-oss-120b |
Leave blank | Check supported regions and payment methods |
| MiniMax | openai-completions |
https://api.minimax.io/v1 |
MiniMax-M3 |
Use zai for M2 |
International and mainland-China accounts are separate |
| OpenRouter | openai-completions |
https://openrouter.ai/api/v1 |
anthropic/claude-sonnet-4 |
Leave blank | Check current OpenRouter billing terms |
anthropic-messages, because it has its own protocol for features such as native thinking blocks and cache_control. The other 6 routes use the OpenAI-compatible openai-completions mode and differ primarily in their base URLs. Chapter 11 explains this API-mode distinction in more detail.Common setup problems
Most registration and connection problems fall into the following categories:
-
Test fails after you add the provider
Check these fields in order: (1) Does the base URL have an extra trailing
/? For example,.../v4/instead of.../v4may produce a 404. (2) Does the key contain leading or trailing spaces? Paste it into a plain-text editor to inspect it before saving. (3) Is the API mode correct? Useanthropic-messagesfor Anthropic andopenai-completionsfor the other 6 routes in this appendix; the wrong protocol may return 401 or 400. (4) Is the model ID exact and current? Entering a model such asglm-4.6incorrectly—by omitting.6and usingglm-4—or encountering a catalog change involvingdeepseek-chatafter 2026-07 orllama-3.3-70b-versatile, can produce a 404 model-not-found error. See the troubleshooting table in Chapter 6 for more detail. -
Your payment method is not accepted
Handle billing by provider: (1) OpenAI and Anthropic—review the provider’s supported regions and accepted payment methods, then use an eligible method issued in your own name. (2) GLM, DeepSeek, and MiniMax—do not ask another person to fund the account or misrepresent your region; use the direct service only when its terms support you, or check whether OpenRouter legitimately offers an alternative such as
meta-llama/llama-3.3-70b-instructordeepseek/deepseek-chat. (3) MiniMax—choose the international service atplatform.minimax.ioonly if it supports your region and payment method; the mainland-China service has separate eligibility. (4) Do not use payment workarounds of any kind, including borrowed accounts, cards, or identities. (5) OpenRouter can consolidate several providers under one eligible account, but verify its 5.5% platform fee, 5.0% cryptocurrency fee, and regional terms before paying. -
Phone verification stalls because no message arrives
Verification methods vary by provider and region. (1) Confirm the country code and phone number. (2) Check blocked or spam messages. (3) Wait 5 minutes before requesting another code. (4) Review whether email or federated sign-in is officially supported. Do not bypass the provider’s regional or identity requirements.
-
You cannot open the GLM, DeepSeek, or MiniMax site from your home network
Some networks block or cannot route
*.cndomains. Try three diagnostic checks: (1) Open the official site from another network to determine whether local DNS or firewall policy is responsible. (2) Review your DNS policy before trying public resolvers such as8.8.8.8or1.1.1.1. (3) Use OpenRouter only when its current catalog and terms support the model and your region. Changing networks or DNS does not make an unsupported account eligible. -
You closed the page before copying the new key
All 7 providers follow the same security pattern: the complete key is shown only when it is created. Later, the dashboard displays only the first and last few characters. A key that was not copied cannot be recovered. Disable it, create a replacement, and save the new value in a password manager before continuing. This is a security feature, not a bug.
-
A provider passed Test but fails a few days later
There are three common causes: (1) Your free allowance or account balance is exhausted. Check the provider dashboard and add funds only through an accepted method if needed. (2) The model has been retired. This is particularly common on Groq; consult the provider’s model catalog and use the documented successor. (3) The key was disabled after unusual activity. Review security notices in the dashboard and create a replacement key if the provider instructs you to do so.
Frequently asked questions
Do I need an account with all 7 providers?
Can I use the same key on several devices, such as my phone, tablet, and Home Assistant host?
Which provider is best for a complete beginner?
Can I access several providers without creating a separate account for each one?
openai/gpt-4o, anthropic/claude-sonnet-4, deepseek/deepseek-chat, meta-llama/llama-3.3-70b-instruct, and google/gemini-2.5-flash. The trade-off is a platform fee when adding credit: 5.5%, or 5.0% for cryptocurrency, plus a $0.80 minimum fee for small card payments at the time of writing. Confirm current terms. Anthropic models routed through OpenRouter may lose native thinking blocks and cache_control, so frequent Claude users may still benefit from a direct Anthropic account.Does Pi Agent upload my key to Woow?
models.json, the file containing your keys, to Woow. The data path is your browser → pi-web on your Home Assistant host → the provider’s official endpoint, such as open.bigmodel.cn. No Woow server sits between them. This local key storage is central to BYOK. See “Where the key is stored” in Chapter 6 for more detail.The base URL and API mode look correct, but Test still fails. Which field is wrong?
anthropic-messages for Anthropic and openai-completions for the other routes listed here. (2) Base URL—copy it exactly, including https and /v1 or /api/paas/v4, with no extra trailing /. (3) API key—use the eye icon to check for missing characters or leading and trailing spaces. (4) Model ID—match the provider’s current documentation exactly, including capitalization and hyphens; verify catalog entries such as deepseek-chat and llama-3.3-70b-versatile before using them. If all 4 fields are correct, consult the error-code table in Chapter 6: 401 usually indicates a key or authentication problem, 404 an address or model problem, 400 a request or API-mode problem, and 402 insufficient balance.Why does Anthropic require its own anthropic API mode while the others use openai-completions?
claude-opus-4-7 and claude-opus-5 return structured content blocks with type: "thinking" rather than embedding all reasoning in ordinary text; and (2) cache_control—you can mark a prompt segment for caching so a repeated prefix may cost 10% as much. These features require the anthropic-messages API mode. OpenRouter’s openai-completions route can flatten them, so heavy Claude users may prefer a direct Anthropic account using anthropic-messages. Chapter 12 explains the value of thinking blocks.Should I use MiniMax’s international service or its mainland-China service?
platform.minimax.io, with API endpoint api.minimax.io, only if it supports your region and payment method. The mainland-China service uses platform.minimaxi.com and API endpoint api.minimaxi.com; the extra i is part of the official domain. Do not mix the services: (1) payment methods and eligibility differ; (2) interface languages, pricing, and network performance may differ; and (3) a key works only with the service where it was created, so using the other endpoint returns a 401. The international service also documents an /anthropic endpoint; the standard example on this page uses /v1. Confirm current API-mode guidance before configuring either route.