/ 文件 / 台灣

快速開始

只需三處修改就能把現有 OpenAI SDK 接到 NextModel:SDK 基礎位址、API 金鑰和模型識別碼。

程式碼優先

Python、Node 和 curl 範例都使用同一個 OpenAI 相容端點。

快速開始會改哪些內容?

接到 NextModel 通常只會改三個值:SDK 基礎位址、API 金鑰和模型識別碼。請求格式保持 OpenAI 相容,因此台灣團隊可以先比較模型成本、品質和供應商適配度,再進一步調整應用程式碼。

curl
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."}]}'
Python
# 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)
Node.js
// 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);

文件索引

把所有核心整合頁面放在一起。

台灣快速開始

用三分鐘把既有 OpenAI SDK 連接到 NextModel,方便台灣團隊在正式流量前比較供應商並看清 API 成本。

認證

使用 Bearer Token、專案級 API 金鑰和可控的金鑰管理方式發起 AI API 呼叫。

聊天補全

使用統一的 OpenAI 相容請求格式呼叫聊天模型。

串流輸出

在生產環境啟用串流輸出前,先弄清楚模型的串流能力標籤。

模型

取得模型價格、能力、來源標籤、上下文長度和推薦使用場景。

錯誤

閘道和上游提供方排障時常見的 HTTP 錯誤分類。

計費

先估算模型成本,再依專案與金鑰對帳,讓台灣團隊更容易管理費用與用量。

OpenAI 相容接入

用最小改動把現有 OpenAI SDK 接到 NextModel。

CacheSafety Bench

在啟用生產快取前,先判斷 LLM 回應重用到底安不安全。

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.