POST /v1/live
curl --request POST \
--url https://api.example.com/v1/live \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form sdp=@example-file \
--form 'session={
"audio": {
"input": {
"format": {
"rate": 123,
"type": "audio/pcm"
},
"noise_reduction": {},
"transcription": {
"keywords": [
"<string>"
],
"language": "<string>",
"languages": [
"<string>"
],
"model": "<string>",
"prompt": "<string>"
},
"turn_detection": {
"type": "server_vad",
"create_response": true,
"idle_timeout_ms": 123,
"interrupt_response": true,
"prefix_padding_ms": 123,
"silence_duration_ms": 123,
"threshold": 123
}
},
"output": {
"format": {
"rate": 123,
"type": "audio/pcm"
},
"speed": 123,
"voice": "<string>"
}
},
"delegation": {
"type": "<string>",
"ack_filler": true
},
"initial_items": [
{
"content": [
{
"text": "<string>",
"type": "<string>"
}
],
"role": "<string>",
"type": "<string>"
}
],
"instructions": "<string>",
"model": "<string>"
}'import requests
url = "https://api.example.com/v1/live"
files = { "sdp": ("example-file", open("example-file", "rb")) }
payload = { "session": "{
\"audio\": {
\"input\": {
\"format\": {
\"rate\": 123,
\"type\": \"audio/pcm\"
},
\"noise_reduction\": {},
\"transcription\": {
\"keywords\": [
\"<string>\"
],
\"language\": \"<string>\",
\"languages\": [
\"<string>\"
],
\"model\": \"<string>\",
\"prompt\": \"<string>\"
},
\"turn_detection\": {
\"type\": \"server_vad\",
\"create_response\": true,
\"idle_timeout_ms\": 123,
\"interrupt_response\": true,
\"prefix_padding_ms\": 123,
\"silence_duration_ms\": 123,
\"threshold\": 123
}
},
\"output\": {
\"format\": {
\"rate\": 123,
\"type\": \"audio/pcm\"
},
\"speed\": 123,
\"voice\": \"<string>\"
}
},
\"delegation\": {
\"type\": \"<string>\",
\"ack_filler\": true
},
\"initial_items\": [
{
\"content\": [
{
\"text\": \"<string>\",
\"type\": \"<string>\"
}
],
\"role\": \"<string>\",
\"type\": \"<string>\"
}
],
\"instructions\": \"<string>\",
\"model\": \"<string>\"
}" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('sdp', '<string>');
form.append('session', '{
"audio": {
"input": {
"format": {
"rate": 123,
"type": "audio/pcm"
},
"noise_reduction": {},
"transcription": {
"keywords": [
"<string>"
],
"language": "<string>",
"languages": [
"<string>"
],
"model": "<string>",
"prompt": "<string>"
},
"turn_detection": {
"type": "server_vad",
"create_response": true,
"idle_timeout_ms": 123,
"interrupt_response": true,
"prefix_padding_ms": 123,
"silence_duration_ms": 123,
"threshold": 123
}
},
"output": {
"format": {
"rate": 123,
"type": "audio/pcm"
},
"speed": 123,
"voice": "<string>"
}
},
"delegation": {
"type": "<string>",
"ack_filler": true
},
"initial_items": [
{
"content": [
{
"text": "<string>",
"type": "<string>"
}
],
"role": "<string>",
"type": "<string>"
}
],
"instructions": "<string>",
"model": "<string>"
}');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.example.com/v1/live', 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.example.com/v1/live",
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=\"sdp\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session\"\r\n\r\n{\r\n \"audio\": {\r\n \"input\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"noise_reduction\": {},\r\n \"transcription\": {\r\n \"keywords\": [\r\n \"<string>\"\r\n ],\r\n \"language\": \"<string>\",\r\n \"languages\": [\r\n \"<string>\"\r\n ],\r\n \"model\": \"<string>\",\r\n \"prompt\": \"<string>\"\r\n },\r\n \"turn_detection\": {\r\n \"type\": \"server_vad\",\r\n \"create_response\": true,\r\n \"idle_timeout_ms\": 123,\r\n \"interrupt_response\": true,\r\n \"prefix_padding_ms\": 123,\r\n \"silence_duration_ms\": 123,\r\n \"threshold\": 123\r\n }\r\n },\r\n \"output\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"speed\": 123,\r\n \"voice\": \"<string>\"\r\n }\r\n },\r\n \"delegation\": {\r\n \"type\": \"<string>\",\r\n \"ack_filler\": true\r\n },\r\n \"initial_items\": [\r\n {\r\n \"content\": [\r\n {\r\n \"text\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"role\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"instructions\": \"<string>\",\r\n \"model\": \"<string>\"\r\n}\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.example.com/v1/live"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sdp\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session\"\r\n\r\n{\r\n \"audio\": {\r\n \"input\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"noise_reduction\": {},\r\n \"transcription\": {\r\n \"keywords\": [\r\n \"<string>\"\r\n ],\r\n \"language\": \"<string>\",\r\n \"languages\": [\r\n \"<string>\"\r\n ],\r\n \"model\": \"<string>\",\r\n \"prompt\": \"<string>\"\r\n },\r\n \"turn_detection\": {\r\n \"type\": \"server_vad\",\r\n \"create_response\": true,\r\n \"idle_timeout_ms\": 123,\r\n \"interrupt_response\": true,\r\n \"prefix_padding_ms\": 123,\r\n \"silence_duration_ms\": 123,\r\n \"threshold\": 123\r\n }\r\n },\r\n \"output\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"speed\": 123,\r\n \"voice\": \"<string>\"\r\n }\r\n },\r\n \"delegation\": {\r\n \"type\": \"<string>\",\r\n \"ack_filler\": true\r\n },\r\n \"initial_items\": [\r\n {\r\n \"content\": [\r\n {\r\n \"text\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"role\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"instructions\": \"<string>\",\r\n \"model\": \"<string>\"\r\n}\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.example.com/v1/live")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sdp\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session\"\r\n\r\n{\r\n \"audio\": {\r\n \"input\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"noise_reduction\": {},\r\n \"transcription\": {\r\n \"keywords\": [\r\n \"<string>\"\r\n ],\r\n \"language\": \"<string>\",\r\n \"languages\": [\r\n \"<string>\"\r\n ],\r\n \"model\": \"<string>\",\r\n \"prompt\": \"<string>\"\r\n },\r\n \"turn_detection\": {\r\n \"type\": \"server_vad\",\r\n \"create_response\": true,\r\n \"idle_timeout_ms\": 123,\r\n \"interrupt_response\": true,\r\n \"prefix_padding_ms\": 123,\r\n \"silence_duration_ms\": 123,\r\n \"threshold\": 123\r\n }\r\n },\r\n \"output\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"speed\": 123,\r\n \"voice\": \"<string>\"\r\n }\r\n },\r\n \"delegation\": {\r\n \"type\": \"<string>\",\r\n \"ack_filler\": true\r\n },\r\n \"initial_items\": [\r\n {\r\n \"content\": [\r\n {\r\n \"text\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"role\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"instructions\": \"<string>\",\r\n \"model\": \"<string>\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/live")
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=\"sdp\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session\"\r\n\r\n{\r\n \"audio\": {\r\n \"input\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"noise_reduction\": {},\r\n \"transcription\": {\r\n \"keywords\": [\r\n \"<string>\"\r\n ],\r\n \"language\": \"<string>\",\r\n \"languages\": [\r\n \"<string>\"\r\n ],\r\n \"model\": \"<string>\",\r\n \"prompt\": \"<string>\"\r\n },\r\n \"turn_detection\": {\r\n \"type\": \"server_vad\",\r\n \"create_response\": true,\r\n \"idle_timeout_ms\": 123,\r\n \"interrupt_response\": true,\r\n \"prefix_padding_ms\": 123,\r\n \"silence_duration_ms\": 123,\r\n \"threshold\": 123\r\n }\r\n },\r\n \"output\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"speed\": 123,\r\n \"voice\": \"<string>\"\r\n }\r\n },\r\n \"delegation\": {\r\n \"type\": \"<string>\",\r\n \"ack_filler\": true\r\n },\r\n \"initial_items\": [\r\n {\r\n \"content\": [\r\n {\r\n \"text\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"role\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"instructions\": \"<string>\",\r\n \"model\": \"<string>\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"code": "<string>",
"message": "<string>"
}
}Forwarding
POST /v1/live
Available at the instance root or under a provider/namespace prefix. Shared paths select the wire dialect from client headers; without dialect evidence, the first listed route wins.
POST
/
v1
/
live
POST /v1/live
curl --request POST \
--url https://api.example.com/v1/live \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form sdp=@example-file \
--form 'session={
"audio": {
"input": {
"format": {
"rate": 123,
"type": "audio/pcm"
},
"noise_reduction": {},
"transcription": {
"keywords": [
"<string>"
],
"language": "<string>",
"languages": [
"<string>"
],
"model": "<string>",
"prompt": "<string>"
},
"turn_detection": {
"type": "server_vad",
"create_response": true,
"idle_timeout_ms": 123,
"interrupt_response": true,
"prefix_padding_ms": 123,
"silence_duration_ms": 123,
"threshold": 123
}
},
"output": {
"format": {
"rate": 123,
"type": "audio/pcm"
},
"speed": 123,
"voice": "<string>"
}
},
"delegation": {
"type": "<string>",
"ack_filler": true
},
"initial_items": [
{
"content": [
{
"text": "<string>",
"type": "<string>"
}
],
"role": "<string>",
"type": "<string>"
}
],
"instructions": "<string>",
"model": "<string>"
}'import requests
url = "https://api.example.com/v1/live"
files = { "sdp": ("example-file", open("example-file", "rb")) }
payload = { "session": "{
\"audio\": {
\"input\": {
\"format\": {
\"rate\": 123,
\"type\": \"audio/pcm\"
},
\"noise_reduction\": {},
\"transcription\": {
\"keywords\": [
\"<string>\"
],
\"language\": \"<string>\",
\"languages\": [
\"<string>\"
],
\"model\": \"<string>\",
\"prompt\": \"<string>\"
},
\"turn_detection\": {
\"type\": \"server_vad\",
\"create_response\": true,
\"idle_timeout_ms\": 123,
\"interrupt_response\": true,
\"prefix_padding_ms\": 123,
\"silence_duration_ms\": 123,
\"threshold\": 123
}
},
\"output\": {
\"format\": {
\"rate\": 123,
\"type\": \"audio/pcm\"
},
\"speed\": 123,
\"voice\": \"<string>\"
}
},
\"delegation\": {
\"type\": \"<string>\",
\"ack_filler\": true
},
\"initial_items\": [
{
\"content\": [
{
\"text\": \"<string>\",
\"type\": \"<string>\"
}
],
\"role\": \"<string>\",
\"type\": \"<string>\"
}
],
\"instructions\": \"<string>\",
\"model\": \"<string>\"
}" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('sdp', '<string>');
form.append('session', '{
"audio": {
"input": {
"format": {
"rate": 123,
"type": "audio/pcm"
},
"noise_reduction": {},
"transcription": {
"keywords": [
"<string>"
],
"language": "<string>",
"languages": [
"<string>"
],
"model": "<string>",
"prompt": "<string>"
},
"turn_detection": {
"type": "server_vad",
"create_response": true,
"idle_timeout_ms": 123,
"interrupt_response": true,
"prefix_padding_ms": 123,
"silence_duration_ms": 123,
"threshold": 123
}
},
"output": {
"format": {
"rate": 123,
"type": "audio/pcm"
},
"speed": 123,
"voice": "<string>"
}
},
"delegation": {
"type": "<string>",
"ack_filler": true
},
"initial_items": [
{
"content": [
{
"text": "<string>",
"type": "<string>"
}
],
"role": "<string>",
"type": "<string>"
}
],
"instructions": "<string>",
"model": "<string>"
}');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.example.com/v1/live', 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.example.com/v1/live",
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=\"sdp\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session\"\r\n\r\n{\r\n \"audio\": {\r\n \"input\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"noise_reduction\": {},\r\n \"transcription\": {\r\n \"keywords\": [\r\n \"<string>\"\r\n ],\r\n \"language\": \"<string>\",\r\n \"languages\": [\r\n \"<string>\"\r\n ],\r\n \"model\": \"<string>\",\r\n \"prompt\": \"<string>\"\r\n },\r\n \"turn_detection\": {\r\n \"type\": \"server_vad\",\r\n \"create_response\": true,\r\n \"idle_timeout_ms\": 123,\r\n \"interrupt_response\": true,\r\n \"prefix_padding_ms\": 123,\r\n \"silence_duration_ms\": 123,\r\n \"threshold\": 123\r\n }\r\n },\r\n \"output\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"speed\": 123,\r\n \"voice\": \"<string>\"\r\n }\r\n },\r\n \"delegation\": {\r\n \"type\": \"<string>\",\r\n \"ack_filler\": true\r\n },\r\n \"initial_items\": [\r\n {\r\n \"content\": [\r\n {\r\n \"text\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"role\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"instructions\": \"<string>\",\r\n \"model\": \"<string>\"\r\n}\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.example.com/v1/live"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sdp\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session\"\r\n\r\n{\r\n \"audio\": {\r\n \"input\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"noise_reduction\": {},\r\n \"transcription\": {\r\n \"keywords\": [\r\n \"<string>\"\r\n ],\r\n \"language\": \"<string>\",\r\n \"languages\": [\r\n \"<string>\"\r\n ],\r\n \"model\": \"<string>\",\r\n \"prompt\": \"<string>\"\r\n },\r\n \"turn_detection\": {\r\n \"type\": \"server_vad\",\r\n \"create_response\": true,\r\n \"idle_timeout_ms\": 123,\r\n \"interrupt_response\": true,\r\n \"prefix_padding_ms\": 123,\r\n \"silence_duration_ms\": 123,\r\n \"threshold\": 123\r\n }\r\n },\r\n \"output\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"speed\": 123,\r\n \"voice\": \"<string>\"\r\n }\r\n },\r\n \"delegation\": {\r\n \"type\": \"<string>\",\r\n \"ack_filler\": true\r\n },\r\n \"initial_items\": [\r\n {\r\n \"content\": [\r\n {\r\n \"text\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"role\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"instructions\": \"<string>\",\r\n \"model\": \"<string>\"\r\n}\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.example.com/v1/live")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sdp\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session\"\r\n\r\n{\r\n \"audio\": {\r\n \"input\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"noise_reduction\": {},\r\n \"transcription\": {\r\n \"keywords\": [\r\n \"<string>\"\r\n ],\r\n \"language\": \"<string>\",\r\n \"languages\": [\r\n \"<string>\"\r\n ],\r\n \"model\": \"<string>\",\r\n \"prompt\": \"<string>\"\r\n },\r\n \"turn_detection\": {\r\n \"type\": \"server_vad\",\r\n \"create_response\": true,\r\n \"idle_timeout_ms\": 123,\r\n \"interrupt_response\": true,\r\n \"prefix_padding_ms\": 123,\r\n \"silence_duration_ms\": 123,\r\n \"threshold\": 123\r\n }\r\n },\r\n \"output\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"speed\": 123,\r\n \"voice\": \"<string>\"\r\n }\r\n },\r\n \"delegation\": {\r\n \"type\": \"<string>\",\r\n \"ack_filler\": true\r\n },\r\n \"initial_items\": [\r\n {\r\n \"content\": [\r\n {\r\n \"text\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"role\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"instructions\": \"<string>\",\r\n \"model\": \"<string>\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/live")
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=\"sdp\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"session\"\r\n\r\n{\r\n \"audio\": {\r\n \"input\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"noise_reduction\": {},\r\n \"transcription\": {\r\n \"keywords\": [\r\n \"<string>\"\r\n ],\r\n \"language\": \"<string>\",\r\n \"languages\": [\r\n \"<string>\"\r\n ],\r\n \"model\": \"<string>\",\r\n \"prompt\": \"<string>\"\r\n },\r\n \"turn_detection\": {\r\n \"type\": \"server_vad\",\r\n \"create_response\": true,\r\n \"idle_timeout_ms\": 123,\r\n \"interrupt_response\": true,\r\n \"prefix_padding_ms\": 123,\r\n \"silence_duration_ms\": 123,\r\n \"threshold\": 123\r\n }\r\n },\r\n \"output\": {\r\n \"format\": {\r\n \"rate\": 123,\r\n \"type\": \"audio/pcm\"\r\n },\r\n \"speed\": 123,\r\n \"voice\": \"<string>\"\r\n }\r\n },\r\n \"delegation\": {\r\n \"type\": \"<string>\",\r\n \"ack_filler\": true\r\n },\r\n \"initial_items\": [\r\n {\r\n \"content\": [\r\n {\r\n \"text\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"role\": \"<string>\",\r\n \"type\": \"<string>\"\r\n }\r\n ],\r\n \"instructions\": \"<string>\",\r\n \"model\": \"<string>\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"code": "<string>",
"message": "<string>"
}
}授权
beareranthropicKeygoogleKeyqueryKey
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
multipart/form-data
响应
Successful protocol response
The response is of type string.