Providers
The Providers API lists available LLM providers, reports their authentication status, discovers models, and connects subscription or API-key providers through the Gizzi runtime. Provider credentials are stored by Gizzi; the API only reads connection metadata. The same routes are also mounted under/api without the v1 prefix.
Existing runtime/provider APIs expose implementation controls intentionally. The Agency API is the abstraction that hides those controls behind capabilities and one durable agent identity.
Base URL
Endpoints
List providers
Response
Provider status values
Get provider auth status
Response
Discover provider models
Response
supported may be false because the runtime owns model discovery, but allow_freeform remains true.
Install a CLI brain
POST /api/v1/cli-tools/:id/install installs a CLI brain (Claude Code, Codex, Grok, Kimi, Qwen, …) on the computer this runtime runs on. Tools the Factory manages run its version-pinned installer, allternit-factory pane harness install <tool>, whose pins and licences come from factory/pane/src/ao/harness/harness.json. Other catalog tools install from the pinned recipe in the catalog (npm into the harness folder, uv, Homebrew, or an https install script). A custom tool installs with the command you gave it, and always needs acceptTerms: true.
Tools are installed into the harness’s managed bin/: ~/.allternit/factory/harness/bin, or $ALLTERNIT_FACTORY_HARNESS_HOME/bin if that’s set. allternit-api and gizzi put that folder first on their PATH at startup, so the tool works right away.
On a computer without npm, the installer first downloads a private Node 22 from nodejs.org into the same folder and checks it against Node’s published SHASUMS256.txt. Nothing system-wide is changed. When the install succeeds, gizzi reloads so the brain appears in the model picker.
text/event-stream. It sends log events while the install runs, then one done event:
In
GET /api/v1/providers/auth/status, every CLI row has an install object: {available, requiresTerms, license, termsUrl, pin}. A CLI whose binary isn’t on the computer reports status: "not_installed".
Coding CLI catalog
GET /api/v1/cli-tools/catalog lists every coding CLI Allternit supports, whether or not it is installed, plus the caller’s custom tools. It is built from one file, cmd/gizzi-code/src/runtime/providers/discovery/cli-catalog.json, which gizzi reads for its CLI brains and allternit-api embeds, so the list, the install recipes and the brains can’t drift apart.
status is ok, missing (installed, not signed in), not_installed or unknown. signIn is subscription, api_key or none. customAllowed is false on a shared hosted runtime (see below).
Thinking levels
Each model takes its own thinking levels, with the vendor’s own name for them. One table holds them:cmd/gizzi-code/src/runtime/providers/discovery/model-thinking.json. allternit-api, gizzi, the web app and the iPhone app all read it.
Every row from GET /api/v1/models has a thinking object, or null when the model has no setting:
GET /api/v1/models/thinking returns the whole table (vendors and models), for pickers that list models from other sources. Match a model id the way the server does: lowercase, . read as -, any provider/ prefix dropped, a trailing * in a pattern matches a prefix, and the first match wins.
levels is in order, from least to most thinking. toggle means the model can also turn thinking off (DeepSeek). fast means the account offers a faster priority tier (Codex). verified: false marks levels not yet confirmed on the vendor’s page for that model.
A chat send passes the level as effort. allternit-api keeps it only when the model takes it, and sends it to gizzi as the turn’s variant. A level the model does not take is dropped, and the model’s default applies. gizzi then sends the vendor’s own setting:
To add or change a model, edit its entry from the vendor’s own source and name that source in
source. For Codex models, codex debug models lists each model’s levels and default.
Add your own coding CLI
POST /api/v1/cli-tools/custom registers a coding CLI that isn’t in the catalog. It then appears in the catalog and in GET /api/v1/providers/auth/status?kind=cli, installs and signs in through the same flows, and gizzi can run it as a brain.
Each person can add up to 50.
DELETE /api/v1/cli-tools/custom/:id removes one.
Custom tools run a program on the machine, so only a runtime that belongs to one person accepts them: Allternit Desktop and self-hosted installs. A shared hosted runtime answers 403 {"error":"custom_tools_disabled"}, never runs them, and reports customAllowed: false.
Connect a provider
login, so the user can finish on any device:
- Send
remote: truewhen the user isn’t at that computer, for example a cloud computer reached through the relay. Tools with aloginRemotecommand in the CLI catalog then use their headless sign-in. Codex and Grok (login --device-auth), Copilot (login --device-code) and Kiro (login --use-device-flow) use a device code: open the link, enter the code, and it finishes by itself. Cursor Agent and Qoder runloginwithloginRemoteEnv(NO_OPEN_BROWSER=1/NO_BROWSER=1), and Augment runslogin --headless. Other tools run their normallogincommand;loginRemoteHint, when set, comes back ashint. Withoutremote, the CLI also opens a browser on that computer. - Claude Code works the same either way. The user opens the link and signs in, and the page shows a code. When
login.needsCodeistrue, send that code to/connect/code. login.urlandlogin.codecan benullfor the first few seconds. Keep polling/connect/status.- A sign-in is stopped after 15 minutes. Starting a new one replaces any earlier one for the same provider.
Response states
already_connected, connected, needs_api_key, not_installed, started.
Check connect status
Response
status is success once the CLI reports signed in, failed if its sign-in ended without that (see login.error), and pending otherwise. When it succeeds, the brain becomes the default and gizzi reloads.
Paste a sign-in code
{"ok": true}, or 409 {"error": "no_login_waiting"} if no sign-in is waiting for a code.
Confirm connect
Response
Coding CLI accounts
A coding CLI can hold several sign-ins when its catalog entry hasaccountHomeEnv, the environment variable that points the CLI at its config folder (CLAUDE_CONFIG_DIR for Claude Code, CODEX_HOME for Codex). The default account is the CLI’s own sign-in and needs no row. Each added account has its own folder, ~/.allternit/cli-homes/<id>, so its sign-in is kept apart; a second Claude Code account gets its own macOS Keychain entry through its own config folder.
multi is false when the CLI cannot hold several accounts; clients then hide the add button. A server without the route answers 404.
POST /api/v1/providers/:id/accounts takes { "label": "Work" }, creates the account and its folder, and starts the same sign-in as Connect a provider with the account’s folder set. The response has the same shape. PATCH takes { "default": true } or { "label": "..." }. DELETE removes the row and its folder; the default account can’t be deleted. auth/status checks each account against its own folder.
A session, bot or brain config may carry cli_account_id next to the CLI provider id. The account used is the one named in the request, else the bot’s, else the default. The subscription gateway’s POST /v1/tasks accepts routing.account_id, which must be an eligible account of that vendor or the call fails with 409 { "error": "account_not_eligible" }.
Media generation
List media providers
Generate media
Local brains
Local brain status
Response
Local brain models
Public GGUF model search
Response
Error codes
Related pages
- Models — list available models and policy aliases
- Chat Completions — send requests through providers
- BYOC Runtime — run Allternit on your own infrastructure