API

Chat Completions

Request format, response format, and current behavior of the OpenAI-compatible endpoint.

Public base URL

Routera publishes the API at https://routera.one/api/v1.

Routera’s main generation endpoint is POST /chat/completions.

Endpoint

POST https://routera.one/api/v1/chat/completions

Request body

Routera currently reads these fields:

FieldRequiredNotes
modelYesMust match a model id from GET /models
messagesYesArray of chat messages
streamNoWhen true, returns SSE chunks

Example:

{
  "model": "openai/gpt-5.5",
  "messages": [
    { "role": "system", "content": "Be concise." },
    { "role": "user", "content": "Summarize Routera in one sentence." }
  ]
}

Response body

Non-streaming responses use an OpenAI-style shape:

{
  "id": "chatcmpl_x",
  "object": "chat.completion",
  "created": 1710000000,
  "model": "openai/gpt-5.5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Routera is an OpenAI-compatible routing layer for model access."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 17,
    "total_tokens": 29
  }
}

Current compatibility

Routera is intentionally narrow right now.

  • The endpoint is OpenAI-compatible in shape.
  • The route currently documents only model, messages, and stream as supported request fields.
  • Unknown OpenAI fields should not be relied on yet unless we explicitly add support for them.