---
title: "Create a Dream"
method: POST
path: "/v1/dreams?beta=true"
---

# Create a Dream

`POST /v1/dreams?beta=true`

## Headers

- `anthropic-version` string
- `anthropic-beta` string

## Request body

- BetaCreateDreamRequest
  - `inputs` BetaDreamInput[], required
    - union
      - object — An input memory store the dream reads from. The dream never mutates this store.
        - `type` 'memory_store', required
        - `memory_store_id` string, required
      - object — Input session transcripts the dream reads.
        - `type` 'sessions', required
        - `session_ids` string[], required
  - `model` union, required
    - string
    - BetaDreamModelConfigParams — Model identifier and configuration applied to every pipeline stage.
      - `id` string, required — Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
      - `speed` 'standard' | '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.
  - `instructions` string, nullable

## Response `200`

Successful response (OK)

- BetaDream — An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. 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.
  - `type` 'dream', required
  - `id` string, required
  - `inputs` BetaDreamInput[], required
    - union
      - object — An input memory store the dream reads from. The dream never mutates this store.
        - `type` 'memory_store', required
        - `memory_store_id` string, required
      - object — Input session transcripts the dream reads.
        - `type` 'sessions', required
        - `session_ids` string[], required
  - `outputs` BetaDreamOutput[], required
    - `type` 'memory_store', required
    - `memory_store_id` string, required
  - `status` 'pending' | 'running' | 'completed' | 'failed' | 'canceled', required — Lifecycle status of a Dream.
  - `created_at` string, date-time, required — A timestamp in RFC 3339 format
  - `ended_at` string, date-time, required — A timestamp in RFC 3339 format
  - `archived_at` string, date-time, required — A timestamp in RFC 3339 format
  - `error` BetaDreamError, required — Failure detail for a Dream whose `status` is `failed`.
    - `type` string, required
    - `message` string, required
  - `model` BetaDreamModelConfig, required — Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig.
    - `id` string, required — Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
    - `speed` 'standard' | '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.
  - `instructions` string, nullable, required
  - `session_id` string, nullable, required
  - `usage` BetaDreamUsage, required — Cumulative token usage for the dream across every pipeline stage.
    - `input_tokens` integer, required — Total uncached input tokens consumed across every pipeline stage.
    - `output_tokens` integer, required — Total output tokens generated across every pipeline stage.
    - `cache_read_input_tokens` integer, required — Total tokens read from prompt cache.
    - `cache_creation_input_tokens` integer, required — Total tokens used to create prompt-cache entries (sum of all TTL tiers).

## Other responses

- `400` — Invalid argument - The client specified an invalid argument
- `401` — Unauthenticated - The request does not have valid authentication credentials
- `403` — Permission denied - The caller does not have permission to execute the specified operation
- `404` — Not found - Some requested entity was not found
- `408` — Deadline exceeded - The deadline expired before the operation could complete
- `409` — Aborted - The operation was aborted due to concurrency issue
- `412` — Failed precondition - Operation was rejected because the system is not in required state
- `413` — Out of range - Operation was attempted past the valid range
- `429` — Resource exhausted - Some resource has been exhausted (rate limiting)
- `431` — Request header fields too large - Request metadata was too large
- `499` — Cancelled - The operation was cancelled by the client
- `500` — Internal - Internal server error
- `501` — Unimplemented - The operation is not implemented or supported
- `503` — Unavailable - The service is currently unavailable
- `504` — Deadline exceeded - Upstream service did not respond in time

---

[API](https://skmtc.net/anthropics/apis/anthropic-api.md) · [All operations](https://skmtc.net/anthropics/apis/anthropic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/anthropics/anthropic-api/versions/93d8fd7d6493/schema)
