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
| Dialect | Base URL | Compatible With | Notes |
|---|---|---|---|
| Anthropic Messages API | https://api.runars.ca (or root) | Anthropic SDK, Claude Code, LLM frameworks | Uses x-api-key header |
| OpenAI Chat Completions | https://api.runars.ca/v1 | OpenAI SDK, Codex CLI, LLM frameworks | Uses 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
| Feature | Anthropic | OpenAI |
|---|---|---|
| Streaming | ✅ | ✅ |
| Tool calling | ✅ | ✅ |
| Prompt caching | ✅ | ⚠️ (limited) |
count_tokens | ✅ | Via /v1/models only |
What's next
- New to Runars? Try the Quickstart.
- Setting up your SDK or CLI? Head to Install SDKs.
- Need detailed endpoint specs? Browse the API Endpoints reference.
Authentication
All endpoints require authentication via your API key. See Authentication for full details on header formats and examples for both dialects.