Supported providers#
This page lists every model provider Lockpin can price and cap, the base URL to give each provider’s SDK, and the key variable Lockpin reads. It is for anyone pointing an agent or an SDK at Lockpin.
How routing works#
Every provider is served under its own name on the Lockpin address. Your agent keeps using the provider’s own SDK and model names, and you change only its base URL. Tasks and budgets are shared across providers: one task can call Claude and then GPT, and the cap covers both.
A model with no price is refused, so the cap can never be skipped by accident. See Prices and the price feed.
Providers and base URLs#
The addresses below assume the default listen address, 127.0.0.1:8787.
Provider |
Base URL to give the SDK |
Key Lockpin uses when the client sends none |
|---|---|---|
Meta |
|
|
OpenAI |
|
|
Anthropic |
|
|
Google Gemini |
|
|
xAI |
|
|
xAI, US endpoint (1.1x) |
|
|
DeepSeek |
|
|
Mistral |
|
|
Groq |
|
|
Together |
|
|
Fireworks |
|
|
OpenRouter |
|
|
The cloud providers run on your own cloud account and have pages of their own:
Provider |
Base URL |
Credential |
Page |
|---|---|---|---|
Azure OpenAI |
|
|
|
Amazon Bedrock |
|
An AWS credential, signed by Lockpin |
|
Google Vertex AI |
|
A Google credential; Lockpin mints the token |
Meta’s base URL is set with -upstream (default https://api.meta.ai/v1).
List what this machine can use#
lockpin providers
lockpin providers -models
lockpin providers lists each provider, the base URL to give its SDK, and whether its key
variable is set. -models also lists every model with its price. lockpin prices is the same
command.
Keys#
Set each provider’s key in the shell that starts Lockpin, using the variable names
lockpin providers lists:
$env:ANTHROPIC_API_KEY = "..."
lockpin
export ANTHROPIC_API_KEY=...
lockpin
Outside team mode you can skip this and let each agent send its own key, which Lockpin passes
through. In team mode the server holds one key per provider, and people only ever hold their
Lockpin key. A provider the server has no key for answers 503 no_provider_key. See
Set up a team.
Example: the Anthropic SDK#
import anthropic
client = anthropic.Anthropic(base_url="http://127.0.0.1:8787/anthropic",
default_headers={"X-Lockpin-Task": "fix-login-bug",
"X-Lockpin-Budget-Usd": "0.50"})
Add a server of your own#
You can add an OpenAI-compatible server of your own, such as a local model, with a catalog
file passed as -prices FILE:
{"providers": {"local": {"api": "openai", "base_url": "http://127.0.0.1:11434/v1", "auth": "bearer"}},
"models": {"local/qwen3:8b": {"input": 0, "cached_input": 0, "output": 0.01}}}
See Prices and the price feed for the catalog format.
What Lockpin handles per provider#
So that the cap stays exact, Lockpin reads each provider’s own conventions:
Usage in every shape. Anthropic’s separate cache reads and writes, DeepSeek’s and Together’s own cache fields, Groq’s
x_groqstream usage, and OpenRouter’s reported cost, which is charged as is.Cache writes. Anthropic, and OpenAI’s gpt-6 models, bill writing the prompt cache at 1.25x input (2x for Anthropic’s 1-hour cache). The worst case uses that rate.
Long-context prices. Above 272K input (OpenAI), 200K (xAI, Gemini 3.1 Pro) or 100K (Claude Haiku 5.5), the whole call costs more. Reservations and charges use the right tier.
Reasoning counted outside the output. xAI and Gemini leave reasoning out of
completion_tokens. Lockpin charges it fromtotal_tokens.Routing. OpenRouter can send a call to a pricier host than its listed price. Known models are reserved at the dearest host’s price and charged what OpenRouter reports.
Prompt cache routing. Each task gets
prompt_cache_key, or the provider’s own header (x-grok-conv-idon xAI,x-session-affinityon Fireworks,x-session-idon OpenRouter), so its calls keep hitting one cache.
Calls Lockpin cannot meter#
Calls Lockpin cannot meter, such as embeddings, images, audio, files and batches, are refused:
Mode |
Reply |
To allow them |
|---|---|---|
Solo |
|
List their paths in |
Team |
|
Not available. |
Reads, such as model lists, always pass.
Limits#
Gemini’s OpenAI-compatible API does not report cache hits, so Gemini calls are charged at full input and never show cache misses. Gemini reservations allow for twice the output limit.
xAI does not say whether
max_tokensalso limits reasoning. A single xAI call could cost more than its reservation; the next call is then blocked.A Chat Completions call with
n(orbest_of) above 1 asks for several choices, each of which can use the whole output limit. On a capped task it is refused as unpriced.
Verify#
Check that each provider’s key variable is set and see where a test call would go:
lockpin doctor -providers openai,anthropic
Add
-networkto also send oneHEADrequest, with no credentials, to each provider’s host. It makes no model calls.lockpin doctor -providers openai,anthropic -network
A 404 unknown_provider reply means the base URL is wrong. Meta is /v1, the others are
/<provider>/v1, and Anthropic’s is /anthropic.