Repository Public
1---2title: Archive a Dream3url: https://platform.claude.com/docs/en/api/beta/dreams/archive4---56# Archive a Dream78**POST** `/v1/dreams/{dream_id}/archive`910Archive a Dream1112## Path parameters1314- `dream_id: string`1516## Headers1718- `"anthropic-beta": optional array of AnthropicBeta`1920 Optional header to specify the beta version(s) you want to use.2122 - `string`2324 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`2526 - `"message-batches-2024-09-24"`2728 - `"prompt-caching-2024-07-31"`2930 - `"computer-use-2024-10-22"`3132 - `"computer-use-2025-01-24"`3334 - `"pdfs-2024-09-25"`3536 - `"token-counting-2024-11-01"`3738 - `"token-efficient-tools-2025-02-19"`3940 - `"output-128k-2025-02-19"`4142 - `"files-api-2025-04-14"`4344 - `"mcp-client-2025-04-04"`4546 - `"mcp-client-2025-11-20"`4748 - `"dev-full-thinking-2025-05-14"`4950 - `"interleaved-thinking-2025-05-14"`5152 - `"code-execution-2025-05-22"`5354 - `"extended-cache-ttl-2025-04-11"`5556 - `"context-1m-2025-08-07"`5758 - `"context-management-2025-06-27"`5960 - `"model-context-window-exceeded-2025-08-26"`6162 - `"skills-2025-10-02"`6364 - `"fast-mode-2026-02-01"`6566 - `"output-300k-2026-03-24"`6768 - `"user-profiles-2026-03-24"`6970 - `"user-profiles-2026-08-18"`7172 - `"user-profiles-2026-09-04"`7374 - `"advisor-tool-2026-03-01"`7576 - `"managed-agents-2026-04-01"`7778 - `"cache-diagnosis-2026-04-07"`7980 - `"dreaming-2026-04-21"`8182 - `"thinking-token-count-2026-05-13"`8384 - `"server-side-fallback-2026-06-01"`8586 - `"server-side-fallback-2026-07-01"`8788 - `"fallback-credit-2026-06-01"`8990 - `"fallback-credit-2026-07-01"`9192 - `"agent-memory-2026-07-22"`9394 - `"mid-conversation-tool-changes-2026-07-01"`9596 - `"compact-2026-01-12"`9798 - `"computer-use-2025-11-24"`99100 - `"mcp-tunnels-2026-06-22"`101102 - `"structured-outputs-2025-11-13"`103104 - `"task-budgets-2026-03-13"`105106 - `"thinking-display-updates-2026-08-18"`107108 - `"ce-user-management-2026-07-13"`109110 - `"mid-conversation-output-config-2026-07-01"`111112 - `"thinking-binding-controls-2026-08-01"`113114 - `"mid-conversation-system-clear-at-2026-08-21"`115116 - `"compact-2026-09-04"`117118- `"anthropic-workspace-id": optional string`119120## Returns121122- `BetaDream object`123124 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.125126 - `type: "dream"`127128 - `id: string`129130 - `archived_at: string or null`131132 A timestamp in RFC 3339 format133134 format: date-time135136 - `created_at: string`137138 A timestamp in RFC 3339 format139140 format: date-time141142 - `ended_at: string or null`143144 A timestamp in RFC 3339 format145146 format: date-time147148 - `error: BetaDreamError or null`149150 Failure detail for a Dream whose `status` is `failed`.151152 - `type: string`153154 - `message: string`155156 - `inputs: array of BetaDreamInput`157158 - `BetaDreamMemoryStoreInput object`159160 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.161162 - `type: "memory_store"`163164 - `memory_store_id: string`165166 minLength: 1167168 - `BetaDreamSessionsInput object`169170 Input session transcripts the dream reads.171172 - `type: "sessions"`173174 - `session_ids: array of string`175176 - `instructions: string or null`177178 - `model: BetaDreamModelConfig`179180 Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig.181182 - `id: string`183184 Model identifier, e.g. "claude-opus-5". 1-256 characters.185186 minLength: 1, maxLength: 256187188 - `speed: optional "standard" or "fast"`189190 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.191192 - `"standard"`193194 - `"fast"`195196 - `output_behavior: BetaOutputBehavior`197198 - `BetaOutputBehaviorCreateNew object`199200 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.201202 - `type: "create_new"`203204 - `BetaOutputBehaviorUpdateExisting object`205206 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.207208 - `type: "update_existing"`209210 - `memory_store_id: string`211212 minLength: 1213214 - `outputs: array of BetaDreamOutput`215216 - `type: "memory_store"`217218 - `memory_store_id: string`219220 - `session_id: string or null`221222 - `status: BetaDreamStatus`223224 Lifecycle status of a Dream.225226 - `"pending"`227228 - `"running"`229230 - `"completed"`231232 - `"failed"`233234 - `"canceled"`235236 - `usage: BetaDreamUsage`237238 Cumulative token usage for the dream across every pipeline stage.239240 - `cache_creation_input_tokens: number`241242 Total tokens used to create prompt-cache entries (sum of all TTL tiers).243244 format: int32245246 - `cache_read_input_tokens: number`247248 Total tokens read from prompt cache.249250 format: int32251252 - `input_tokens: number`253254 Total uncached input tokens consumed across every pipeline stage.255256 format: int32257258 - `output_tokens: number`259260 Total output tokens generated across every pipeline stage.261262 format: int32263264## Example265266```bash267curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \268 -X POST \269 -H 'anthropic-version: 2023-06-01' \270 -H 'anthropic-beta: dreaming-2026-04-21' \271 -H "X-Api-Key: $ANTHROPIC_API_KEY"272```273274### Response (200)275276```json277{278 "id": "id",279 "archived_at": "2019-12-27T18:11:19.117Z",280 "created_at": "2019-12-27T18:11:19.117Z",281 "ended_at": "2019-12-27T18:11:19.117Z",282 "error": {283 "message": "message",284 "type": "type"285 },286 "inputs": [287 {288 "memory_store_id": "x",289 "type": "memory_store"290 }291 ],292 "instructions": "instructions",293 "model": {294 "id": "x",295 "speed": "standard"296 },297 "output_behavior": {298 "type": "create_new"299 },300 "outputs": [301 {302 "memory_store_id": "memory_store_id",303 "type": "memory_store"304 }305 ],306 "session_id": "session_id",307 "status": "pending",308 "type": "dream",309 "usage": {310 "cache_creation_input_tokens": 0,311 "cache_read_input_tokens": 0,312 "input_tokens": 0,313 "output_tokens": 0314 }315}316```317