Language
Inference Space Docs

Regions and Network Routes

How to pick a region (China / Global) and, within it, the right route domain — cn.inf.space, global.inf.space, or ai.inf.space.

Onboarding involves two independent choices:

  1. Pick a region — where your account lives. The region determines your console, account, balance, and API keys. The two regions are fully independent and do not share credentials.
  2. Pick a route — which domain your code calls. A route is just a network path to the same region, so you can switch routes at any time without affecting your account or billing.

Step 1: Pick a region

RegionConsoleBest for
Chinahttps://cn.inf.spaceTeams based in mainland China
Globalhttps://ai.inf.spaceTeams based outside mainland China

Consoles, accounts, balances, and API keys are entirely separate between the two regions. A gk_ key issued in the China region returns 401 on the Global region and vice versa. Open an account in one region — do not open one in each and call across.

Step 2: Pick a route

RegionRouteConsole and API baseWhen to use it
ChinaChina-accelerated (default)https://cn.inf.spaceCallers in mainland China that also download generated images / video there
ChinaInternationalhttps://global.inf.spaceChina-region accounts whose servers are in Europe, the Americas, or APAC
GlobalInternationalhttps://ai.inf.spaceEverything on a Global-region account

Both China-region routes reach the same service: same model catalog, same key, same balance and invoices. Switching domains requires no other change. Only the network path differs:

  • cn.inf.space is the China-accelerated route. Large responses — image and video generation, and pulling finished files afterwards — are more stable on it from inside mainland China.
  • global.inf.space is the international route. It is faster when your servers are outside mainland China, and is not the right default for mainland clients.

When in doubt, take the default: https://cn.inf.space in the China region, https://ai.inf.space in the Global region. You can change it later at any time.

Console and API share one domain

Each route domain serves both the browser console and the API. Sign in, create keys, check usage and top up on the same host your SDK calls — https://cn.inf.space or https://global.inf.space in the China region, https://ai.inf.space in the Global region.

Common SDK configuration

import OpenAI from "openai";

// Global region (default below)
// China region, accelerated route: https://cn.inf.space/v1
// China region, international route: https://global.inf.space/v1
const client = new OpenAI({
  baseURL: "https://ai.inf.space/v1",
  apiKey: process.env.INFERENCE_SPACE_API_KEY,
});
import Anthropic from "@anthropic-ai/sdk";

// Global region (default below)
// China region, accelerated route: https://cn.inf.space
// China region, international route: https://global.inf.space
const client = new Anthropic({
  baseURL: "https://ai.inf.space",
  authToken: process.env.INFERENCE_SPACE_API_KEY,
});
# Global region (default below)
# China region, accelerated route: https://cn.inf.space
# China region, international route: https://global.inf.space
curl "https://ai.inf.space/v1/chat/completions" \
  -H "Authorization: Bearer $INFERENCE_SPACE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-sol","messages":[{"role":"user","content":"Hello"}]}'

Endpoint reference

Replace {BASE} with the domain of the route you picked. Paths are identical on all three routes.

CapabilityEndpoint
OpenAI Chat CompletionsPOST {BASE}/v1/chat/completions
OpenAI ResponsesPOST {BASE}/v1/responses
Anthropic MessagesPOST {BASE}/v1/messages
Image generationPOST {BASE}/v1/images/generations
Image editsPOST {BASE}/v1/images/edits
Async jobsPOST {BASE}/api/jobs
Speech to textPOST {BASE}/v1/audio/transcriptions
Text to speechPOST {BASE}/v1/audio/speech
OCRPOST {BASE}/v1/recognize
Vision segmentationPOST {BASE}/v1/vision-segment/predictions
Price lookupGET {BASE}/v1/pricing/lookup

{BASE} is one of https://ai.inf.space (Global region), https://cn.inf.space or https://global.inf.space (China region).

Switching routes for CLI tools

The one-line installers for Codex CLI and Claude Code write the China-accelerated route by default. Pass --route to change it:

# China region, international route
curl -fsSL https://docs.inf.space/install/codex.sh | bash -s -- --key gk_YOUR_KEY --route cn-global

# Global region
curl -fsSL https://docs.inf.space/install/claude.sh | bash -s -- --key gk_YOUR_KEY --route global

--route accepts cn-accel (default), cn-global, and global. The Windows PowerShell scripts use -Route with the same values.

FAQ

  • Does switching routes require code changes? Only the base URL.
  • Does switching routes affect billing? No. Within a region all routes share one balance, usage record, and invoice stream.
  • The same key returns 401 on one route. That key belongs to the other region. Check whether it was created on cn.inf.space or ai.inf.space.
  • Can I use two routes at once? Yes. Within a region they are not exclusive — for example, run China-based services on cn.inf.space and overseas services on global.inf.space with the same key.

On this page