Ch 04 Setup

Four steps to
your first call

If your code already talks to the OpenAI or Anthropic API, the only change is the base URL and the key.

  1. Step 01

    Get a code

    Buy a redeem code from @afiqstores_bot on Telegram.

  2. Step 02

    Create an account

    Register with your email, then redeem the code to issue an API key.

  3. Step 03

    Copy the key

    It appears on your dashboard straight away, with its balance and expiry.

  4. Step 04

    Point your client here

    Swap the base URL and key. Keep everything else.

On air // base URLs
OpenAI compatible
https://rootsys.cloud/v1
Anthropic compatible
https://rootsys.cloud

Ch 04.1 Examples

OpenAI format

Ready to run once you set ROOTSYS_API_KEY. Model: deepseek-v4-flash.

Terminal // curl
curl https://rootsys.cloud/v1/chat/completions \
  -H "Authorization: Bearer $ROOTSYS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
Terminal // python
from openai import OpenAI

client = OpenAI(
    base_url="https://rootsys.cloud/v1",
    api_key="YOUR_API_KEY",
)

reply = client.chat.completions.create(
    model="deepseek-v4-flash",
    messages=[{"role": "user", "content": "Hello"}],
)

print(reply.choices[0].message.content)
Terminal // node
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://rootsys.cloud/v1",
  apiKey: process.env.ROOTSYS_API_KEY,
});

const reply = await client.chat.completions.create({
  model: "deepseek-v4-flash",
  messages: [{ role: "user", content: "Hello" }],
});

console.log(reply.choices[0].message.content);

Ch 04.2 Examples

Anthropic format

For Claude Code and the Anthropic SDKs. Point the base URL at https://rootsys.cloud with no /v1; the SDK appends it.

Terminal // curl
curl https://rootsys.cloud/v1/messages \
  -H "x-api-key: YOUR_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello"}]
  }'
Terminal // python
from anthropic import Anthropic

client = Anthropic(
    base_url="https://rootsys.cloud",
    api_key="YOUR_API_KEY",
)

message = client.messages.create(
    model="deepseek-v4-flash",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)

print(message.content)
Terminal // node
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://rootsys.cloud",
  apiKey: process.env.ROOTSYS_KEY,
});

const message = await client.messages.create({
  model: "deepseek-v4-flash",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello" }],
});

console.log(message.content);

Ch 03 Works with

Your tools

Signed-in users get full step-by-step guides with their own base URL filled in, under Docs and tutorials.

Claude Code

Set ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN in ~/.claude/settings.json.

Codex

Add a rootsys provider in ~/.codex/config.toml (example below).

OpenCode

Add a custom OpenAI-compatible provider with the base URL and key.

Cline

Bring your own key, choose OpenAI Compatible, paste the base URL and key.

Kilo Code

Settings, Provider, Custom Provider. Models load automatically.

Roo Code

Choose OpenAI Compatible, paste the base URL and key, pick a model.

OpenClaw

AI Provider, Custom Provider (OpenAI-compatible), base URL and key.

Hermes

Use a custom OpenAI-compatible provider with the base URL and key.

Codex config

Add Rootsys as a model provider in ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml), then run codex.

Terminal // config.toml
model = "deepseek-v4-flash"
model_provider = "rootsys"

[model_providers.rootsys]
name = "Rootsys"
base_url = "https://rootsys.cloud/v1"
wire_api = "responses"
experimental_bearer_token = "fiq-your-api-key"

Ch 04.3 Field notes

Worth knowing

Streaming works
Set stream: true and tokens arrive as they are generated, in the same SSE format the OpenAI SDKs expect.
Listing models
GET /v1/models with your key returns the IDs your plan can call.
Checking your balance
GET /v1/quota with your key returns tokens remaining, total, used and the expiry, without spending tokens.
Token allowance
Each request draws from the allowance on your key. When it runs out, calls are refused until the key is topped up.
Top-ups keep the key
Redeeming onto an existing key keeps the same key string. Tokens stack; expiry extends at most 30 days from today.
Rejected model names
Only IDs from the catalogue are accepted. A name that is not mapped comes back as an error rather than being silently swapped.
Rootsys© 2026 Rootsys // OpenAI + Anthropic compatible gateway