MarkDB
Proxy API

Proxy API overview

The OpenAI-compatible surfaces MarkDB exposes and how to authenticate.

The MarkDB proxy exposes several LLM API surfaces at https://proxy.markdb.cloud. Each is captured into memory and dispatched natively to the underlying provider.

Authentication

Send your mk_live_... key as a bearer token (see Authentication):

  • Authorization: Bearer mk_live_... on every surface, or X-MarkDB-API-Key: mk_live_... as an alternative.
  • Claude Code sends ANTHROPIC_AUTH_TOKEN as a bearer header, so setting that variable authenticates the Messages surface.

The proxy authenticates from the bearer only. It does not read a bare x-api-key header as a MarkDB credential; that header is passed upstream. The key must carry the write scope, since every proxy request captures the exchange into memory.

Surfaces

Chat Completions

POST /v1/chat/completions

The standard OpenAI shape. Used by Cursor, the OpenAI SDK and most tools. Supports streaming and tool calls.

Responses

POST /v1/responses

The OpenAI Responses API, used by Codex CLI. MarkDB translates the Responses wire format (including function_call tool use) to the underlying provider.

Messages

POST /v1/messages

The Anthropic Messages API, used by Claude Code. MarkDB translates Messages (including tool_use / tool_result blocks) to the underlying provider.

Embeddings

POST /v1/embeddings

OpenAI-compatible embeddings, dispatched to the provider that owns the model.

Routing

The provider is chosen from the model name (claude-* to Anthropic, gpt-* / o* to OpenAI, gemini-* to Gemini, grok-* to xAI). Credentials are resolved per account: your configured key for that provider, or the server default.

See Models & routing for the full routing table, the curated model catalog and the enrichment/embedding defaults.

Chat continuity headers

To control how turns group into sessions, optionally send:

  • X-MarkDB-Chat-Key: <stable id> sets the conversation thread id.
  • X-MarkDB-External-Session-ID: <id> sets the client's session id.

You can also send these in the request body as markdb_chat_key and markdb_external_session_id. If omitted, MarkDB derives a stable chat key from the opening messages.

On this page