Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.openserv.ai/llms.txt

Use this file to discover all available pages before exploring further.

The SERV Reasoning API is a REST API at https://inference-api.openserv.ai. It implements the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages formats, so existing clients work with a base URL and key change. To get running, start with the Quickstart.

Authentication

Generate an API key at console.openserv.ai and send it as a bearer token:
Authorization: Bearer $SERV_API_KEY

Endpoints

Method and pathFormatReference
POST /v1/chat/completionsOpenAIChat completions
POST /v1/responsesOpenAIResponses
POST /v1/messagesAnthropicMessages
/v1/chat/completions works with every model in the catalog. /v1/responses is OpenAI models only. /v1/messages accepts most of the catalog — see endpoint compatibility.

System prompt required

Every request must include a system prompt. Where it goes depends on the endpoint — a system message for chat completions, top-level instructions for responses, or top-level system for messages. Requests without one are rejected.

Errors

The API uses standard HTTP status codes. Error bodies follow the format of the endpoint’s upstream API.
StatusMeaning
400Invalid request — missing system prompt, unsupported model, or malformed body.
401Missing or invalid API key.
404Unknown path or model.
429Rate limited.
5xxServer or upstream provider error.
{
  "error": {
    "type": "invalid_request_error",
    "message": "A system prompt is required. Please include a system or developer message in your request."
  }
}