---
title: "Research Chat"
method: POST
path: "/research/chat"
tags: ["research-chat"]
---

# Research Chat

`POST /research/chat`

## Request

- Base URL: `https://api.casenode.ai`
- URL: `https://api.casenode.ai/research/chat`
- Auth: none declared

## Headers

- `authorization` string, nullable

## Request body

- ResearchChatRequest: A question (`message`) or a confirmed plan (`plan`): never both.
  - `message` string
  - `plan` ConfirmedPlan: The plan on the card when the user clicked Run plan. The fields are what runs, as the card holds them (`planning.libs.ts::confirmedPlan`); `text` is the plan as the user read it, which the model is shown. The server used to parse the text a second time, in Python, to decide what to run, and that parse disagreed with the card's twice (`planIntents.parity.test.ts`): the user got a different search from the one on screen, with no error. `plan_from_fields` normalises these exactly as it does a parsed plan text.
    - `text` string, required
    - `intent` string
    - `pack` boolean
    - `contains_groups` array[]
      - string[]
    - `paragraph_term` string
    - `also` string[]
    - `ranking` string
    - `courts` string[]
    - `courts_match` 'must' | 'not'
    - `filters` PlanFilter[]
      - `field` string, required
      - `value` string, required
      - `match` 'strict' | 'exclude'
    - `sort` union
      - 'relevance' | 'citations' | 'date'
      - ''
  - `model` string
  - `api_key` string
  - `base_url` string, nullable
  - `messages` HistoryMessage[], nullable
    - `role` string, required
    - `content` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/casenode/apis/casenode-api.md) · [All operations](https://skmtc.dev/casenode/apis/casenode-api/llms.txt) · [OpenAPI document](https://skmtc.dev/casenode/apis/casenode-api/revisions/5b2883d19661?raw)
