Skip to content

Latest commit

 

History

History
126 lines (102 loc) · 4.8 KB

File metadata and controls

126 lines (102 loc) · 4.8 KB
title Introduction
description Access hundreds of AI models through a unified API

What Is TokenLab?

TokenLab is an AI API aggregation platform that gives you unified access to hundreds of AI models from providers such as OpenAI, Anthropic, Google, DeepSeek, Moonshot, MiniMax, and more.

Use native Anthropic/Gemini routes when provider behavior matters, or OpenAI-compatible `/v1` routes for existing OpenAI-style tools. Call OpenAI, Anthropic, Gemini, and Responses-style endpoints from one platform. No subscriptions. Only pay for what you actually use. Smart routing, failover, and multi-channel support improve reliability.

Supported Capabilities

The public catalog changes over time. Use /v1/models, recommended_for, or the Models page for exact current availability; the examples below use current public model IDs.

Capability Description Example models
Chat & Reasoning Text generation, planning, tools gpt-5.4, claude-sonnet-4-6, deepseek-r1
Vision & Multimodal Image understanding and multimodal chat gpt-4o, claude-sonnet-4-6, gemini-3.5-flash
Image Generation & Editing Text-to-image and image editing gpt-image-2, flux-pro, qwen-image-plus
Video Generation Text-to-video, image-to-video, reference video, and motion control veo3.1, wan-2.7, kling-3.0-video, happyhorse-1.0
Audio & Realtime WebSocket TTS, transcription, audio translation, and realtime WebSocket sessions gpt-4o-mini-tts, whisper-1, gpt-realtime
Embeddings & Rerank Text vectorization and reranking text-embedding-3-small, qwen3-vl-rerank
Translation Text translation and WebSocket speech translation workflows doubao-seed-translation, gpt-realtime-translate
Music & 3D Music and 3D asset generation suno-music, tripo-h3.1
Worlds World generation, status polling, and media asset workflows Use /v1/worlds/generations and the Models API for current availability

Choose the Request Format

Start with the route that matches the behavior you need. Use native Anthropic/Gemini routes for provider-native features; use OpenAI-compatible /v1/chat/completions when migrating existing OpenAI-style chat code.

curl https://api.tokenlab.sh/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "messages": [
      {"role": "user", "content": "Explain what TokenLab does in one sentence."}
    ]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://api.tokenlab.sh/v1"
)

response = client.chat.completions.create(
    model="gpt-5.4",
    messages=[{"role": "user", "content": "Explain what TokenLab does in one sentence."}]
)

print(response.choices[0].message.content)
import OpenAI from 'openai';

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

const response = await client.chat.completions.create({
  model: 'gpt-5.4',
  messages: [{ role: 'user', content: 'Explain what TokenLab does in one sentence.' }],
});

console.log(response.choices[0].message.content);
Use `POST /v1/responses` only when you explicitly need Responses-specific behavior. It is not the default compatibility path across all models.

Key Features

Use OpenAI, Anthropic, Gemini, or Responses-native formats with one account. Structured hints help coding agents self-correct faster. Connect IDEs, SDKs, frameworks, and chat apps with fewer provider-specific changes.

Next Steps

Get your first request working in a couple of minutes. Explore the endpoint-by-endpoint reference. Start with SDK, IDE, and app integrations. Browse current model availability and pricing.