Skip to main content
OpenAI Chat Completions. With boundary_id, memories from that Boundary are added to the conversation before the model is called. Without it, the request goes to the model as is. Set stream to true to receive server-sent events in the OpenAI format. Parameters not listed below are passed to the model unchanged.

Query Parameters

string
The Boundary whose memory this request uses. Omit it to call the model without memory.

Headers

string
Your MemoryLake API key, when you call the model with your own provider key. The provider key then goes in the provider’s usual key header. Your provider key is forwarded to the provider and never stored.
string
W3C trace context. When present, the request joins your trace and the same trace id comes back in X-Trace-ID.

Request Body

array
required
The conversation so far
string
required
Model name, as listed under Available Models in the console
integer
Maximum tokens to generate, reasoning included. Use this instead of max_tokens for the gpt-5 and o-series models.
integer
Maximum tokens to generate
boolean
default:"false"
Stream the reply as server-sent events
number
Sampling temperature
array
Tools the model may call, in the OpenAI format

Response

array
The generated replies
integer
Creation time, Unix seconds
string
Completion id
string
Model that answered
string
Always chat.completion
object
Tokens used