curl --request POST \
--url https://backend.identifai.net/api/classification_audio \
--header 'Content-Type: multipart/form-data' \
--header 'X-Api-Key: <api-key>' \
--form 'audio=@example-file;type=audio/mpeg' \
--form 'ref_id=<string>' \
--form 'webhook_url=<string>' \
--form 'deferred_webhook_url=<string>' \
--form no_cache=true \
--form prevent_c2pa_forces=true \
--form 'audio_timestamps=00:00:05.000,00:01:12.500'import requests
url = "https://backend.identifai.net/api/classification_audio"
files = { "audio": ("example-file", open("example-file", "rb"), "audio/mpeg") }
payload = {
"ref_id": "<string>",
"webhook_url": "<string>",
"deferred_webhook_url": "<string>",
"no_cache": "true",
"prevent_c2pa_forces": "true",
"audio_timestamps": "00:00:05.000,00:01:12.500"
}
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('audio', '<string>');
form.append('ref_id', '<string>');
form.append('webhook_url', '<string>');
form.append('deferred_webhook_url', '<string>');
form.append('no_cache', 'true');
form.append('prevent_c2pa_forces', 'true');
form.append('audio_timestamps', '00:00:05.000,00:01:12.500');
const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
options.body = form;
fetch('https://backend.identifai.net/api/classification_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_URL => "https://backend.identifai.net/api/classification_audio",
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=\"audio\"; filename=\"example-file\"\r\nContent-Type: audio/mpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ref_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"deferred_webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"no_cache\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prevent_c2pa_forces\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_timestamps\"\r\n\r\n00:00:05.000,00:01:12.500\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://backend.identifai.net/api/classification_audio"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: audio/mpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ref_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"deferred_webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"no_cache\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prevent_c2pa_forces\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_timestamps\"\r\n\r\n00:00:05.000,00:01:12.500\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://backend.identifai.net/api/classification_audio")
.header("X-Api-Key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: audio/mpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ref_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"deferred_webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"no_cache\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prevent_c2pa_forces\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_timestamps\"\r\n\r\n00:00:05.000,00:01:12.500\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.identifai.net/api/classification_audio")
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=\"audio\"; filename=\"example-file\"\r\nContent-Type: audio/mpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ref_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"deferred_webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"no_cache\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prevent_c2pa_forces\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_timestamps\"\r\n\r\n00:00:05.000,00:01:12.500\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_bodyClassify a speech
Submit a speech for classification
š Response format varies based on the Accept header:
Accept: application/json ā { "identifier": "..." }
Other values (e.g. text/plain) ā plain text with just the identifier string.
curl --request POST \
--url https://backend.identifai.net/api/classification_audio \
--header 'Content-Type: multipart/form-data' \
--header 'X-Api-Key: <api-key>' \
--form 'audio=@example-file;type=audio/mpeg' \
--form 'ref_id=<string>' \
--form 'webhook_url=<string>' \
--form 'deferred_webhook_url=<string>' \
--form no_cache=true \
--form prevent_c2pa_forces=true \
--form 'audio_timestamps=00:00:05.000,00:01:12.500'import requests
url = "https://backend.identifai.net/api/classification_audio"
files = { "audio": ("example-file", open("example-file", "rb"), "audio/mpeg") }
payload = {
"ref_id": "<string>",
"webhook_url": "<string>",
"deferred_webhook_url": "<string>",
"no_cache": "true",
"prevent_c2pa_forces": "true",
"audio_timestamps": "00:00:05.000,00:01:12.500"
}
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('audio', '<string>');
form.append('ref_id', '<string>');
form.append('webhook_url', '<string>');
form.append('deferred_webhook_url', '<string>');
form.append('no_cache', 'true');
form.append('prevent_c2pa_forces', 'true');
form.append('audio_timestamps', '00:00:05.000,00:01:12.500');
const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
options.body = form;
fetch('https://backend.identifai.net/api/classification_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_URL => "https://backend.identifai.net/api/classification_audio",
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=\"audio\"; filename=\"example-file\"\r\nContent-Type: audio/mpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ref_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"deferred_webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"no_cache\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prevent_c2pa_forces\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_timestamps\"\r\n\r\n00:00:05.000,00:01:12.500\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://backend.identifai.net/api/classification_audio"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: audio/mpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ref_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"deferred_webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"no_cache\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prevent_c2pa_forces\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_timestamps\"\r\n\r\n00:00:05.000,00:01:12.500\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://backend.identifai.net/api/classification_audio")
.header("X-Api-Key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: audio/mpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ref_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"deferred_webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"no_cache\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prevent_c2pa_forces\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_timestamps\"\r\n\r\n00:00:05.000,00:01:12.500\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.identifai.net/api/classification_audio")
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=\"audio\"; filename=\"example-file\"\r\nContent-Type: audio/mpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ref_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"deferred_webhook_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"no_cache\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prevent_c2pa_forces\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_timestamps\"\r\n\r\n00:00:05.000,00:01:12.500\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_bodyAuthorizations
Your API key.
Headers
Response content type. Supported: application/json, text/plain.
application/json, text/plain Body
The speech to be classified. Supported formats: MP3, WAV, OGG, FLAC, AAC, 3GP, M4A, M4B, M4P, M4R, MP4. MIME types: audio/mpeg, audio/wav, audio/ogg, audio/flac, audio/aac, audio/3gp, audio/m4a, audio/m4b, audio/m4p, audio/m4r, video/mp4. Maximum file size: 15MB.
An optional reference ID to associate with the classification request.
If specified, the classification result will also be automatically sent to the entered URL. Otherwise, the result can be obtained by polling the relative endpoint. Please note that in order to use a webhook callback URL you need to request a specific enablement, otherwise the parameter is ignored. Moreover, the system may cache the analysis results of repeated submissions, i.e. submissions of the same file with the same options: in this case the webhook won't be called and the results would be accessible only by polling the relative endpoint.
If specified, the URL is notified once when the deferred results of the submission are complete (e.g. the textual explanations of the XAI maps and of the heatmap), after the main results sent to webhook_url. The notification carries the event submission.deferred.completed: see Deferred results for the payload. The same enablement, domain restrictions and authentication of webhook_url apply. Delivery is at least once: deduplicate by identifier, and note that an expired notification can be followed by a second one with the real outcome, which supersedes it. If omitted or empty, no deferred notification is sent.
Set it to true to force the system to reprocess the image even if it has been previously submitted with the same options. This may result in additional charges.
If true, C2PA signature does not force the origin to artificial. If false or undefined, C2PA signature will force the origin to artificial (current behaviour).
[Plan feature] Specific moments of the speech to analyze. Comma-separated list of timecodes in HH:MM:SS.mmm format, measured from the beginning of the file (e.g. 00:00:05.000,00:01:12.500). When provided, instead of splitting the audio into chunks over its whole duration, the system analyzes one short audio chunk centred on each listed moment; moments close enough to fall within the same chunk are analyzed together in a single chunk. Duplicated moments are counted once. You can list up to 30 moments if your pricing plan lets you choose the number of audio chunks, otherwise up to 5. One audio chunk is charged for each distinct moment: chunks that are not produced (grouped moments, moments beyond the end of the audio) are refunded once the analysis is complete. If none of the moments falls within the audio, the classification ends with an error. You must be enabled in your pricing plan to use this option, otherwise the parameter is ignored.
"00:00:05.000,00:01:12.500"
Response
The classification identifier. The format depends on the Accept header.
"8d64370a87b820cc1cf620338f5c898bab37439c9a405f32d9eaffc50c4f27b0"