สร้างการตรวจสอบเนื้อหา
post/v1/moderations
ตรวจสอบว่าเนื้อหาข้อความละเมิดนโยบายการใช้งานหรือไม่
การยืนยันตัวตน
ส่งคีย์ API ของ OLETOKEN เป็น Bearer token สร้างคีย์ได้ที่หน้า API Keys ในคอนโซล
Authorization: Bearer $OLETOKEN_API_KEYเนื้อหาคำขอ
Content-Type:application/json
| ฟิลด์ | ประเภท | จำเป็น | คำอธิบาย |
|---|---|---|---|
| input | string | string[] | — | |
| model | string | — | — |
การตอบกลับ
200สร้างการตรวจสอบเนื้อหาแล้ว
| ฟิลด์ | ประเภท | จำเป็น | คำอธิบาย |
|---|---|---|---|
| id | string | — | — |
| model | string | — | — |
| results | object[] | — | — |
| flagged | boolean | — | — |
| categories | object | — | — |
| category_scores | object | — | — |
ตัวอย่างคำขอ
curl -X POST 'https://api.oletoken.ai/v1/moderations' \
-H "Authorization: Bearer $OLETOKEN_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"input": "string"
}'
