Skip to content

Integrations Overview ​

TokenSG speaks both the OpenAI Chat Completions protocol and the Anthropic Messages protocol (/v1/chat/completions + /v1/messages), so virtually every mainstream developer CLI, IDE extension, and SDK can talk to TokenSG without code changes. The matrix below covers the five officially tested integrations; any other OpenAI-compatible tool works via the Generic OpenAI-Compatible guide.

Supported integrations ​

IntegrationProtocolGuide
Claude CodeAnthropic Messages (/v1/messages)Claude Code
OpenCodeOpenAI Chat or Anthropic MessagesOpenCode
OpenAI Codex CLIOpenAI Chat (wire_api = "chat")Codex CLI
Gemini CLILimited (native Google GLA only) — workaround via OpenAI-compatible CLIGemini CLI
Generic OpenAI-CompatibleOpenAI Chat — Cursor, Cline, Continue.dev, Vercel AI SDK, LangChain, LlamaIndex, etc.OpenAI-Compatible Tools

Not sure which one to pick? ​

Your primary goalRecommended path
Use Claude models through a dedicated agentic CLIClaude Code or OpenCode (Anthropic mode)
Use GPT-4o / o3 / o4-mini in a terminal coding agentOpenAI Codex CLI or OpenCode (OpenAI mode)
Use Gemini models programmaticallyAny OpenAI-Compatible CLI with model: "gemini-2.5-pro" — TokenSG routes to Google GLA / Vertex internally (see Gemini CLI for why the native CLI itself is a poor fit)
Drive TokenSG from Cursor / Cline / Continue / Zed / Vercel AI SDK / LangChain / any IDE pluginGeneric OpenAI-Compatible — change base_url and go
Build custom automation in Python / Node.js / GoOpenAI SDK with base_url = https://api.tokensg.ai/v1 — see Quick Start

Universal basics ​

  • OpenAI-compatible endpoint: https://api.tokensg.ai/v1
  • Anthropic-compatible endpoint: https://api.tokensg.ai (the SDK appends /v1/messages automatically)
  • Authentication: Authorization: Bearer sk-xxx — TokenSG does not accept Anthropic-style x-api-key
  • Verifying: open the Dashboard and watch Request Logs / Today's Usage — a new row means you're connected

Don't see your tool?

Any tool that lets you change the OpenAI base URL will work — follow the Generic OpenAI-Compatible pattern. If you'd like us to add a dedicated page, please open a PR on github.com/xmai-ai/xmai-docs.