GPTokens

OpenAI-compatible API docs

Use Chinese LLM routes with existing OpenAI SDKs

Replace the base URL, set your GPTokens API key, choose a supported model from /v1/models, and send standard chat completion requests.

Quickstart

Integration checklist

1. Create a key

Open your GPTokens workspace, create an API key, and store it as a production secret.

2. Set the base URL

Use the GPTokens /v1 endpoint in OpenAI-compatible clients and agent tools.

3. Pick a live model

Call /v1/models before hard-coding names because route availability can change.

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." }]
});

Operational guidance

Production rules

  • Keep model names configurable so you can switch between DeepSeek, Qwen, Kimi, GLM, MiniMax, and MiMo.
  • Log model name, latency, token usage, failure status, and fallback path for every production request.
  • Test tool calls and structured output with your own validators before relying on benchmark scores.
  • Use separate keys for development, staging, and production workloads.

FAQ

Questions developers ask before buying Chinese LLM tokens

Is GPTokens run by a model provider?

No. GPTokens is an independent OpenAI-compatible gateway. It issues GPTokens API keys and routes requests to supported Chinese LLM providers through one account.

Can I use an OpenAI SDK?

Yes. Most integrations only need the GPTokens base URL, a GPTokens API key, and a supported model name from the live model list.

Who is this for?

GPTokens is built for developers and teams in the US, Europe, and other global markets that want to test Chinese LLM APIs without managing separate provider accounts, payment methods, and dashboards.

Should I hard-code model names?

Use the model pages for planning, then call /v1/models before production. Availability, routing, context windows, and price can change as providers update models.