Direct answer
This page explains how UK teams use NextModel's OpenAI-compatible gateway. Connect an existing OpenAI SDK to NextModel in minutes, then compare providers and keep AI spend visible before UK production traffic grows. It adds the practical steps, configuration notes, and common questions.
Start with the OpenAI-compatible endpoint
NextModel is an OpenAI-compatible routing layer for teams shipping AI products. Set the SDK base URL to https://api.nextmodel.app/v1, use a NextModel API key, and choose a model ID from the catalog to compare providers before traffic scales.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.nextmodel.app/v1"
)
resp = client.chat.completions.create(
model="doubao-seed-2-0-mini",
messages=[{"role": "user", "content": "Hello from NextModel"}]
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.NEXTMODEL_API_KEY,
baseURL: "https://api.nextmodel.app/v1",
});
const response = await client.chat.completions.create({
model: "doubao-seed-2-0-mini",
messages: [{ role: "user", content: "Hello from NextModel" }],
});
console.log(response.choices[0].message.content);curl https://api.nextmodel.app/v1/chat/completions \
-H "Authorization: Bearer $NEXTMODEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seed-2-0-mini",
"messages": [{"role": "user", "content": "Hello from NextModel"}]
}'What changes from an existing OpenAI project?
Most migrations change three fields: the base URL, the API key, and the model name. Your application can keep the same chat-completions shape while comparing model price, capability, provider source, and workload fit.
| base_url | https://api.nextmodel.app/v1 |
| endpoint | /chat/completions |
| auth | Authorization: Bearer YOUR_API_KEY |
| model | Use a NextModel catalog ID such as doubao-seed-2-0-mini |