Prerequisites
Before using the AiHubMix CLI, you’ll need:- An AiHubMix account
- An Access Token generated from the AiHubMix Settings page by clicking “Generate System Access Token”
- Required Python dependencies:
The aihubmix_cli.py script can be downloaded here
Model
Feature List
AiHubMix CLI provides the following main functions:API Endpoints Overview
Endpoint | HTTP Method | Description |
---|---|---|
/api/user/self | GET | Get current user information and account balance |
/api/token/ | GET | Get list of all API keys |
/api/token/ | POST | Create a new API key |
/api/token/ | PUT | Update an existing API key |
/api/token/{token_id} | GET | Get details of a specific API key |
/api/token/{token_id} | DELETE | Delete a specific API key |
/api/token/search | GET | Search for API keys (using ?keyword=search_term ) |
/api/user/token | GET | Get user API key |
/api/models | GET | Get list of all available models |
/api/user/available_models | GET | Get list of models available to the current user |
Account Management
API Key Management
Model Management
JSON Format Output
All CLI commands support outputting results in JSON format for programmatic processing:Troubleshooting
If you encounter issues, try the following solutions:-
Connection Problems: If the main domain connection fails, try using the backup domain:
-
Invalid Access Token: Ensure the provided access token is a valid key obtained from the AiHubMix website. Access tokens typically have a format like
fd***
. - Insufficient Permissions: Some operations may require specific permissions; ensure your account has sufficient privileges.
- Request Failures: Check your network connection or try again later.
Notes
- The access token is different from the regular API keys used to access AI models
- Each user has their own system access token, with access levels determined by the user role (regular user, administrator, or root user)