Skip to main content
The AiHubMix CLI is a collection of utility scripts that allows you to manage your AiHubMix API keys, query account information, and use AI services without going through a web interface. Essentially, it encapsulates API calls (using curl or Python requests) for command-line convenience.
We recommend the next-generation command-line tool AIHubMix CLI: a single binary with zero runtime dependencies (no Python required), resource-oriented commands like aihubmix keys list, and jq- and AI Agent-friendly output. This page retains the legacy Python script usage for reference.

Prerequisites

Before using the AiHubMix CLI, you need to:
  1. An AIHubMix account
  2. Generate an Access Token by clicking “Generate System Access Token” on the AIHubMix Settings page;
  3. Install the necessary Python dependencies:
The aihubmix_cli.py script can be downloaded here

Features Overview

The AIHubMix CLI offers the following key functionalities:

API Endpoint Overview

Retrieve Balance Information

Key Management

Create New Key

Retrieve Key List

Search for Key

Update Key

Delete Key

Retrieve User Key

Model Management

Retrieve User’s Available Models

Output in JSON Format

All CLI commands support outputting results in JSON format, making it easier for programmatic processing:

Troubleshooting

If you encounter issues, you can try the following solutions:
  1. Connection Issues: If the main domain fails to connect, try using an alternative domain:
  2. Invalid Access Token: Ensure that the provided access token is a valid key obtained from the AIHubMix website. The format of the access token is usually like fd***.
  3. Insufficient Permissions: Some operations may require specific permissions, so ensure your account has adequate permissions.
  4. Request Failure: Check your network connection or try again later.

Notes

  • The access token is different from the regular API Key used to access AI models.
  • Each user has their own system access token, and the access level is determined by the user’s role (regular user, administrator, or root user).

Last updated: 2026-06-01