aihubmix). Once installed, you can query your account balance, manage API Keys, and view available models from the terminal without opening the web console. It is a single binary — no Python, Node, or Go required — and installs with one command; every command supports JSON output, so it plugs straight into scripts, CI, and AI Agents (such as Claude Code).
What it can do:
- Check balance: Query your account balance and used quota in real time
- Manage Keys: Create, view, search, update, and delete API Keys
- View models: List the models available to the current token
- Scriptable: JSON output + stable exit codes, a natural fit for automation and AI Agents
Don’t mix up the two credentials: The CLI signs in with a “System Access Token” (Manage Key, format
fd***). Get it from the console at console.aihubmix.com/setting by clicking “Generate System Access Token”. It is used to manage your account and is not the same as the API Key (sk-***) you use to call models.Installation
One-Command Install (Recommended)
Copy the command for your system, paste it into your terminal, and run it to download the binary and automatically add it toPATH:
aihubmix login to get started.
You can also manually download the binary for your platform from Releases (Windows:
aihubmix_windows_amd64.exe) and place it in a PATH directory; on Unix-like systems, run chmod +x.Quick Start
Once logged in, all commands are available:Command Reference
Common Operations
Managing API Keys
-q 10 sets a $10 quota limit on the Key, and -u means unlimited quota. Deletion prompts for confirmation by default; add --yes to skip it in CI scenarios.
Using with Scripts / AI Agents
The CLI is very automation-friendly and can be driven directly by CI, scripts, or AI Agents (such as Claude Code):- Login-free: Pass a Manage Key via the
AIHUBMIX_TOKENenvironment variable or--tokento skip interactive login (priority:--token>AIHUBMIX_TOKEN> config file). - JSON output: Add
--json(-j) to any command; normal results go to stdout and errors to stderr, makingjqparsing easy. - Stable exit codes: Scripts can branch on these to determine success or failure.
Global Flags
The following flags apply to all commands:Configuration File
Login information is stored in~/.aihubmix/config.json (Windows: %USERPROFILE%\.aihubmix\config.json), with permissions tightened to read/write by the current user only. During login, the Manage Key is not echoed and not written to logs.
FAQ
Do I need to install Python / Node / Go? No. The CLI is a single binary — download and use. What’s the difference between a Manage Key and an API Key? The Manage Key (fd***) is used to manage your account (check balance, manage Keys) and is used by the CLI; the API Key (sk-***) is used to call models. They are generated in different places in the console and cannot be used interchangeably.
Is Windows supported?
Yes. Native binaries are provided for Windows, macOS, and Linux.
How do I use it non-interactively in CI / scripts?
Pass the Manage Key via the AIHUBMIX_TOKEN environment variable, combined with --json and exit codes — no need to run aihubmix login.
What if I forget or leak my Manage Key?
Regenerate it at console.aihubmix.com/setting; the old token is invalidated.
Related docs: Platform API · CliEndpoints · Legacy Python Script · AIHubMix Console
Last updated: 2026-06-22