Docs / Coding agents
Use with coding agents
Any agent or tool that lets you set an OpenAI-compatible base URL can use HummingRelay. For Pi there is an installer.
Pi
Run this in a terminal:
curl --proto '=https' --tlsv1.2 -fsSL https://hmbrd.dev/setup.sh | shThe script adds HummingRelay as a provider to the Pi coding agent and asks for your API key. Have a key from the dashboard ready. Then pick one of the HummingRelay models in Pi. The two flags after curl keep the download on HTTPS with TLS 1.2 or newer, including any redirect.
Piping a script into a shell runs it as you. To read it first, download it once and run the file you read:
curl --proto '=https' --tlsv1.2 -fsSL https://hmbrd.dev/setup.sh -o hummingrelay-setup.sh
less hummingrelay-setup.sh
sh hummingrelay-setup.shWhat the installer trusts
- hmbrd.dev, for the script. It arrives over HTTPS and nothing else vouches for it. There is no checksum next to it: one served by the same site would change together with the script. The script prints its revision when it starts, and
sh hummingrelay-setup.sh --versionprints only that. - pi.dev, only if Pi is missing and you agree. The script then downloads Pi’s own installer from
https://pi.dev/install.shand runs it. That installer and whatever it downloads are Pi’s code; HummingRelay does not control or check them. Install Pi yourself first and nothing is fetched from pi.dev. Without a terminal to ask on, the script never downloads it. - The Pi you already have, for its update. The script runs
pi update --self, which is Pi’s own updater. SetHMBRD_SKIP_UPDATE=1to skip it.
The script sends your API key to https://api.hmbrd.dev/v1 to check it, and nowhere else. It is then written to Pi’s models.json, which only your user can read. With HMBRD_KEY_MODE=env the file refers to the HMBRD_API_KEY environment variable instead of holding the key. The previous models.json is kept next to it as a backup.
Other tools
Look for an “OpenAI-compatible” or “custom OpenAI” provider and fill in:
| Setting | Value |
|---|---|
| Base URL | https://api.hmbrd.dev/v1 |
| API key | hr_live_… |
| Model | model-zero, model-one-flash or model-one |
| API type | Chat Completions |
Tools that only speak the Responses API or the Anthropic Messages API will not work: HummingRelay serves Chat Completions and legacy Completions only.
Keeping agent costs predictable
Agents send long prompts many times and often in parallel. A few settings matter more than usual:
- Set a max output tokens limit in the agent if it has one. Each call reserves its maximum cost first, and without a limit that maximum includes 8,192 output tokens. Smaller holds let parallel calls run on a modest balance. See Holds.
- Cancelling the agent does not cancel the call in flight. The model finishes and the call is billed. See Disconnects.
- Cached prompt tokens are cheaper. Agents resend the same system prompt and history, which the models can cache and bill at the cached-input rate.
- Reasoning is billed as output. A lower
reasoning_effortmakes routine steps cheaper, if the agent lets you set it. See Reasoning. - Bonus credit does not cover
model-one. With only bonus credit left, usemodel-zeroormodel-one-flash.