API
API docs · Quick start
OpenAI-compatible. Swap in the base_url and your key and you are set.
Basics
- base_url
- https://router.xiaojins.com/v1
- Auth
- Header Authorization: Bearer <your key>
- Model list
- GET /v1/models
Values for model
| model | |
|---|---|
| deepseek-flash | DeepSeek V4.1 Flash, direct |
| deepseek-flash-three-pass | Sansi. reasoning_effort accepts low, medium, high, max, default high; max_tokens defaults to 65,536 |
| xjp-guard-1 | Prompt guard. Not a chat model; use the guard endpoint below |
Chat completions
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)Guard endpoint
curl https://router.xiaojins.com/v1/workflows/guard \
-H "Authorization: Bearer $XJP_KEY" -H "content-type: application/json" \
-d '{"input": "text to check"}'For the contract, billing, and privacy see Prompt guard · xjp-guard-1