Claude Platform Docs

드림 취소

$client->beta->dreams->cancel(string dreamID, ?list<AnthropicBeta> betas, ?string workspaceID): BetaDream
POST/v1/dreams/{dream_id}/cancel
Requires anthropic-beta: dreaming-2026-04-21. How to send beta headers

pending 또는 running 상태의 드림을 중지합니다.

드림이 먼저 completed 또는 failed에 도달하지 않은 한, 응답의 status는 canceled로 표시됩니다. 응답 이후에도 usage는 계속 변경될 수 있습니다. canceled 상태의 드림을 취소하면 변경 없이 그대로 반환됩니다. completed 또는 failed 상태의 드림을 취소하면 400 오류가 반환됩니다.

드림 취소에 대한 자세한 내용은 드림 가이드를 참조하세요.

Parameters
dreamID: string⁠Path parameter

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

betas?: optional list<AnthropicBeta>⁠Header parameter

This endpoint is in beta: requests must send dreaming-2026-04-21 in this header.

workspaceID?: optional string⁠Header parameter

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.

Returns
class BetaDream { $type = 'dream'; $id; $archivedAt; /* 11 more */ }
드림 취소
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

$client = new Client(apiKey: 'my-anthropic-api-key');

$betaDream = $client->beta->dreams->cancel(
  'dream_id',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
  workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);

var_dump($betaDream);
Returns Examples
Response 200
{
  "id": "id",
  "archived_at": "2019-12-27T18:11:19.117Z",
  "created_at": "2019-12-27T18:11:19.117Z",
  "ended_at": "2019-12-27T18:11:19.117Z",
  "error": {
    "message": "message",
    "type": "type"
  },
  "inputs": [
    {
      "memory_store_id": "x",
      "type": "memory_store"
    }
  ],
  "instructions": "instructions",
  "model": {
    "id": "x",
    "speed": "standard"
  },
  "output_behavior": {
    "type": "create_new"
  },
  "outputs": [
    {
      "memory_store_id": "memory_store_id",
      "type": "memory_store"
    }
  ],
  "session_id": "session_id",
  "status": "pending",
  "type": "dream",
  "usage": {
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 0,
    "input_tokens": 0,
    "output_tokens": 0
  }
}