Why HTTP 403 unsupported_country_region_territory happens
If your server, CI runner, VPS, or local workstation sits in an unsupported or flagged IP range, direct calls to api.openai.com or api.anthropic.com immediately fail with HTTP 403 (unsupported_country_region_territory or Request not allowed). Changing API keys or reinstalling the SDK will not fix it because the block happens at the edge IP and account billing layer.
Switching to a compliant multi-model gateway like Modelseed removes the geo-block cleanly at the API endpoint level — no brittle OS-wide VPNs, no rotating proxies breaking TLS, and no lost tool-calling streams.
| HTTP Status | Typical Cause | Immediate Fix on Modelseed |
|---|---|---|
| 403 unsupported_country_region_territory | Direct OpenAI / Anthropic geo-IP restriction | Switch base_url to https://api.modelseed.dev/v1 (or /v1/messages for Claude) |
| 401 invalid_api_key | Missing Bearer prefix, revoked key, or old vendor key left in env | Mint a fresh key in Modelseed Console and test GET /v1/models |
| 402 insufficient_balance | Key spend cap reached or wallet balance empty | Check key quota cap or top up via Binance Pay (0.50+ USDT) / USDT / Lava |
| 404 model_not_found | Double /v1/v1 path or non-catalog model alias | Remove extra /v1 for Anthropic SDK; copy exact ID from /v1/models |
Fix Python, Node.js, Claude Code, and Codex in 2 minutes
Keep your existing OpenAI or Anthropic SDK code intact — only update the base URL, key, and catalog model ID.
# 1. OpenAI SDK / Codex / n8n / Cline
export OPENAI_BASE_URL="https://api.modelseed.dev/v1"
export OPENAI_API_KEY="sk-your-modelseed-key"
# 2. Anthropic SDK / Claude Code (no /v1 suffix)
export ANTHROPIC_BASE_URL="https://api.modelseed.dev"
export ANTHROPIC_AUTH_TOKEN="sk-your-modelseed-key"
# 3. Confirm 200 OK without spending credits
curl --fail-with-body https://api.modelseed.dev/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY"Verify before updating production containers
Sign up for free (no credit card required), verify that GET /v1/models returns HTTP 200 from your exact VPS or CI runner IP, and run one real chat completion using your $1–$2 welcome bonus.
Frequently asked questions
Does Modelseed require a VPN on my VPS or local machine?
No. Standard HTTPS connections to https://api.modelseed.dev work directly from your server, Docker container, or workstation without routing traffic through a VPN.
I switched the Base URL but still get 403 from my shell — why?
Check for lingering environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, or HTTP_PROXY) in ~/.bashrc, ~/.zshrc, or IDE settings that override your new Modelseed endpoint.
Can I call both GPT-6.2 and Claude Opus 5.5 from the same account after switching?
Yes. One Modelseed balance funds GPT-6.2, Claude Opus 5.5 / Kiro, DeepSeek V4.1 Flash, Qwen 4 Max, GLM 5.3, Seedream 5.0 Pro, and Seedance 2.5.
What if I hit HTTP 429 rate limit during burst traffic?
Check your plan concurrency limit (Pro = 2, Max = 3, Ultra = 5) or pay-as-you-go retries with exponential backoff; see our full API error reference for details.