接入文档

OpenAI 兼容 · base_url https://neyino.com/ai/v1 · 1 N = ¥7.3 ≈ $1 · 默认模型 glm-5.3-flash(不传 model 时自动使用) · 模型广场

快速开始

from openai import OpenAI

client = OpenAI(base_url="https://neyino.com/ai/v1", api_key="nyi-你的Key")
resp = client.chat.completions.create(
    model="glm-5.3-flash",
    messages=[{"role": "user", "content": "你好"}],
    stream=True,  # 推荐开启,避免长回复被 CDN 断开
)
for chunk in resp:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
Node.js / TypeScript 示例
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://neyino.com/ai/v1",
  apiKey: "nyi-你的Key",
});

const res = await client.chat.completions.create({
  model: "glm-5.3-flash",
  messages: [{ role: "user", content: "你好" }],
  stream: true,
});
for await (const chunk of res) process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
curl 冒烟测试
curl -N https://neyino.com/ai/v1/chat/completions \
  -H "Authorization: Bearer nyi-你的Key" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-5.3-flash","stream":true,"messages":[{"role":"user","content":"你好"}]}'
获取模型列表(含全部动态模型)
curl https://neyino.com/ai/v1/models -H "Authorization: Bearer nyi-你的Key"

会话记忆(永久记忆)

请求体加 thread_id(1-64 位字母数字下划线横线),同 Key 隔离;全部历史永久保存,超长会话自动压缩为长期记忆摘要。

{"model": "glm-5.3-flash", "thread_id": "my-chat-1",
 "messages": [{"role": "user", "content": "我叫小明"}]}
# 下次请求用同一个 thread_id,AI 仍记得你叫小明

流式事件(SSE)

请求体加 stream: true,响应为 text/event-stream:

data: {"choices":[{"delta":{"content":"你"}}]}

data: {"choices":[{"delta":{"content":"好"}}]}

data: {"choices":[{"delta":{},"finish_reason":"stop"}],
       "neyino_upstream_model":"glm-5.3-flash"}

data: [DONE]

深度模式

自动审查并修订答案,质量更高,token 消耗约 2 倍。

{"model": "deepseek/deepseek-chat", "deep": true,
 "messages": [{"role": "user", "content": "分析分布式推理的可行性"}]}

计费说明

错误码

状态码含义处置
401API 密钥无效或已过期到 API 页重新创建 nyi- 密钥
402N 余额不足(付费模型预检)充值
404模型不存在核对 model 与模型广场一致(区分大小写)
429触发限流(上游或并发)退避后重试;付费模型 429 通常为上游透传
502/503上游异常或熔断中稍后重试;持续失败可在广场换同档模型

限流

常见问题

如何计费?支持哪些支付方式?
按 token 扣 N(价格与上游官方定价实时一致),支持 USDT 自动到账、支付宝/微信与兑换码;详见计费说明。
一个 Key 可以同时并发请求吗?
可以,无本站并发上限;注意上游 429 与余额(402 预检)两个边界。
如何确认实际应答的上游模型?
响应头 X-Neyino-Upstream-Model,或流式 finish 块的 neyino_upstream_model 字段。
会话记忆会上传我的内容吗?
带 thread_id 的请求内容会存入你的账号下用于多轮记忆(不用于训练);不传 thread_id 则不落任何会话历史。

机器可读版本:llms.txt(站点与 API 摘要) · llms.txt (EN) · 更新 Atom feed · sitemap