Trigger an asynchronous memory consolidation job.
POST /api/v1/cloud/dreams
Creates a Dream that asynchronously consolidates the specified Memory Store. Returns a Dream object.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT or SAT> |
Content-Type | Yes | application/json |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
inputs | array | Yes | Input list. Must include one memory_store type input; optionally include sessions type inputs |
model | string | object | null | No | Model ID or Dream model object with optional reasoning effort and context window. Omitted, null, or empty-string values use auto |
instructions | string | No | Custom consolidation instructions, at most 4096 bytes when UTF-8 encoded (a character may use multiple bytes) |
inputs elements
| Field | Type | Description |
|---|---|---|
type | string | "memory_store" or "sessions" |
memory_store_id | string | Required when type is memory_store |
session_ids | array | Required when type is sessions, max 100 Session IDs |
model object
Existing string requests remain supported, for example "model": "auto". You can also pass an object:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Nonempty model ID. Use an available, enabled ID from List Models; IDs are not limited to a fixed set of tiers |
effort | string | No | Reasoning effort: none, low, medium, high, xhigh, or max. Values other than none must appear in the selected model's efforts; none explicitly disables reasoning |
context_window | integer | No | Context window in tokens; must be a positive integer. When the model has a nonempty available_context_windows list, select a value from it; no tier restriction is applied when the catalog declares no tiers |
- The two options may be omitted independently. Omission means no explicit override; responses do not fill in defaults as user selections. Explicit null, empty effort, zero or negative windows, and other invalid values return 400.
- Omitting the entire
model, or sending null, an empty string, or a whitespace-only string, selectsauto. An object must contain a nonemptyid;{}does not mean auto. autowithout options keeps automatic routing. Witheffortorcontext_window, the catalog must contain an availableautoentry supporting those options; otherwise the request returns 400.- Only
id,effort, andcontext_windoware supported in the object.speedand other unknown fields return 400. The error response'serror.paramidentifies the field. - The example illustrates the format. Query the models and options available to your identity before using it; do not assume
dfmodel,high, or400000is always available.
Example request
Example response
HTTP 201 Created
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Empty or invalid inputs, missing or duplicate memory_store input, missing or inaccessible source Store, more than 100 Session IDs in total, unavailable or disabled model, invalid model option types/combinations or unknown fields, instructions exceeding 4096 UTF-8 bytes |
| 401 | authentication_error | Missing or invalid authentication token |
| 409 | conflict_error | The current identity already has an active Dream (pending or running) in this workspace |