Mistral Moderation API

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

Operations 2

POST /moderations Mistral AI Moderate text content #
POST /chat/moderations Mistral AI Moderate chat conversation #

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-moderation-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. 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:
    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
    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'
    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
  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