Skip to content

yangyongfee-tech/aipower-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AIPower Examples

Working example apps using AIPower — one API for 16 AI models (GPT-5, Claude, DeepSeek, Qwen, Gemini, and 11 more).

🚀 Quick Start

  1. Get a free API key at aipower.me (10 free calls, no card)
  2. Pick an example below
  3. Set AIPOWER_API_KEY env var and run

📦 Examples

Example Description Tech
python/ Python starter — chat, streaming, smart routing Python 3.8+
node/ Node.js starter — async chat, tool calling Node 18+
nextjs-chatbot/ Full-stack chatbot with model switcher Next.js 15 + Vercel AI SDK

🌍 Why AIPower?

  • 16 models, one API — GPT, Claude, DeepSeek, Qwen, GLM, Kimi, Doubao, Gemini
  • OpenAI SDK compatible — change one line of code
  • Smart routing — use model="auto" and let AI pick the best model
  • Chinese AI models — DeepSeek, Qwen, GLM, Kimi, Doubao available without Chinese accounts
  • Cheapest in the industry — GLM-4 Flash at $0.01/M tokens
  • WeChat Pay — pay in CNY/HKD alongside credit card

💡 Common Patterns

Smart routing (let AI pick)

r = client.chat.completions.create(
    model="auto",  # or auto-cheap, auto-code, auto-best
    messages=[...],
)

Model fallback (reliability)

try:
    r = client.chat.completions.create(model="openai/gpt-5", ...)
except:
    r = client.chat.completions.create(model="deepseek/deepseek-chat", ...)

Cost-optimized tiering

# Use GLM-4 Flash for classification ($0.01/M)
# Use DeepSeek V3 for chat ($0.32/M)
# Use Claude Opus only for complex tasks ($5.75/M)

📖 Documentation

🤝 Contributing

PRs welcome. Add your example and open a PR.

📄 License

MIT

About

Working code samples for AIPower — one OpenAI-compatible API for 16 AI models (GPT, Claude, Gemini, DeepSeek, Qwen, Kimi, GLM, Doubao, MiniMax)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors