Skip to main content
POST
/
audio
/
translations
Translate audio to English text
curl --request POST \
  --url https://api.anyapi.ai/v1/audio/translations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file=@example-file \
  --form model=whisper-1
{
  "text": "<string>",
  "language": "<string>",
  "duration": 123
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Get your API key from the dashboard.

Body

multipart/form-data
file
file
required

The audio file object (not file name) to translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.

model
string
required

ID of the model to use

Example:

"whisper-1"

prompt
string

An optional text to guide the model's style or continue a previous audio segment. The prompt should be in English.

response_format
enum<string>
default:json

The format of the transcript output

Available options:
json,
text,
srt,
verbose_json,
vtt
temperature
number
default:0

The sampling temperature, between 0 and 1

Required range: 0 <= x <= 1

Response

Successful response

text
string
required

The translated text in English

language
string

The language of the input audio

duration
number

The duration of the input audio in seconds

I