Cancel a Dream
api/beta/dreams/cancel
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta/dreams/cancel Changed · +36 / -33 lines
# Cancel a Dream ## Path parameters ## Headers ## Returns ## Example ### Response (200) ## Cancel a Dream ### Path Parameters ### Header Parameters ### Returns ### Example #### Response
---- -title: Cancel a Dream -url: https://platform.claude.com/docs/en/api/beta/dreams/cancel ---- +# Cancel a Dream -## Cancel a Dream +**POST** `/v1/dreams/{dream_id}/cancel` -**post** `/v1/dreams/{dream_id}/cancel` - Cancel a Dream -### Path Parameters +## Path parameters - `dream_id: string` -### Header Parameters +## Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Returns +## Returns -- `BetaDream object { id, archived_at, created_at, 11 more }` +- `BetaDream object` 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.
A timestamp in RFC 3339 format + format: date-time + - `created_at: string` A timestamp in RFC 3339 format + format: date-time + - `ended_at: string or null` A timestamp in RFC 3339 format + format: date-time + - `error: BetaDreamError or null` Failure detail for a Dream whose `status` is `failed`.
- `inputs: array of BetaDreamInput` - - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + - `BetaDreamMemoryStoreInput object` 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. - `memory_store_id: string` + minLength: 1 + - `type: "memory_store"` - - `"memory_store"` + - `BetaDreamSessionsInput object` - - `BetaDreamSessionsInput object { session_ids, type }` - Input session transcripts the dream reads. - `session_ids: array of string`
- `type: "sessions"` - - `"sessions"` - - `instructions: string or null` - `model: BetaDreamModelConfig`
Model identifier, e.g. "claude-opus-5". 1-256 characters. + minLength: 1, maxLength: 256 + - `speed: optional "standard" or "fast"` 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.
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. - - `BetaOutputBehaviorCreateNew object { type }` + - `BetaOutputBehaviorCreateNew object` 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: "create_new"` - - `"create_new"` + - `BetaOutputBehaviorUpdateExisting object` - - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` - 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. - `memory_store_id: string` + minLength: 1 + - `type: "update_existing"` - - `"update_existing"` - - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
- `type: "memory_store"` - - `"memory_store"` - - `session_id: string or null` - `status: BetaDreamStatus`
- `type: "dream"` - - `"dream"` - - `usage: BetaDreamUsage` Cumulative token usage for the dream across every pipeline stage.
Total tokens used to create prompt-cache entries (sum of all TTL tiers). + format: int32 + - `cache_read_input_tokens: number` Total tokens read from prompt cache. + format: int32 + - `input_tokens: number` Total uncached input tokens consumed across every pipeline stage. + format: int32 + - `output_tokens: number` Total output tokens generated across every pipeline stage. -### Example + format: int32 -```http +## Example + +```bash curl https://api.anthropic.com/v1/dreams/$DREAM_ID/cancel \ -X POST \ -H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +### Response (200) ```json {