Mistral Moderation API

Content moderation and classification API for detecting harmful content across nine safety categories for text and chat.

GitHub
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /moderations Moderate text for policy violations · Mistral AI Moderate text content #
Ask an LLM
“Can I check a single piece of text for hate speech or violence?”
“Which safety categories does text moderation score?”
Tell an agent
Moderate {input} with moderation model {model}.
Score {input} for policy violations using {model}.
POST /chat/moderations Moderate a chat conversation · Mistral AI Moderate chat conversation #
Ask an LLM
“Can I moderate a multi-turn chat for policy violations?”
“Does chat moderation see system, user and assistant messages?”
Tell an agent
Moderate the chat {input} with moderation model {model}.
Score chat conversation {input} for policy violations using {model}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mistral:mistral-moderation-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mistral-moderation-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mistral AI Mistral Moderation API
  description: Content moderation and classification API for detecting potentially harmful or inappropriate content. Supports text and chat moderation across safety categories including violence, sexual content, hate speech, self-harm, dangerous content, and more.
  version: '1.0'
  contact:
    name: Mistral AI Support
    url: https://docs.mistral.ai/
    email: support@mistral.ai
  termsOfService: https://mistral.ai/terms/
servers:
- url: https://api.mistral.ai/v1
  description: Mistral AI Production
security:
- bearerAuth: []
tags:
- name: Moderation
  description: Content moderation and classification operations
paths:
  /moderations:
    post:
      operationId: createModeration
      summary: Mistral AI Moderate text content
      description: Classify text content for potential policy violations across safety categories. Returns category-level flags and scores.
      tags:
      - Moderation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModerationRequest'
      responses:
        '200':
          description: Moderation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModerationResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
  /chat/moderations:
    post:
      operationId: createChatModeration
      summary: Mistral AI Moderate chat conversation
      description: Classify a chat conversation for potential policy violations. Evaluates multi-turn conversations including system, user, and assistant messages.
      tags:
      - Moderation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatModerationRequest'
      responses:
        '200':
          description: Chat moderation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModerationResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
components:
  schemas:
    ModerationRequest:
      type: object
      required:
      - model
      - input
      properties:
        model:
          type: string
          description: The moderation model to use
          examples:
          - mistral-moderation-latest
        input:
          oneOf:
          - type: string
          - type: array
            items:
              type: string
          description: Text content to classify
    ChatModerationRequest:
      type: object
      required:
      - model
      - input
      properties:
        model:
          type: string
          description: The moderation model to use
          examples:
          - mistral-moderation-latest
        input:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
                enum:
                - system
                - user
                - assistant
              content:
                type: string
          description: Chat messages to classify
    ModerationResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the moderation request
        model:
          type: string
          description: The model used for moderation
        results:
          type: array
          items:
            $ref: '#/components/schemas/ModerationResult'
    ModerationResult:
      type: object
      properties:
        categories:
          type: object
          description: Category flags indicating violations
          properties:
            sexual:
              type: boolean
            hate_and_discrimination:
              type: boolean
            violence_and_threats:
              type: boolean
            dangerous_and_criminal_content:
              type: boolean
            selfharm:
              type: boolean
            health:
              type: boolean
            financial:
              type: boolean
            law:
              type: boolean
            pii:
              type: boolean
        category_scores:
          type: object
          description: Category confidence scores between 0 and 1
          properties:
            sexual:
              type: number
            hate_and_discrimination:
              type: number
            violence_and_threats:
              type: number
            dangerous_and_criminal_content:
              type: number
            selfharm:
              type: number
            health:
              type: number
            financial:
              type: number
            law:
              type: number
            pii:
              type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Mistral AI API key passed as a Bearer token
externalDocs:
  description: Mistral Moderation API Documentation
  url: https://docs.mistral.ai/api/#moderation