QUICKSTART

From zero to your first call in 60 seconds

One endpoint, your existing OpenAI code. If something doesn't work, jump to troubleshooting.

1

Create your account with a real email

Go to api.novatoken.dev/register and sign up.

2

Create an API key

In the dashboard sidebar, open Tokens (令牌) → click Add Token (添加令牌).

The key is shown once. If you lose it, delete the token and create a new one — it takes five seconds.
3

Pick a model — or let auto pick for you

Not sure which model to use? Set "model": "auto" and we route each request to the cheapest model that can handle it well — short chat goes to Qwen, everyday answers to GLM, hard reasoning to DeepSeek. You pay that model's normal per-token rate, exactly as if you had picked it yourself. No routing fee, no markup.

Model nameUSD per 1M in / outUse it for
autoSTART HERE Same as the model it picks
$0.10 – $0.30 in / $0.30 – $1.20 out
Default choice. Difficulty-based routing at the chosen model's own rate — you are charged for Qwen when Qwen answers, DeepSeek when DeepSeek answers. Your usage log shows the real model name.
Qwen/Qwen2.5-7B-Instruct $0.10 / $0.30 Fastest replies (~2s), 32K context. Translation, rewriting, classification, simple Q&A.
zai-org/GLM-5.3-Flash $0.15 / $0.50 1M context, strong Chinese + English, light reasoning and summaries.
deepseek-ai/DeepSeek-V4-Flash $0.30 / $1.20
cache hit $0.006
1M context, deep reasoning, math, long documents. Cache-hit input is 50x cheaper than list.
moonshotai/Kimi-K2.7-Code $1.20 / $5.00 262K context. Coding agents, repo-scale edits, tool-heavy workflows.

All five support streaming, tool / function calling and JSON mode. Use the exact name including the vendor/ prefix — a typo returns model not found.

Rule of thumb: chat app → auto. Heavy coding → moonshotai/Kimi-K2.7-Code. You can switch per request, no new key needed.
4

Point your code at the endpoint

Base URL: https://api.novatoken.dev/v1 — it behaves exactly like the OpenAI API.

# curl — the whole thing in one line
curl https://api.novatoken.dev/v1/chat/completions \
  -H "Authorization: Bearer sk-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"auto","messages":[{"role":"user","content":"hi"}]}'
# python (pip install openai)
from openai import OpenAI
client = OpenAI(api_key="sk-YOUR_KEY", base_url="https://api.novatoken.dev/v1")
r = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Explain JWT in three bullets."}])
print(r.choices[0].message.content)
# python — streaming (recommended for chat UIs)
stream = client.chat.completions.create(
    model="auto", stream=True,
    messages=[{"role": "user", "content": "Write a haiku about rain."}])
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")
// node (npm i openai)
import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.NOVATOKEN_KEY, baseURL: "https://api.novatoken.dev/v1" });
const r = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "hi" }],
});
console.log(r.choices[0].message.content);
Migrating existing code? Change two values only: base_url → https://api.novatoken.dev/v1 and api_key → your sk- key. Everything else (SDK, request shape, streaming, tool calls) stays the same.
5

Or use a desktop / mobile / IDE client

Any app that accepts a custom OpenAI-compatible endpoint works. Fill in two fields — endpoint and key:

AppWhereWhat to enter
Cherry StudioSettings → Model Provider → Add → OpenAIAPI Host: https://api.novatoken.dev  ·  API Key: sk-...
ChatboxSettings → Model → Add custom providerAPI Host: https://api.novatoken.dev/v1
LobeChat / NextChatSettings → Language Model → OpenAIBase URL: https://api.novatoken.dev/v1
CursorSettings → Models → OpenAI API Key + Override Base URLBase URL: https://api.novatoken.dev/v1  ·  model: moonshotai/Kimi-K2.7-Code
Cline / Roo Code (VS Code)Provider: OpenAI CompatibleBase URL: https://api.novatoken.dev/v1
Continueconfig.json → models → provider: openaiapiBase: https://api.novatoken.dev/v1
Dify / n8nModel provider → OpenAI-API-compatibleBase URL: https://api.novatoken.dev/v1

Some clients let you type any model name — use the full names from the table in step 3. Others only show a fixed list; pick the closest and override the model string if the app allows it.

?

Troubleshooting

You seeMeaningFix
401 invalid tokenKey wrong, deleted, or has a stray space/newlineCreate a fresh token, paste it again, make sure there's no trailing space
403 insufficient quotaAccount balance is $0Credits not applied yet → refresh the console; if still missing, email support with your receipt
404 model not foundModel name typoCopy the exact name from step 3, including the vendor/ prefix and case
400 context length exceededInput longer than the model's windowQwen 32K · Kimi 262K · GLM and DeepSeek 1M. Trim history or switch model
429Rate limitedSlow down, or use stream: true and retry with exponential backoff
First words take 5–15sReasoning models think before answeringExpected. Use stream: true, or pick Qwen2.5-7B / auto for instant replies
connection reset / timeout on long outputClient timeout shorter than generation timeRaise the client timeout (e.g. 300s) and enable streaming
i

Common questions

QuestionAnswer
Can I use this key with the official OpenAI API?This key is a NovaToken credential — it authenticates against our endpoint and draws down your NovaToken balance, so it is not an OpenAI account key. That is the point: your code keeps using the same OpenAI SDK, but you are billed per token by card for Chinese open-weight models, with no OpenAI account, subscription or card on file. If you also need OpenAI's own models, keep a separate OpenAI key for those calls.
Can I use it in my own app / backend / bot?Yes. It's a normal HTTP API — any language, server-side or client-side. Keep it out of public front-end code and rotate it if leaked.
Does auto cost extra?No. You pay the normal per-token price of whichever model answers the request — Qwen when Qwen answers, DeepSeek when DeepSeek answers. There is no routing fee and no markup on top of the model price.
Which model does auto actually use?Short chat → Qwen2.5-7B, everyday answers → GLM-5.3, hard reasoning and code → DeepSeek-V4. Your usage log records the real model that served each request, so the bill is always auditable.
Do credits expire?No. They sit on your balance until used.
Is my data used for training?No. We proxy to upstream inference providers and don't retain prompt or completion content beyond short-lived request logs used for billing.
Open dashboard → Buy $5 of credits