NR

Documentation

NextRouter REborn exposes an OpenAI-compatible API. Point your client at it with an API key from the Keys page — no SDK changes needed.

Quick start

bash
curl https://nextrouter-vert.vercel.app/api/v1/chat/completions \
  -H "Authorization: Bearer nr_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"kiro-auto","messages":[{"role":"user","content":"Hello"}]}'

Just swap the base URL and key. Available model IDs are listed on the Models page.

Endpoints

POST
/api/v1/chat/completions
Text completions. Supports streaming (SSE) and non-streaming.
POST
/api/v1/images/generations
Image generation from a text prompt. OpenAI-compatible body.
POST
/api/v1/images/edits
Image editing for models that support it (e.g. flux-2-pro, sdxl-lightning).
POST
/api/v1/audio/speech
Text-to-speech for tts models. Returns audio bytes.
POST
/api/v1/audio/transcriptions
Speech-to-text for stt models. Multipart form upload with a file field.
POST
/api/v1/embeddings
Text embeddings. OpenAI-compatible body.
POST
/api/v1/videos/generations
Video generation from a text prompt. Body: { model, prompt }. Returns a video URL or base64.
GET
/api/v1/models
Lists available model IDs.

Authentication

All /api/v1 endpoints require Authorization: Bearer <key>. Generate keys on the Keys page. Keys are shown once — keep them safe.

Limits

  • Daily token limit: 500K tokens per user, combined across all models. Resets at midnight UTC.
  • Model-level RPM limits may apply to individual custom models (set by the model owner).
  • Custom models: at most 100 per account.

Custom models

Owners can add their own endpoints on the My Models page. Public custom models can be called by anyone as {owner-username}/{model-name}. Private models only work with the owner's keys.

Streaming example

javascript
const res = await fetch("https://nextrouter-vert.vercel.app/api/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer nr_xxxxxxxx",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    model: "kiro-auto",
    stream: true,
    messages: [{ role: "user", content: "Hello" }]
  })
});
for await (const chunk of res.body) {
  console.log(new TextDecoder().decode(chunk));
}