Models Sign in

Mortar documentation

On this page
  1. Start here
  2. Build
  3. Look things up

Mortar serves open-weight language models behind an OpenAI-compatible API, in its own cloud or in yours. Point an OpenAI SDK at Mortar's base URL, authenticate with a Mortar API key, and your chat-completions code keeps working.

Base URL
https://api.mortar.one/v1

Start here

  • Quickstart. Create a key and send your first request from Python, TypeScript or curl, then stream the reply.
  • Authentication. How keys are issued, stored, rotated and revoked.
  • OpenAI compatibility. The few places Mortar behaves differently, starting with streaming by default.

Build

Look things up

  • API reference. Every endpoint, field, status code and error, starting with chat completions.
  • Model catalog. Context windows and sample prices for every model, with and without prompt caching.
  • Cost tools. Find what a prompt wastes on prefill, and project a monthly bill at your cache hit rate.
  • Changelog. What changed, newest first.