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" # optionalimport requests
url = "http://localhost:3051/api/v1/moderate/audio"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3051/api/v1/moderate/audio', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3051",
CURLOPT_URL => "http://localhost:3051/api/v1/moderate/audio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3051/api/v1/moderate/audio"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3051/api/v1/moderate/audio")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3051/api/v1/moderate/audio")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued"
}{
"error": "<string>",
"message": "<string>",
"statusCode": 503,
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}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.
This moderates transcribed speech, not non-speech audio content. Music, sound effects and other non-verbal audio are not classified.
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.
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" # optionalimport requests
url = "http://localhost:3051/api/v1/moderate/audio"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3051/api/v1/moderate/audio', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3051",
CURLOPT_URL => "http://localhost:3051/api/v1/moderate/audio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3051/api/v1/moderate/audio"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3051/api/v1/moderate/audio")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3051/api/v1/moderate/audio")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued"
}{
"error": "<string>",
"message": "<string>",
"statusCode": 503,
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}moderate:audio scope. Requests without this scope receive a 403 FORBIDDEN
response. See authentication.reason may contain.