Quickstart

Get from sign-up to your first API call in under 3 minutes. TokonLab is fully OpenAI-compatible — just change the base URL.

Step 1 — Sign up

Create a free account. Free tier includes 50 requests/day with no credit card required.

Step 2 — Generate API Key

Go to your dashboard and create an API key. It looks like this:

API Key format
sk-tokon-xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Step 3 — Install SDK

bash
# Python
pip install openai

# Node.js
npm install openai

Step 4 — Make your first request

python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.tokonlab.com/v1",
    api_key="sk-tokon-your-api-key",
)

response = client.chat.completions.create(
    model="cheap-model",  # or "fast-model" / "best-model"
    messages=[
        {"role": "user", "content": "Hello"}
    ]
)

print(response.choices[0].message.content)
# Output: Hello! How can I help you today?
javascript
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.tokonlab.com/v1',
  apiKey: 'sk-tokon-your-api-key',
});

const response = await client.chat.completions.create({
  model: 'cheap-model',
  messages: [{ role: 'user', content: 'Hello' }],
});

console.log(response.choices[0].message.content);

Success criteria: Developer can sign up, get API key, and call API within 3 minutes. System routes to at least 2 providers. Usage and billing are correctly recorded.