AIHubMix Skill is a local extension for AI coding agents. After installation, you can use natural language in Codex, Claude Code, Cursor, Cline, and other Skills-capable agents to integrate AIHubMix, query models, choose by capability, generate examples, and troubleshoot errors.
This Skill does not include a fixed model list. Instead, it reads models, pricing, context windows, protocol contracts, and other real-time information from official AIHubMix APIs when needed, helping the agent avoid stale memory.
Use Cases
| Scenario | You can say | What the Skill does |
|---|
| Integrate AIHubMix | ”Connect this project to AIHubMix” | Detects the project stack, selects the right protocol, and provides a minimal runnable integration |
| Query models | ”Check the latest available gemini models” | Queries and summarizes results from the AIHubMix real-time model API |
| Select by capability | ”Which image-input models are available?” | Filters candidate models by vision, image generation, video, TTS, STT, embedding, rerank, and other capabilities |
| Generate examples | ”Give me an Anthropic messages example” | Generates runnable examples for OpenAI, Anthropic, Gemini, and other protocols |
| Verify a Key | ”Help me confirm whether this model can be called” | Uses a real minimal request to verify API Key and model availability |
| Troubleshoot errors | ”Why did I get this 401 / 400?” | Analyzes the endpoint, model, error body, and request ID to suggest a fix |
Prerequisites
- Install at least one Skills-capable AI Agent, such as Codex, Claude Code, Cursor, Cline, Gemini CLI, or OpenCode.
- Make sure Python 3.8 or later is available locally.
- For real model calls, prepare an AIHubMix API Key.
- To query balance, Key lists, or models callable by the current account, install and log in to the official
aihubmix CLI.
Installation
Option 1: Let the Agent Install It
Give this instruction to your current AI Agent:
Install AIHubMix Skill from https://github.com/AIhubmix/skills and place it in the current tool's Skills directory.
Claude Code can use ~/.claude/skills,
Codex can use ~/.codex/skills.
After installation, run python <skill>/scripts/AiHubMixAPI.py --help to verify it.
Option 2: Manual Installation
# Claude Code
cp -r AiHubMixAPI ~/.claude/skills/
# Codex
cp -r AiHubMixAPI ~/.codex/skills/
Different agents may use different Skills directories. If your tool uses a shared directory, check that agent’s Skills documentation first, or let the agent decide the installation location.
Optional: Install AIHubMix CLI
The AiHubMixAPI script can read public model and protocol information. Account balance, Key management, and models actually callable by the current account require the official CLI after login.
# Windows
irm https://raw.githubusercontent.com/AIhubmix/platfrom-cli/main/install.ps1 | iex
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/AIhubmix/platfrom-cli/main/install.sh | sh
After installation, run:
aihubmix login
aihubmix whoami
aihubmix models list
How to Use
After installation, you usually do not need to remember commands. Describe the task directly in your agent:
Connect this Next.js project to AIHubMix and run a smoke test with a callable text model.
Check the latest Claude-family models and pricing on AIHubMix.
Which image-generation models can I use? Only show models callable by my current account.
This endpoint returns 401. Help me determine whether it is a Key, Base URL, or model permission issue.
If the agent does not trigger the Skill automatically, call it explicitly:
/AiHubMixAPI query the latest gemini models
/AiHubMixAPI troubleshoot this 400 error
Command Line Usage
You can also run the script directly from the Skill directory:
# Query models
python scripts/AiHubMixAPI.py list --limit 20
python scripts/AiHubMixAPI.py report gemini
python scripts/AiHubMixAPI.py compare <model-a> <model-b>
# Find candidate models by capability
python scripts/AiHubMixAPI.py candidates --capability vision
python scripts/AiHubMixAPI.py candidates --capability image-gen
python scripts/AiHubMixAPI.py candidates --capability rerank
# Only show candidates callable by the current account; requires logged-in aihubmix CLI
python scripts/AiHubMixAPI.py candidates --capability vision --mine
For Chinese output, append --lang zh or set:
Capability Quick Reference
| Capability | Recommended command |
|---|
| View model list | list |
| Query a model or family | get <model-id> / report <query> |
| Compare models | compare <model-a> <model-b> ... |
| Select by capability | candidates --capability <capability> |
| Show only callable models | candidates --capability <capability> --mine |
| Verify API Key | doctor --model <model-id> |
| Verify image input | doctor --model <model-id> --image |
| Generate OpenAI-compatible example | example chat --model <model-id> |
| Generate Anthropic-compatible example | example messages --model <model-id> |
| Troubleshoot errors | troubleshoot --status <code> --endpoint <path> --model <model-id> |
FAQ
The Agent Does Not Trigger the Skill Automatically
Different agents have different Skill-triggering strategies. You can first call /AiHubMixAPI explicitly, or describe the task more directly with keywords such as “AIHubMix”, “model”, “Base URL”, “API Key”, or “error code”.
A Model Appears in the Public List, but My Key Cannot Call It
The public model list only means the model exists on the platform. It does not guarantee that the current account has permission or balance to call it. Use aihubmix models list or candidates --mine to check the account’s real callable range, then use doctor --model <model-id> for a real verification.
When Do I Need the aihubmix CLI
You do not need it for public information. You need to install and log in to the CLI for account-related capabilities such as balance, Key management, callable models, and --mine filtering.
Will the API Key Be Exposed
The Skill script redacts secrets. Still, avoid writing real Keys into repository files, issues, PR descriptions, or chat logs. Use environment variables for local debugging.