
AIHubMix is a unified AI model gateway providing 500+ models from OpenAI, Anthropic, Google, and leading open-source providers behind one API key, with four wire protocols (OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, Google Gemini). Officially authorized model reseller, deployed on Google Cloud (US).
https://aihubmix.com and swap the API key.model to auto and the gateway picks the best model based on cost, quality, or latency strategies.playground.aihubmix.com.llms.txt, agents.md), AIHubMix Skills, MCP server, and deep links for Claude Code, Codex, Cursor.OpenCode is an AI coding agent built for the terminal. AIHubMix is a first-class provider for OpenCode.
npm install -g opencode-ai or curl -fsSL https://opencode.ai/install | bashopencode auth loginopencode then type /models and search for aihubmixEdit ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"aihubmix": {
"models": {
"gpt-5": { "name": "GPT-5", "contextLength": 128000, "type": "language" },
"claude-sonnet-4-5": { "name": "Claude Sonnet 4.5", "contextLength": 200000, "type": "language" },
"deepseek-v4-pro": { "name": "DeepSeek-V4-Pro", "contextLength": 131072, "type": "language" }
}
}
}
}Add options.baseURL under the aihubmix provider for custom gateways or proxies:
{
"provider": {
"aihubmix": {
"options": { "baseURL": "https://api.inferera.com" }
}
}
}Only specify the domain level — /v1 paths are appended automatically.
coding-minimax-m2.1-free — Free coding modelcoding-glm-4.7-free — Free coding modelclaude-sonnet-4-5 — Best for complex coding tasksgpt-5 — General purposegpt-5-codex — Optimized for code generationClaude Code uses the Anthropic Messages protocol. Configure with environment variables:
echo 'export ANTHROPIC_BASE_URL="https://aihubmix.com"' >> ~/.zshrc
echo 'export ANTHROPIC_AUTH_TOKEN="sk-your-key"' >> ~/.zshrc
echo 'export ANTHROPIC_MODEL="claude-sonnet-4-5"' >> ~/.zshrc
source ~/.zshrc[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-your-key", [EnvironmentVariableTarget]::User)
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://aihubmix.com", [EnvironmentVariableTarget]::User)
[Environment]::SetEnvironmentVariable("ANTHROPIC_MODEL", "claude-sonnet-4-5", [EnvironmentVariableTarget]::User)claude -p "1+1, output only the answer" --model claude-sonnet-4-5If it returns 2, Claude Code is configured successfully.
OMO (Oh My OpenAgent) is a powerful agent framework extending OpenCode and Codex CLI with 11 discipline agents, 54+ lifecycle hooks, and built-in MCPs.
bunx oh-my-openagent install# Install OMO Light for Codex CLI
npx lazycodex-ai install
# Configure Codex CLI to use AIHubMix
export OPENAI_API_KEY="sk-your-key"
export OPENAI_BASE_URL="https://aihubmix.com/v1"
# Start Codex with OMO
codex# Install OMO standalone
npm i -g omo-ai@beta
# Configure
export OPENAI_API_KEY="sk-your-key"
export OPENAI_BASE_URL="https://aihubmix.com/v1"
# Run OMO
omoexport OPENAI_API_KEY="sk-your-key"
export OPENAI_BASE_URL="https://aihubmix.com/v1"
codexhttps://aihubmix.com/v1| Protocol | Endpoint | Auth Header |
|---|---|---|
| OpenAI Chat Completions | POST /v1/chat/completions | Authorization: Bearer key |
| OpenAI Responses | POST /v1/responses | Authorization: Bearer key |
| Anthropic Messages | POST /v1/messages | x-api-key: key + anthropic-version: 2023-06-01 |
| Google Gemini | POST /gemini/v1beta/models/{model}:generateContent | x-goog-api-key: key |