Integrate in 3 Minutes

One line of code to access GPT-4o, Claude 3.5, and our cost-saving Auto-Router.

1

Get Your Unified Key

Sign up and generate an API key. This single key replaces your subscriptions to OpenAI, Anthropic, and Mistral.

2

Point to DevLume Gateway

You don't need to install a new SDK. Just configure your existing OpenAI client to use our Base URL.

Base URL
https://api.devlume.io/v1
API Key Format
dv_sk_...
3

Enable Auto-Routing

Here is the magic: instead of specifying gpt-4o, use devlume-auto. We will analyze the prompt and route it to the optimal model.

Python
from openai import OpenAI

# 1. Configure the client
client = OpenAI(
    api_key="dv_sk_...",
    base_url="https://api.devlume.io/v1"  # <--- The only change
)

# 2. Use the Smart Router
response = client.chat.completions.create(
    model="devlume-auto", # <--- Magic happens here
    messages=[
        {"role": "user", "content": "Analyze this financial statement..."}
    ]
)

print(response.choices[0].message.content)

How it works: If the prompt is simple ("Hello", "Summarize"), we route to Flash models. If it requires logic, we route to SOTA. You save money automatically.

Compatible SDKs

Devlume works out of the box with:

OpenAI PythonOpenAI Node.jsLangChainVercel AI SDKAutogenFlowise