เริ่มต้นอย่างรวดเร็ว
ย้ายจาก OpenAI SDK เดิมไปยัง NextModel ด้วยการเปลี่ยนเพียงสามอย่าง: ที่อยู่ฐานของ SDK, คีย์ API และรหัสโมเดล.
โค้ดมาก่อน
ตัวอย่างใน Python, Node, และ curl ใช้ endpoint ที่เข้ากันได้กับ OpenAI เดียวกันทั้งหมด.
ในการเริ่มต้นอย่างรวดเร็ว เปลี่ยนอะไรบ้าง?
การย้ายไป NextModel ปกติจะเปลี่ยนเพียงสามค่า: ที่อยู่ฐานของ SDK, คีย์ API และรหัสโมเดล รูปแบบคำขอยังเข้ากันได้กับ OpenAI ทำให้ทีมเปรียบเทียบต้นทุนโมเดล คุณภาพ และความเหมาะกับผู้ให้บริการได้ก่อนจะแก้โค้ดแอปให้ลึกขึ้น.
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);ดัชนีเอกสาร
หน้าการเชื่อมต่อหลักทั้งหมดในที่เดียว.
เริ่มต้นอย่างรวดเร็ว
เชื่อม SDK OpenAI ที่มีอยู่เข้ากับ NextModel ภายในสามนาที แล้วเปรียบเทียบผู้ให้บริการและคุมต้นทุนให้ชัดก่อนส่งทราฟฟิกจริงไปใช้งาน.
การยืนยันตัวตน
ใช้ Bearer token, กุญแจที่ผูกกับโปรเจกต์, และการจัดการคีย์แบบคุมงบสำหรับการเรียก AI API.
การจบแชต
เรียก chat model ผ่าน request รูปแบบเดียวที่เข้ากันได้กับ OpenAI.
Streaming
ทำความเข้าใจป้ายความสามารถด้าน streaming ก่อนใช้ model ในสภาพใช้งานจริง.
Models
ดึงราคา model ความสามารถ ป้ายแหล่งที่มา ความยาว context และ use case ที่แนะนำ.
ข้อผิดพลาด
หมวดหมู่ HTTP error ที่พบบ่อยสำหรับการแก้ปัญหา gateway และผู้ให้บริการ.
การเรียกเก็บเงิน
ประมาณค่าใช้จ่ายของ model และกระทบยอดการใช้งานตามโปรเจกต์และตามคีย์.
ย้ายจาก OpenAI
ย้าย integration ของ OpenAI ที่มีอยู่ไปยัง NextModel โดยเปลี่ยนแอปน้อยที่สุด.
CacheSafety Bench
ทำความเข้าใจวิธีทดสอบการนำคำตอบ LLM กลับมาใช้ซ้ำอย่างปลอดภัยก่อนเปิดใช้ caching ในสภาพใช้งานจริง.
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.