Quick Start
Authentication
All ApiHub requests use Bearer token authentication. The field name differs by tool, but the mechanism is the same.
Last updated: 2026-08-03
1
HTTP request header
When calling the API directly, add this header to every request.
HTTP Header
Authorization: Bearer your-apihub-key2
Claude Code / Anthropic tools
Pass the key via the ANTHROPIC_AUTH_TOKEN environment variable, paired with ANTHROPIC_BASE_URL.
Environment variables
export ANTHROPIC_AUTH_TOKEN="your-apihub-key"
export ANTHROPIC_BASE_URL="https://www.apihub.ink"3
Codex / OpenAI tools
Pass the key through the OPENAI_API_KEY environment variable instead of storing credentials in a committable config file.
Windows PowerShell
[Environment]::SetEnvironmentVariable("OPENAI_API_KEY", "your-apihub-key", "User")macOS / Linux
export OPENAI_API_KEY="your-apihub-key"Common Errors
- Missing the `Bearer` prefix, or copying the placeholder `your-apihub-key` literally.