Bắt đầu nhanh
Chuyển từ SDK OpenAI hiện có sang NextModel chỉ với ba thay đổi: địa chỉ gốc của SDK, khóa API và mã nhận dạng model.
Ưu tiên code
Ví dụ Python, Node, và curl đều dùng cùng một endpoint tương thích OpenAI.
Bắt đầu nhanh thay đổi gì?
Việc chuyển sang NextModel thường chỉ thay đổi ba giá trị: địa chỉ gốc của SDK, khóa API và mã nhận dạng model. Dạng yêu cầu vẫn tương thích với OpenAI, nên đội ngũ có thể so sánh chi phí model, chất lượng và mức phù hợp của nhà cung cấp trước khi đụng sâu hơn vào mã ứng dụng.
curl https://api.nextmodel.app/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NEXTMODEL_API_KEY" \
-d '{"model":"qwen/qwen3.7-max","messages":[{"role":"user","content":"Reply with OK."}]}'# pip install openai
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["NEXTMODEL_API_KEY"],
base_url="https://api.nextmodel.app/v1",
)
resp = client.chat.completions.create(
model="qwen/qwen3.7-max",
messages=[{"role": "user", "content":"Reply with OK."}],
)
print(resp.choices[0].message.content)// npm install openai
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.NEXTMODEL_API_KEY,
baseURL: "https://api.nextmodel.app/v1",
});
const resp = await client.chat.completions.create({
model: "qwen/qwen3.7-max",
messages: [{ role: "user", "content":"Reply with OK." }],
});
console.log(resp.choices[0].message.content);Mục lục tài liệu
Tất cả trang tích hợp cốt lõi ở một chỗ.
Bắt đầu nhanh
Kết nối SDK OpenAI hiện có với NextModel trong ba phút, rồi so sánh nhà cung cấp và giữ chi phí luôn rõ ràng trước khi chuyển lưu lượng thực tế.
Xác thực
Dùng token Bearer, khóa theo dự án, và cách quản lý khóa có ý thức ngân sách cho các lời gọi API AI.
Hoàn tất chat
Gọi model chat bằng một dạng yêu cầu duy nhất tương thích OpenAI.
Phát trực tuyến
Hiểu nhãn năng lực streaming trước khi dùng model ở môi trường thực tế.
Model
Lấy giá model, năng lực, nhãn nguồn, độ dài context, và use case được khuyến nghị.
Lỗi
Các nhóm lỗi HTTP thường gặp khi gỡ rối gateway và nhà cung cấp.
Thanh toán
Ước tính chi phí model và đối soát usage theo dự án và theo khóa.
Di chuyển từ OpenAI
Chuyển một tích hợp OpenAI hiện có sang NextModel với thay đổi ứng dụng tối thiểu.
CacheSafety Bench
Hiểu cách đo khả năng tái sử dụng an toàn của phản hồi LLM trước khi bật bộ nhớ đệm ở môi trường thực tế.
Chat
The OpenAI-compatible chat surface: same SDK, same shapes, streaming and tools included.
Video
Submit a video job, poll it, and pass reference images as URLs or inline data URIs.
Audio
Audio SKUs today, and why this page ships no audio snippet yet.
Models
The catalog is the reference: every model page carries copy-paste snippets built from live metadata.
Claude Code
Claude Code talks the Anthropic protocol natively — point it at the gateway host, no path suffix.
Cursor
Add NextModel as an OpenAI-compatible provider in Cursor.
Any client
The three-edit migration, restated for agents and plain HTTP clients.
Codex CLI
Register NextModel as a custom OpenAI-compatible model provider in Codex CLI.
OpenCode
Add NextModel as an OpenAI-compatible provider in opencode.json.
Crush
Point the Charm Crush agent at NextModel via crush.json.
Cherry Studio
Add NextModel as an OpenAI-compatible provider in Cherry Studio.
Cline
Use NextModel as the OpenAI-compatible provider in the Cline VS Code extension.
Model IDs
How catalog ids are shaped, why they contain slashes, and which id to send where.
Usage
Query balance and usage over the API, and read the per-request billing headers.
FAQ
Migration, billing boundaries, limits, and the questions support answers most.
API Reference
Every live gateway endpoint, grouped by protocol, with auth conventions and rate-limit headers.
Verify Responses
From per-request billing headers to cryptographic receipts anchored on Base — how to prove what happened, not take it on faith.