Skip to main content
Memory Router puts your MemoryLake memory in front of the models you already call. Keep your OpenAI or Anthropic SDK, change the base URL, and add a boundary_id to each request: relevant memories are added to the prompt before the model is called. Requests and responses keep the provider’s own format. This reference covers what Memory Router adds; for every other field, see the provider’s API reference. To get started step by step, see the Quickstart.

Base URL

Memory Router lives under the same base URL as the rest of the MemoryLake API, https://app.memorylake.ai/openapi/memorylake, in its own /router section.
The earlier endpoints https://app.memorylake.ai/openai/v1/… and https://app.memorylake.ai/anthropic/v1/messages keep working and behave the same. New integrations should use the paths above.

Endpoints

Authentication

Every request needs a MemoryLake API key (sk-...). Where it goes depends on whose model account pays for the call: Your provider key is forwarded to the provider and never stored. See Deployment Modes.

Memory

Add boundary_id as a query parameter, not a header or a body field:
A Boundary decides which memory a request uses. boundary_id applies to Chat Completions, Responses and Messages. Without boundary_id, the request goes to the model as is, with memory off; it is still authenticated and metered. See How It Works.

Models

Use the model’s native name, such as gpt-4o-mini or claude-haiku-4-5, with no provider prefix. List Models returns every model you can call and which base URL reaches it. The OpenAI and Anthropic /v1/models endpoints are not available.

Streaming

Set stream: true to receive server-sent events in the provider’s format. Events are forwarded as they arrive.

Tracing

Every response carries an X-Trace-ID header. Send a W3C traceparent header to make the request part of your own trace. Quote the trace id when you contact support.

Errors

List Models answers in the MemoryLake API format, like every other MemoryLake endpoint: errors carry success: false, a message and an error_code. See Error Codes. The inference endpoints keep the provider’s format. Errors from Memory Router itself on those endpoints: 401 and 403 use the OpenAI error shape ({"error": {"message", "type"}}). 402 returns {"success": false, "message": "insufficient quota"}. 429 returns {"success": false, "code": "AUTH_THROTTLED", "action", "error": {"type", "message"}}. 502 returns plain text. 503 returns {"success": false, "message", "code": "REQUEST_BLOCKED"}. Other errors are passed through from upstream unchanged; errors from the model provider keep the provider’s own format.