{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/anthropic/main/json-schema/anthropic-beta-create-dream-request-schema.json",
  "title": "BetaCreateDreamRequest",
  "x-generated": "2026-09-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anthropic-dreams-beta-true-api-openapi.yml#/components/schemas/BetaCreateDreamRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "inputs",
    "model"
  ],
  "properties": {
    "inputs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BetaDreamInput"
      }
    },
    "model": {
      "$ref": "#/$defs/BetaDreamModelParams"
    },
    "instructions": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096
        },
        {
          "type": "null"
        }
      ]
    },
    "output_behavior": {
      "$ref": "#/$defs/BetaOutputBehavior"
    }
  },
  "$defs": {
    "BetaDreamInput": {
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaDreamMemoryStoreInput"
        },
        {
          "$ref": "#/$defs/BetaDreamSessionsInput"
        }
      ]
    },
    "BetaDreamMemoryStoreInput": {
      "description": "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.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "memory_store_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "memory_store"
          ]
        },
        "memory_store_id": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "BetaDreamModelConfigParams": {
      "description": "Model identifier and configuration applied to every pipeline stage.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "description": "Model identifier, e.g. \"claude-opus-5\". 1-256 characters.",
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "speed": {
          "description": "Inference speed mode. Defaults to `standard`.",
          "anyOf": [
            {
              "$ref": "#/$defs/BetaSpeed"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "BetaDreamModelParams": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/BetaDreamModelConfigParams"
        }
      ]
    },
    "BetaDreamSessionsInput": {
      "description": "Input session transcripts the dream reads.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "session_ids"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "sessions"
          ]
        },
        "session_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "BetaOutputBehavior": {
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaOutputBehaviorCreateNew"
        },
        {
          "$ref": "#/$defs/BetaOutputBehaviorUpdateExisting"
        }
      ]
    },
    "BetaOutputBehaviorCreateNew": {
      "description": "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.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "create_new"
          ]
        }
      }
    },
    "BetaOutputBehaviorUpdateExisting": {
      "description": "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.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "memory_store_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "update_existing"
          ]
        },
        "memory_store_id": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "BetaSpeed": {
      "type": "string",
      "description": "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.",
      "enum": [
        "standard",
        "fast"
      ]
    }
  }
}