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.
Geprüfte offizielle Quellen:
Preisstand aktualisiert:
Verwandte Leitfäden
- Die günstigste Claude-API? Tatsächliche Tokenpreise im Vergleich
- Die günstigste GPT-API? GPT-Tokenpreise im Vergleich
- GPT-6.1-, Claude- und Gemini-APIs aus Festlandchina aufrufen
- APIs zur Videogenerierung im Vergleich: Kling, Seedance und 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
Aktuelle öffentliche Preise
Bezahlung nach Verbrauch mit Prepaid-Credits. 200 Credits = 1 US-$. Credit-Beträge werden auf zwei Nachkommastellen aufgerundet; das ist keine USD-Rundung. Fehlgeschlagene Generierungen werden nicht berechnet; eine vorübergehende Reservierung kann nach dem Fehler freigegeben werden. Prüfen Sie vor dem Absenden den endgültigen Preis. Tokenpreise gelten pro einer Million Token, Eingabe / Ausgabe; Videopreise sind Einstiegspreise für die angegebene Konfiguration.
| Modell | ModelFold USD | Offiziell (USD) | Einheit / Konfiguration |
|---|---|---|---|
| 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 | Nicht unabhängig verifiziert | per 1M tokens |
| Claude Sonnet 4.6 | 1.02 in / 5.13 out | Nicht unabhängig verifiziert | per 1M tokens |
| Claude Opus 4.8 | 2.40 in / 12.00 out | Nicht unabhängig verifiziert | per 1M tokens |
API-Beispiele
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"Die Beispiele dienen der Veranschaulichung und wurden nicht an ein kostenpflichtiges Modell gesendet. Installieren Sie das OpenAI Python SDK separat. Für Video- und Bildanfragen gelten die Pflichtparameter der jeweiligen Modellseite; Videoaufträge laufen asynchron.
Häufig gestellte Fragen
Direkte Antwort
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.
Ist ModelFold immer am günstigsten?
Nein. Vergleichen Sie dasselbe Modell, denselben Kontext, denselben Cache-Modus und dasselbe Verhältnis von Ein- zu Ausgabe. Maßgeblich für die Kosten sind der endgültige Preis und die tatsächliche Nutzung.
Werden fehlgeschlagene Generierungen berechnet?
Fehlgeschlagene Generierungen werden nicht berechnet. Eine vorübergehende Reservierung ist keine endgültige Belastung; die Abrechnung sehen Sie in den Kontoprotokollen.
Wo finde ich die richtige Modell-ID?
Nutzen Sie GET /v1/models und die verlinkte Modelldokumentation. Der Pfad einer Webseite ist nicht immer die API-Modell-ID.
