AI HUB Docs
English
Console →
Guides

Use AI HUB in Codex

Codex works with any OpenAI-compatible provider. When AI HUB is added as a model provider in its config, Codex routes calls through the AI HUB wallet.

Add the provider

In ~/.codex/config.toml, register AI HUB and point a profile at it. The wire_api = "chat" line tells Codex to use the chat-completions endpoint, which AI HUB serves.

config.toml
[model_providers.aihub]
name = "AI HUB"
base_url = "https://console.aimodelhub.ai/v1"
env_key = "AIHUB_API_KEY"
wire_api = "chat"

[profiles.aihub]
model = "anthropic-claude-sonnet-4-6"
model_provider = "aihub"

Run it

Shell
export AIHUB_API_KEY=sk-hub-...
codex --profile aihub

Set model to any published slug from the Models list.