启动一个异步作业,该作业使用过去的会话生成记忆存储的重组版本,并返回梦境以供您轮询结果。
默认情况下,梦境会将其结果写入新的记忆存储,而不会更改输入记忆存储。响应中的 status 设置为 pending,outputs 数组为空。请轮询该梦境,直到 status 变为 completed、failed 或 canceled。
请参阅梦境指南,详细了解如何创建梦境。
Headers
Body
Returns
创建梦境
curl https://api.anthropic.com/v1/dreams \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2026-10-21' \
-H 'anthropic-beta: dreaming-2026-04-21' \
-H "Authorization: Bearer $ANTHROPIC_API_KEY" \
-d '{
"inputs": [
{
"memory_store_id": "x",
"type": "memory_store"
}
],
"model": "string"
}'Response 200
{
"id": "id",
"archived_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"ended_at": "2019-12-27T18:11:19.117Z",
"error": {
"message": "message",
"type": "type"
},
"inputs": [
{
"memory_store_id": "x",
"type": "memory_store"
}
],
"instructions": "instructions",
"model": {
"id": "x",
"speed": "standard"
},
"output_behavior": {
"type": "create_new"
},
"outputs": [
{
"memory_store_id": "memory_store_id",
"type": "memory_store"
}
],
"session_id": "session_id",
"status": "pending",
"type": "dream",
"usage": {
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 0,
"output_tokens": 0
}
}Returns Examples
Response 200
{
"id": "id",
"archived_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"ended_at": "2019-12-27T18:11:19.117Z",
"error": {
"message": "message",
"type": "type"
},
"inputs": [
{
"memory_store_id": "x",
"type": "memory_store"
}
],
"instructions": "instructions",
"model": {
"id": "x",
"speed": "standard"
},
"output_behavior": {
"type": "create_new"
},
"outputs": [
{
"memory_store_id": "memory_store_id",
"type": "memory_store"
}
],
"session_id": "session_id",
"status": "pending",
"type": "dream",
"usage": {
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 0,
"output_tokens": 0
}
}