Skip to content

Providers & Models

PizzaPi is built on the pi coding agent, which supports 30+ AI providers out of the box. You can authenticate with a paid subscription via OAuth, set API keys, or add custom providers like Ollama or LM Studio for local models.


These providers use OAuth — authenticate with /login inside a session:

ProviderSubscription
AnthropicClaude Pro / Max
OpenAIChatGPT Plus / Pro (Codex)
GitHub CopilotCopilot subscription

These are the most commonly used API-key providers. Many other built-in providers (DeepSeek, Fireworks, Together, Moonshot AI, Ollama Cloud, Cloudflare, OpenCode, and more) are also available — run pizza models to see the providers configured on your system and their required env vars.

ProviderEnvironment Variable
AnthropicANTHROPIC_API_KEY
OpenAIOPENAI_API_KEY
Google GeminiGEMINI_API_KEY
Azure OpenAIAZURE_OPENAI_API_KEY
Google Vertex AIGOOGLE_CLOUD_API_KEY
Amazon BedrockAWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY
MistralMISTRAL_API_KEY
GroqGROQ_API_KEY
CerebrasCEREBRAS_API_KEY
xAIXAI_API_KEY
OpenRouterOPENROUTER_API_KEY
Vercel AI GatewayAI_GATEWAY_API_KEY
Hugging FaceHF_TOKEN
Kimi For CodingKIMI_API_KEY
MiniMaxMINIMAX_API_KEY

Inside a PizzaPi session, type /login in the chat input. You’ll be prompted to select a provider and complete the OAuth flow in your browser. Tokens are stored in ~/.pizzapi/auth.json and auto-refresh when they expire.

Use /logout to clear stored credentials.

Set the provider’s environment variable before starting PizzaPi:

Terminal window
export ANTHROPIC_API_KEY=sk-ant-...

Or store it in the auth file at ~/.pizzapi/auth.json:

{
"anthropic": { "type": "api_key", "key": "sk-ant-..." },
"openai": { "type": "api_key", "key": "sk-..." }
}

The auth file is created with 0600 permissions (user read/write only). Auth file credentials take priority over environment variables.

The key field in auth.json supports three formats:

FormatExampleDescription
Shell command"!security find-generic-password -ws 'anthropic'"Executes command, uses stdout
Environment variable"$MY_ANTHROPIC_KEY" or "${MY_ANTHROPIC_KEY}"Reads the named env var. A $ prefix (or ${...}) is required for interpolation; a bare name is treated as a literal value.
Literal value"sk-ant-..."Used directly

Shell commands are useful for pulling keys from password managers:

{
"anthropic": { "type": "api_key", "key": "!op read 'op://vault/item/credential'" }
}

When multiple sources provide credentials for the same provider:

  1. CLI --api-key flag (highest priority)
  2. auth.json entry (API key or OAuth token)
  3. Custom provider keys from models.json
  4. Environment variable (final fallback)

Use the /model command in the chat input to open the model selector. This shows all available models across your authenticated providers.

In the PizzaPi web UI you can also use /cycle_model (alias of /model) to cycle through a subset of models, and /effort (or /cycle_effort) to change reasoning effort.

Set your preferred default model in ~/.pizzapi/settings.json:

{
"defaultProvider": "anthropic",
"defaultModel": "claude-sonnet-4-20250514",
"defaultThinkingLevel": "medium"
}

Limit which models appear when cycling:

{
"enabledModels": ["claude-*", "gpt-4o", "gemini-2*"]
}

Add local or custom models (Ollama, vLLM, LM Studio, proxies) via ~/.pizzapi/models.json. The file reloads each time you open /model — edit it mid-session without restarting.

{
"providers": {
"ollama": {
"baseUrl": "http://localhost:11434/v1",
"api": "openai-completions",
"models": [
{ "id": "llama3.1:8b" },
{ "id": "qwen2.5-coder:7b" }
]
}
}
}
{
"providers": {
"ollama": {
"baseUrl": "http://localhost:11434/v1",
"api": "openai-completions",
"apiKey": "ollama",
"models": [
{
"id": "llama3.1:8b",
"name": "Llama 3.1 8B (Local)",
"reasoning": false,
"input": ["text"],
"contextWindow": 128000,
"maxTokens": 32000,
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
}
]
}
}
}
APIUse For
openai-completionsMost compatible — Ollama, vLLM, LM Studio, OpenRouter
openai-responsesOpenAI Responses API
openai-codex-responsesOpenAI Codex CLI agent API
anthropic-messagesAnthropic Messages API
azure-openai-responsesAzure OpenAI Responses API
google-generative-aiGoogle Generative AI
google-vertexGoogle Vertex AI
mistral-conversationsMistral chat completions
bedrock-converse-streamAmazon Bedrock Converse
FieldDescription
baseUrlAPI endpoint URL
apiAPI type (see above)
apiKeyAPI key (supports shell command, env var, or literal)
headersCustom headers (same resolution as apiKey)
authHeaderSet true to add Authorization: Bearer <apiKey>
modelsArray of model definitions
modelOverridesPer-model overrides for built-in models
FieldRequiredDefaultDescription
idYesModel identifier passed to the API
nameNoidHuman-readable label
apiNoprovider’sOverride API type for this model
reasoningNofalseSupports extended thinking
thinkingLevelMapNoMap of thinking levels to API parameter values
inputNo["text"]Input types: ["text"] or ["text", "image"]
contextWindowNo128000Context window (tokens)
maxTokensNo16384Max output tokens
costNoall zerosPer-million-token costs
headersNoPer-model custom headers
compatNoOpenAI compatibility overrides
baseUrlNoprovider’sOverride endpoint for this model

For servers with partial OpenAI compatibility, use the compat field at the provider or model level:

{
"providers": {
"local-llm": {
"baseUrl": "http://localhost:8080/v1",
"api": "openai-completions",
"compat": {
"supportsDeveloperRole": false,
"supportsReasoningEffort": false
},
"models": [{ "id": "my-model" }]
}
}
}

This commonly applies to Ollama, vLLM, SGLang, and similar servers that don’t understand the developer role or reasoning_effort parameter.


Terminal window
export AZURE_OPENAI_API_KEY=...
# Use either the full base URL...
export AZURE_OPENAI_BASE_URL=https://your-resource.openai.azure.com
# ...or just the resource name as a shorthand
export AZURE_OPENAI_RESOURCE_NAME=your-resource
# Optional (defaults to v1)
export AZURE_OPENAI_API_VERSION=v1
export AZURE_OPENAI_DEPLOYMENT_NAME_MAP=gpt-4=my-gpt4,gpt-4o=my-gpt4o
Terminal window
# Option 1: AWS Profile
export AWS_PROFILE=your-profile
# Option 2: IAM Keys
export AWS_ACCESS_KEY_ID=AKIA...
export AWS_SECRET_ACCESS_KEY=...
# Optional region (defaults to us-east-1)
export AWS_REGION=us-west-2
Terminal window
# Option 1: Application Default Credentials
gcloud auth application-default login
export GOOGLE_CLOUD_PROJECT=your-project
export GOOGLE_CLOUD_LOCATION=us-central1
# Option 2: API key
export GOOGLE_CLOUD_API_KEY=...

Route a built-in provider through a proxy without redefining its models:

{
"providers": {
"anthropic": {
"baseUrl": "https://my-proxy.example.com/v1"
}
}
}

All built-in Anthropic models remain available — only the endpoint changes.