使用单个 Bearer 密钥将 Vortixy Chat 集成到你的项目中。配额与你的套餐一致。 在仪表盘 → 你的 API 中创建密钥
发送消息,可选地附带对话历史、启用网络搜索或调整思考深度。计入您的计划每日消息和 Token 上限。
支持聊天机器人:添加 system 设置机器人人设(8k 字符),stream:true 获取 NDJSON 增量,webSearch 获取实时来源。每次调用都会扣除 tokens、请求和 web 搜索 — 与网页共享(00:00 UTC 重置)。
POST /api/v1/chat 的所有 JSON 字段。仅 message 必填 — 其餘均为可选。
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| message | string | yes | 用户消息(1–32,000 字符)。 |
| history | array | no | 历史轮次:[{ role: 'user' | 'assistant', content: string }](最多 20)。 |
| system | string | no | 机器人人设 / 指令(最多 8k)。也接受别名 instructions。 |
| provider | string | no | gemini(托管,默认)。如需 BYOK,请在 Dashboard → 设置 → AI 密钥中保存密钥,然后使用 provider openai / anthropic / deepseek / gemini 并指定 BYOK 模型 ID。 |
| model | string | no | 模型 ID — 见下表。必须是该 provider + 套餐允许的。 |
| chatMode | enum | no | 聊天模式:fast | smart | auto(auto 按查询自动选择)。优先于 model — 设置时请省略 model。也接受别名 engineMode。 |
| thinkingLevel | enum | no | none | low | medium | high | xhigh | max(xhigh/max 仅适用于 GPT-5.6)。 |
| webSearch | boolean | no | true 启用实时网络搜索。计入每日搜索配额。 |
| stream | boolean | no | true 启用 NDJSON 流式(delta → done)。默认为 false(JSON)。 |
提示:省略 provider/model 将使用你套餐的最佳模型。聊天机器人请设 stream:true。
推理现已按模式自动进行 — Fast 用 low,Smart 用 high,Auto 会根据你的问题智能选择。你不再需要选择级别。API 仍接受 thinkingLevel,但为可选项,且会被模式覆盖。
| 级别 | 描述 |
|---|---|
| none | 不思考 — 最快,token 消耗最低。 |
| low | 轻度思考 — 快速回答,略加思考。 |
| medium | 均衡思考 — 适合大多数任务。 |
| high | 深度思考 — 适用于复杂分析与规划。 |
| xhigh | 非常深入 — 仅前沿模型,适合难题。 |
| max | 最大 — 占用全部思考预算,最慢且最贵。 |
Fast → low/medium,Smart → medium/high,Auto → 每次查询选择 low→high。无需用户选择 — 系统时刻智能判断。
选模式,不选模型。Vortixy 会智能路由,充分利用你的配额 — 无需指定具体模型。所有模式共享你套餐的配额(00:00 UTC)。
| 模式 | 何时使用 | 思考 | 速度 |
|---|---|---|---|
| Fast | 简单任务的快速回答 — 最快、最高效。 | low / medium | 最快 |
| Smart | 复杂任务的深入推理 — 更透彻,逐步推进。 | medium / high | 深入 |
| Auto | Vortixy 会为每个问题自动选择最佳模式(启发式,零额外成本)。 | auto (low → high) | 自动选择 |
Smart 选中时有动画光晕(shimmer 边框)。Auto 为默认 — 推荐用于大多数任务。
在Dashboard → Settings → AI keys中保存一次(AES-256-GCM加密,绝不暴露) — 然后用provider + model调用。BYOK轮次免模型tokens,其余同托管(00:00 UTC)。
| 模型 | 提供商 | 访问 | 思考 | 上下文 |
|---|---|---|---|---|
| gemini-3.8-flash:byok | gemini | Free — 需要密钥 | none, low, medium, high | 1049k |
| gemini-3.7-flash:byok | gemini | Free — 需要密钥 | none, low, medium, high | 1049k |
| gemini-3.6-flash:byok | gemini | Free — 需要密钥 | none, low, medium, high | 1049k |
| gemini-3.5-flash-lite:byok | gemini | Free — 需要密钥 | none, low, medium, high | 1049k |
| gemini-3.1-flash-lite:byok | gemini | Free — 需要密钥 | none, low, medium, high | 1049k |
| gpt-6-astra | openai | Free — 需要密钥 | low, medium, high, xhigh, max | 1050k |
| gpt-6-sol | openai | Free — 需要密钥 | none, low, medium, high, xhigh, max | 1049k |
| gpt-6-luna | openai | Free — 需要密钥 | none, low, medium, high, xhigh, max | 1049k |
| gpt-5.6-sol | openai | Free — 需要密钥 | none, low, medium, high, xhigh, max | 1049k |
| gpt-5.6-terra | openai | Free — 需要密钥 | none, low, medium, high, xhigh, max | 1049k |
| gpt-5.6-luna | openai | Free — 需要密钥 | none, low, medium, high, xhigh, max | 1049k |
| claude-fable-5-1 | anthropic | Free — 需要密钥 | none, high | 1049k |
| claude-opus-5-5 | anthropic | Free — 需要密钥 | none, high | 1049k |
| claude-sonnet-5-5 | anthropic | Free — 需要密钥 | none, high | 1049k |
| claude-fable-5 | anthropic | Free — 需要密钥 | none, high | 1049k |
| claude-opus-5 | anthropic | Free — 需要密钥 | none, high | 1049k |
| claude-sonnet-5 | anthropic | Free — 需要密钥 | none, high | 1049k |
| claude-haiku-4-5 | anthropic | Free — 需要密钥 | none, high | 200k |
| claude-sonnet-4-6 | anthropic | Free — 需要密钥 | none, high | 200k |
| deepseek-flash | deepseek | Free — 需要密钥 | none, high | 1049k |
| deepseek-v4-pro | deepseek | Free — 需要密钥 | none, high | 1049k |
| deepseek-v4-flash | deepseek | Free — 需要密钥 | none, high | 1049k |
BYOK 目录:gpt-6-astra/gpt-6-sol/gpt-6-luna/gpt-5.6-sol/terra/luna (openai)、claude-fable-5-1/opus-5-5/sonnet-5-5/fable-5/opus-5/sonnet-5/haiku-4-5 (anthropic)、deepseek-flash/v4-pro/v4-flash (deepseek)、gemini-3.8/3.7/3.6-flash:byok + flash-lites:byok (gemini)。有密钥即可在 Free 使用全部 — 无需升级。
上下文窗口因模型而异,最高可达 1M (3.8/3.7) / 256k tokens。每次请求还受套餐限制:Free 30k、Go 30k、Pro 35k、Max 50k 或 Max+ 100k tokens。超过适用预算的 85% 后,较早轮次会自动压缩。公开 API 无状态:每次调用都要在 `history` 中重新发送历史记录。
每次请求的可用上下文取套餐上限(30k/30k/35k/50k/100k tokens)与模型窗口(最高 1M (3.8/3.7) / 256k (其余))中的较小值。集成时只发送可容纳的历史,并自行总结较早轮次;过大的请求可能会被拒绝。
// Basic — only required field
{ "message": "Explain quantum computing simply" }
// With system persona (chatbot) — 8k chars
{
"message": "What do you sell?",
"system": "You are a friendly shop assistant for Acme. Answer briefly in Spanish."
}
// With history — multi-turn conversation
{
"message": "And what about entanglement?",
"history": [
{ "role": "user", "content": "Hi" },
{ "role": "assistant", "content": "Hello! How can I help?" },
{ "role": "user", "content": "Explain quantum computing" }
]
}
// Full request — all variants together
{
"message": "Latest AI breakthroughs with sources",
"history": [{ "role": "user", "content": "Hi" }],
"system": "You are Acme support. Be concise.",
"provider": "gemini", // managed (default) — BYOK dashboard-only for other providers
"model": "gemini-3.5-flash", // any available managed model from the table above
"thinkingLevel": "high", // none | low | medium | high | xhigh | max
"webSearch": true, // true = live web grounding + sources[]
"stream": false // false = JSON, true = NDJSON deltas
}// 200 OK — non-streaming response
{
"answer": "Quantum computing uses qubits...",
"model": "gemini-3.5-flash",
"usage": { "tokensEstimated": 42, "tokensReserved": 42, "webSearch": true },
"sources": [{ "title": "Quantum computing — Wikipedia", "url": "https://en.wikipedia.org/wiki/Quantum_computing" }],
"plan": "pro",
"resetsInSeconds": 43200,
"resetsAt": "2026-09-25T00:00:00.000Z"
} // quotas reset daily at 00:00 UTC — streaming uses RateLimit-* headers// Streaming (NDJSON) — ideal for chatbots
const res = await fetch("https://www.vortixy.net/api/v1/chat", {
method: "POST",
headers: { Authorization: "Bearer " + process.env.VORTIXY_API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ message: "Hello!", system: "Be concise.", stream: true, thinkingLevel: "medium" })
});
for await (const line of res.body.pipeThrough(new TextDecoderStream()).pipeThrough(splitNDJSON())) {
const evt = JSON.parse(line);
if (evt.type === "delta") process.stdout.write(evt.delta);
if (evt.type === "sources") console.log("sources", evt.sources);
if (evt.type === "done") console.log("\nusage", evt.usage);
}
// curl variants — pick the one you need
// 1) Basic
curl -X POST https://www.vortixy.net/api/v1/chat -H "Authorization: Bearer $VORTIXY_API_KEY" -H "Content-Type: application/json" -d '{"message":"Hello"}'
// 2) With web search + high thinking
curl -X POST https://www.vortixy.net/api/v1/chat -H "Authorization: Bearer $VORTIXY_API_KEY" -H "Content-Type: application/json" -d '{"message":"Latest AI news","webSearch":true,"thinkingLevel":"high"}'
// 3) Chatbot persona + streaming (NDJSON)
curl -N -X POST https://www.vortixy.net/api/v1/chat -H "Authorization: Bearer $VORTIXY_API_KEY" -H "Content-Type: application/json" -d '{"message":"Hi","system":"You are Acme bot.","stream":true}'流式会发出 delta → done(NDJSON,Content-Type: application/x-ndjson)。webSearch:true 时还会通过网络搜索返回已验证来源(计入每日配额)。
按月还是按年?
年付可节省 17%。