Skip to content
Zabio is in beta: models, prices and features can change. Tell us what breaks at hello@zabio.ai.

Command line

zabio signs you in with your browser, lets you pick an organization and an API key, shows usage and prices, manages keys, projects and vendor keys, and chats through the router from the terminal.

The CLI is a single Go binary. Build it from the source repository:

Terminal window
go build -o bin/zabio ./cmd/zabio

Then put bin/zabio on your PATH.

Terminal window
zabio login # prints a URL and a code, opens the browser, waits for approval
zabio orgs # your organizations
zabio use acme # select one (done for you when there is exactly one)
zabio keys create --name laptop
zabio keys use key_... # paste the key once; it is stored in the config file (mode 0600)
zabio chat "Summarize the OpenAI chat completions API in one line"
zabio usage

zabio keys use zb_live_... right after keys create also works: the CLI finds the key by its prefix.

usage: zabio [--config PATH] [--json] COMMAND [ARGS]
Commands:
login sign in with the browser (device flow)
logout revoke the session token and forget it
whoami show the signed-in user
orgs list your organizations
use ORG_SLUG select the organization for later commands
keys list|create|rotate|revoke|use
manage API keys of the selected organization
(list --project P: one project's keys)
projects list|create manage projects (only the owner creates them)
members list list members of the selected organization
members invite EMAIL [--role member|admin] [--project P]...
invite someone, optionally limited to projects
members projects EMAIL [--project P]...
limit a member to projects (none: all of them)
usage [--month YYYY-MM | --days N] [--project P]
spend summary and by-model breakdown
models models and prices
billing [show|ledger|topup] credits, ledger, add credits through Stripe
vendor-keys [list|add|remove] your own vendor API keys (BYOK)
conversations [list|show|delete] stored conversations (metadata only)
chat --new | --conversation conv_... stateful chat through /v1/responses
chat [--model M] [--system S] [--session ID] [MESSAGE]
chat through the router (interactive without MESSAGE)
tokens list|create|revoke manage your CLI tokens
version print the version
Flags:
--config PATH config file (default ~/.config/zabio/config.json)
--json print the raw response JSON instead of tables
Environment: ZABIO_API_BASE, ZABIO_INFERENCE_BASE override the config file.
Command What it does
login [--no-browser] device flow: prints a verification URL and a code, opens the browser, waits for approval and stores a user token (zbu_...)
logout revokes the token on the server and forgets it locally
whoami your user, how you are signed in, your organizations, the selected organization and key
tokens list, tokens create --name N [--scopes a,b], tokens revoke ID your CLI tokens. Create prints the token once
Command What it does
orgs lists your organizations; the selected one is marked with *
use ORG_SLUG selects the organization. Switching clears the selected API key, because keys belong to one organization
keys list [--project P] keys of the organization, or of one project; the one in use is marked with *. A member limited to projects sees only theirs
keys create --name N [--project P] [--code C] creates a key and prints it once. P is a project id (prj_...), slug or name. With two-step sign-in on, the CLI asks for a code from your authenticator app; --code gives it without asking (a script with no terminal must pass it). The CLI cannot use a passkey: with passkeys only, give a recovery code, or create the key in the web app
keys rotate KEY_ID [--code C] gives the key a new secret and prints it once; the key keeps its id, settings and history, and the old secret stops working at once. When it is the key this CLI uses, the CLI stores the new secret. Asks for the second step as keys create does. A connected app’s key cannot be rotated
keys revoke KEY_ID revokes a key
keys use KEY_ID [--key PLAINTEXT] [--yes] stores a key locally for zabio chat. Asks for the key with hidden input unless --key is given, checks it against the key’s prefix, and asks for confirmation unless --yes
projects list, projects create --name N projects; only the organization’s owner creates them
members list members with role, projects, monthly quota and spend this month
members invite EMAIL [--role member|admin] [--project P]... invites someone by email. Each --project limits a member to that project; without one they see the whole organization
members projects EMAIL [--project P]... changes the projects a member is limited to; with no --project the member sees the whole organization again
Terminal window
zabio chat --model auto/balanced --system "Answer in Spanish" "What is prompt caching?"
zabio chat --session support-42 "Second question in the same routing session"
zabio chat # interactive; Ctrl-D or "exit" leaves
zabio chat --new "Start a stored conversation"
zabio chat --conversation conv_... "Continue it"
Terminal window
zabio transcribe --format srt meeting.mp3 # the subtitle file and a cost line
zabio speak -o morning.mp3 "Good morning." # the audio file and a cost line
zabio speak -o - --model aura-2 --voice aura-2-sirio-es --format wav "Hola." > hola.wav

speak takes --model (auto by default), --voice (the model’s default when absent), --format (mp3, opus, aac, flac, wav, pcm) and --speed; -o - writes the audio to standard output. The voices are AI-generated.

Terminal window
zabio image -o lighthouse.jpg "A red lighthouse on a rocky shore at dusk" # the image file and a cost line
zabio image -o poster.png --model gpt-image-2.5-flare --size 1024x1536 --quality high --format png "A poster for a jazz night"
zabio image edit -o room-with-lamp.png "Put the lamp on the table in the room" room.png lamp.png
zabio image edit -o hat.png --mask mask.png "Add a red hat" portrait.png
zabio image --background --size 4096x4096 "A city at night, detailed, 4K" # prints the id, img_...
zabio image status img_... # queued, in_progress, completed, failed or cancelled
zabio image get -o city.png img_... # the image once completed

image takes --model (auto by default), --size (auto or WIDTHxHEIGHT), --quality (low to max on the models that take it) and --format (png, jpeg, webp); -o - writes the image to standard output. image edit takes the same options, the prompt, then one or more image files (png, jpeg or webp), and --mask with a png whose transparent areas mark where to edit the first image (the OpenAI models only). image --background queues the generation and prints its id instead of waiting; image status ID prints its status, and image get -o FILE ID writes its image once it is completed. An edit cannot run in the background. The images are AI-generated; Google’s carry a SynthID watermark.

Without --model, chat uses auto: Zabio picks for you, the cheapest model able to do the job, moving up a line when the job needs it. chat streams the answer and then prints one dim line on stderr: model served, vendor, cost, cached tokens and elapsed time. Without a message it runs a prompt loop that keeps the history in memory and resends it each turn. --new and --conversation use the Responses API instead: the server keeps the history, the CLI prints the conversation id the first time, and the status line adds escalated from ... or compacted when those happened.

Command What it does
usage [--month YYYY-MM | --days N] [--project P] billed, saved (what routing saved, computed when you run it: see Billing), calls, tokens, average latency, and a by model table, for the organization or one project. Default: current month to date, UTC
models every model with your organization’s list prices in USD per million tokens
billing or billing show balance, low balance warning, lifetime top-ups, whether the trial was credited, plan and minimum top-up
billing ledger [--limit N] the credit ledger, newest first (1 to 500 rows)
billing topup --amount USD [--no-browser] creates a Stripe Checkout link for that amount and opens it. The balance updates when the payment completes
vendor-keys list, vendor-keys add --vendor anthropic|openai|google [--label L], vendor-keys remove vk_... your own vendor keys (Own keys). add reads the key with hidden input and verifies it with the vendor
conversations list [--key key_...] [--limit N], conversations show conv_..., conversations delete conv_... stored conversations, metadata only. delete uses the selected API key and is permanent

--json on any command prints the raw response body instead of the human view. Commands that make several calls print one object with every body (whoami: {"me", "session"}; usage: {"summary", "by_model", "savings"}). chat --json prints one raw event payload per line.

Terminal window
zabio usage --days 7 --json | jq .savings.saved_micros
zabio keys list --json | jq -r '.data[] | [.id, .name] | @tsv'

The config file is ~/.config/zabio/config.json (mode 0600; $XDG_CONFIG_HOME is honored). It holds the API base URLs, your user token, the selected organization and the selected API key. --config PATH or ZABIO_CONFIG selects another file. ZABIO_API_BASE and ZABIO_INFERENCE_BASE override the two base URLs for one invocation and are never written back.

No command prints your user token or API key except tokens create and keys create, which show the new secret exactly once.

Code Meaning
0 success
1 the server answered with an error; printed as error: <message> (<code>)
2 the server could not be reached or answered something unreadable
64 bad arguments; the usage text follows