Skip to main content
Memory Router works two ways. Unlike proxies that force you to bring your own key, you can keep your provider account or let MemoryLake run the models for you. Both modes share the same endpoints — the difference is which keys you send. Everything else — prompts, streaming, tool calls — stays the same.

Endpoints

Append ?boundary_id=<id> to enable memory on a request — see How It Works. boundary_id does not apply to Images. No embedding models are available yet, so the Embeddings endpoint is not usable for now. Every parameter is listed in the API Reference. The earlier endpoints without /openapi/memorylake/router (such as https://app.memorylake.ai/openai/v1) keep working the same way; new integrations should use the paths above.
With the Anthropic SDK, set base_url to https://app.memorylake.ai/openapi/memorylake/router/anthropic (without /v1) — the SDK appends /v1/messages itself.

MemoryLake-hosted

No provider account required. MemoryLake runs the major models for you, so a single MemoryLake API key is all you need to start.
  • One key for everything — nothing else to sign up for.
  • GPT, o-series, and Claude models built in and ready to call by their native names, plus image models such as gpt-image-1 for image generation.
  • The simplest possible way to ship with memory.
Keys: MemoryLake key only, in the native auth header (Authorization: Bearer for OpenAI-style calls, x-api-key for Anthropic)
TypeScript

BYOK — Bring Your Own Key

Use your own provider account. Your provider key is encrypted in transit, forwarded to the provider per call, and never stored on our servers.
  • Keep your existing OpenAI / Anthropic account.
  • Model usage is billed to your provider account, under your rate limits.
  • Key is encrypted + passthrough only — never persisted or logged.
  • You can call the models listed under Available Models in the console.
Keys: your provider key in the provider’s native auth header + MemoryLake key in the x-memorylake-api-key header
TypeScript
The native auth header differs by protocol: OpenAI-style calls use Authorization: Bearer <key>; Anthropic calls use x-api-key: <key>. In BYOK mode your provider key goes there, and the MemoryLake key always rides in x-memorylake-api-key.

Choosing a Mode

Key Safety, by Design

In BYOK mode your provider key is encrypted in transit and passed straight through to the provider on every call. MemoryLake never stores, logs, or reuses it — the design is stateless, per-request passthrough with zero server-side key storage.

Supported Providers

Additional providers and protocols are added over time; the console’s Available Models page always reflects the current catalog.
Both modes need a MemoryLake balance: memory is billed to it in BYOK mode too, and a call is refused with 402 when the balance is too low.

Next Steps

Quickstart

Copy-paste setup for both modes.

Observability

Trace requests and understand the error contract.