---
title: "Chat Classifications"
method: POST
path: "/v1/chat/classifications"
tags: ["classifiers"]
---

# Chat Classifications

`POST /v1/chat/classifications`

Chat Classifications

## Request body

- ChatClassificationRequest
  - `model` string, required
  - `input` union, required — Chat to classify
    - InstructRequest
      - `messages` union[], required
        - union
          - SystemMessage
            - `role` 'system'
            - `content` union, required
              - …
          - UserMessage
            - `role` 'user'
            - `content` union, required
              - …
          - AssistantMessage
            - `role` 'assistant'
            - `content` union
              - …
            - `tool_calls` ToolCall[], nullable
              - …
            - `prefix` boolean — Set this to `true` when adding an assistant message as prefix to condition the model response. The role of the prefix message is to force the model to start its answer by the content of the message.
          - ToolMessage
            - `role` 'tool'
            - `content` union, required
              - …
            - `tool_call_id` string, nullable
            - `name` string, nullable
    - InstructRequest[]
      - `messages` union[], required
        - union
          - SystemMessage
            - `role` 'system'
            - `content` union, required
              - …
          - UserMessage
            - `role` 'user'
            - `content` union, required
              - …
          - AssistantMessage
            - `role` 'assistant'
            - `content` union
              - …
            - `tool_calls` ToolCall[], nullable
              - …
            - `prefix` boolean — Set this to `true` when adding an assistant message as prefix to condition the model response. The role of the prefix message is to force the model to start its answer by the content of the message.
          - ToolMessage
            - `role` 'tool'
            - `content` union, required
              - …
            - `tool_call_id` string, nullable
            - `name` string, nullable

## Response `200`

Successful Response

- ClassificationResponse
  - `id` string, required
  - `model` string, required
  - `results` object[], required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mistral/apis/mistral-ai-api.md) · [All operations](https://skmtc.net/mistral/apis/mistral-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mistral/mistral-ai-api/versions/933c4ebdcd72/schema)
