Skip to main content
VS Code is one of the most popular code editors. You can install the Claude Code or Codex extension to use AIOHub AI models directly in the editor for code completion, chat, and refactoring.

Prerequisites

Extension overview

The two extensions use different protocols and configurations. They do not conflict and can be installed side by side:
Claude Code and Codex in the VS Code extension marketplace
ExtensionProtocolBase URL
Claude CodeClaude Messageshttps://api.aiohub.org
CodexOpenAI Responseshttps://api.aiohub.org/v1
Your API key must be associated with the correct group, otherwise models will be unavailable or authentication will fail. Choose the appropriate group when creating your key.

Claude Code extension

Claude Code is Anthropic’s official VS Code extension, providing AI chat, code editing, and terminal capabilities.
1

Install the extension

Search for Claude Code in the VS Code extension marketplace, or run:
code --install-extension anthropics.claude-code
2

Configure environment variables

The Claude Code extension uses the same environment variables as the Claude Code CLI. Add to ~/.zshrc or ~/.bashrc:
export ANTHROPIC_BASE_URL="https://api.aiohub.org"
export ANTHROPIC_AUTH_TOKEN="sk-your-api-key"
Configuring Claude Code environment variables
Run source ~/.bashrc (or source ~/.zshrc), then restart VS Code.
ANTHROPIC_BASE_URL must not include /v1. Claude Code appends /v1/messages automatically.
On Windows, add system environment variables:
VariableValue
ANTHROPIC_BASE_URLhttps://api.aiohub.org
ANTHROPIC_AUTH_TOKENsk-your-api-key
You can also set terminal environment variables in VS Code settings.json:
{
  "terminal.integrated.env.osx": {
    "ANTHROPIC_BASE_URL": "https://api.aiohub.org",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-api-key"
  },
  "terminal.integrated.env.linux": {
    "ANTHROPIC_BASE_URL": "https://api.aiohub.org",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-api-key"
  },
  "terminal.integrated.env.windows": {
    "ANTHROPIC_BASE_URL": "https://api.aiohub.org",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-api-key"
  }
}
3

Choose a group

Your API key’s group determines which models are available and at what price. Recommended groups for Claude Code:
GroupNotes
claude-bedrockStable, supports prompt caching, higher price
claude-kiroLower price, occasional downtime, no cache support
anthropicStandard Anthropic route
See Groups for details.
4

Verify the connection

Open VS Code and send a message in the Claude Code panel. A normal response confirms the setup works:
Claude Code chat working

Codex extension

Codex is OpenAI’s official VS Code extension for AI-assisted programming.
1

Install the extension

Search for Codex in the VS Code extension marketplace, or run:
code --install-extension openai.codex
2

Create the config file

The Codex extension reads from the same ~/.codex/config.toml as the CLI. If you already followed the Codex CLI setup, the extension picks it up automatically and you can skip this step.If not yet configured, create ~/.codex/config.toml:
model_provider = "aiohub"
model = "gpt-5.3-codex"

[model_providers.aiohub]
name = "AIOHub"
base_url = "https://api.aiohub.org/v1"
env_key = "AIOHUB_API_KEY"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = false
Codex config file
3

Set the environment variable

Add the API key to ~/.bashrc or ~/.zshrc:
export AIOHUB_API_KEY="sk-your-api-key"
Configuring Codex environment variable
base_url must include /v1. Codex uses the OpenAI Responses API, which differs from Claude Code’s endpoint.
4

Choose a group

Your API key’s group determines which models are available and at what price. Recommended groups for Codex:
GroupNotes
codexGateway relay, compatibility-first
codex-passthroughDirect pass-through, low latency
See Groups for details.
5

Verify the connection

Restart VS Code and send a message in the Codex panel. A normal response confirms the setup works:
Codex chat working

FAQ

Confirm VS Code version ≥ 1.90. Some extensions require a recent VS Code version. Restart VS Code and try again.
Confirm ANTHROPIC_AUTH_TOKEN is set and VS Code can read it. Run echo $ANTHROPIC_AUTH_TOKEN in the VS Code integrated terminal to verify.
Check that base_url in ~/.codex/config.toml is https://api.aiohub.org/v1 and the AIOHUB_API_KEY environment variable exists.
Yes. Claude Code and Codex use different protocols and configurations. They do not conflict and you can switch between them as needed.
Check your balance at wallet management. See Add funds.

Other editor extensions

If your editor extension supports a custom OpenAI Base URL (e.g., Continue, Cline), see OpenAI-compatible apps.