/ docs
Quickstart
Start with the same SDK style. Change base_url, API key, and model ID.
Code first
Python, Node, and curl examples use the same OpenAI-compatible endpoint.
Python
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)Node
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
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"}]
}'Docs index
Every core integration page in one place.
Quickstart
Connect to NextModel in three minutes with an OpenAI-compatible SDK and one base_url change.
Authentication
Use Bearer tokens, project-scoped keys, and budget-aware key management for AI API calls.
Chat completions
Call chat models through one OpenAI-compatible request shape.
Streaming
Understand streaming capability labels before using a model in production.
Models
Fetch model prices, capabilities, source labels, context length, and recommended use cases.
Errors
Common HTTP error categories for gateway and provider troubleshooting.
Billing
Estimate model cost and reconcile usage across projects and keys.
OpenAI migration
Move an existing OpenAI SDK integration to NextModel with minimal application changes.