SSunlight 2.1 ProPrivate API Docs
Powered by TokenRouter · z-ai/glm-5.3-free

Sunlight 2.1 Pro

Private business gateway — call this model as sunlight-2.1-pro

PRIVATEBearer token required — no public pages except this one

TokenRouter z-ai/glm-5.3-free behind alias sunlight-2.1-pro.

Endpoints

MethodPathAuthDescription
GET/healthNoneLiveness probe
GET/v1/healthNoneAlias
GET/v1/modelsBearerList models — returns sunlight-2.1-pro
POST/v1/chat/completionsBearerOpenAI-compatible — supports stream: true (SSE)
POST/v1/completionsBearerAlias to /v1/chat/completions
POST/api/generateBearerSimple {prompt|messages}{text, usage}
GET/docsNoneThis page

Quick start

curl
curl https://api.ai.yavqo.com/v1/chat/completions \
  -H "Authorization: Bearer $GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sunlight-2.1-pro",
    "messages": [{"role":"user","content":"Hello"}],
    "stream": false
  }'
stream
curl -N https://api.ai.yavqo.com/v1/chat/completions \
  -H "Authorization: Bearer $GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"sunlight-2.1-pro","messages":[{"role":"user","content":"Write a haiku"}],"stream":true}'
simple generate
curl https://api.ai.yavqo.com/api/generate \
  -H "Authorization: Bearer $GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Explain TokenRouter in one sentence"}'

SDK

Yavqo SDK
import { Yavqo } from "@yavqo/aisdk";
const client = new Yavqo({ baseURL: "https://api.ai.yavqo.com/v1", apiKey: process.env.GATEWAY_API_KEY! });
const res = await client.generateText({ model: "sunlight-2.1-pro", prompt: "Hello" });
console.log(res.text);

// streaming
const stream = await client.streamText({ model: "sunlight-2.1-pro", prompt: "Stream me a story" });
for await (const chunk of stream.textStream) process.stdout.write(chunk);
OpenAI SDK
import OpenAI from "openai";
const openai = new OpenAI({ baseURL: "https://api.ai.yavqo.com/v1", apiKey: process.env.GATEWAY_API_KEY });
await openai.chat.completions.create({ model: "sunlight-2.1-pro", messages: [{role:"user",content:"Hi"}] });