Coding agents · Pi
Use the Pi coding agent with open-source models hosted in the EU
Pi is a small, extensible coding agent for the terminal. It reads custom providers from a single models.json file, so adding inference.eu takes one provider block, and every prompt Pi sends is then processed on open-weight models in European data centres.
- 01API format: OpenAI and Anthropic
- 02EU data centres
- 03Covered by one DPA
Set it up in a few minutes
- 1
Create an API key in your inference.eu account and export it as
INFERENCE_EU_API_KEYin your shell profile. - 2
Open
~/.pi/agent/models.json, or create it if it does not exist. - 3
Add an
inference-euprovider with the inference.eu base URL,apiset toopenai-completionsandapiKeyset to$INFERENCE_EU_API_KEY. - 4
List the model ids you want under
models, for exampleqwen3-coder-480b-a35b-instruct. - 5
Start
pi, run/model, pick an inference.eu model and pressCtrl+Sto make it the default.
{
"$schema": "https://pi.dev/schemas/models.schema.json",
"providers": {
"inference-eu": {
"baseUrl": "https://api.inference.eu/v1",
"api": "openai-completions",
"apiKey": "$INFERENCE_EU_API_KEY",
"models": [
{ "id": "qwen3-coder-480b-a35b-instruct" },
{ "id": "glm-5.3" },
{ "id": "kimi-k3" }
]
}
}
}What Pi is
Pi is a minimal coding agent that runs in the terminal. It keeps its core small: a handful of tools for reading, writing and editing files and running shell commands, plus a plain system prompt. Everything else, from custom commands to new providers, is added through extensions, skills and configuration files.
Pi speaks several model APIs natively, including OpenAI Chat Completions and Anthropic Messages. Any endpoint that speaks one of those formats can be added in models.json, which is how you connect it to inference.eu.
How the configuration works
Custom providers live in ~/.pi/agent/models.json under providers. The inference-eu block sets baseUrl to the inference.eu base URL ending in /v1 and api to openai-completions. apiKey accepts $NAME or ${NAME} interpolation, so the key stays in your environment and out of the file.
Each entry under models needs an id that matches an inference.eu model id. Pi reloads the file whenever you open /model, so you can add models without restarting. If you prefer the Anthropic format, set api to anthropic-messages and use the base URL without the trailing /v1.
Which models to choose
Pi relies on the model to plan edits and call its file and shell tools in sequence, so models with dependable tool calling work best. qwen3-coder-480b-a35b-instruct is a strong default for everyday coding: it follows Pi's short system prompt closely and edits files precisely.
For larger refactors or tasks that need more reasoning across a codebase, glm-5.3 and kimi-k3 are good choices. gpt-oss-120b responds quickly and suits small questions and scripted runs. Add several to models.json and cycle between them with Ctrl+P to compare them on your own repository.
Troubleshooting
If an inference.eu model does not appear in /model, Pi has no usable key for the provider. Check that INFERENCE_EU_API_KEY is exported in the shell that starts Pi and that apiKey reads $INFERENCE_EU_API_KEY exactly.
A 401 error means the key is wrong or inactive. A 404 usually comes from a base URL with an extra path or, with anthropic-messages, from leaving /v1 on the URL. "Model not found" means an id differs from the inference.eu model id. If a run ends without token counts, update Pi, since streaming usage is read from the final chunk.
Keeping code and data in the EU
Pi sends the files it reads, your prompts and tool output to the model provider. With inference.eu as the provider, those requests are processed in EU data centres and never used for training. We sign a data processing agreement under Article 28 GDPR, publish our subprocessor list and bill in euros.
Pi itself runs locally and does not proxy your prompts through its own servers. It may fetch an updated model catalogue from pi.dev, which contains model metadata, not your code. Use only inference.eu providers in /scoped-models so that no session falls back to a provider outside the EU.
Pi: common questions
The questions buyers, developers and legal teams ask us most. Something missing? Ask us directly.
Related
- OpenCodeRun the OpenCode terminal agent on open-weight models processed in EU data centres. Add one provider block to opencode.json and keep your code in Europe.Coding agents
- OpenClawRun the OpenClaw personal assistant on open-weight models processed in EU data centres by adding inference.eu as a custom provider in openclaw.json.Agents
- Claude CodePoint Claude Code at inference.eu with ANTHROPIC_BASE_URL and run it on open-weight models processed in EU data centres. No Anthropic account needed.Coding agents
Move your AI workloads to EU infrastructure
Tell us which models you use and roughly how much traffic you have. We reply within one working day with pricing and next steps.
- Reply within one working day
- Pricing for your volume
- DPA ready to sign