---
title: "Generate follow-up choices for a cases chat completion"
method: POST
path: "/cases/chat/choices"
tags: ["cases"]
---

# Generate follow-up choices for a cases chat completion

`POST /cases/chat/choices`

Generate the choices (short follow-up prompts) to display to the user.
Called after POST /cases/chat/completion with the conversation history
including the completed assistant answer.

## Request body

- object
  - `messages` object[], required — Conversation history as plain-text messages. Content is always a plain string (no tool_use / tool_result content blocks).
    - `content` string, required — Plain-text message content
    - `role` 'user' | 'assistant', required — Message role
  - `model` string — Optional LLM model override. Falls back to server default if not specified.
  - `parameters` object[], required — Definitions of the case parameters the user can change from the parameter form.
    - `choices` string[] — Allowed values, for a parameter of value_type "enum".
    - `default_value` string, required — Value the case defines for the parameter.
    - `description` string — Description of the parameter.
    - `label` string, required — Human-readable label of the parameter.
    - `max` number — Largest value allowed, for a parameter of value_type "number".
    - `min` number — Smallest value allowed, for a parameter of value_type "number".
    - `unit` string — Unit the value is given in, shown next to the label.
    - `value_type` 'number' | 'smiles' | 'string' | 'tuple' | 'array' | 'enum', required — Type the value must be written as. "tuple" and "array" keep the Python literal text, such as "(1, 1, 1)" or "[423, 523]".
    - `variable_name` string, required — Variable name of the case parameter.

## Response `200`

Choices generated successfully

- object
  - `choices` union[], required — Choices to display to the user as the next actions.
    - union
      - object — A message the user can click to send as-is as the next user message.
        - `action` 'prompt', required
        - `text` string, required — Label of the choice, sent back as-is as the next user message when clicked.
      - object — A suggestion to change a case parameter and run the case.
        - `action` 'change_parameter', required
        - `value` string, required — Suggested value for the parameter.
        - `variable` string, required — Variable name of the case parameter to change.

## Other responses

- `400` — Bad request
- `503` — Service unavailable
- `504` — Gateway timeout
- `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)
