API
API 文档 · 快速开始
OpenAI 兼容。换掉 base_url 和 key 就能用。
基本信息
- base_url
- https://router.xiaojins.com/v1
- 鉴权
- 请求头 Authorization: Bearer <你的 key>
- 模型列表
- GET /v1/models
model 取值
| model | |
|---|---|
| deepseek-flash | DeepSeek V4.1 Flash 直连 |
| deepseek-flash-three-pass | 三思。reasoning_effort 可选 low、medium、high、max,缺省 high;max_tokens 缺省 65,536 |
| xjp-guard-1 | 安全检测,不是聊天模型,走下面的 guard 端点 |
对话补全
curl https://router.xiaojins.com/v1/chat/completions \
-H "Authorization: Bearer $XJP_KEY" -H "content-type: application/json" \
-d '{
"model": "deepseek-flash-three-pass",
"reasoning_effort": "high",
"messages": [{"role": "user", "content": "Hello"}]
}'from openai import OpenAI
client = OpenAI(base_url="https://router.xiaojins.com/v1", api_key="<your key>")
resp = client.chat.completions.create(
model="deepseek-flash",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)安全检测端点
curl https://router.xiaojins.com/v1/workflows/guard \
-H "Authorization: Bearer $XJP_KEY" -H "content-type: application/json" \
-d '{"input": "text to check"}'契约、计费与隐私见 安全检测 · xjp-guard-1