---
title: OpenAI Moderations | RunAPI
description: RunAPI의 OpenAI 호환 Moderations 작업을 통해 요청을 전송합니다.
url: https://runapi.ai/ko/docs/api/openai/moderations.md
canonical: https://runapi.ai/ko/docs/api/openai/moderations
locale: ko
---

> HTML 버전: https://runapi.ai/ko/docs/api/openai/moderations
> 에이전트용 사이트 색인: https://runapi.ai/llms.txt

# OpenAI Moderations

## 개요

RunAPI의 OpenAI 호환 Moderations 작업을 호환 모델과 프로토콜의 요청 및 응답 형식에 맞게 사용하세요.

### 빠른 시작

1. API 키를 만들고 RUNAPI_API_KEY로 설정합니다.
2. 호환되는 모델을 선택한 후 문서화된 경로 매개변수와 JSON 본문을 전송합니다.
3. 해당 작업에 대한 JSON 응답 또는 서버 전송 이벤트를 읽고 프로토콜 오류를 처리하세요.

## 엔드포인트

POST /v1/moderations

Base URL: https://runapi.ai

계약 버전: v1

권장 인증 방식: Authorization: Bearer YOUR_API_TOKEN

## 인증 정보 전달 방식

RunAPI는 아래 나열된 각 캐리어를 허용합니다. 생성된 샘플은 프로토콜의 기본 헤더를 사용합니다.

- `Authorization: Bearer YOUR_API_TOKEN` (권장)
- `x-api-key: YOUR_API_TOKEN`

## 호환 모델

현재 가격, 속도 제한 및 상업적 이용 세부 정보는 모델 페이지를 여십시오.

- [omni-moderation-latest](https://runapi.ai/ko/models/openai-moderation)

## 요청 계약

공개 프로토콜과 RunAPI 지원이 모두 확인된 필드만 나열됩니다. 추가 JSON 본문 필드는 그대로 전달됩니다.

### JSON 본문

필수: `input`

```json
{
  "input": {
    "description": "분류할 텍스트 또는 텍스트와 이미지 혼합 콘텐츠.",
    "items": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "additionalProperties": true,
          "type": "object"
        }
      ]
    },
    "type": [
      "string",
      "array"
    ]
  },
  "model": {
    "description": "RunAPI 모더레이션 모델 식별자; 기본값은 omni-moderation-latest입니다.",
    "type": "string"
  }
}
```

### 요청 예시

```json
{
  "input": [
    {
      "text": "A peaceful landscape.",
      "type": "text"
    },
    {
      "image_url": {
        "url": "https://runapi.ai/icon.png"
      },
      "type": "image_url"
    }
  ]
}
```

## 동기 응답

HTTP 200

### 스키마

```json
{
  "additionalProperties": true,
  "properties": {
    "id": {
      "minLength": 1,
      "type": "string"
    },
    "model": {
      "minLength": 1,
      "type": "string"
    },
    "results": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "categories": {
            "additionalProperties": true,
            "type": "object"
          },
          "category_applied_input_types": {
            "additionalProperties": true,
            "type": "object"
          },
          "category_scores": {
            "additionalProperties": true,
            "type": "object"
          },
          "flagged": {
            "type": "boolean"
          }
        },
        "required": [
          "flagged",
          "categories",
          "category_scores"
        ],
        "type": "object"
      },
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "id",
    "model",
    "results"
  ],
  "type": "object"
}
```

### 예시

```json
{
  "id": "modr_123",
  "model": "omni-moderation-latest",
  "results": [
    {
      "categories": {
        "sexual": false,
        "violence": false
      },
      "category_applied_input_types": {
        "sexual": [
          "text",
          "image"
        ],
        "violence": [
          "text",
          "image"
        ]
      },
      "category_scores": {
        "sexual": 0.0002,
        "violence": 0.0001
      },
      "flagged": false
    }
  ]
}
```

## 프로토콜 오류: invalid_request

HTTP 400

### 스키마

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### 예시

```json
{
  "error": {
    "code": null,
    "message": "input is required",
    "param": "input",
    "type": "invalid_request_error"
  }
}
```

## 생성된 코드 샘플

각 cURL, JavaScript, Python 예제는 프로토콜별 SDK 없이도 이 계약에서 검증된 요청을 전송합니다.

### curl

```curl
curl -X POST https://runapi.ai/v1/moderations \
  -H Authorization:\ Bearer\ YOUR_API_TOKEN \
  -H Content-Type:\ application/json \
  -d \{\"input\":\[\{\"type\":\"text\",\"text\":\"A\ peaceful\ landscape.\"\},\{\"type\":\"image_url\",\"image_url\":\{\"url\":\"https://runapi.ai/icon.png\"\}\}\]\}
```

### javascript

```javascript
const response = await fetch("https://runapi.ai/v1/moderations", {
  method: "POST",
  headers: {
  "Authorization": "Bearer YOUR_API_TOKEN",
  "Content-Type": "application/json"
},
  body: JSON.stringify({
  "input": [
    {
      "type": "text",
      "text": "A peaceful landscape."
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://runapi.ai/icon.png"
      }
    }
  ]
})
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data);
```

### python

#### 설치

```bash
pip install requests
```

```python
import requests

response = requests.post(
    "https://runapi.ai/v1/moderations",
    headers={"Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json"},
    json={"input": [{"type": "text", "text": "A peaceful landscape."}, {"type": "image_url", "image_url": {"url": "https://runapi.ai/icon.png"}}]}
)
response.raise_for_status()
print(response.json())
```

## 관련 가이드

- [인증](https://runapi.ai/ko/docs/guides/authentication.md)
- [빠른 시작](https://runapi.ai/ko/docs/guides/llm-api/quickstart.md)

---

## RunAPI의 더 많은 정보

- [홈](https://runapi.ai/ko/.md)
- [모델 카탈로그](https://runapi.ai/ko/models.md)
- [요금](https://runapi.ai/ko/pricing.md)
- [제공사](https://runapi.ai/ko/models)
- [문서](https://runapi.ai/ko/docs/guides)
- [SDK](https://runapi.ai/ko/sdk.md)
- [CLI](https://runapi.ai/ko/cli.md)
- [MCP Server](https://runapi.ai/ko/mcp.md)
- [Claude Code와 Cursor](https://runapi.ai/ko/claude-code-vs-cursor.md)
- [Cursor API 설정](https://runapi.ai/ko/cursor-api-setup.md)
- [RunAPI와 OpenRouter 비교](https://runapi.ai/ko/openrouter-alternative.md)
- [엔터프라이즈](https://runapi.ai/ko/contact.md)
- [문의](https://runapi.ai/ko/contact.md)
- [약관](https://runapi.ai/ko/terms.md)
- [개인정보](https://runapi.ai/ko/privacy.md)
- [에이전트용 사이트 색인](https://runapi.ai/llms.txt)

문의: contact@runapi.ai

## 구조화된 데이터

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "ko",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/ko",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/ko/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "ko",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/ko",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/koicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "ko",
    "@type": "TechArticle",
    "headline": "OpenAI Moderations",
    "description": "RunAPI의 OpenAI 호환 Moderations 작업을 통해 요청을 전송합니다.",
    "url": "https://runapi.ai/ko/docs/api/openai/moderations",
    "mainEntityOfPage": "https://runapi.ai/ko/docs/api/openai/moderations"
  }
]
```
