DEV Community

Daniel Dong
Daniel Dong

Posted on

You don't need a new SDK every time you want to try a different AI model.

You don't need a new SDK every time you want to try a different AI model.

import openai

# One client. All models.
client = openai.OpenAI(
    api_key="mb-xxx",
    base_url="https://aibridge-api.com/v1"
)

# Fast and cheap ($0.27/M)
client.chat.completions.create(model="deepseek-chat", messages=messages)

# Multilingual, 128K context
client.chat.completions.create(model="qwen-max", messages=messages)

# Complex reasoning
client.chat.completions.create(model="glm-4-plus", messages=messages)

# 1M context, always reasoning
client.chat.completions.create(model="kimi-k3", messages=messages)
Enter fullscreen mode Exit fullscreen mode

Same import openai. Same .chat.completions.create(). Same response format.

The only thing that changes is a string.

No new PyPI packages. No new environment variables. No new API key rotation. No "wait, which provider uses system_prompt vs instructions vs system."

15 Chinese AI models. One endpoint. 500K free tokens/month. GitHub login in one click.

aibridge-api.com/playground.html (try without signing up)
aibridge-api.com

1

2

34

4

Top comments (0)