Prerequisites
Before using the AiHubMix CLI, you need to:- An AIHubMix account
- Generate an Access Token by clicking “Generate System Access Token” on the AIHubMix Settings page;
- 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
| Endpoint | HTTP Method | Description |
|---|---|---|
/api/user/self | GET | Retrieve current user information and account balance |
/api/token/ | GET | Retrieve a list of all Keys |
/api/token/ | POST | Create a new API Key |
/api/token/ | PUT | Update an existing API Key |
/api/token/{token_id} | GET | Retrieve detailed information for a specific Key |
/api/token/{token_id} | DELETE | Delete a specific Key |
/api/token/search | GET | Search for Keys (use ?keyword=search_term) |
/api/user/token | GET | Retrieve user Keys |
/api/models | GET | Retrieve a list of all available models |
/api/user/available_models | GET | Retrieve a list of models available to the current user |
Retrieve Balance Information
Key Management
Create New Key
Retrieve Key List
Search for Key
Update Key
Delete Key
Retrieve User Key
Model Management
Retrieve All Available Models
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:-
Connection Issues: If the main domain fails to connect, try using an alternative domain:
-
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***. - Insufficient Permissions: Some operations may require specific permissions, so ensure your account has adequate permissions.
- 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).