Skip to main content
Get Memory Router running in three steps. The only changes to your application are the base URL, a boundary_id query parameter, and — in BYOK mode — one header.

Step 1: Get a key and a Boundary

  1. Sign in to the console and create a MemoryLake API key (starts with sk-).
  2. Open Integrations → Memory Router API and create a Boundary — the memory scope that binds your conversations to a workspace, project, and actors. Copy its id.
Keep your MemoryLake key in an environment variable such as MEMORYLAKE_API_KEY. See Authentication for details on managing keys. Requests without a boundary_id still work, but run as plain passthrough with memory disabled.

Step 2: Pick a mode and swap the base URL

Both modes use the same endpoints — what differs is which keys you send: No embedding models are available yet, so the Embeddings endpoint is not usable for now. Images generates pictures with image models and does not use memory; see Image Generation. See Deployment Modes for a full comparison.

MemoryLake-hosted — one key

No provider account required. GPT, o-series, and Claude models are built in; pick any model listed under Available Models in the console by its native name.

BYOK — your provider key

Keep your provider account. Your provider key goes in the provider’s native auth header (Authorization: Bearer for OpenAI, x-api-key for Anthropic); the MemoryLake key rides in the x-memorylake-api-key header.

Anthropic SDK

With the Anthropic SDK, set the base URL to https://app.memorylake.ai/openapi/memorylake/router/anthropic — the SDK appends /v1/messages itself.
The console’s Integrations → Memory Router API page generates these snippets for you, pre-filled with your Boundary id, across cURL / Python / Node.js and both modes.

Step 3: Call as normal

Send requests exactly as you do today. With a boundary_id attached, relevant memories are recalled into the prompt automatically, and new memories are extracted and stored asynchronously — the response is never delayed.
TypeScript
Check the X-Trace-ID response header and the console Logs page to confirm the call went through the Router — see Observability.
Newer OpenAI reasoning models (gpt-5 family, o1/o3/o4) expect max_completion_tokens instead of max_tokens on Chat Completions. Keep your parameters in the provider’s official format — the Router passes them through unchanged.

Next Steps

Deployment Modes

Full comparison of BYOK and hosted, plus supported providers.

API Reference

Every endpoint, header, and parameter in detail.