RunarsRunars Docs
Endpoints

Quickstart

Make requests to both Runars API dialects

This guide assumes you already have an API key. If not, go back to Get Started → Quickstart first.

Using the Anthropic-compatible endpoint

The simplest endpoint mirrors Anthropic's own Messages API.

curl https://api.runars.ca/v1/messages \
  -H "x-api-key: sk-runars-..." \
  -H "content-type: application/json" \
  -d '{
    "model": "glm-5.2",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "Explain quantum computing in one sentence."
      }
    ]
  }'

Response (non-streaming):

{
  "id": "...",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "Quantum computers exploit superposition and entanglement..."
    }
  ],
  "model": "glm-5.2",
  "stop_reason": "end_turn",
  "stop_sequence": null,
  "usage": {
    "input_tokens": 12,
    "output_tokens": 34,
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 0
  }
}

Using the OpenAI-compatible endpoint

The OpenAI-compatible endpoint uses the /v1/chat/completions path.

curl https://api.runars.ca/v1/chat/completions \
  -H "Authorization: Bearer sk-runars-..." \
  -H "content-type: application/json" \
  -d '{
    "model": "glm-5.2",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "Explain quantum computing in one sentence."
      }
    ]
  }'

Response:

{
  "id": "...",
  "object": "chat.completion",
  "created": ...,
  "model": "glm-5.2",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Quantum computers exploit superposition and entanglement..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 34,
    "total_tokens": 46
  }
}

Key differences

AspectAnthropicOpenAI
Base URLhttps://api.runars.cahttps://api.runars.ca/v1
Auth headerx-api-keyAuthorization: Bearer
Response wrappercontent: [...]choices[0].message.content
Stop reason fieldstop_reasonfinish_reason
Token usageinput_tokens, output_tokensprompt_tokens, completion_tokens, total_tokens

Both endpoints support streaming, tool calling, and all the same features—the differences are purely in wire format.

What's next

On this page