---
title: "Chat Moderations"
method: POST
path: "/v1/chat/moderations"
tags: ["classifiers"]
---

# Chat Moderations

`POST /v1/chat/moderations`

Chat Moderations

## Request body

- ChatModerationRequest
  - `input` union, required — Chat to classify
    - union[]
      - union
        - SystemMessage
          - `role` 'system'
          - `content` union, required
            - string
            - SystemMessageContentChunks[]
              - …
        - UserMessage
          - `role` 'user'
          - `content` union, required
            - string
            - ContentChunk[]
              - …
        - AssistantMessage
          - `role` 'assistant'
          - `content` union
            - string
            - ContentChunk[]
              - …
          - `tool_calls` ToolCall[], nullable
            - `id` string
            - `type` 'function'
            - `function` FunctionCall, required
              - …
            - `index` integer
          - `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
            - string
            - ContentChunk[]
              - …
          - `tool_call_id` string, nullable
          - `name` string, nullable
    - array[]
      - union[]
        - 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
  - `model` string, required

## Response `200`

Successful Response

- ModerationResponse
  - `id` string, required
  - `model` string, required
  - `results` ModerationObject[], required
    - `categories` object — Moderation result thresholds
    - `category_scores` object — Moderation result

## 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)
