Claude Platform Docs

Dreams

Create a Dream
BetaDream beta().dreams().create(DreamCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/dreams
List Dreams
DreamListPage beta().dreams().list(DreamListParamsparams = DreamListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/dreams
Get a Dream
BetaDream beta().dreams().retrieve(DreamRetrieveParamsparams = DreamRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/dreams/{dream_id}
Cancel a Dream
BetaDream beta().dreams().cancel(DreamCancelParamsparams = DreamCancelParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/dreams/{dream_id}/cancel
Archive a Dream
BetaDream beta().dreams().archive(DreamArchiveParamsparams = DreamArchiveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/dreams/{dream_id}/archive
Models
class BetaDream:

An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.

class BetaDreamError:

Failure detail for a Dream whose status is failed.

String message
String type
class BetaDreamInput: A class that can be one of several variants.union

An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.

class BetaDreamMemoryStoreInput:

An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.

String memoryStoreId
minLength1
Type type
class BetaDreamSessionsInput:

Input session transcripts the dream reads.

List<String> sessionIds
Type type
class BetaDreamMemoryStoreInput:

An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.

String memoryStoreId
minLength1
Type type
class BetaDreamMemoryStoreOutput:

An output memory store the dream writes consolidated memories into.

String memoryStoreId
Type type
class BetaDreamModelConfig:

Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig.

String id

Model identifier, e.g. "claude-opus-5". 1-256 characters.

minLength1
maxLength256
Optional<Speed> speed

Inference speed mode. fast provides significantly faster output token generation at premium pricing. Not all models support fast; invalid combinations are rejected at create time.

One of the following:
STANDARD("standard")
FAST("fast")
class BetaDreamModelConfigParam:

Model identifier and configuration applied to every pipeline stage.

String id

Model identifier, e.g. "claude-opus-5". 1-256 characters.

minLength1
maxLength256
Optional<Speed> speed

Inference speed mode. fast provides significantly faster output token generation at premium pricing. Not all models support fast; invalid combinations are rejected at create time.

One of the following:
STANDARD("standard")
FAST("fast")
class BetaDreamOutput:

An output memory store the dream writes consolidated memories into.

String memoryStoreId
Type type
class BetaDreamSessionsInput:

Input session transcripts the dream reads.

List<String> sessionIds
Type type
enum BetaDreamStatus:

Lifecycle status of a Dream.

PENDING("pending")
RUNNING("running")
COMPLETED("completed")
FAILED("failed")
CANCELED("canceled")
class BetaDreamUsage:

Cumulative token usage for the dream across every pipeline stage.

long cacheCreationInputTokens

Total tokens used to create prompt-cache entries (sum of all TTL tiers).

formatint32
long cacheReadInputTokens

Total tokens read from prompt cache.

formatint32
long inputTokens

Total uncached input tokens consumed across every pipeline stage.

formatint32
long outputTokens

Total output tokens generated across every pipeline stage.

formatint32
class BetaOutputBehavior: A class that can be one of several variants.union

The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.

class BetaOutputBehaviorCreateNew:

The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.

Type type
class BetaOutputBehaviorUpdateExisting:

The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.

String memoryStoreId
minLength1
Type type
class BetaOutputBehaviorCreateNew:

The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.

Type type
class BetaOutputBehaviorUpdateExisting:

The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.

String memoryStoreId
minLength1
Type type