Analyze Single File
curl --request POST \
--url https://demo.descriptor.ai/api/v1/offline/processing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"language_code": "en-US",
"insights": {
"summary": {
"prompt_customization": "Focus on key points and action items"
},
"sentiment": {},
"topics": {}
}
},
"audio": {
"uri": "https://example.com/audio.wav"
}
}
'import requests
url = "https://demo.descriptor.ai/api/v1/offline/processing"
payload = {
"config": {
"language_code": "en-US",
"insights": {
"summary": { "prompt_customization": "Focus on key points and action items" },
"sentiment": {},
"topics": {}
}
},
"audio": { "uri": "https://example.com/audio.wav" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
language_code: 'en-US',
insights: {
summary: {prompt_customization: 'Focus on key points and action items'},
sentiment: {},
topics: {}
}
},
audio: {uri: 'https://example.com/audio.wav'}
})
};
fetch('https://demo.descriptor.ai/api/v1/offline/processing', 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://demo.descriptor.ai/api/v1/offline/processing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'language_code' => 'en-US',
'insights' => [
'summary' => [
'prompt_customization' => 'Focus on key points and action items'
],
'sentiment' => [
],
'topics' => [
]
]
],
'audio' => [
'uri' => 'https://example.com/audio.wav'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://demo.descriptor.ai/api/v1/offline/processing"
payload := strings.NewReader("{\n \"config\": {\n \"language_code\": \"en-US\",\n \"insights\": {\n \"summary\": {\n \"prompt_customization\": \"Focus on key points and action items\"\n },\n \"sentiment\": {},\n \"topics\": {}\n }\n },\n \"audio\": {\n \"uri\": \"https://example.com/audio.wav\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://demo.descriptor.ai/api/v1/offline/processing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"language_code\": \"en-US\",\n \"insights\": {\n \"summary\": {\n \"prompt_customization\": \"Focus on key points and action items\"\n },\n \"sentiment\": {},\n \"topics\": {}\n }\n },\n \"audio\": {\n \"uri\": \"https://example.com/audio.wav\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo.descriptor.ai/api/v1/offline/processing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"language_code\": \"en-US\",\n \"insights\": {\n \"summary\": {\n \"prompt_customization\": \"Focus on key points and action items\"\n },\n \"sentiment\": {},\n \"topics\": {}\n }\n },\n \"audio\": {\n \"uri\": \"https://example.com/audio.wav\"\n }\n}"
response = http.request(request)
puts response.read_body{
"result_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Quickstart
Analyze Single File
For the best results, use audio files with a sample rate of 16 kHz and 16 bits per sample.
POST
/
api
/
v1
/
offline
/
processing
Analyze Single File
curl --request POST \
--url https://demo.descriptor.ai/api/v1/offline/processing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"language_code": "en-US",
"insights": {
"summary": {
"prompt_customization": "Focus on key points and action items"
},
"sentiment": {},
"topics": {}
}
},
"audio": {
"uri": "https://example.com/audio.wav"
}
}
'import requests
url = "https://demo.descriptor.ai/api/v1/offline/processing"
payload = {
"config": {
"language_code": "en-US",
"insights": {
"summary": { "prompt_customization": "Focus on key points and action items" },
"sentiment": {},
"topics": {}
}
},
"audio": { "uri": "https://example.com/audio.wav" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
language_code: 'en-US',
insights: {
summary: {prompt_customization: 'Focus on key points and action items'},
sentiment: {},
topics: {}
}
},
audio: {uri: 'https://example.com/audio.wav'}
})
};
fetch('https://demo.descriptor.ai/api/v1/offline/processing', 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://demo.descriptor.ai/api/v1/offline/processing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'language_code' => 'en-US',
'insights' => [
'summary' => [
'prompt_customization' => 'Focus on key points and action items'
],
'sentiment' => [
],
'topics' => [
]
]
],
'audio' => [
'uri' => 'https://example.com/audio.wav'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://demo.descriptor.ai/api/v1/offline/processing"
payload := strings.NewReader("{\n \"config\": {\n \"language_code\": \"en-US\",\n \"insights\": {\n \"summary\": {\n \"prompt_customization\": \"Focus on key points and action items\"\n },\n \"sentiment\": {},\n \"topics\": {}\n }\n },\n \"audio\": {\n \"uri\": \"https://example.com/audio.wav\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://demo.descriptor.ai/api/v1/offline/processing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"language_code\": \"en-US\",\n \"insights\": {\n \"summary\": {\n \"prompt_customization\": \"Focus on key points and action items\"\n },\n \"sentiment\": {},\n \"topics\": {}\n }\n },\n \"audio\": {\n \"uri\": \"https://example.com/audio.wav\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo.descriptor.ai/api/v1/offline/processing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"language_code\": \"en-US\",\n \"insights\": {\n \"summary\": {\n \"prompt_customization\": \"Focus on key points and action items\"\n },\n \"sentiment\": {},\n \"topics\": {}\n }\n },\n \"audio\": {\n \"uri\": \"https://example.com/audio.wav\"\n }\n}"
response = http.request(request)
puts response.read_body{
"result_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}You can start using our API with the command line following these steps:
- Send a POST request with audio file link and corresponding configuration in JSON.
- Send a GET request to fetch results using the result_id from the response.
- Optional: Configure a webhook to receive the results.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Successful Response
Identifier to retrieve the analysis results