SVRTR API
SVRTR - a unified API to top models from Anthropic, OpenAI, Moonshot and SpaceXAI. Two compatible endpoints: Anthropic Messages and OpenAI Chat Completions. Strictly pay-as-you-go by tokens, instant start, no minimums and no fixed plans - works with any client: Anthropic SDK, OpenAI SDK, OpenClaw, curl, any HTTP.
Overview
SVRTR gives you a unified API to the best models from four vendors - Anthropic, OpenAI, Moonshot and SpaceXAI - through two compatible formats. Claude and Grok models are served over the Anthropic Messages API (/v1/messages); GPT and Kimi models over OpenAI Chat Completions (/v1/chat/completions). One sk-sr-v1-... key works on both. You pay only for the tokens you use - no minimums, no fixed plans.
Single endpoint
One URL and one format for every Claude model. No per-model plumbing.
Anthropic compatible
The same Messages API. Anthropic SDK, curl, any HTTP client work without code changes.
Pay per token
You pay strictly for the tokens you consume. No minimums, no fixed plans - instant start.
High availability
Built for stable operation under load with fast response times.
Quickstart
Three ways to connect in a minute. Base URL is https://api.svrtr.org, path is /v1/messages, header is x-api-key.
Direct API (curl)
A minimal HTTP request - nothing but curl:
# request curl https://api.svrtr.org/v1/messages \ -H "x-api-key: sk-sr-v1-YOUR_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hi!"}] }'
Anthropic SDK
The official Anthropic SDK (Python / Node) - only base_url changes:
from anthropic import Anthropic client = Anthropic( api_key="sk-sr-v1-YOUR_KEY", base_url="https://api.svrtr.org", ) msg = client.messages.create( model="claude-opus-5", max_tokens=1024, messages=[{"role": "user", "content": "Hi!"}], ) print(msg.content[0].text)
import Anthropic from '@anthropic-ai/sdk'; const client = new Anthropic({ apiKey: 'sk-sr-v1-YOUR_KEY', baseURL: 'https://api.svrtr.org', }); const msg = await client.messages.create({ model: 'claude-opus-5', max_tokens: 1024, messages: [{ role: 'user', content: 'Hi!' }], }); console.log(msg.content[0].text);
OpenClaw agent
Connect via a provider in OpenClaw (see the “OpenClaw agent” section):
// ~/.openclaw/openclaw.json (JSON5 — comments allowed) { "models": { "providers": { "svrtr": { "baseUrl": "https://api.svrtr.org", "api": "anthropic-messages", "apiKey": "sk-sr-v1-YOUR_KEY", "authHeader": false, "headers": { "x-api-key": "sk-sr-v1-YOUR_KEY" }, "models": [ { "id": "claude-opus-5", "name": "Opus 5" }, { "id": "claude-sonnet-5", "name": "Sonnet 5" } ] } } }, "agents": { "defaults": { "model": { "primary": "svrtr/claude-opus-5" } } } }
Authentication
Requests are authenticated with the x-api-key header carrying your key in the sk-sr-v1-... format. Keys are issued in your dashboard (Telegram login).
- Key header:
x-api-key: sk-sr-v1-xxxxx - API version:
anthropic-version: 2023-06-01 - Content type:
content-type: application/json
Authorization: Bearer - this is the most common integration mistake (returns 403). Tip: keep the key in an environment variable, never commit it.Setup for AI agents
SVRTR speaks the Anthropic Messages API. Any coding assistant that lets you override the Anthropic base URL can point at it directly. Below are copy-paste setups for the most common tools.
These tools support overriding the Anthropic base URL directly — no proxy needed. Set the base URL to https://api.svrtr.org and your key as the Anthropic API key.
1. Claude Code CLI
Two env vars, then run claude. Persist them in ~/.claude/settings.json.
# Claude Code CLI — point it at SVRTR export ANTHROPIC_BASE_URL="https://api.svrtr.org" export ANTHROPIC_API_KEY="sk-sr-v1-YOUR-KEY-HERE" claude # Persist it in ~/.claude/settings.json: # { "env": { "ANTHROPIC_BASE_URL": "https://api.svrtr.org", # "ANTHROPIC_API_KEY": "sk-sr-v1-YOUR-KEY-HERE" } }
2. Anthropic Python SDK
from anthropic import Anthropic client = Anthropic( base_url="https://api.svrtr.org", api_key="sk-sr-v1-YOUR-KEY-HERE", ) resp = client.messages.create( model="claude-opus-5", max_tokens=1024, messages=[{"role": "user", "content": "Hello"}], ) print(resp.content[0].text)
3. Anthropic TypeScript SDK
import Anthropic from "@anthropic-ai/sdk"; const client = new Anthropic({ baseURL: "https://api.svrtr.org", apiKey: process.env.SVRTR_API_KEY, }); const msg = await client.messages.create({ model: "claude-opus-5", max_tokens: 1024, messages: [{ role: "user", content: "Hello" }], });
4. Google Antigravity IDE
Export the env vars in Antigravity's built-in terminal, then select a Claude model.
# Google Antigravity IDE — in the AG terminal: export ANTHROPIC_BASE_URL="https://api.svrtr.org" export ANTHROPIC_API_KEY="sk-sr-v1-YOUR-KEY-HERE" # Then pick a Claude model inside Antigravity.
5. Cline (VSCode)
Configure via the Settings panel — provider Anthropic with a custom base URL.
# Cline (VSCode) — via Settings UI: # Settings -> Cline -> API Provider: Anthropic # check "Use custom base URL" # Base URL: https://api.svrtr.org # API Key: sk-sr-v1-YOUR-KEY-HERE # Model: claude-opus-5
6. Continue.dev
Add a model entry to ~/.continue/config.yaml.
# ~/.continue/config.yaml models: - name: SVRTR Claude Opus provider: anthropic apiBase: https://api.svrtr.org apiKey: sk-sr-v1-YOUR-KEY-HERE model: claude-opus-5 roles: [chat, edit, apply] defaultCompletionOptions: promptCaching: true
7. Zed
Open the agent settings JSON and point Anthropic at SVRTR.
// Command palette: "agent: open settings" { "language_models": { "anthropic": { "api_url": "https://api.svrtr.org", "available_models": [ { "name": "claude-opus-5", "display_name": "SVRTR Opus 5", "max_tokens": 200000 } ] } } } // Set the API key via Zed's UI.
8. aider
Pass the base URL and key as CLI flags.
aider --model anthropic/claude-opus-5 \ --set-env ANTHROPIC_API_BASE=https://api.svrtr.org \ --anthropic-api-key sk-sr-v1-YOUR-KEY-HERE
9. OpenHands
Set the LLM block in ~/.openhands/config.toml.
# ~/.openhands/config.toml [llm] model = "anthropic/claude-opus-5" api_key = "sk-sr-v1-YOUR-KEY-HERE" base_url = "https://api.svrtr.org"
OpenAI-compatible endpoint
For tools that speak the OpenAI Chat Completions API, use base URL https://api.svrtr.org/v1, path /v1/chat/completions, and Authorization: Bearer <key>. Any model name is routed to Claude. Streaming and tool calls are supported.
Cursor IDE
Agent mode and Chat work through your SVRTR key. (Tab completions stay on Cursor's built-in models.)
# Cursor IDE — Settings -> Models -> API Keys # 1. Toggle "OpenAI API Key", paste your SVRTR key: sk-sr-v1-YOUR-KEY-HERE # 2. Toggle "Override OpenAI Base URL" and set it to: https://api.svrtr.org/v1 # 3. Click "Verify". Use Agent mode or Chat. Any model name routes to Claude. # Note: Cursor Tab completions always use Cursor's built-in models (not BYOK).
OpenAI SDK (Python / JS) & LiteLLM-based tools
Point the OpenAI SDK's base URL at SVRTR.
from openai import OpenAI client = OpenAI( base_url="https://api.svrtr.org/v1", api_key="sk-sr-v1-YOUR-KEY-HERE", ) resp = client.chat.completions.create( model="claude-opus-5", # any model name maps to Claude messages=[{"role": "user", "content": "Hello"}], ) print(resp.choices[0].message.content)
aider (OpenAI mode) · GitHub Copilot BYOK
Set the OpenAI base URL and key. Copilot Chat: paste the same base URL in its BYOK "OpenAI compatible" slot.
# aider via the OpenAI-compatible endpoint export OPENAI_API_BASE="https://api.svrtr.org/v1" export OPENAI_API_KEY="sk-sr-v1-YOUR-KEY-HERE" aider --model openai/claude-opus-5
Notes on other tools
- Windsurf doesn't expose a custom base-URL slot yet — use a local OpenAI proxy (e.g. LiteLLM) pointed at the OpenAI-compatible endpoint above.
- Antigravity IDE panel sends the Anthropic key straight to Anthropic (no base-URL override); use its built-in terminal recipe above instead.
/v1/messages with x-api-key (native tools), or OpenAI path /v1/chat/completions with Authorization: Bearer (OpenAI-style tools like Cursor). Model IDs use dashes (claude-opus-5); on the OpenAI path any model name maps to Claude.Endpoint
All requests use a single method:
POST https://api.svrtr.org/v1/messages # claude-*, grok-4.6 POST https://api.svrtr.org/v1/chat/completions # gpt-5.6-*, k3, kimi-for-coding
SVRTR exposes two endpoints; pick by model. Anthropic Messages (POST /v1/messages): claude-* and grok-4.6, body and response in Anthropic format. OpenAI Chat Completions (POST /v1/chat/completions): gpt-5.6-* and k3/kimi-for-coding, body and response in OpenAI format. The same key works on both; set the model in the model field.
Models
| Model | Vendor | Context | Endpoint | Input | Output |
|---|---|---|---|---|---|
claude-opus-5 | Anthropic | 1M | /v1/messages | $5 | $25 |
claude-sonnet-5 | Anthropic | 1M | /v1/messages | $3 | $15 |
claude-fable-5 | Anthropic | 1M | /v1/messages | $10 | $50 |
claude-haiku-4-5 | Anthropic | 200K | /v1/messages | $1 | $5 |
grok-4.6 | SpaceXAI | 500K | /v1/messages | $2 | $6 |
gpt-5.6-sol | OpenAI | 400K | /v1/chat/completions | $5 | $30 |
gpt-5.6-terra | OpenAI | 400K | /v1/chat/completions | $2 | $12 |
gpt-5.6-luna | OpenAI | 400K | /v1/chat/completions | $0.2 | $1.2 |
k3 | Moonshot | 1M | /v1/chat/completions | $3 | $15 |
kimi-for-coding | Moonshot | 256K | /v1/chat/completions | $0.95 | $4 |
Request parameters
Body fields for /v1/messages (Anthropic Messages API format):
claude-opus-5.{role, content} objects, roles user/assistant.true, the response is streamed in chunks via SSE.Response format
A successful response is JSON in the Anthropic Messages format. The model text is in content[].text:
{
"id": "msg_01ABC...",
"type": "message",
"role": "assistant",
"model": "claude-opus-5",
"content": [
{ "type": "text", "text": "Hi! How can I help?" }
],
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": { "input_tokens": 12, "output_tokens": 8 }
}input_tokens / output_tokens) is what billing is based on. The sum of request and response tokens is charged against your balance at the model rate. stop_reason values: end_turn, max_tokens, stop_sequence, tool_use.Streaming responses
Streaming (SSE) is supported, just like the Anthropic API. Add "stream": true to the body - the response arrives as a stream of text/event-stream events: message_start, a series of content_block_delta, then message_stop. The SDKs provide a convenient client.messages.stream(...) helper.
curl https://api.svrtr.org/v1/messages \ -H "x-api-key: sk-sr-v1-YOUR_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5", "max_tokens": 1024, "stream": true, "messages": [{"role": "user", "content": "Write a haiku"}] }'
from anthropic import Anthropic client = Anthropic( api_key="sk-sr-v1-YOUR_KEY", base_url="https://api.svrtr.org", ) with client.messages.stream( model="claude-opus-5", max_tokens=1024, messages=[{"role": "user", "content": "Hi!"}], ) as stream: for text in stream.text_stream: print(text, end="", flush=True)
Working with images (vision)
All models accept images; the block format depends on the endpoint. On Anthropic Messages (Claude, Grok) add a type:"image" block with source:{type:"base64", media_type, data} alongside text (public URLs work too). On OpenAI Chat Completions (GPT, Kimi) use a type:"image_url" block with image_url:{url:"data:<media>;base64,<data>"} (URL or data-URI). Images pass through as-is, no re-compression.
{
"model": "claude-opus-5",
"max_tokens": 1024,
"messages": [{
"role": "user",
"content": [
{
"type": "image",
"source": {
"type": "base64",
"media_type": "image/jpeg",
"data": "/9j/4AAQSkZJRg..."
}
},
{ "type": "text", "text": "What is in this image?" }
]
}]
}source.data, with the type in media_type.Tool calling
★Function calling - works
Pass a tools array describing your functions. If the model decides to call a tool, it returns a type:"tool_use" block with name and input, and stop_reason becomes tool_use. Your client executes the tool and sends the result back as a type:"tool_result" block.
{
"model": "claude-opus-5",
"max_tokens": 1024,
"tools": [{
"name": "get_weather",
"description": "Current weather for a city",
"input_schema": {
"type": "object",
"properties": {
"city": { "type": "string" }
},
"required": ["city"]
}
}],
"messages": [
{ "role": "user", "content": "Weather in Dubai?" }
]
}{
"role": "assistant",
"stop_reason": "tool_use",
"content": [
{
"type": "tool_use",
"id": "toolu_01ABC...",
"name": "get_weather",
"input": { "city": "Dubai" }
}
]
}tool_use, append the assistant message and a new user message with a tool_result block (same tool_use_id) - then repeat the request.tool_choice:{type:"tool"}) is incompatible with thinking and not recommended for agentic tasks. For strict JSON, use tool_choice:{type:"auto"} together with thinking - the model will still call your tool and return a valid tool_use. Non-reasoning modes (forced-tool without thinking, especially on large prompts) are not guaranteed and may hit short-window limits.Prompt caching
Reusing the same large context (documents, instructions)? Put cache_control on a block - Anthropic caches it. Reading from cache is about 10× cheaper than normal input.
{
"model": "claude-opus-5",
"max_tokens": 1024,
"system": [{
"type": "text",
"text": "... large context / instructions ...",
"cache_control": { "type": "ephemeral" }
}],
"messages": [{ "role": "user", "content": "Question about the context" }]
}Reasoning (thinking / effort)
Models can reason before answering; the control differs by family. Claude (/v1/messages): a thinking block with type = adaptive · enabled · disabled; with enabled, budget_tokens caps the reasoning, while adaptive lets the model pick depth (Fable 5 always thinks adaptively). Grok, GPT, Kimi: a reasoning_effort parameter, with its own set of levels per family.
{
"model": "claude-fable-5",
"max_tokens": 4096,
"thinking": {
"type": "enabled",
"budget_tokens": 2048
},
"messages": [{ "role": "user", "content": "A task that needs reasoning" }]
}reasoning_effort: Grok (grok-4.6) - low·medium·high·xhigh (default high); GPT-5.6 (sol/terra/luna) - none·low·medium·high·xhigh·max (default medium); Kimi (k3, kimi-for-coding) - low·high·max (default max). Kimi K3 always reasons: thinking mode is permanently on; do not send thinking: {"type":"disabled"}. An unsupported value returns a 400 error listing the accepted ones. Reasoning tokens are billed as output.Limits & reliability
The service is built for high availability. On a transient error (429 or 5xx) an automatic retry with exponential backoff is recommended on the client side. The official Anthropic SDKs do this out of the box; for a custom HTTP client, a simple example is below.
import time, httpx def call_with_retry(payload, tries=5): for i in range(tries): r = httpx.post("https://api.svrtr.org/v1/messages", headers={"x-api-key": KEY, "anthropic-version": "2023-06-01"}, json=payload, timeout=60) if r.status_code not in (429, 500, 502, 503): return r time.sleep(2 ** i) # 1, 2, 4, 8, 16s return r
503 with a Retry-After header - just retry after that delay. There are no hard requests-per-minute limits.Error codes
x-api-key header.Authorization: Bearer instead of x-api-key.Pricing
Strictly per-token pricing (USD per 1M tokens):
Account & balance
Billing is prepaid credits. 1 credit = 1 USDT. Top up in USDT (TRON network, TRC-20) to your personal address: send any amount - credits appear after network confirmations.
GET /api/balance - returns current credits, address and deposit history.Connect with SVRTR (OAuth)
For integrators embedding SVRTR into their own app: user logs in via Telegram, grants access, your app gets a personal API key. Standard OAuth 2.0 (authorization_code + PKCE S256). Short version below, full guide in a dedicated section.
- Register a client:
client_id,redirect_uri,client_secret. - Redirect user to
/oauth/authorizewith PKCE params. - User logs in via Telegram and confirms access.
- Exchange the received
codeviaPOST /oauth/tokenwithcode_verifierandclient_secret— you get an API key back.
https://svrtr.org/oauth/authorizehttps://svrtr.org/oauth/tokenclient_id and issue a client_secret. Full guide with examples — dedicated section.Connecting an OpenClaw agent
★Most important for agents
The easiest path is the OpenClaw CLI (it writes the provider into ~/.openclaw/openclaw.json for you):
# 1) add provider + key (edits openclaw.json for you) openclaw models auth login --provider svrtr \ --base-url https://api.svrtr.org \ --api anthropic-messages \ --api-key sk-sr-v1-YOUR_KEY # 2) set it as the primary model openclaw models set svrtr/claude-opus-5 # 3) verify the model is listed openclaw models list
Or edit the config manually
Add the provider to ~/.openclaw/openclaw.json (the models.providers section) and set the primary model under agents.defaults.model:
// ~/.openclaw/openclaw.json (JSON5 — comments allowed) { "models": { "providers": { "svrtr": { "baseUrl": "https://api.svrtr.org", "api": "anthropic-messages", "apiKey": "sk-sr-v1-YOUR_KEY", "authHeader": false, "headers": { "x-api-key": "sk-sr-v1-YOUR_KEY" }, "models": [ { "id": "claude-opus-5", "name": "Opus 5" }, { "id": "claude-sonnet-5", "name": "Sonnet 5" } ] } } }, "agents": { "defaults": { "model": { "primary": "svrtr/claude-opus-5" } } } }
Then in openclaw.json set the primary model to svrtr/claude-opus-5.
headers: { x-api-key } with authHeader: false - otherwise the gateway sends Authorization: Bearer and gets a 403.~/.openclaw/openclaw.json → models.providers, not the generated agents/main/agent/models.json; (2) an allowlist agents.defaults.models is set - add svrtr/claude-opus-5 to it; (3) the gateway wasn't restarted. Check with: openclaw models list.Connecting agents
SVRTR is an Anthropic-compatible endpoint, so it plugs into any agent that can talk to the Anthropic API: just switch the baseURL to https://api.svrtr.org and pass your key in the x-api-key: sk-sr-v1-... header. Below are examples for four popular coding agents.
SVRTR works with any tool that speaks the Anthropic Messages API. Verified clients: Cursor, Cline, Roo Code, Kilo Code, Aider, Zed, Continue, OpenCode, Crush, Droid, Pi, Hermes, OpenClaw, plus the official Anthropic SDKs (Python / TypeScript), LangChain, LlamaIndex and any HTTP client. The principle is always the same: baseURL https://api.svrtr.org + the x-api-key header.
OCPlatform
Add a provider to models.json, then set the primary model to svrtr/claude-opus-5 in openclaw.json. The key is passed explicitly via headers: { x-api-key } with authHeader: false (see the “OpenClaw agent” section).
// ~/.openclaw/openclaw.json (JSON5 — comments allowed) { "models": { "providers": { "svrtr": { "baseUrl": "https://api.svrtr.org", "api": "anthropic-messages", "apiKey": "sk-sr-v1-YOUR_KEY", "authHeader": false, "headers": { "x-api-key": "sk-sr-v1-YOUR_KEY" }, "models": [ { "id": "claude-opus-5", "name": "Opus 5" }, { "id": "claude-sonnet-5", "name": "Sonnet 5" } ] } } }, "agents": { "defaults": { "model": { "primary": "svrtr/claude-opus-5" } } } }
Pi
Pi and Claude-compatible clients pick up the endpoint from environment variables. Since SVRTR mirrors the Anthropic API, any client that reads ANTHROPIC_BASE_URL + x-api-key works with no code changes:
export ANTHROPIC_BASE_URL="https://api.svrtr.org" export ANTHROPIC_API_KEY="sk-sr-v1-YOUR_KEY" # Pi / Claude-compatible clients pick up the endpoint automatically
Hermes
In the Hermes provider settings point the Anthropic-compatible baseURL and the x-api-key header at SVRTR. The exact field names depend on your Hermes version - the essence is an Anthropic-compatible baseURL + key:
provider: type: anthropic base_url: https://api.svrtr.org api_key: sk-sr-v1-YOUR_KEY # sent as the x-api-key header model: claude-opus-5
Kilo Code
In Kilo Code (VS Code) settings pick the “Anthropic” provider (or “Anthropic-compatible / Custom”), set Base URL https://api.svrtr.org, API Key sk-sr-v1-... and model claude-opus-5. Example settings.json fragment (setting names may differ by version):
{
"kilocode.apiProvider": "anthropic",
"kilocode.anthropicBaseUrl": "https://api.svrtr.org",
"kilocode.apiKey": "sk-sr-v1-YOUR_KEY",
"kilocode.model": "claude-opus-5"
}https://api.svrtr.org, the x-api-key header with an sk-sr-v1-... key, and a model name (e.g. claude-opus-5).FAQ
base_url = https://api.svrtr.org. No code changes needed.sk-sr-v1-... and are passed in the x-api-key header.HTTP 402. Top up your balance and access is restored immediately.tools, images via a type:"image" block.