Documentation

API Reference in the NexoRouter documentation.

API Reference

This page documents the current stable public OpenAI-compatible API surface.

Only endpoints documented here are product-supported commitments. Other /v1 paths may pass through the gateway, but they are not stable public API promises until they appear in this reference.

Base URL

https://api.nexorouter.com/v1

Authentication

Authorization: Bearer YOUR_NEXOROUTER_API_KEY

GET /models

Returns publicly available model IDs.

Request

curl https://api.nexorouter.com/v1/models \
  -H "Authorization: Bearer $NEXOROUTER_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "id": "deepseek-v4-flash",
      "object": "model"
    }
  ]
}

The response may include additional OpenAI-compatible fields. Use the id field as the stable model ID for requests.

POST /chat/completions

Creates one chat completion.

Request body

FieldTypeRequiredNotes
modelstringyesCopy from Models or GET /v1/models.
messagesarrayyesNon-empty OpenAI-compatible message list.
temperaturenumberno0 to 2.
top_pnumberno0 to 1.
max_tokensintegernoPositive integer.

Request

curl https://api.nexorouter.com/v1/chat/completions \
  -H "Authorization: Bearer $NEXOROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [
      { "role": "user", "content": "Write one short launch checklist." }
    ],
    "max_tokens": 256
  }'

Response

{
  "id": "chatcmpl_example",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Create an API key, choose a model, test in Playground, and monitor usage logs."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 20,
    "completion_tokens": 18,
    "total_tokens": 38
  }
}

CORS

The public API responds to browser CORS preflight requests and exposes:

  • x-request-id
  • x-ratelimit-limit
  • x-ratelimit-remaining
  • retry-after

Streaming

Streaming is not listed as a verified public API. Use non-streaming chat/completions unless a NexoRouter page explicitly documents streaming behavior for your client and model.

Embeddings

Embeddings are not listed as a verified public API. Use a separate embeddings provider until NexoRouter documents endpoint behavior, public embedding models, pricing, and usage logs.

Endpoint boundaries

Do not assume support for an endpoint family unless a docs page explicitly documents it.

Endpoint families not yet documented as stable public API:

  • OpenAI Responses API
  • Anthropic Messages API
  • Gemini native API
  • image generation
  • video generation
  • audio
API Reference — NexoRouter