Skip to content

FAQ ​

What is the difference between TokenSG and calling OpenAI/Anthropic/Google directly? ​

TokenSG provides a unified API that lets you access models from multiple providers (OpenAI, Anthropic, Google, and more) through a single endpoint and API key. Benefits include:

  • One API, many models — No need to manage separate accounts and keys for each provider
  • Cost savings — Pay-as-you-go pricing with competitive rates
  • High availability — Automatic failover across multiple channels
  • OpenAI-compatible — Use the standard OpenAI SDK with zero code changes

How do I migrate from OpenAI to TokenSG? ​

It's a one-line change. Just update the base_url in your OpenAI SDK configuration:

python
# Before (OpenAI direct)
client = OpenAI(api_key="sk-openai-key")

# After (TokenSG)
client = OpenAI(
    api_key="sk-your-tokensg-key",
    base_url="https://api.tokensg.ai/v1",
)
javascript
// Before (OpenAI direct)
const client = new OpenAI({ apiKey: 'sk-openai-key' })

// After (TokenSG)
const client = new OpenAI({
  apiKey: 'sk-your-tokensg-key',
  baseURL: 'https://api.tokensg.ai/v1',
})

All your existing code — model parameters, message formats, streaming — works exactly the same.

Using a CLI like Claude Code / OpenCode / Codex? See Integrations for step-by-step guides.

What models are supported? ​

TokenSG supports models from OpenAI, Anthropic, Google, and more. Visit the Models page for the full list with real-time pricing.

How do I check my balance and usage? ​

Log in to the Dashboard to view:

  • Balance — Your current account balance
  • Usage — Request history and cost breakdown
  • Top-up — Add funds via credit card (powered by Airwallex)

My account has negotiated pricing — why does /v1/models still show list price? ​

GET /v1/models returns the public price catalog and does not vary by caller. Billing always uses your account's negotiated price — treat the dashboard usage logs and invoices as the source of truth. See Enterprise Pricing for details.

Once signed in to the dashboard, the model list, price comparison, and model detail pages all show your negotiated price; signed-out pages and the marketing site show list price.

What if I lose my API key? ​

API keys are only shown once when created. If you lose your key:

  1. Log in to the Dashboard
  2. Revoke the lost key (to prevent unauthorized use)
  3. Create a new key
  4. Update your application with the new key

How do I troubleshoot failed requests? ​

  1. Check the error response — The type field tells you what went wrong. See Error Codes for details.
  2. Verify your API key — Make sure the key is valid and included in the Authorization: Bearer header.
  3. Check your balance — A 402 error means you need to top up.
  4. Check rate limits — A 429 error means you're sending too many requests. Implement backoff and retry.
  5. Try a different model — A 503 error means the model is temporarily unavailable. Try an alternative model.
  6. Check the request format — Ensure your request body matches the API reference.