GPTokens

API documentation

Build with GPTokens and OpenAI-compatible SDKs

Start with one base URL and a GPTokens API key, discover live Chinese LLM routes, and keep model selection configurable as availability changes.

Documentation map

Choose the guide for your next step

Start here

Minimal OpenAI-compatible quickstart

  1. Create a GPTokens API key in Workspace and store it as a server-side secret.
  2. Set your client base URL to https://gptokens.ai/v1.
  3. Call /v1/models with your key to confirm the live model IDs available to your account.
  4. Send a chat completion request, then record model name, latency, token usage, and failures.

OpenAI-compatible request

Use GPTokens with existing SDKs

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.GPTOKENS_API_KEY,
  baseURL: "https://gptokens.ai/v1"
});

const response = await client.chat.completions.create({
  model: "qwen3.7-plus",
  messages: [{ role: "user", content: "Compare Chinese LLM routes for my task." }]
});

Route discovery

Treat the live model list as the runtime source of truth

Model pages help with planning, but provider availability, model identifiers, account access, and pricing can change. Check /v1/models and the live terms in Workspace before hard-coding a production route.

FAQ

Questions developers ask before buying Chinese LLM tokens

Is GPTokens compatible with OpenAI SDKs?

GPTokens supports the common OpenAI-compatible request pattern. Set the GPTokens base URL, use a GPTokens API key, and choose a model ID returned by the live model list.

Where should I get model IDs?

Use the model directory for planning, then call /v1/models with your API key before production because route availability and identifiers can change.

Should I put an API key in browser code?

No. Keep GPTokens API keys in server-side secrets and use separate keys for development, staging, and production.

Where can I review prices and security guidance?

Use the pricing page for billing concepts, Workspace for live account terms and route prices, and the security page for key-handling guidance.