Use Claude Code with a mainland-reachable API base URL
Point Claude Code at https://modelfold.ai/anthropic with a ModelFold API key as ANTHROPIC_AUTH_TOKEN; Claude Code appends /v1/messages itself, this page is not a VPN, and reachability from mainland China depends on the network.
Claude Code reads the base URL, credential and model from environment variables. Set all four model variables to IDs returned by the authenticated model list, including Haiku, or background tasks may request a name this API does not serve. Prices below are ModelFold public token rates for the linked catalog pages.
Official sources checked:
Price snapshot updated:
Related guides
- Cheapest Claude API? Compare actual token prices
- Cheapest GPT API? GPT token pricing compared
- Calling GPT-6.1, Claude and Gemini APIs from mainland China
- Video generation APIs compared: Kling, Seedance and Veo
- Use Claude Code with a mainland-reachable API base URL
- Point Codex CLI at a third-party API
- Cheaper Cursor setup with your own API key
- Kling, Veo and Seedance API prices on ModelFold
- Nano Banana and GPT Image API prices
- Call the Gemini API from mainland China
- DeepSeek vs Claude: coding API price on ModelFold
- AI API pay as you go versus a subscription
- Call every listed model with one API key
Current public prices
Pay as you go with prepaid credits. 200 credits = US$1. Credit charges round up to two decimal places; this is not USD rounding. Failed generations are not charged; a temporary hold may be released after failure. Review the final quote before submitting. Token rates are per one million tokens, input / output; video prices are starting prices for the listed configuration.
| Model | ModelFold USD | Official USD | Unit / configuration |
|---|---|---|---|
| Claude Haiku 5.5 | 0.072 in / 0.36 out | $0.1 / $0.5 (≤100,000 input tokens) | per 1M tokens |
| Claude Sonnet 5.5 | 0.96 in / 4.80 out | $2 / $10 | per 1M tokens |
| Claude Opus 5.5 | 1.92 in / 9.60 out | $4 / $20 | per 1M tokens |
| Claude Haiku 4.5 | 0.33 in / 1.71 out | Not independently verified | per 1M tokens |
| Claude Sonnet 4.6 | 1.02 in / 5.13 out | Not independently verified | per 1M tokens |
| Claude Opus 4.8 | 2.40 in / 12.00 out | Not independently verified | per 1M tokens |
API examples
curl https://modelfold.ai/v1/models -H "Authorization: Bearer $MODELFOLD_API_KEY"export ANTHROPIC_BASE_URL=https://modelfold.ai/anthropic
export ANTHROPIC_AUTH_TOKEN=$MODELFOLD_API_KEY
export ANTHROPIC_MODEL=claude-sonnet-5-5
export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5-5
export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-5-5curl https://modelfold.ai/anthropic/v1/models \
-H "Authorization: Bearer $MODELFOLD_API_KEY"Examples are illustrative and were not sent to a paid model. Install the OpenAI Python SDK separately. Video and image requests follow each model page for required parameters; video jobs are asynchronous.
Frequently asked questions
Direct answer
Point Claude Code at https://modelfold.ai/anthropic with a ModelFold API key as ANTHROPIC_AUTH_TOKEN; Claude Code appends /v1/messages itself, this page is not a VPN, and reachability from mainland China depends on the network.
Does this mean I do not need a VPN inside Claude Code?
You do not put a proxy address in Claude Code. Requests go to modelfold.ai. Whether a given mainland network can open that host is not guaranteed, and this product is not a VPN.
Can I skip the Haiku variable?
No. Background tasks may still request the Haiku tier. Set ANTHROPIC_MODEL and the Sonnet, Opus and Haiku variables to IDs from GET /anthropic/v1/models.
Do I also need a Claude subscription?
This route uses a ModelFold API key and prepaid credits. It does not use a Claude subscription token, and it does not include features that exist only inside a Claude subscription.
Is ModelFold always the cheapest?
No. Compare the same model, context, cache mode and input/output mix. Final quotes and actual usage determine the charge.
Are failed generations charged?
Failed generations are not charged. A temporary reservation is not a final charge; check account logs for settlement.
Where do I find the correct model ID?
Use GET /v1/models and the linked model documentation. A website page slug is not always the API model ID.
