Stop a pending or running dream.

The response shows status as canceled, unless the dream reached completed or failed first. usage can keep changing after the response. Canceling a canceled dream returns it unchanged. Canceling a completed or failed dream returns a 400 error.

See the Dreams guide to learn more about canceling dreams.

post/v1/dreams/{dream_id}/cancel?beta=true

Request

  • Base URL
    https://api.anthropic.com
  • Auth
    none declared

Path parameters

dream_idstring required

The ID of the dream to cancel (drm_...).

Headers

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

anthropic-workspace-idstring

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.

Response

Successful response (OK)

type'dream' required
idstring required

The unique ID of the dream (drm_...).

status'pending' | 'running' | 'completed' | 'failed' | 'canceled' required

Where a dream is in its lifecycle.

completed, failed, and canceled are final: once a dream has one of these statuses, its status doesn't change again.

See the Dreams guide for what each status means.

created_atstring date-time required

A timestamp in RFC 3339 format

ended_atstring date-time required

A timestamp in RFC 3339 format

archived_atstring date-time required

A timestamp in RFC 3339 format

instructionsstring nullable required

The guidance given when the dream was created, or null if none was given.

session_idstring nullable required

The ID of the session that runs the dream (sesn_...), or null if that session hasn't started.

Stream that session's events to follow what the dream reads and writes.

See the Dreams guide for how to watch a running dream.

Changes

    • info

      added the enum value user-profiles-billing-2026-10-01 to the property items/anyOf[subschema #2]/ of the header request parameter anthropic-beta

    • info

      added the enum value admin-user-sign-out-2026-10-08 to the property items/anyOf[subschema #2]/ of the header request parameter anthropic-beta