建立內容審核
post/v1/moderations
檢查文字內容是否違反使用政策。
驗證
把 OLETOKEN 的 API Key 作為 Bearer Token 放進 Authorization 請求標頭。金鑰在控制台的「API 金鑰」頁建立。
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"
}'
