Get a signed URL for uploading a recording
curl --request POST \
--url https://api.siro.ai/v1/core/recordings/signed-urls \
--header 'Content-Type: application/json' \
--header 'x-siro-auth-token: <api-key>' \
--data '
{
"fileType": "<string>",
"fileSize": 2
}
'import requests
url = "https://api.siro.ai/v1/core/recordings/signed-urls"
payload = {
"fileType": "<string>",
"fileSize": 2
}
headers = {
"x-siro-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-siro-auth-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileType: '<string>', fileSize: 2})
};
fetch('https://api.siro.ai/v1/core/recordings/signed-urls', 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.siro.ai/v1/core/recordings/signed-urls",
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([
'fileType' => '<string>',
'fileSize' => 2
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-siro-auth-token: <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.siro.ai/v1/core/recordings/signed-urls"
payload := strings.NewReader("{\n \"fileType\": \"<string>\",\n \"fileSize\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-siro-auth-token", "<api-key>")
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://api.siro.ai/v1/core/recordings/signed-urls")
.header("x-siro-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fileType\": \"<string>\",\n \"fileSize\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siro.ai/v1/core/recordings/signed-urls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-siro-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fileType\": \"<string>\",\n \"fileSize\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uploadUrl": "<string>",
"uploadHeaders": {
"Content-Type": "<string>",
"x-goog-content-length-range": "<string>"
},
"downloadUrl": "<string>",
"expiresAt": "<string>"
},
"cursor": "<string>",
"pageSize": 123,
"limit": 123,
"total": 123,
"hasNextPage": true
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>",
"expected": "<string>",
"received": "<string>"
}
],
"name": "ZodError"
}{
"error": "<string>"
}Upload Recordings
Get a signed URL for uploading a recording
Generate signed upload and download URLs for an audio file. The upload URL can be used to upload the file directly to cloud storage.
POST
/
v1
/
core
/
recordings
/
signed-urls
Get a signed URL for uploading a recording
curl --request POST \
--url https://api.siro.ai/v1/core/recordings/signed-urls \
--header 'Content-Type: application/json' \
--header 'x-siro-auth-token: <api-key>' \
--data '
{
"fileType": "<string>",
"fileSize": 2
}
'import requests
url = "https://api.siro.ai/v1/core/recordings/signed-urls"
payload = {
"fileType": "<string>",
"fileSize": 2
}
headers = {
"x-siro-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-siro-auth-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileType: '<string>', fileSize: 2})
};
fetch('https://api.siro.ai/v1/core/recordings/signed-urls', 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.siro.ai/v1/core/recordings/signed-urls",
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([
'fileType' => '<string>',
'fileSize' => 2
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-siro-auth-token: <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.siro.ai/v1/core/recordings/signed-urls"
payload := strings.NewReader("{\n \"fileType\": \"<string>\",\n \"fileSize\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-siro-auth-token", "<api-key>")
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://api.siro.ai/v1/core/recordings/signed-urls")
.header("x-siro-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fileType\": \"<string>\",\n \"fileSize\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siro.ai/v1/core/recordings/signed-urls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-siro-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fileType\": \"<string>\",\n \"fileSize\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uploadUrl": "<string>",
"uploadHeaders": {
"Content-Type": "<string>",
"x-goog-content-length-range": "<string>"
},
"downloadUrl": "<string>",
"expiresAt": "<string>"
},
"cursor": "<string>",
"pageSize": 123,
"limit": 123,
"total": 123,
"hasNextPage": true
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>",
"expected": "<string>",
"received": "<string>"
}
],
"name": "ZodError"
}{
"error": "<string>"
}Generates a short-lived signed upload URL for an audio file plus a matching download URL. This is the first step of the direct-upload flow: upload your audio to cloud storage with
Then call Post recordings upload with
uploadUrl, then pass downloadUrl as fileUrl to Post recordings upload to create the recording.
Response fields
| Field | Description |
|---|---|
uploadUrl | Signed URL to PUT the file body to (Google Cloud Storage). |
uploadHeaders | Headers you must send with the PUT — see below. |
downloadUrl | Pass this as fileUrl when creating the recording. |
expiresAt | When the signed URLs expire (ISO 8601). Upload before this time. |
Required upload headers
The values ofContent-Type and x-goog-content-length-range are baked into the signature of uploadUrl. You must send them exactly as returned in uploadHeaders, or GCS rejects the upload with a 403 SignatureDoesNotMatch.
-
Content-Type— the MIME type for thefileTypeyou requested. Siro maps extensions as follows:fileTypeContent-Typemp3audio/mpegwavaudio/wavaacaudio/aac -
x-goog-content-length-range—0,<fileSize>, where<fileSize>is the exact byte size you passed in the request. The uploaded body must fall within this range.
Example upload
# 1. Request the signed URLs
curl -X POST https://api.siro.ai/v1/core/recordings/signed-urls \
-H "x-siro-auth-token: $SIRO_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fileType": "mp3", "fileSize": 1048576}'
# Response:
# {
# "data": {
# "uploadUrl": "https://storage.googleapis.com/...",
# "uploadHeaders": {
# "Content-Type": "audio/mpeg",
# "x-goog-content-length-range": "0,1048576"
# },
# "downloadUrl": "https://storage.googleapis.com/...",
# "expiresAt": "2026-06-08T12:00:00.000Z"
# }
# }
# 2. PUT the file to uploadUrl, echoing uploadHeaders verbatim
curl -X PUT "$UPLOAD_URL" \
-H "Content-Type: audio/mpeg" \
-H "x-goog-content-length-range: 0,1048576" \
--data-binary @recording.mp3
fileUrl set to downloadUrl.Authorizations
OAuth access token for user-scoped requests (Authorization Code or machine-to-machine). Send header x-siro-auth-token: <oauth-access-token>. Not an organization API key.
Body
application/json