Submit audio moderation
Submit an audio clip for moderation. The clip is transcribed and the resulting text runs through the same keyword blocklist and LLM prohibition check as text moderation, including every custom category enabled on your account. Pass a publicly reachable HTTP or HTTPS audio URL. The worker downloads it. URLs that use another scheme, or that resolve to a private or internal network address, are rejected with 400 INVALID_REQUEST. The clip must be no larger than 100 MB and no longer than 30 minutes.
https://api.omnifence.ai/api/v1/moderate/audioThis moderates transcribed speech, not non-speech audio content. Music, sound effects and other non-verbal audio are not classified. A clip with no speech in it (music without words, sound effects, noise or silence) completes with is_prohibited: false.
The transcript is never stored and never returned. A rejection reason is model-generated text, scrubbed of verbatim quotation on a best-effort basis, and may paraphrase what was said.
Returns a job ID for polling or webhook delivery. Multipart requests allow at most eight non-file fields. Each field other than text must be at most 16,384 UTF-8 bytes. Oversized fields return 400; too many fields return 413.
Requires the moderate:audio scope. Requests without this scope receive a 403 FORBIDDEN
response. See authentication.
Moderates transcribed speech only. The API does not classify non-speech audio, and a clip with
no speech in it completes with is_prohibited: false. The transcript is never stored and never
returned. See audio moderation for exactly what
the rejection reason may contain.
Request#
Headers#
| Name | Type | Required | Description |
|---|---|---|---|
Authorization |
string | Yes | Your API key as a Bearer token: Bearer YOUR_API_KEY. |
The request fields are described in Audio moderation.
Example request#
curl -X POST https://api.omnifence.ai/api/v1/moderate/audio \
-H "Authorization: Bearer $OMNIFENCE_API_KEY" \
-F "audio=https://example.com/clip.mp3" \
-F "webhook_url=https://your-app.com/webhooks/omnifence" # optional
Responses#
202 Accepted#
| Field | Type | Always present | Description |
|---|---|---|---|
job_id |
string (uuid) | Yes | |
status |
string | Yes | One of queued. |
{
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "queued"
}
503 Service Unavailable#
Moderation intake is busy or a dependency is unavailable. Capacity rejections include Retry-After (seconds); retry with backoff and jitter. SUBMISSION_STATUS_UNKNOWN includes a job_id: poll it before submitting again because acceptance could not be confirmed.
| Field | Type | Always present | Description |
|---|---|---|---|
error |
string | Yes | |
message |
string | Yes | |
statusCode |
integer | Yes | One of 503. |
job_id |
string (uuid) | No | Recovery ID when the acceptance outcome is unknown. |
{
"error": "string",
"message": "string",
"statusCode": 503,
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}