Upload a file
curl --request POST \
--url https://api.wavix.com/v1/speech-analytics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form callback_url=https://you-site.com/webhook \
--form insights=trueimport requests
url = "https://api.wavix.com/v1/speech-analytics"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"callback_url": "https://you-site.com/webhook",
"insights": "true"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('callback_url', 'https://you-site.com/webhook');
form.append('insights', 'true');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.wavix.com/v1/speech-analytics', 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.wavix.com/v1/speech-analytics",
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<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback_url\"\r\n\r\nhttps://you-site.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"insights\"\r\n\r\ntrue\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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.wavix.com/v1/speech-analytics"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback_url\"\r\n\r\nhttps://you-site.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"insights\"\r\n\r\ntrue\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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("https://api.wavix.com/v1/speech-analytics")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback_url\"\r\n\r\nhttps://you-site.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"insights\"\r\n\r\ntrue\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wavix.com/v1/speech-analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback_url\"\r\n\r\nhttps://you-site.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"insights\"\r\n\r\ntrue\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"file": "file.mp3",
"request_id": "e865ea07-25af-4fdd-876e-04b0d41d5ebd",
"success": true
}{
"success": false,
"message": "Missing or invalid parameter <param_name>"
}{
"success": false,
"message": "Missing or invalid parameter <param_name>"
}Speech Analytics
Upload a file
Uploads an audio file for transcription. Transcription is asynchronous; Wavix sends a POST callback to callback_url when it completes, including the request_id returned by this request.
Callback body:
{
"request_id": "e865ea07-25af-4fdd-876e-04b0d41d5ebd",
"status": "completed",
"error": null
}
request_id: ID of the transcription request.status: One ofcompleted(transcription succeeded) orfailed(transcription encountered an error).error: Error description, ornullwhen the transcription succeeded.
POST
/
v1
/
speech-analytics
Upload a file
curl --request POST \
--url https://api.wavix.com/v1/speech-analytics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form callback_url=https://you-site.com/webhook \
--form insights=trueimport requests
url = "https://api.wavix.com/v1/speech-analytics"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"callback_url": "https://you-site.com/webhook",
"insights": "true"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('callback_url', 'https://you-site.com/webhook');
form.append('insights', 'true');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.wavix.com/v1/speech-analytics', 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.wavix.com/v1/speech-analytics",
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<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback_url\"\r\n\r\nhttps://you-site.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"insights\"\r\n\r\ntrue\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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.wavix.com/v1/speech-analytics"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback_url\"\r\n\r\nhttps://you-site.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"insights\"\r\n\r\ntrue\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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("https://api.wavix.com/v1/speech-analytics")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback_url\"\r\n\r\nhttps://you-site.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"insights\"\r\n\r\ntrue\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wavix.com/v1/speech-analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback_url\"\r\n\r\nhttps://you-site.com/webhook\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"insights\"\r\n\r\ntrue\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"file": "file.mp3",
"request_id": "e865ea07-25af-4fdd-876e-04b0d41d5ebd",
"success": true
}{
"success": false,
"message": "Missing or invalid parameter <param_name>"
}{
"success": false,
"message": "Missing or invalid parameter <param_name>"
}Authorizations
Wavix API key. Pass as Authorization: Bearer <api_key>. Keys support per-resource scopes (none / read / write). See Restricted keys and scopes.
Body
multipart/form-data
Audio file to transcribe. Maximum size is 25 MB. Supported formats are WAV, MP3, and MP4 stereo.
URL that receives the POST callback when transcription completes.
Example:
"https://you-site.com/webhook"
When true, generates conversation insights alongside the transcript.
Example:
true
Was this page helpful?