모더레이션 생성
CometAPI POST /v1/moderations를 사용하여 OpenAI 호환 모더레이션 요청으로 텍스트 또는 멀티모달 입력을 확인합니다.
이 엔드포인트를 사용하여 모델 엔드포인트로 보내기 전에 사용자가 생성한 콘텐츠를 확인합니다.Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
model과 input 값을 포함한 OpenAI 호환 모더레이션 요청을 전송하세요.
Authorization: Bearer <COMETAPI_KEY>.요청 본문
| Field | Type | Required | Description |
|---|---|---|---|
input | string or array | Yes | 확인할 콘텐츠입니다. 하나의 텍스트 입력에는 문자열을 사용하고, 여러 텍스트를 한 번에 검사할 때는 문자열 배열을 사용하며, 텍스트와 image_url 같은 OpenAI 스타일의 멀티모달 파트를 사용할 수도 있습니다. |
model | string | Yes | 모더레이션 model ID입니다. 특별한 모더레이션 모델 요구사항이 없는 한 텍스트 및 이미지 모더레이션에는 omni-moderation-latest를 사용하세요. |
omni-moderation-latest입니다. 공개 이미지 URL은 CometAPI 서버가 다운로드할 수 있어야 합니다. 복사 가능한 이미지 테스트에는 base64 데이터 URL을 사용하세요.
요청 예시
하나의 텍스트 입력만 분류하면 될 때는 단일 텍스트 문자열을 보내세요:응답 형태
응답에는id, model, results, usage가 포함됩니다. results의 각 항목은 일치하는 입력이 플래그되었는지 여부, 카테고리별 boolean 값, 카테고리 점수, 그리고 각 카테고리에 적용된 입력 유형을 보고합니다. 배치 텍스트 요청의 경우 results에는 입력 문자열마다 하나의 항목이 들어 있습니다. 청구 및 모니터링 필드에는 usage를 사용하세요.인증
CometAPI API key used for model requests. Send it as Authorization: Bearer <COMETAPI_KEY>.
본문
Required moderation model ID. Use omni-moderation-latest for text and image moderation unless you have a specific moderation model requirement.
"omni-moderation-latest"
Content to check. Use a string for one text input, an array of strings for batch text checks, or OpenAI-style multimodal parts such as text plus image_url when the selected model supports it.
"I want to check this text before sending it to a model."
응답
Moderation decisions and token usage.
Moderation request ID.
"modr-1594"
Model used for moderation.
"omni-moderation-latest"
Moderation decisions. For batch text input, this array contains one result per input string.
Token usage for the moderation request. Additional provider accounting fields can be present.