Quick Start
Get API Key
Your API Key is the credential you use to call the ApiHub API, configure Claude Code, Codex, desktop clients, and other integration tools.
Last updated: 2026-08-03
Never commit your API Key to a public repository or expose it in client-side code. If a key is leaked, delete it immediately and create a new one.
1
Sign in to the Dashboard
If not signed in, you will be redirected to the login page. Sign in with email or GitHub OAuth.
2
Create an API Key
Click "Create" on the API Keys page and add a label to identify this key.
3
Copy and Save the Key
Copy the full key after creation. You can also return to the API Keys list and use the copy button to copy the full key again.
Treat the key as a sensitive credential and store it in an environment variable or password manager.
.env.local
# Claude Code / Anthropic-compatible tools
ANTHROPIC_AUTH_TOKEN=your-apihub-key
ANTHROPIC_BASE_URL=https://www.apihub.ink
# Codex / OpenAI-compatible tools
OPENAI_API_KEY=your-apihub-key
OPENAI_BASE_URL=https://www.apihub.ink/v1Verification
- You copied the full key, not a partial fragment.
- The key is saved in an environment variable or password manager, not in your codebase.
Common Errors
- Copying a truncated key causes 401 Unauthorized on every request.
- Pushing the key to a public repository leads to immediate abuse.