AI-voice detection
curl --request POST \
--url https://api.aurigin.ai/v0/predict \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form file='@example-file' \
--form user_id=speaker_123import requests
url = "https://api.aurigin.ai/v0/predict"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "user_id": "speaker_123" }
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '(binary audio file)');
form.append('user_id', 'speaker_123');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.aurigin.ai/v0/predict', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aurigin.ai/v0/predict",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n(binary audio file)\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"user_id\"\r\n\r\nspeaker_123\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aurigin.ai/v0/predict"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n(binary audio file)\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"user_id\"\r\n\r\nspeaker_123\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aurigin.ai/v0/predict")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n(binary audio file)\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"user_id\"\r\n\r\nspeaker_123\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aurigin.ai/v0/predict")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n(binary audio file)\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"user_id\"\r\n\r\nspeaker_123\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"predictions": [
"fake",
"fake",
"real"
],
"global_probability": [
0.9584,
0.9585,
0.9123
],
"error": [
null,
null,
null
],
"model": "apollo-4-2025-10-20",
"processing_time": 1.350719928741455,
"audio_duration": 69.91
}{
"error": "validation_error",
"message": "Audio file too large (max 4MB)",
"status": 400,
"correlation_id": "d3a1cb06-23a3-4f8a-a955-7ed2df41b5b7"
}{
"error": "unauthorized",
"message": "Invalid x-api-key header",
"status": 403,
"correlation_id": "12b52e74-7a57-4d85-aa2b-7b9158f09ef9"
}{
"error": "internal_error",
"message": "Upstream model timed out",
"status": 500,
"correlation_id": "f906f85c-4b63-4f25-a93d-392d8fd521fb"
}Deepfake detection
AI-voice detection
Analyze audio to determine if it is AI generated or real.
You can send audio data in two ways: (1) multipart/form-data with a direct file upload, or (2) application/json with a presigned URL.
The API processes audio files in 5-second chunks and returns one prediction per chunk.
- Minimum duration: 3 seconds (1 chunk)
- Maximum file size: 4MB
- Chunk size: 5 seconds each
- Output: One prediction per 5-second chunk
Supported formats: WAV, MP3, M4A, FLAC, OGG.
Error codes:
- 400 Invalid input or file too large
- 403 Authentication failed (check x-api-key)
- 500 Internal error or upstream unavailability.
POST
/
predict
AI-voice detection
curl --request POST \
--url https://api.aurigin.ai/v0/predict \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form file='@example-file' \
--form user_id=speaker_123import requests
url = "https://api.aurigin.ai/v0/predict"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "user_id": "speaker_123" }
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '(binary audio file)');
form.append('user_id', 'speaker_123');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.aurigin.ai/v0/predict', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aurigin.ai/v0/predict",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n(binary audio file)\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"user_id\"\r\n\r\nspeaker_123\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aurigin.ai/v0/predict"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n(binary audio file)\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"user_id\"\r\n\r\nspeaker_123\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aurigin.ai/v0/predict")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n(binary audio file)\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"user_id\"\r\n\r\nspeaker_123\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aurigin.ai/v0/predict")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n(binary audio file)\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"user_id\"\r\n\r\nspeaker_123\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"predictions": [
"fake",
"fake",
"real"
],
"global_probability": [
0.9584,
0.9585,
0.9123
],
"error": [
null,
null,
null
],
"model": "apollo-4-2025-10-20",
"processing_time": 1.350719928741455,
"audio_duration": 69.91
}{
"error": "validation_error",
"message": "Audio file too large (max 4MB)",
"status": 400,
"correlation_id": "d3a1cb06-23a3-4f8a-a955-7ed2df41b5b7"
}{
"error": "unauthorized",
"message": "Invalid x-api-key header",
"status": 403,
"correlation_id": "12b52e74-7a57-4d85-aa2b-7b9158f09ef9"
}{
"error": "internal_error",
"message": "Upstream model timed out",
"status": 500,
"correlation_id": "f906f85c-4b63-4f25-a93d-392d8fd521fb"
}Authorizations
Response
OK
Error messages for each 5-second chunk (null if successful). Aligns 1:1 with the predictions array.
Confidence scores (0.0-1.0) for each prediction, one per 5-second chunk. Aligns 1:1 with the predictions array.
AI detection results for each 5-second chunk of the audio. Array length equals the number of 5-second chunks in the audio file.
Available options:
fake, real ⌘I