API Documentation
DEMO

API Documentation

FAKE ENDPOINTS & ENV VARS

Reference examples for the NEXORA unified gateway schema. All URLs and keys are non-routable demo placeholders.

QUICKSTART
Unified Chat Completions
Send OpenAI-compatible chat completion requests to a single NEXORA endpoint and switch providers by changing only the model identifier.
POST https://api.nexora-demo.invalid/v1/chat/completions
Example (TypeScript)
const response = await fetch("https://api.nexora-demo.invalid/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.NEXORA_DEMO_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "nexora/router-auto-v2",
    temperature: 0.3,
    messages: [
      { role: "system", content: "Be concise and return valid JSON." },
      { role: "user", content: "Summarize gateway failover benefits in 3 bullets." },
    ],
  }),
});

const payload = await response.json();
console.log(payload.choices[0]?.message?.content);
Implementation Notes
  • • Uses the placeholder endpoint api.nexora-demo.invalid (non-routable RFC 2606 domain).
  • • Always load keys from environment variables — never hardcode credentials in source.