Audio transcriptions
curl --request POST \
--url https://app.frogbot.ai/api/v1/audio/transcriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"language": "<string>",
"prompt": "<string>",
"response_format": "<string>",
"temperature": 123
}
'import requests
url = "https://app.frogbot.ai/api/v1/audio/transcriptions"
payload = {
"model": "<string>",
"language": "<string>",
"prompt": "<string>",
"response_format": "<string>",
"temperature": 123
}
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({
model: '<string>',
language: '<string>',
prompt: '<string>',
response_format: '<string>',
temperature: 123
})
};
fetch('https://app.frogbot.ai/api/v1/audio/transcriptions', 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://app.frogbot.ai/api/v1/audio/transcriptions",
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([
'model' => '<string>',
'language' => '<string>',
'prompt' => '<string>',
'response_format' => '<string>',
'temperature' => 123
]),
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://app.frogbot.ai/api/v1/audio/transcriptions"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"<string>\",\n \"temperature\": 123\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://app.frogbot.ai/api/v1/audio/transcriptions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"<string>\",\n \"temperature\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.frogbot.ai/api/v1/audio/transcriptions")
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 \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"<string>\",\n \"temperature\": 123\n}"
response = http.request(request)
puts response.read_body{
"text": "Hello, this is a sample transcription.",
"task": "transcribe",
"language": "en",
"duration": 3.5,
"words": [
{ "word": "Hello", "start": 0.0, "end": 0.4 },
{ "word": "this", "start": 0.5, "end": 0.7 }
]
}
Inference API
Audio transcriptions
Transcribe audio files to text
POST
/
api
/
v1
/
audio
/
transcriptions
Audio transcriptions
curl --request POST \
--url https://app.frogbot.ai/api/v1/audio/transcriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"language": "<string>",
"prompt": "<string>",
"response_format": "<string>",
"temperature": 123
}
'import requests
url = "https://app.frogbot.ai/api/v1/audio/transcriptions"
payload = {
"model": "<string>",
"language": "<string>",
"prompt": "<string>",
"response_format": "<string>",
"temperature": 123
}
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({
model: '<string>',
language: '<string>',
prompt: '<string>',
response_format: '<string>',
temperature: 123
})
};
fetch('https://app.frogbot.ai/api/v1/audio/transcriptions', 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://app.frogbot.ai/api/v1/audio/transcriptions",
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([
'model' => '<string>',
'language' => '<string>',
'prompt' => '<string>',
'response_format' => '<string>',
'temperature' => 123
]),
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://app.frogbot.ai/api/v1/audio/transcriptions"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"<string>\",\n \"temperature\": 123\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://app.frogbot.ai/api/v1/audio/transcriptions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"<string>\",\n \"temperature\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.frogbot.ai/api/v1/audio/transcriptions")
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 \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"<string>\",\n \"temperature\": 123\n}"
response = http.request(request)
puts response.read_body{
"text": "Hello, this is a sample transcription.",
"task": "transcribe",
"language": "en",
"duration": 3.5,
"words": [
{ "word": "Hello", "start": 0.0, "end": 0.4 },
{ "word": "this", "start": 0.5, "end": 0.7 }
]
}
Transcribe audio from a file into text. Accepts multipart form data.
Authenticate
Use an API key in theAuthorization header.
curl https://app.frogbot.ai/api/v1/audio/transcriptions \
-H "Authorization: Bearer $FROGBOT_API_KEY"
Request body
string
required
Transcription model ID to use. See available transcription models for the full list.Examples:
whisper-1, elevenlabs-scribe-v1file
required
The audio file to transcribe. Supported formats:
mp3, mp4, mpeg, mpga, m4a, wav, webm.string
Language of the audio in ISO-639-1 format (e.g.
en, fr, es). Providing this improves accuracy and latency.string
Optional text to guide the model’s style or provide context. Should match the language of the audio.
string
default:"json"
Format of the transcription output. Options:
json, text, srt, verbose_json, vtt.number
default:"0"
Sampling temperature between 0 and 1. Higher values produce more varied output.
Response
string
The transcribed text.
string
Always
transcribe.string
Detected or specified language of the audio.
number
Duration of the audio in seconds.
array
Examples
curl https://app.frogbot.ai/api/v1/audio/transcriptions \
-H "Authorization: Bearer $FROGBOT_API_KEY" \
-F file="@audio.mp3" \
-F model="whisper-1"
curl https://app.frogbot.ai/api/v1/audio/transcriptions \
-H "Authorization: Bearer $FROGBOT_API_KEY" \
-F file="@audio.mp3" \
-F model="whisper-1" \
-F language="en" \
-F response_format="verbose_json"
from openai import OpenAI
client = OpenAI(
base_url="https://app.frogbot.ai/api/v1",
api_key="YOUR_API_KEY"
)
with open("audio.mp3", "rb") as f:
response = client.audio.transcriptions.create(
model="whisper-1",
file=f,
language="en"
)
print(response.text)
import OpenAI from "openai";
import fs from "fs";
const client = new OpenAI({
baseURL: "https://app.frogbot.ai/api/v1",
apiKey: "YOUR_API_KEY",
});
const response = await client.audio.transcriptions.create({
model: "whisper-1",
file: fs.createReadStream("audio.mp3"),
language: "en",
});
console.log(response.text);
{
"text": "Hello, this is a sample transcription.",
"task": "transcribe",
"language": "en",
"duration": 3.5,
"words": [
{ "word": "Hello", "start": 0.0, "end": 0.4 },
{ "word": "this", "start": 0.5, "end": 0.7 }
]
}