OpenRouter
OpenAI-compatible aggregator with many hosted models under one key. Pricing and cache support depend on the selected model.
OPENROUTER_API_KEYSqueezy keeps the code analysis, permissions, and accounting on your machine, and routes model turns through whichever provider you configure. You bring the key.
Squeezy ships 27 provider ids. The quickest start is an aggregator: one API key reaches many hosted models. If you prefer a vendor's own API, a subscription sign-in, a cloud platform's catalog, an open-weight host, or a model running on your own machine, Squeezy supports those too. Set the provider and supply its credential; the tables below list the environment variable for each.
OpenAI-compatible aggregator with many hosted models under one key. Pricing and cache support depend on the selected model.
OPENROUTER_API_KEYOpenAI-compatible gateway for hosted model access through Vercel.
AI_GATEWAY_API_KEYOpenAI-compatible gateway for virtual keys, routing, and observability.
PORTKEY_API_KEYOrg-wide proxy with rate limiting and routing in front of your chosen models.
Cloudflare gatewayNative OpenAI route with usage parsing and cache-related request metadata where supported.
OPENAI_API_KEYNative Anthropic route with API-key and OAuth paths plus cache read/write accounting where exposed.
ANTHROPIC_API_KEYNative Gemini route with API-key configuration and streaming usage metadata where available.
GEMINI_API_KEYUse an OpenAI subscription through its OAuth sign-in instead of a metered API key.
OpenAI OAuthUse a GitHub Copilot subscription through its OAuth sign-in.
Copilot OAuthAWS-hosted models using the AWS credential chain and Bedrock runtime APIs.
AWS credentialsAzure-hosted OpenAI with a deployment-specific endpoint and API-key or bearer-token configuration.
AZURE_OPENAI_API_KEYGoogle Cloud route via an OpenAI-compatible endpoint with access-token or service-account OAuth.
Google Cloud authOpen-weight models at high tokens-per-second.
GROQ_API_KEYOpen-weight models at high tokens-per-second.
CEREBRAS_API_KEYDeepSeek's own DeepSeek-V3 and R1 models.
DEEPSEEK_API_KEYHosted open-weight inference (Llama, Qwen, Mixtral).
TOGETHER_API_KEYHosted open-weight inference.
FIREWORKS_API_KEYHosted open-weight inference.
DEEPINFRA_API_KEYHosted open-weight inference.
BASETEN_API_KEYMistral La Plateforme hosted models.
MISTRAL_API_KEYxAI Grok models over the OpenAI-compatible API.
XAI_API_KEYOpen-weight models served on Cloudflare's edge.
Cloudflare API tokenLocal models served by Ollama. Context and availability are runtime-defined.
local runtimeLocal models served by LM Studio's OpenAI-compatible server.
local runtimeSelf-hosted vLLM OpenAI-compatible server.
local runtimeSelf-hosted llama.cpp-style OpenAI-compatible server.
local runtimePoint the openai_compatible preset at any other endpoint that speaks the OpenAI Chat Completions API, including a self-hosted LiteLLM proxy.
custom base URLSqueezy can send simple, mechanical turns to a provider's small, fast model and escalate to your main model only when a task turns out to be hard, routing never crosses providers. See how it works for the full picture.
Provider settings resolve from CLI flags, environment variables, project config, user settings, and built-in defaults. Set the provider and let the credential come from its environment variable:
[model]
provider = "openrouter"
model = "" # set your model id, or leave blank for the default
[providers.openrouter]
api_key_env = "OPENROUTER_API_KEY"