Quick Start
This guide walks you through setting up TokenGO and sending your first API request.
Step 1: Create an Account
- Go to TokenGO Console
- Sign up with your email or use GitHub/Google OAuth
- Verify your email address
Step 2: Top Up Your Balance
Before making API requests, you need balance in your account:
- Navigate to Billing in the sidebar
- Click Top Up to open the payment dialog
- Select a preset amount ($10, $20, $50, $100, $200, $500) or enter a custom amount
- Complete the Stripe payment
- Your balance updates immediately after payment
Step 3: Create an API Key
- Navigate to API Keys in the sidebar
- Click Create Key
- Enter a name for your key (e.g.,
my-first-key) - Choose whether the key has unlimited or limited quota
- Set an expiration date or toggle Never Expire
- Click Create — your API key will be displayed once. Copy it now, you won't be able to see it again.
Set it as an environment variable:
export THORBASE_API_KEY="your_api_key_here"Step 4: Send Your First Request
TokenGO is compatible with the OpenAI API format. Use any OpenAI SDK or make a direct HTTP request:
curl https://api.thorbase.com/v1/chat/completions \
-H "Authorization: Bearer $THORBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "Hello, TokenGO!"}]
}'Step 5: Integrate with Your Code
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
api_key="your_api_key",
base_url="https://api.thorbase.com/v1"
)
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)TypeScript (OpenAI SDK)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.THORBASE_API_KEY,
baseURL: "https://api.thorbase.com/v1",
});
const response = await client.chat.completions.create({
model: "gpt-4o-mini",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);Java (OpenAI-compatible client)
// Use any OpenAI-compatible Java client
// Set base URL to: https://api.thorbase.com/v1
// Set API key to: your_api_keyGo (OpenAI-compatible client)
// Use any OpenAI-compatible Go client
// Set base URL to: https://api.thorbase.com/v1
// Set API key to: your_api_keyNext Steps
- Model Hub — Browse all available models and pricing
- Playground — Test models interactively
- Billing — Understand your spending and top up
- Usage Logs — Track your API usage in detail