메인 콘텐츠로 건너뛰기
POST
/
v1
/
moderations
Create Moderation
curl --request POST \
  --url https://aihubmix.com/v1/moderations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": "I want to kill them."
}
'
{
  "id": "<string>",
  "model": "<string>",
  "results": [
    {
      "flagged": true,
      "categories": {
        "hate": true,
        "hate/threatening": true,
        "harassment": true,
        "harassment/threatening": true,
        "illicit": true,
        "illicit/violent": true,
        "self-harm": true,
        "self-harm/intent": true,
        "self-harm/instructions": true,
        "sexual": true,
        "sexual/minors": true,
        "violence": true,
        "violence/graphic": true
      },
      "category_scores": {
        "hate": 123,
        "hate/threatening": 123,
        "harassment": 123,
        "harassment/threatening": 123,
        "illicit": 123,
        "illicit/violent": 123,
        "self-harm": 123,
        "self-harm/intent": 123,
        "self-harm/instructions": 123,
        "sexual": 123,
        "sexual/minors": 123,
        "violence": 123,
        "violence/graphic": 123
      },
      "category_applied_input_types": {
        "hate": [],
        "hate/threatening": [],
        "harassment": [],
        "harassment/threatening": [],
        "illicit": [],
        "illicit/violent": [],
        "self-harm": [],
        "self-harm/intent": [],
        "self-harm/instructions": [],
        "sexual": [],
        "sexual/minors": [],
        "violence": [],
        "violence/graphic": []
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt

Use this file to discover all available pages before exploring further.

인증

Authorization
string
header
필수

Gateway-issued API key, formatted as sk-gateway-xxxxxxxx. Used by OpenAI-shaped endpoints (/v1/chat/completions, etc.).

본문

application/json
input
기본값:""
필수

Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.

예시:

"I want to kill them."

model
기본값:omni-moderation-latest

The content moderation model you would like to use. Learn more in the moderation guide, and learn about available models here.

예시:

"omni-moderation-2024-09-26"

응답

OK

Represents if a given text input is potentially harmful.

id
string
필수

The unique identifier for the moderation request.

model
string
필수

The model used to generate the moderation results.

results
object[]
필수

A list of moderation objects.