Class DreamCreateParams
-
- All Implemented Interfaces:
-
com.anthropic.core.Params
public final class DreamCreateParams implements Params
Start an asynchronous job that uses past sessions to produce a reorganized version of a memory store and get back the dream to poll for the result.
By default the dream writes its result to a new memory store and doesn't change the input memory store. The response has
statusset topendingand an emptyoutputsarray. Poll the dream untilstatusiscompleted,failed, orcanceled.See the Dreams guide to learn more about creating dreams.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classDreamCreateParams.BuilderA builder for DreamCreateParams.
public final classDreamCreateParams.Bodypublic final classDreamCreateParams.ModelThe model that runs a dream, given as a model ID or as an object with
idandspeed.In the object form,
speedcan only bestandard.The Availability section of the Dreams guide lists the supported models.
-
Method Summary
Modifier and Type Method Description final Optional<List<AnthropicBeta>>betas()This endpoint is in beta: requests must send dreaming-2026-04-21in this header.final Optional<String>workspaceId()Optional header to select the Workspace for this request. final List<BetaDreamInput>inputs()The memory store and sessions for the dream to read, as exactly one memory_storeentry and exactly onesessionsentry.final DreamCreateParams.Modelmodel()The model that runs a dream, given as a model ID or as an object with idandspeed.final Optional<String>instructions()Guidance that steers how the dream reads the sessions and organizes the output memory store, from 1 to 4,096 characters. final Optional<BetaOutputBehavior>outputBehavior()Which memory store a dream writes its result to. final JsonField<List<BetaDreamInput>>_inputs()Returns the raw JSON value of inputs. final JsonField<DreamCreateParams.Model>_model()Returns the raw JSON value of model. final JsonField<String>_instructions()Returns the raw JSON value of instructions. final JsonField<BetaOutputBehavior>_outputBehavior()Returns the raw JSON value of outputBehavior. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final DreamCreateParams.BuildertoBuilder()final DreamCreateParams.Body_body()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. SpanData_spanData()The data for the OpenTelemetry span of a call to the method with these parameters. Booleanequals(Object other)IntegerhashCode()StringtoString()final static DreamCreateParams.Builderbuilder()Returns a mutable builder for constructing an instance of DreamCreateParams. -
-
Method Detail
-
betas
final Optional<List<AnthropicBeta>> betas()
This endpoint is in beta: requests must send
dreaming-2026-04-21in this header.
-
workspaceId
final Optional<String> workspaceId()
Optional header to select the Workspace for this request. The value is a Workspace ID (for example,
wrkspc_011CZkZaBF1tNoB5wlCeusgy).Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.
-
inputs
final List<BetaDreamInput> inputs()
The memory store and sessions for the dream to read, as exactly one
memory_storeentry and exactly onesessionsentry.
-
model
final DreamCreateParams.Model model()
The model that runs a dream, given as a model ID or as an object with
idandspeed.In the object form,
speedcan only bestandard.The Availability section of the Dreams guide lists the supported models.
-
instructions
final Optional<String> instructions()
Guidance that steers how the dream reads the sessions and organizes the output memory store, from 1 to 4,096 characters.
See the Dreams guide for what kinds of instructions work well.
-
outputBehavior
final Optional<BetaOutputBehavior> outputBehavior()
Which memory store a dream writes its result to. Defaults to
create_newwhen left out of a create request.
-
_inputs
final JsonField<List<BetaDreamInput>> _inputs()
Returns the raw JSON value of inputs.
Unlike inputs, this method doesn't throw if the JSON field has an unexpected type.
-
_model
final JsonField<DreamCreateParams.Model> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_instructions
final JsonField<String> _instructions()
Returns the raw JSON value of instructions.
Unlike instructions, this method doesn't throw if the JSON field has an unexpected type.
-
_outputBehavior
final JsonField<BetaOutputBehavior> _outputBehavior()
Returns the raw JSON value of outputBehavior.
Unlike outputBehavior, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final DreamCreateParams.Builder toBuilder()
-
_body
final DreamCreateParams.Body _body()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
_spanData
SpanData _spanData()
The data for the OpenTelemetry span of a call to the method with these parameters.
-
builder
final static DreamCreateParams.Builder builder()
Returns a mutable builder for constructing an instance of DreamCreateParams.
The following fields are required:
.inputs() .model()
-
-
-
-