Quickstart
The Inference Company serves open models through the OpenAI and Anthropic APIs. Create an API key in the console, point your client at https://api.theinferencecompany.si/v1, and set the model to one of ours, such as glm-5.3. Your existing code, tools and streaming keep working.
1. Get an API key
- Sign in to the console at api.theinferencecompany.si with Google or GitHub, and create your team. It starts with $2 of credit.
- Try the models side by side on your own prompts in the playground, with their names hidden until you pick the best reply.
- Create your first agent: give it a name, pick its default model and, if you like, a monthly spend cap.
- Copy the API key it shows you. It starts with
sk_and is shown only once.
Each agent has its own keys, so you can compare results by agent and revoke one without touching the others.
2. Send your first request
curl
curl https://api.theinferencecompany.si/v1/chat/completions \
-H "Authorization: Bearer $TIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "glm-5.3", "messages": [{"role": "user", "content": "Say hello."}]}'
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(base_url="https://api.theinferencecompany.si/v1", api_key=TIC_API_KEY)
reply = client.chat.completions.create(
model="glm-5.3",
messages=[{"role": "user", "content": "Say hello."}],
)
print(reply.choices[0].message.content)
TypeScript (OpenAI SDK)
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.theinferencecompany.si/v1", apiKey: process.env.TIC_API_KEY });
const reply = await client.chat.completions.create({
model: "glm-5.3",
messages: [{ role: "user", content: "Say hello." }],
});
Python (Anthropic SDK)
from anthropic import Anthropic
client = Anthropic(base_url="https://api.theinferencecompany.si", api_key=TIC_API_KEY)
reply = client.messages.create(
model="kimi-k3",
max_tokens=1024,
messages=[{"role": "user", "content": "Say hello."}],
)
Claude Code
export ANTHROPIC_BASE_URL="https://api.theinferencecompany.si" export ANTHROPIC_AUTH_TOKEN="$TIC_API_KEY" export ANTHROPIC_MODEL="glm-5.3" claude
Streaming ("stream": true) and tool calls work on both APIs exactly as they do with OpenAI and Anthropic. More in running Claude Code on open models.
3. Choose a model
| Model ID | Model | Good for |
|---|---|---|
kimi-k3 | Kimi K3 | Holds a whole repository in context on long loops |
glm-5.3 | GLM-5.3 | Near the top on coding, at half the price of Opus |
deepseek-v4-pro | DeepSeek V4 Pro | The top open model on coding, at a fraction of the cost |
deepseek-v4.1-flash | DeepSeek V4.1 Flash | Fast and cheap for high-volume agent steps |
qwen3.8-max | Qwen3.8-Max | Large general model with strong tool use |
minimax-m3 | MiniMax M3 | Small active size, quick on agent tool calls |
Prices and savings for each are in the models table. GET /v1/models lists the models your key can use.
On the OpenAI API, an unknown model name returns an error. On the Anthropic API, a model name we don't serve, such as one of Claude's, runs on your agent's default model, so tools that send their own model names keep working.
4. Track tasks and outcomes
Group the requests that make up one task by sending the same x-task-id header with each. Use your own ID, such as a ticket number, up to 255 characters. The task is created on its first request.
client.chat.completions.create(
model="glm-5.3",
messages=messages,
extra_headers={"x-task-id": "TICKET-4821"},
)
When the task ends, report whether it succeeded:
curl -X POST https://api.theinferencecompany.si/v1/tasks/TICKET-4821/finish \
-H "Authorization: Bearer $TIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "completed", "success": true, "success_source": "ci"}'
status is one of completed, failed, aborted or unknown. The console then shows cost per successful task for each agent.
Sessions are tracked for you: requests that continue the same conversation are grouped automatically. To set the session yourself, send an x-session-id header with a session ID from POST /v1/sessions.
5. Use it with your tools
Coding agents, editors and agent frameworks connect the same way: set the base URL, your key and a model ID. Step-by-step setup for each:
- Claude Code
- OpenAI Codex CLI
- OpenCode
- Hermes Agent
- OpenClaw
- Cline
- Roo Code
- Kilo Code
- Continue
- Aider
- Cursor
- Zed
- Goose
- Vercel AI SDK
- LangChain
- LiteLLM
6. Retry safely
Send an Idempotency-Key header with a unique value per request. If you retry with the same key after a timeout, the request isn't run twice: you get the original response, or a 409 while the first attempt is still running.
Errors
| Status | Meaning |
|---|---|
| 400 | The request is invalid, for example an unknown model on the OpenAI API or an unknown session ID. |
| 401 | The API key is missing, wrong or revoked. |
| 402 | Your team is out of credits, or the agent reached its monthly spend cap. |
| 409 | The Idempotency-Key was already used for a different request, or the task was already finished. |
| 429 | Too many requests. Wait and retry. |
| 502, 503, 504 | The model is temporarily unavailable or timed out. Retry with the same Idempotency-Key. |
Every response includes an x-request-id header. Include it when you contact us at hello@theinferencecompany.si.
Common questions
Which base URL do I use?
https://api.theinferencecompany.si/v1 for OpenAI clients and https://api.theinferencecompany.si for Anthropic clients and Claude Code.
How do I authenticate?
Send your API key as Authorization: Bearer sk_... or as x-api-key: sk_.... Both work on every endpoint.
How do I track cost per successful task?
Send an x-task-id header with every request that belongs to a task, then report the outcome with POST /v1/tasks/{task_id}/finish. The console shows cost per successful task for each agent.