An OpenAI-compatible API is useful because the surface is familiar. But "familiar" is not the same as "identical everywhere." This is the endpoint surface documented for nRouter, with the per-model checks that matter before production.
The connection
Two values change: a virtual key stored as NROUTER_API_KEY, and the base URL https://api.nrouter.ai/v1. Your OpenAI SDK, message format, and streaming code carry over.
The endpoints
-
/v1/chat/completions— chat and streaming completions in the OpenAI request format. Addstream: truefor server-sent event chunks. -
/v1/models— model discovery; returns the live catalogue surface used to verify IDs and capabilities. -
/v1/embeddings— embeddings, where the selected embedding model and provider support the endpoint. -
/v1/images— image generation, where supported by the selected model and provider. -
/v1/audioand/v1/videos— audio operations and video jobs, where supported; check the API reference for request and polling behavior.
Every "where supported" above is load-bearing. Availability depends on the selected model — verify against the catalogue and the API reference, not assumptions.
The checks before production
- Verify the model ID exists in the live catalogue and supports your endpoint.
- Test tool calling and JSON mode on the exact model — support varies by provider.
- Test streaming error handling: a stream that has started does not transparently replay to another provider.
- Configure budgets and guardrails (PII redaction, prompt-injection detection) at the gateway layer.
- Confirm cost records attribute each request to its provider and model.
The reference point for all of the above: OpenAI-compatible LLM API.
Disclosure: I work with the nRouter team.