Trigger an asynchronous memory consolidation job.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
|
|
Yes |
|
Request body
|
Field |
Type |
Required |
Description |
|
|
array |
Yes |
List of inputs. Must include one |
|
|
string |
No |
Model selection: |
|
|
string |
No |
Custom consolidation instructions, max 4096 characters |
inputs elements
|
Field |
Type |
Description |
|
|
string |
|
|
|
string |
Required when type is |
|
|
array |
Required when type is |
Example request
curl -s -X POST 'https://api.qoder.com.cn/api/v1/cloud/dreams' \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"inputs": [
{ "type": "memory_store", "memory_store_id": "memstore_019e5cdb9c3f71c3b6505eba937a40b4" },
{ "type": "sessions", "session_ids": ["sess_019e7a1b2c3d4e5f6a7b8c9d0e1f2a3b"] }
],
"model": "auto",
"instructions": "Focus on user preferences for code style"
}'
Example response
HTTP 201 Created
{
"id": "drm_019e86b4a8f070a3b6c5d4e3f2a1b0c9",
"type": "dream",
"status": "pending",
"inputs": [
{ "type": "memory_store", "memory_store_id": "memstore_019e5cdb9c3f71c3b6505eba937a40b4" },
{ "type": "sessions", "session_ids": ["sess_019e7a1b2c3d4e5f6a7b8c9d0e1f2a3b"] }
],
"outputs": [],
"model": { "id": "auto" },
"instructions": "Focus on user preferences for code style",
"session_id": null,
"usage": { "input_tokens": 0, "output_tokens": 0, "cache_creation_input_tokens": 0, "cache_read_input_tokens": 0 },
"error": null,
"created_at": "2026-06-15T10:00:00Z",
"ended_at": null,
"archived_at": null
}
Errors
|
HTTP |
Type |
Trigger |
|
400 |
|
Empty inputs, missing or duplicate memory_store input, session count exceeds 100, invalid model, or instructions too long |
|
401 |
|
Missing or invalid authentication token |
|
404 |
|
Referenced Memory Store does not exist or is inaccessible |
|
409 |
|
User already has an active Dream (pending or running) |
See Errors for the full error envelope.