Claude Code and Codex¶
Both tools let you change the API endpoint. Pointing them at RevidAPI works immediately — billed in VND, no vendor account required.
Fastest path¶
Open these URLs in a browser, replacing sk_... with your key:
https://revidapi.com/v1/setup-claudecode?key=sk_YOUR_KEY
https://revidapi.com/v1/setup-codex?key=sk_YOUR_KEY
They return ready-made setup commands for your platform.
Claude Code — manual¶
export ANTHROPIC_BASE_URL="https://revidapi.com"
export ANTHROPIC_AUTH_TOKEN="sk_YOUR_KEY"
claude
Add those lines to ~/.zshrc or ~/.bashrc to make it permanent.
Pick a model with /model inside Claude Code, or:
export ANTHROPIC_MODEL="claude-sonnet-5"
Codex CLI — manual¶
Edit ~/.codex/config.toml:
model_provider = "revidapi"
model = "gpt-6-astra"
[model_providers.revidapi]
name = "RevidAPI"
base_url = "https://revidapi.com/v1"
wire_api = "responses"
env_key = "REVIDAPI_KEY"
Then:
export REVIDAPI_KEY="sk_YOUR_KEY"
codex
wire_api = "responses" is required. Routing Codex through Chat Completions
drops tool calls, and Codex loses the ability to read files in your project.
Cost¶
Long sessions carry very large input because the whole context is resent each turn. Two things cut the bill most:
- Use
/compactonce the conversation is long. - Pick a model that is merely sufficient.
claude-sonnet-5is about 40% cheaper thanclaude-opus-5on both input and output, and handles most code edits.
See Saving with cache.