---
title: "Stream cases chat response as SSE"
method: POST
path: "/cases/chat/stream"
tags: ["cases"]
deprecated: true
---

# Stream cases chat response as SSE

`POST /cases/chat/stream`

> **Deprecated.**

Deprecated: superseded by POST /cases/chat/completion and
POST /cases/chat/choices.

The response is a server-sent events stream using Anthropic-compatible
event names and payloads.

Event types emitted during the stream:
- content_block_start / content_block_delta / content_block_stop:
  proxied Anthropic content block events
- message_delta: proxied Anthropic turn metadata
- error: {"type": "error", "error": {"type": "...", "message": "..."}}

## Request body

- object
  - `client_tools` object[] — Tool definitions provided by the frontend. The backend passes these to the LLM and forwards tool_use blocks back to the caller as SSE events. Uses the Cases chat supported subset of Anthropic's custom ToolParam schema.
    - `allowed_callers` string[]
    - `cache_control` object, nullable — Anthropic cache control configuration for the tool definition.
      - `type` 'ephemeral', required
    - `defer_loading` boolean
    - `description` string — Tool description shown to the LLM.
    - `eager_input_streaming` boolean, nullable
    - `input_examples` object[]
    - `input_schema` object, required — Supported subset of Anthropic strict tool input JSON Schema.
      - `additionalProperties` boolean
      - `description` string
      - `properties` object
      - `required` string[]
      - `type` 'object', required
    - `name` string, required — Tool name. This is how the model refers to the tool in tool_use blocks.
    - `strict` boolean — Require tool calls to conform to the input schema.
    - `type` 'custom', nullable — Optional Anthropic custom tool discriminator.
  - `messages` object[], required — Conversation history. For agent-loop turns, entries may include assistant messages with tool_use content blocks and user messages with tool_result content blocks (array content instead of string).
    - `content` union, required — Message content. Either a plain string or an array of content blocks (tool_use / tool_result) for agent-loop turns.
      - string
      - object[]
    - `role` 'user' | 'assistant', required — Message role
  - `model` string — Optional LLM model override. Falls back to server default if not specified.
  - `notebooks` object[], required — Current notebook JSON objects
  - `provider` 'anthropic' | 'bedrock' — LLM provider. "anthropic" for direct API, "bedrock" for AWS Bedrock. Defaults to "bedrock".
  - `structured_view` boolean — Ignored. Kept only so requests from older frontends (which always sent this field) pass validation; remove once they are gone.
  - `thinking` boolean — When true, the LLM call is made with Anthropic extended thinking enabled using a server-side fixed token budget. Thinking content blocks are streamed as regular content_block events.

## Response `200`

SSE stream started successfully

## Other responses

- `400` — Bad request
- `default` — Other error

---

[API](https://skmtc.dev/matlantis/apis/matlantis-web-ui-backend-api.md) · [All operations](https://skmtc.dev/matlantis/apis/matlantis-web-ui-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/matlantis/matlantis-web-ui-backend-api/revisions/b155f3a32673/schema)
