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
Sign up
Email + password — instantly active
Top up wallet
Online top-up (Alipay / WeChat Pay, coming soon) or corporate transfer via support
Create API Key
Set name, RPM, balance cap — shown only once
Call a model
OpenAI-compatible SDK, zero migration, 110+ models
Track usage
Real-time balance, transactions, stats by model / key
1. Sign up
Email + password — done in 30 seconds
Email signup
- Fill in email + password (8+ chars) on the portal signup page
- The system auto-generates your invite code (8 chars) plus a public code (e.g.
AB123456) - 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).
3. Create an API Key
Create as many as you want — each with its own limits
- 1Go to /keys and click "Create Key"
Name (required), optional RPM cap, optional cumulative spend cap, optional expiry.
- 2Copy 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. - 3Wire it into your SDK or env var
We recommend an env var like
TOKENGP_KEY— don't hard-code, don't commit.
4. Call your first model
OpenAI-compatible — change only the base_url in your existing code
Chat completions
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
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 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 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"}'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
| HTTP | Error code | Cause + fix |
|---|---|---|
| 401 | missing_key / invalid_key | Authorization header missing, key typo, or a character dropped while copying |
| 402 | insufficient_balance | Balance too low — top up |
| 402 | cap_reached | This key hit its cumulative cap — create a new one or raise the cap |
| 403 | account_suspended | Account suspended by risk control — contact support |
| 403 | disabled | Key disabled — enable it or create a new one |
| 404 | model_not_found | Model name typo or retired — check /models for the live list |
| 429 | rate_limit_exceeded | Hit the per-key RPM cap |
| 503 | upstream_unavailable | Upstream 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.