Documentation Index
Fetch the complete documentation index at: https://docs.gravitex.ai/llms.txt
Use this file to discover all available pages before exploring further.
1. Overview
Claude Code is Anthropicโs official terminal AI coding client. Through GravitexAI (Anthropic-compatible API) you get:Multi-vendor access
Use the full Claude family, Kimi K2, GPT and more behind one endpoint
Dual-thread model
Heavy tasks on the main thread, lightweight ones on the haiku thread
No subscription
Pay per token โ no Claude Pro required
Stable globally
Distributed nodes with automatic failover
2. Install Node.js (skip if installed)
Make sure Node.js is โฅ 18.0.- Windows
- macOS
- Ubuntu / Debian
Uninstall other proxy clients (optional)
If you previously installed another forked@anthropic-ai/claude-code, clean it up first:
3. Install Claude Code
4. Get your GravitexAI key
Sign in
Go to the GravitexAI console.
Create a key
Open API Keys โ create a new token.
5. Configure Environment Variables
5.1 Basic example (single model)
- Mac / Linux
- Windows CMD
- Windows PowerShell
5.2 Dual-thread architecture
By default Claude Code uses a dual-thread model architecture that saves cost:| Thread | Env var | Purpose |
|---|---|---|
| Main | ANTHROPIC_MODEL | Primary codegen, conversation, complex tasks |
| Haiku | ANTHROPIC_DEFAULT_HAIKU_MODEL | File watching, linter checks, completion, background jobs |
5.3 Recommended config (dual model)
- Mac / Linux
- Windows CMD
- Windows PowerShell
5.4 Single model (optional)
If you only want one model, there are two options: Option A โ set both env vars to the same modelANTHROPIC_DEFAULT_HAIKU_MODEL.
6. Recommended Combinations (via GravitexAI)
| Scenario | Main (ANTHROPIC_MODEL) | Haiku (ANTHROPIC_DEFAULT_HAIKU_MODEL) |
|---|---|---|
| Production (top) | claude-opus-4-7 | claude-haiku-4-5-20251001 |
| Daily dev (recommended) | claude-sonnet-4-6 | claude-haiku-4-5-20251001 |
| Cost-optimized | kimi-k2-250905 | claude-haiku-4-5-20251001 |
| Long context | claude-sonnet-4-5-20250929 (200K) | claude-haiku-4-5-20251001 |
| Quick smoke-test | claude-haiku-4-5-20251001 | claude-haiku-4-5-20251001 |
7. FAQ
401 / invalid API key
401 / invalid API key
- Check
ANTHROPIC_AUTH_TOKENfor stray whitespace or newlines. - Confirm the key is active in the GravitexAI console.
- Ensure your balance is positive.
404 / wrong endpoint
404 / wrong endpoint
For Claude Code, do not append
/v1 to ANTHROPIC_BASE_URL. Use https://api.gravitex.ai (Anthropic protocol differs from OpenAI).How to switch models inside Claude Code?
How to switch models inside Claude Code?
In the interactive UI:Or exit, change env vars, and re-launch.
`model not found` error
`model not found` error
Use the full ID from the GravitexAI model list, e.g.:
- โ
claude-sonnet-4-5-20250929 - โ
claude-sonnet-4-5
How to reduce token cost?
How to reduce token cost?
- Prefer the dual-model setup with Haiku as the background thread.
- Use
--max-turnsand similar flags to cap conversation length. - Maintain project memory under
.claude/to avoid repeating context. - Use
/clearto drop stale context.
Team-wide config?
Team-wide config?
Put env vars into a project
.env, your shell profile, or direnv. Each engineer only swaps in their own ANTHROPIC_AUTH_TOKEN.8. References
- Claude Code official docs: https://docs.anthropic.com/en/docs/claude-code
- GravitexAI console: https://maas.gravitex.ai
- Model catalog: https://maas.gravitex.ai/#/models
- API keys: https://maas.gravitex.ai/#/keys