# OpenAI format

`POST /v1/moderations`

Checks whether the text violates the usage policy

## Authorizations

Bearer authentication — send `Authorization: Bearer <token>`.

## Request Body (application/json) — required

```json
{
  "type": "object",
  "required": [
    "input"
  ],
  "properties": {
    "input": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "model": {
      "type": "string",
      "example": "text-moderation-latest"
    }
  }
}
```

## Responses

### 200 — Moderation result returned

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "model": {
      "type": "string"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "flagged": {
            "type": "boolean"
          },
          "categories": {
            "type": "object",
            "properties": {}
          },
          "category_scores": {
            "type": "object",
            "properties": {}
          }
        }
      }
    }
  }
}
```
