RunarsRunars Docs
Endpoints

Overview

Understand Runars's API dialects and base URLs

Runars exposes a catalog of models through two industry-standard API shapes. Both are fully compatible with their respective SDKs and CLIs, and both request formats are translated transparently to the model you request by id.

The two dialects

DialectBase URLCompatible WithNotes
Anthropic Messages APIhttps://api.runars.ca (or root)Anthropic SDK, Claude Code, LLM frameworksUses x-api-key header
OpenAI Chat Completionshttps://api.runars.ca/v1OpenAI SDK, Codex CLI, LLM frameworksUses Authorization: Bearer token

Why two base URLs? The Codex CLI specifically expects /v1 in the base URL. The Anthropic SDK works with the root URL. Both point to the same model, just with different wire formats.

API shape examples

Anthropic Messages format

{
  "model": "glm-5.2",
  "max_tokens": 1024,
  "messages": [{ "role": "user", "content": "Hello" }]
}

→ Runars translates to internal format → GLM-5.2 → Converts back to Anthropic SSE stream

OpenAI Chat Completions format

{
  "model": "glm-5.2",
  "max_tokens": 1024,
  "messages": [{ "role": "user", "content": "Hello" }]
}

→ Runars translates to internal format → GLM-5.2 → Converts back to OpenAI chat.completion.chunk stream

Both request shapes are nearly identical (messages, max_tokens), but response formats differ—Anthropic uses message_start/message_delta events while OpenAI uses chat.completion.chunk deltas. Runars handles this translation automatically.

Supported features by dialect

FeatureAnthropicOpenAI
Streaming
Tool calling
Prompt caching⚠️ (limited)
count_tokensVia /v1/models only

What's next

Authentication

All endpoints require authentication via your API key. See Authentication for full details on header formats and examples for both dialects.

On this page