Documents

Connection endpoints, configuration guides and environment setups for IDEs, CLI tools and AI agents. Every guide uses the same base URL and key.

Base URL

https://std.ai.id/v1

Quick start & base URL

Works with the shared base URL and key

One endpoint, one key, any OpenAI-compatible client. Everything below uses the same base URL.

  1. 1

    Create an API key

    Sign in with Google or Telegram, open Dashboard then API keys, and create a key. Keys start with st- and are shown once.

  2. 2

    Copy the base URL

    https://std.ai.id/v1 - paste it wherever a client asks for an OpenAI base URL. Do not append /chat/completions yourself.

  3. 3

    Pick a model

    Call GET /v1/models or open the Models page. Any listed model id works, for example gpt-5.1 or claude-sonnet-4-5.

  4. 4

    Send your first request

    Quota is deducted per request: completion tokens plus non-cached prompt tokens, scaled by the model multiplier (a 2x model bills 2 quota per token). Purchased tokens never expire.

cURL
curl https://std.ai.id/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ST_API_KEY" \
  -d '{
    "model": "gpt-5.1",
    "messages": [{ "role": "user", "content": "Hello SuperToken" }],
    "stream": false
  }'
Python
from openai import OpenAI

client = OpenAI(base_url="https://std.ai.id/v1", api_key="st-...")

resp = client.chat.completions.create(
    model="gpt-5.1",
    messages=[{"role": "user", "content": "Write a fibonacci function."}],
)
print(resp.choices[0].message.content)
TypeScript
import OpenAI from 'openai';

const client = new OpenAI({ baseURL: 'https://std.ai.id/v1', apiKey: 'st-...' });

const res = await client.chat.completions.create({
  model: 'gpt-5.1',
  messages: [{ role: 'user', content: 'Say hello' }]
});
console.log(res.choices[0].message.content);

Endpoints

Works with the shared base URL and key

SuperToken speaks both the OpenAI chat format and the Anthropic messages format, so SDKs work with only a base URL change.

  1. 1

    POST /v1/chat/completions

    OpenAI-compatible chat and streaming. Works with every OpenAI SDK, LiteLLM, and any tool that accepts a custom base URL.

  2. 2

    POST /v1/messages

    Anthropic-compatible messages endpoint for Claude-native clients such as Claude Code.

  3. 3

    GET /v1/models

    Returns the currently enabled catalog with model ids and multipliers. Public, no key required.

  4. 4

    Auth

    Send Authorization: Bearer st-... on every call. Requests without a valid key return 401 and are not billed.

List models
curl https://std.ai.id/v1/models
Anthropic format
curl https://std.ai.id/v1/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: $ST_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-sonnet-4-5",
    "max_tokens": 512,
    "messages": [{ "role": "user", "content": "Hello" }]
  }'

9RouterX

Works with the shared base URL and key

The extended 9Router profile. Use it when you want per-model fallback chains and provider-level retries on top of the standard 9Router setup.

  1. 1

    Open the provider settings

    Launch 9RouterX and go to Providers. Choose Add provider and select the OpenAI-compatible type.

  2. 2

    Fill the connection fields

    Base URL: https://std.ai.id/v1. API key: a key that starts with st- from your SuperToken dashboard.

  3. 3

    Configure fallback chains

    Order models from primary to backup, for example gpt-5.1 then claude-sonnet-4-5 then gemini-3-pro. 9RouterX moves to the next model automatically when one fails.

  4. 4

    Enable retry with backoff

    Set 2 retries with exponential backoff. Combined with the 429 guidance below this keeps long agent runs stable.

provider.json
{
  "name": "SuperToken",
  "type": "openai-compatible",
  "baseURL": "https://std.ai.id/v1",
  "apiKey": "st-your-key",
  "fallbacks": ["gpt-5.1", "claude-sonnet-4-5", "gemini-3-pro"],
  "retries": { "attempts": 2, "backoff": "exponential" }
}

9Router

Works with the shared base URL and key

Add SuperToken as a custom OpenAI-compatible provider inside 9Router so its router can dispatch traffic here.

  1. 1

    Open provider settings

    In 9Router go to Providers, then Add provider, and pick the OpenAI-compatible / custom option.

  2. 2

    Fill in the connection

    Base URL https://std.ai.id/v1, API key your st- key, and leave the model list on auto-detect or paste ids from /v1/models.

  3. 3

    Test and save

    Run the built-in test request. A 200 with a short completion means routing is wired correctly.

Provider block
{
  "name": "SuperToken",
  "type": "openai-compatible",
  "base_url": "https://std.ai.id/v1",
  "api_key": "st-...",
  "models": ["gpt-5.1", "claude-sonnet-4-5", "gemini-3-pro"]
}

Zcode

Works with the shared base URL and key

Point Zcode at the SuperToken gateway by overriding the base URL and key in its provider config.

  1. 1

    Add a custom provider

    Zcode settings, Providers, New provider, choose OpenAI-compatible.

  2. 2

    Set base URL and key

    Use https://std.ai.id/v1 and your st- key. Keep the default headers untouched.

  3. 3

    Choose a model

    Type the model id exactly as returned by /v1/models, for example deepseek-chat-v3.2.

provider.json
{
  "providers": [
    {
      "id": "supertoken",
      "label": "SuperToken",
      "baseUrl": "https://std.ai.id/v1",
      "apiKey": "st-...",
      "defaultModel": "gpt-5.1"
    }
  ]
}

Cursor

Works with the shared base URL and key

Cursor supports a custom OpenAI base URL, which is all SuperToken needs.

  1. 1

    Open model settings

    Cursor Settings, Models, then expand the OpenAI API section and enable Override OpenAI Base URL.

  2. 2

    Enter the endpoint

    Base URL https://std.ai.id/v1 and paste your st- key as the OpenAI API key. Verify the key first so Cursor can list models.

  3. 3

    Select a model

    Add a custom model name such as gpt-5.1 or claude-sonnet-4-5 and enable it for chat and inline edit.

Fields
Override OpenAI Base URL : https://std.ai.id/v1
OpenAI API Key          : st-...
Model name              : gpt-5.1

Void editor

Works with the shared base URL and key

Void is an open-source AI editor with configurable providers; add SuperToken as an OpenAI-compatible endpoint.

  1. 1

    Open provider settings

    Void settings, AI providers, Add provider, OpenAI-compatible.

  2. 2

    Configure

    Base URL https://std.ai.id/v1, key st-..., then fetch models or paste them manually.

Config
{
  "provider": "openai-compatible",
  "baseUrl": "https://std.ai.id/v1",
  "apiKey": "st-..."
}

Claude Code

Works with the shared base URL and key

Claude Code talks the Anthropic messages protocol. SuperToken exposes /v1/messages, so only the base URL and key change.

  1. 1

    Export the environment

    Set ANTHROPIC_BASE_URL to https://std.ai.id and ANTHROPIC_AUTH_TOKEN to your st- key, then start claude as usual.

  2. 2

    Pick a Claude model

    Use claude-sonnet-4-5 for everyday coding or claude-opus-4-5 for heavier reasoning.

Shell
export ANTHROPIC_BASE_URL=https://std.ai.id
export ANTHROPIC_AUTH_TOKEN=st-...
export ANTHROPIC_MODEL=claude-sonnet-4-5
claude

Codex CLI

Works with the shared base URL and key

Codex CLI accepts a custom OpenAI-compatible provider through its config file.

  1. 1

    Edit the config

    Add a provider entry pointing at https://std.ai.id/v1 with your key, then select it as the active profile.

~/.codex/config.toml
model = "gpt-5.1"
model_provider = "supertoken"

[model_providers.supertoken]
name = "SuperToken"
base_url = "https://std.ai.id/v1"
env_key = "ST_API_KEY"
Run
export ST_API_KEY=st-...
codex

OpenCode

Works with the shared base URL and key

OpenCode reads providers from opencode.json; add SuperToken as an openai-compatible provider.

  1. 1

    Add the provider

    Create or edit opencode.json in the project root and declare the SuperToken provider with its models.

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "supertoken": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "SuperToken",
      "options": { "baseURL": "https://std.ai.id/v1", "apiKey": "{env:ST_API_KEY}" },
      "models": { "gpt-5.1": {}, "claude-sonnet-4-5": {} }
    }
  }
}

Cline (VS Code)

Works with the shared base URL and key

Cline has a first-class OpenAI Compatible provider option.

  1. 1

    Choose the provider

    In the Cline panel open Settings, API Provider, and select OpenAI Compatible.

  2. 2

    Fill base URL and key

    Base URL https://std.ai.id/v1, API key st-..., then set the model id manually.

Fields
API Provider : OpenAI Compatible
Base URL     : https://std.ai.id/v1
API Key      : st-...
Model ID     : gpt-5.1

Cherry Studio

Works with the shared base URL and key

Cherry Studio manages multiple providers in one desktop app; add SuperToken next to the built-ins.

  1. 1

    Add a provider

    Settings, Model Providers, Add, and choose OpenAI as the type.

  2. 2

    Set the endpoint

    API host https://std.ai.id/v1 with key st-..., then add the models you want in the model list.

Fields
Provider  : OpenAI
API Host  : https://std.ai.id/v1
API Key   : st-...
Models    : gpt-5.1, claude-sonnet-4-5, gemini-3-pro

DeepSeek harness

Works with the shared base URL and key

Any harness that speaks the OpenAI protocol (including DeepSeek-style local harnesses) works by swapping the base URL.

  1. 1

    Point the harness at SuperToken

    Replace the upstream base URL with https://std.ai.id/v1 and use an st- key. Model ids are the ones listed in /v1/models.

  2. 2

    Use a DeepSeek model or any other

    deepseek-chat-v3.2 and deepseek-r1-v3.2 are available alongside GPT, Claude and Gemini under the same key.

Python harness
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://std.ai.id/v1",
    api_key=os.environ["ST_API_KEY"],
)

out = client.chat.completions.create(
    model="deepseek-chat-v3.2",
    messages=[{"role": "user", "content": "Explain this stack trace."}],
)
print(out.choices[0].message.content)

Hermes Agent

Works with the shared base URL and key

Hermes Agent accepts a custom OpenAI-compatible gateway, so SuperToken can back its model routing.

  1. 1

    Edit the provider config

    In config.yaml set the provider base URL to https://std.ai.id/v1 and reference the key from an environment variable, never inline.

  2. 2

    Run a test turn

    Start a session and send one message. Check the dashboard usage page to confirm the request landed and quota was deducted.

config.yaml
provider:
  name: supertoken
  base_url: https://std.ai.id/v1
  api_key: ${ST_API_KEY}
  model: gpt-5.1

Troubleshooting

  • 401 Unauthorized - the key is missing, revoked, or was pasted with whitespace. Create a new key from the dashboard.
  • 404 model not found - the model id must match /v1/models exactly, including version suffixes.
  • 429 Too Many Requests - per-minute limits come from your tier (30 to 300 rpm). Retry with backoff or upgrade.
  • Streaming breaks in a proxy - disable response buffering in the proxy; SuperToken sends standard SSE chunks.