> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elkapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# モデレーションを作成

> <ul><li>テキスト内容が利用ポリシーに違反していないか確認します</li></ul>

<RequestExample>
  ```bash cURL theme={null} theme={null}
  curl --request POST \
    --url 'https://api.elkapi.com/v1/moderations' \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
    "input": "今日は天気がよく、散歩にぴったりです。",
    "model": "gpt-5.5"
  }'
  ```

  ```python Python theme={null} theme={null}
  import requests

  url = "https://api.elkapi.com/v1/moderations"
  headers = {
      "Authorization": "Bearer <token>"
  }
  headers["Content-Type"] = "application/json"
  payload = {
      "input": "今日は天気がよく、散歩にぴったりです。",
      "model": "gpt-5.5"
  }

  response = requests.request("POST", url, headers=headers, json=payload)
  print(response.json())
  ```

  ```javascript JavaScript theme={null} theme={null}
  const url = "https://api.elkapi.com/v1/moderations";

  const headers = {
    "Authorization": "Bearer <token>"
  };
  headers["Content-Type"] = "application/json";
  const payload = {
    "input": "今日は天気がよく、散歩にぴったりです。",
    "model": "gpt-5.5"
  };

  const response = await fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(payload)
  });

  console.log(await response.json());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null} theme={null}
  {
    "id": "id",
    "model": "gpt-5.5",
    "results": [
      {
        "flagged": false,
        "categories": {},
        "category_scores": {}
      }
    ]
  }
  ```
</ResponseExample>

## Authorizations

<ParamField header="Authorization" type="string" required>
  すべてのエンドポイントで Bearer Token 認証が必要です。

  リクエストヘッダーに追加します:

  ```
  Authorization: Bearer YOUR_API_KEY
  ```
</ParamField>

## Body

<ParamField body="input" type="string or array<string>" required />

<ParamField body="model" type="string" default="gpt-5.5">
  例:`gpt-5.5`
</ParamField>

## Response

<ResponseField name="id" type="string" />

<ResponseField name="model" type="string" default="gpt-5.5">
  例:`gpt-5.5`
</ResponseField>

<ResponseField name="results" type="array<object>">
  <ResponseField name="results.flagged" type="boolean" />

  <ResponseField name="results.categories" type="object" />

  <ResponseField name="results.category_scores" type="object" />
</ResponseField>
