Language
Inference Space Docs

Quickstart

Choose your development tool or SDK and integrate in minutes.

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.

  1. Follow the official Codex Desktop installation guide, or download the appropriate installer directly:
  2. Open Codex Desktop, replace gk_YOUR_KEY with the key you just created, and run the setup command below:
curl -fsSL https://tos.run/install/codex.sh | bash -s -- --key gk_YOUR_KEY
iwr https://tos.run/install/codex.ps1 -OutFile setup-codex.ps1
.\setup-codex.ps1 -Key gk_YOUR_KEY

When 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 --version

Then run:

npm install -g @openai/codex

Then replace gk_YOUR_KEY with the key you just created:

curl -fsSL https://tos.run/install/codex.sh | bash -s -- --key gk_YOUR_KEY
iwr https://tos.run/install/codex.ps1 -OutFile setup-codex.ps1
.\setup-codex.ps1 -Key gk_YOUR_KEY

Reopen the terminal and run this in your project directory:

codex

Use 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 --version

Then run:

npm install -g @anthropic-ai/claude-code

Then replace gk_YOUR_KEY with the key you just created:

curl -fsSL https://tos.run/install/claude.sh | bash -s -- --key gk_YOUR_KEY
iwr https://tos.run/install/claude.ps1 -OutFile setup-claude.ps1
.\setup-claude.ps1 -Key gk_YOUR_KEY

Reopen the terminal and run this in your project directory:

claude

Quick integration with CC Switch

  1. Install and open CC Switch from the CC Switch website or the latest release.
  2. Select Codex or Claude Code, click + to add a connection, then select Custom.
  3. Enter the Endpoint, API Key, and Model:
  • Endpoint: https://ai.inf.space/v1
  • API Key: your gk_ key
  • Model: gpt-5.6-sol
  • Endpoint: https://ai.inf.space
  • API Key: your gk_ key
  • Model: claude-sonnet-4-6
  1. Save and enable the connection, then verify it with the selected tool:

Codex: restart the terminal and run:

codex

Claude Code: run directly:

claude

API/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.

On this page