Quickstart
1. Create or copy your API key
Open Dashboard > API Keys and copy your codexkey key:
sk_cdx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2. Make your first Anthropic-format request
bash
curl https://api.claudexia.tech/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: sk_cdx_YOUR_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-5",
"max_tokens": 512,
"messages": [
{"role": "user", "content": "Say hello from codexkey."}
]
}'3. Or use the OpenAI-compatible format
bash
curl https://api.claudexia.tech/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_cdx_YOUR_KEY" \
-d '{
"model": "claude-sonnet-5",
"messages": [
{"role": "user", "content": "Say hello from codexkey."}
]
}'4. Cursor setup
In Cursor, choose the OpenAI-compatible connection and use:
- OpenAI Base URL:
https://api.claudexia.tech/v1 - OpenAI API Key: your codexkey key from the dashboard
Important: using your own API in Cursor needs a paid Pro plan or higher. The 7-day Pro trial does not work with custom endpoints.
5. Claude Code setup
Claude Code should use:
ANTHROPIC_BASE_URL=https://api.claudexia.techANTHROPIC_API_KEY=sk_cdx_YOUR_KEY
Important: in Claude Code the base URL has no /v1.
Linux/macOS:
bash
export ANTHROPIC_BASE_URL="https://api.claudexia.tech"
export ANTHROPIC_API_KEY="sk_cdx_YOUR_KEY"
claudeWindows PowerShell:
powershell
$env:ANTHROPIC_BASE_URL = "https://api.claudexia.tech"
$env:ANTHROPIC_API_KEY = "sk_cdx_YOUR_KEY"
claude6. List models
bash
curl https://api.claudexia.tech/v1/models7. Billing basics
codexkey bills by usage:
- You pay per 1M tokens for each model
- Current rates are available at
https://api.claudexia.tech/v1/models/info
Next steps
- The IDE integration section gives an overview of the setup
- Detailed instructions are on the Claude Code, VS Code and other extensions, and OpenCode pages
- SSE examples are in the Streaming section
- Per-model rates are in the Pricing section