สร้างการตรวจสอบเนื้อหา

post/v1/moderations

ตรวจสอบว่าเนื้อหาข้อความละเมิดนโยบายการใช้งานหรือไม่

การยืนยันตัวตน

ส่งคีย์ API ของ OLETOKEN เป็น Bearer token สร้างคีย์ได้ที่หน้า API Keys ในคอนโซล

Authorization: Bearer $OLETOKEN_API_KEY

เนื้อหาคำขอ

Content-Type:application/json

ฟิลด์ประเภทจำเป็นคำอธิบาย
inputstring | string[]—
modelstring——

การตอบกลับ

200สร้างการตรวจสอบเนื้อหาแล้ว

ฟิลด์ประเภทจำเป็นคำอธิบาย
idstring——
modelstring——
resultsobject[]——
flaggedboolean——
categoriesobject——
category_scoresobject——

ตัวอย่างคำขอ

curl -X POST 'https://api.oletoken.ai/v1/moderations' \
  -H "Authorization: Bearer $OLETOKEN_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "input": "string"
  }'