Complete, working code examples for accessing 200+ AI models through a single API.
This repository contains ready-to-use examples for calling various AI models (DeepSeek, Qwen, Llama, etc.) through AI Token Hub - a unified API gateway that gives you access to 200+ models with a single API key.
pip install openaiimport openai
client = openai.OpenAI(
base_url="https://1d1aa683c7fe1260-115-190-127-67.serveousercontent.com/v1",
api_key="YOUR_API_KEY" # Get from https://aitoken-hub.github.io/aitoken-hub/
)
response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V3",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)| File | Description | Models |
|---|---|---|
chat/ |
Basic chat completions | All models |
coding/ |
Code generation & review | DeepSeek-V3, Qwen3 |
reasoning/ |
Chain-of-thought reasoning | DeepSeek-R1 |
vision/ |
Image understanding | Qwen2.5-VL |
batch/ |
Batch processing patterns | All models |
streaming/ |
Real-time streaming | All models |
multilingual/ |
Translation & multilingual | Qwen3, DeepSeek |
- ✅ All examples use OpenAI SDK (most developers already know it)
- ✅ Copy-paste ready - just add your API key
- ✅ Covers common patterns: chat, code, reasoning, vision, streaming
- ✅ Works with 200+ models - just change the model name
- DeepSeek-V3 (671B) - Best for coding and general tasks
- DeepSeek-R1 (671B) - Advanced reasoning and math
- Qwen3-235B - Alibaba's flagship, great for multilingual
- Qwen3-32B - Fast and cost-effective
- Llama 3.1 405B - Meta's open model
- 90+ more specialized models
- Register at AI Token Hub
- Get your API key from dashboard
- Start using any model
MIT