Skip to content

aitoken-hub/ai-api-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI API Examples 🚀

Complete, working code examples for accessing 200+ AI models through a single API.

What is this?

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.

Quick Start

pip install openai
import 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)

Examples

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

Why use these examples?

  • ✅ 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

Available Models

  • 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

Get Your API Key

  1. Register at AI Token Hub
  2. Get your API key from dashboard
  3. Start using any model

License

MIT

About

Working code examples for 200+ AI models via single API - DeepSeek, Qwen, Llama, and more

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages