文档

快速开始

沿用熟悉的 SDK 调用方式,但先把提供方、成本和工作负载放进同一视野。

代码优先

Python、Node 和 curl 示例都走同一个 OpenAI 兼容端点。

快速开始要改什么?

NextModel 接入通常只改三个值:SDK 基础 URL、API 密钥和模型 ID。请求形状仍保持 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,跑通第一次调用;换模型只改一个字段。

认证

使用 Bearer Token、项目级 API 密钥和可控的密钥管理方式发起 AI API 调用。

聊天补全

使用统一的 OpenAI 兼容请求格式调用聊天模型。

流式输出

在生产环境启用流式输出前,先弄清楚模型的流式能力标签。

模型

获取模型价格、能力、来源标签、上下文长度和推荐使用场景。

错误

网关和上游提供方排障时常见的 HTTP 错误分类。

计费

按项目和密钥来估算模型成本并对账。

OpenAI 兼容接入

用最小改动把现有 OpenAI SDK 接到 NextModel。

CacheSafety Bench

在启用生产缓存前,先判断 LLM 响应复用到底安不安全。

聊天

OpenAI 兼容的聊天面:同款 SDK、同款结构,流式与工具调用都支持。

视频

提交视频任务、轮询结果,参考图支持 URL 或内联 data URI。

音频

音频 SKU 现状,以及本页为何暂不提供音频代码示例。

模型

目录即参考:每个模型页都有由实时元数据生成的可复制示例。

Claude Code

一个环境变量块,把任何 OpenAI 兼容的编码 Agent 指向 NextModel。

Cursor

在 Cursor 里把 NextModel 添加为 OpenAI 兼容提供方。

通用客户端

面向 Agent 与原生 HTTP 客户端重述的三处修改迁移法。

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.