Pi
Add FluxRouter to the Pi agent as an OpenAI-completions provider in models.json.
The Pi agent talks to FluxRouter over the OpenAI endpoint at https://api.fluxrouter.ai/v1, and your Flux key is the only credential it needs.
Manual config
Add a flux provider to ~/.pi/agent/models.json:
{
"providers": {
"flux": {
"api": "openai-completions",
"baseUrl": "https://api.fluxrouter.ai/v1",
"apiKey": "sk-YOUR-FLUX-KEY",
"model": "flux-auto"
}
}
}
Test it
Start Pi and send a short prompt:
pi
If the response comes back, your traffic is flowing through FluxRouter. Check your dashboard to confirm the request landed.
Notes
Keep model set to flux-auto and FluxRouter picks the lane for each request. To pin a tier instead, set model to flux-fast, flux-standard, or flux-reasoning. The key lives directly in models.json under apiKey, so keep that file readable only by you.