Quickstart
Choose your development tool or SDK and integrate in minutes.
Use Codex Desktop
Run the setup command, restart the app, and get started.
Use Codex CLI
Configure with one command and continue working in the terminal.
Use Claude Code
Install Claude Code and start it in your project directory.
API/SDK calls
Integrate your application with the OpenAI or Anthropic SDK.
Quick integration with CC Switch
Prepare an API key
Open https://ai.inf.space and create a key on the API key management page. Keys start with gk_ and are shown in full only once, so save the key immediately. Do not screenshot, share, or commit it to a repository. If you suspect a leak, revoke it in the console and generate a new key immediately.
Use Codex Desktop
Codex Desktop supports macOS and Windows only. On Linux, use Codex CLI in the next section.
- Follow the official Codex Desktop installation guide, or download the appropriate installer directly:
- Open Codex Desktop, replace
gk_YOUR_KEYwith the key you just created, and run the setup command below:
curl -fsSL https://tos.run/install/codex.sh | bash -s -- --key gk_YOUR_KEYiwr https://tos.run/install/codex.ps1 -OutFile setup-codex.ps1
.\setup-codex.ps1 -Key gk_YOUR_KEYWhen finished, restart Codex Desktop, then open or create a workspace to start chatting and coding.
Use Codex CLI
If Codex CLI is not installed, first install Node.js from the official download page and verify that these commands are available:
node --version
npm --versionThen run:
npm install -g @openai/codexThen replace gk_YOUR_KEY with the key you just created:
curl -fsSL https://tos.run/install/codex.sh | bash -s -- --key gk_YOUR_KEYiwr https://tos.run/install/codex.ps1 -OutFile setup-codex.ps1
.\setup-codex.ps1 -Key gk_YOUR_KEYReopen the terminal and run this in your project directory:
codexUse Claude Code
If Claude Code is not installed, first install Node.js from the official download page and verify that these commands are available:
node --version
npm --versionThen run:
npm install -g @anthropic-ai/claude-codeThen replace gk_YOUR_KEY with the key you just created:
curl -fsSL https://tos.run/install/claude.sh | bash -s -- --key gk_YOUR_KEYiwr https://tos.run/install/claude.ps1 -OutFile setup-claude.ps1
.\setup-claude.ps1 -Key gk_YOUR_KEYReopen the terminal and run this in your project directory:
claudeQuick integration with CC Switch
- Install and open CC Switch from the CC Switch website or the latest release.
- Select Codex or Claude Code, click
+to add a connection, then selectCustom. - Enter the
Endpoint,API Key, andModel:
Endpoint:https://ai.inf.space/v1API Key: yourgk_keyModel:gpt-5.6-sol
Endpoint:https://ai.inf.spaceAPI Key: yourgk_keyModel:claude-sonnet-4-6
- Save and enable the connection, then verify it with the selected tool:
Codex: restart the terminal and run:
codexClaude Code: run directly:
claudeAPI/SDK calls
Store the key in an environment variable on the server:
export TOS_API_KEY="gk_YOUR_KEY"import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://ai.inf.space/v1",
apiKey: process.env.TOS_API_KEY,
});
const response = await client.responses.create({
model: "gpt-5.6-sol",
input: "Introduce yourself in one sentence.",
});
console.log(response.output_text);import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://ai.inf.space",
authToken: process.env.TOS_API_KEY,
});
const message = await client.messages.create({
model: "claude-sonnet-4-6",
max_tokens: 1024,
messages: [{ role: "user", content: "Introduce yourself in one sentence." }],
});
console.log(message.content);In production, store API keys only on the server. Do not put them in browser code or commit them to a repository.
Inference Space Overview
Inference Space positioning, unified API capabilities (LLM / images / audio / OCR / vision segmentation), and the control-plane / data-plane split.
Network Routes and Endpoints
How to choose the Inference Space mainland China and international routes, console, and SDK Base URLs.