Generate API tokens using your client credentials:
curl -X POST http://localhost:3001/api/auth/token \
-H "Content-Type: application/json" \
-d '{"clientId": "YOUR_CLIENT_ID", "clientSecret": "YOUR_CLIENT_SECRET"}'
Response:
{
"access_token": "mod_abc123...",
"token_type": "Bearer",
"expires_in": null
}
Transcribe and moderate audio content:
curl -X POST http://localhost:3001/api/moderation/audio \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-F "audio=@audio_file.mp3"
Moderate image content:
curl -X POST http://localhost:3001/api/moderation/image \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-F "image=@image_file.jpg"
Moderate video content:
curl -X POST http://localhost:3001/api/moderation/video \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-F "video=@video_file.mp4"
Check the status of a moderation job:
curl -X GET http://localhost:3001/api/jobs/JOB_ID \
-H "Authorization: Bearer YOUR_API_TOKEN"
{
"transcript": "transcribed text",
"flagged": false,
"categories": { "hate": false, "harassment": false },
"scores": { "hate": 0.001, "harassment": 0.002 }
}
{
"flagged": false,
"categories": { "hate": false, "harassment": false },
"scores": { "hate": 0.001, "harassment": 0.002 }
}
Set your webhook URL in settings to receive job completion notifications:
{
"jobId": "uuid",
"status": "completed",
"result": { ... }
}