USER GUIDE

Ship on TokenGP in 5 minutes

From signup to your first model call — one doc covers it all. Every endpoint is OpenAI-compatible, so migration cost is zero.

Overview · 5 steps end-to-end

Sign up → top up → create key → call → track usage

1

Sign up

Email + password — instantly active

2

Top up wallet

Online top-up (Alipay / WeChat Pay, coming soon) or corporate transfer via support

3

Create API Key

Set name, RPM, balance cap — shown only once

4

Call a model

OpenAI-compatible SDK, zero migration, 110+ models

5

Track usage

Real-time balance, transactions, stats by model / key

1. Sign up

Email + password — done in 30 seconds

Email signup

  1. Fill in email + password (8+ chars) on the portal signup page
  2. The system auto-generates your invite code (8 chars) plus a public code (e.g. AB123456)
  3. You can sign in straight away — we recommend verifying your email once

2. Top up your wallet

Online top-up coming soon — corporate transfer available today

Online top-up

Alipay and WeChat Pay are being integrated and will be available soon.

Corporate transfer

Contact support or your business contact to top up via corporate bank transfer at any time.

Referral commission

Default L1 5% / L2 2% two-tier commission credited in real time on every spend by your invitees (final rate depends on the tenant you signed up under).

Online top-up is being upgraded. Alipay and WeChat Pay will be available soon. Until then, contact support or your business contact to top up via corporate transfer.

3. Create an API Key

Create as many as you want — each with its own limits

  1. 1
    Go to /keys and click "Create Key"

    Name (required), optional RPM cap, optional cumulative spend cap, optional expiry.

  2. 2
    Copy the full key immediately and save it

    Key format: sk-tokengp-XXXXXXXX.... Shown only once at creation — once you close the dialog it's gone for good.

  3. 3
    Wire it into your SDK or env var

    We recommend an env var like TOKENGP_KEY — don't hard-code, don't commit.

Key leaked? What now? Go to /keys and disable it, then create a new one. Spend incurred during the leak counts as real usage and is non-refundable.

4. Call your first model

OpenAI-compatible — change only the base_url in your existing code

Chat completions

curl
curl https://api.tokengp.com/v1/chat/completions \
  -H "Authorization: Bearer $TOKENGP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-flash",
    "messages": [{"role":"user","content":"Hello, TokenGP!"}]
  }'

Python OpenAI SDK

python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.tokengp.com/v1",
    api_key="sk-tokengp-...",
)

resp = client.chat.completions.create(
    model="qwen-flash",
    messages=[{"role": "user", "content": "Hello"}],
)

print(resp.choices[0].message.content)

Text embeddings

curl
curl https://api.tokengp.com/v1/embeddings \
  -H "Authorization: Bearer $TOKENGP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"text-embedding-v4","input":"Hello world"}'

Image generation

curl
curl https://api.tokengp.com/v1/images/generations \
  -H "Authorization: Bearer $TOKENGP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen-image-plus","prompt":"red apple","size":"1024x1024"}'
Leading models available: Qwen / DeepSeek / Kimi / GLM and more — see full pricing.

5. Track usage and balance

Real-time bills + multi-dimensional stats + referral commission

💼

/dashboard

Current balance, this month’s spend, last 30 days of calls, average latency, last 5 calls, trend chart.

📊

/usage

Pick a date range, see total calls, total tokens, total spend; sliced by day / model / key.

🤝

/referral

Your invite code + link. L1 5% + L2 2% credited in real time.

Error codes cheatsheet

Use this table to find the fix

HTTPError codeCause + fix
401missing_key / invalid_keyAuthorization header missing, key typo, or a character dropped while copying
402insufficient_balanceBalance too low — top up
402cap_reachedThis key hit its cumulative cap — create a new one or raise the cap
403account_suspendedAccount suspended by risk control — contact support
403disabledKey disabled — enable it or create a new one
404model_not_foundModel name typo or retired — check /models for the live list
429rate_limit_exceededHit the per-key RPM cap
503upstream_unavailableUpstream temporarily down — retry or switch to a fallback model

Start now

Ship your first model call in 5 minutes. Pay only for what you use.