메인 콘텐츠로 건너뛰기
POST
/
v1
/
moderations
curl --request POST \
  --url https://api.apimart.ai/v1/moderations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "omni-moderation-latest",
    "input": [
      {
        "type": "text",
        "text": "이 이미지가 위반되는지 모더레이션해 주세요"
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://cdn.apimart.ai/files/1779955589195-wh950j4imqd.jpeg"
        }
      }
    ],
    "stream": false
  }'

Documentation Index

Fetch the complete documentation index at: https://docs.apimart.ai/llms.txt

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

omni-moderation-latest를 사용하여 입력 콘텐츠에 대한 안전 모더레이션을 수행합니다. 이 모델은 모더레이션 시리즈에 속하며, 이미지/비디오/오디오 생성 시리즈에는 포함되지 않습니다.
curl --request POST \
  --url https://api.apimart.ai/v1/moderations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "omni-moderation-latest",
    "input": [
      {
        "type": "text",
        "text": "이 이미지가 위반되는지 모더레이션해 주세요"
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://cdn.apimart.ai/files/1779955589195-wh950j4imqd.jpeg"
        }
      }
    ],
    "stream": false
  }'

지원 모델

모델명설명지원 입력
omni-moderation-latest범용 콘텐츠 모더레이션 모델텍스트, 이미지, 텍스트+이미지 혼합

Authorizations

Authorization
string
필수
모든 엔드포인트는 Bearer Token 인증이 필요합니다.API Key 발급:API Key 관리 페이지에 접속하여 API Key를 발급받으세요.요청 헤더에 다음을 추가합니다:
Authorization: Bearer YOUR_API_KEY

Body

model
string
필수
모더레이션 모델명입니다.
  • omni-moderation-latest - 범용 콘텐츠 모더레이션 모델
input
string | string[] | object[]
필수
모더레이션할 콘텐츠입니다. 일반 텍스트, 텍스트 배열, 콘텐츠 블록 배열을 지원합니다.콘텐츠 블록에는 다음을 포함할 수 있습니다:
  • text - 텍스트 콘텐츠 블록
  • image_url - 이미지 URL 콘텐츠 블록
stream
boolean
기본값:"false"
스트리밍 응답 여부입니다.
  • false: 비스트리밍 응답 (기본값. 현재 이 값만 지원하며 true는 지원하지 않음)

input 요청 방식

텍스트+이미지 혼합

{
  "model": "omni-moderation-latest",
  "input": [
    {
      "type": "text",
      "text": "이 이미지가 위반되는지 모더레이션해 주세요"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://cdn.apimart.ai/files/1779955589195-wh950j4imqd.jpeg"
      }
    }
  ],
  "stream": false
}

일반 텍스트(단일)

{
  "model": "omni-moderation-latest",
  "input": "I want to kill someone",
  "stream": false
}

일반 텍스트(배열)

{
  "model": "omni-moderation-latest",
  "input": [
    "hello",
    "I hate you"
  ],
  "stream": false
}

이미지 전용(이미지 URL)

{
  "model": "omni-moderation-latest",
  "input": [
    {
      "type": "image_url",
      "image_url": {
        "url": "https://cdn.apimart.ai/files/1779955589195-wh950j4imqd.jpeg"
      }
    }
  ],
  "stream": false
}

이미지 전용(base64 Data URI)

{
  "model": "omni-moderation-latest",
  "input": [
    {
      "type": "image_url",
      "image_url": {
        "url": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAA..."
      }
    }
  ],
  "stream": false
}

참고 사항

  1. input이 콘텐츠 블록 배열인 경우 각 요소는 type으로 콘텐츠 종류를 구분합니다.
  2. 이미지 모더레이션은 공개적으로 접근 가능한 URL 사용을 권장합니다. base64를 사용할 경우 표준 Data URI 형식 data:image/{format};base64,{data}를 따르세요.
  3. 특별한 요구가 없다면 stream: false를 일관되게 사용하는 것을 권장합니다.