List Dreams
Parameters
Query parameter for include_archived
Returns
List Dreams
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get(
"ANTHROPIC_API_KEY"
), # This is the default and can be omitted
)
page = client.beta.dreams.list()
page = page.data[0]
print(page.id){
"data": [
{
"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
}
}
],
"next_page": "next_page"
}Returns Examples
{
"data": [
{
"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
}
}
],
"next_page": "next_page"
}