Claude Platform Docs

Arsipkan Dream

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

Menyembunyikan dream yang berstatus completed, failed, atau canceled dari daftar dream default.

Mengarsipkan dream yang berstatus pending atau running akan mengembalikan error 400, jadi batalkan dream tersebut terlebih dahulu. Mengarsipkan dream yang sudah diarsipkan akan mengembalikannya tanpa perubahan. Dream yang diarsipkan masih dapat diambil berdasarkan ID. Pengarsipan tidak dapat dibatalkan.

Lihat panduan Dreams untuk mempelajari lebih lanjut tentang cara mengarsipkan dream.

Parameters
dreamID: string⁠Path parameter

The ID of the dream to archive (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 */ }
Arsipkan Dream
<?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->archive(
  '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
  }
}