Everstack

Audio Translation: Translate audio to English text

POST/v1/audio/translations
POST/v1/audio/translations

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Request Body

PropertyTypeRequiredDescription
filestringNo
modelstringNo
promptstringNo
responseFormatstringNo
temperaturenumberNo
filenamestringNo
metadataobjectNo

Responses

200 Translated text

PropertyTypeDescription
textstring
taskstring
languagestring
durationnumber
segmentsobject[]

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

Request

curl -X POST "http://localhost:8089/v1/audio/translations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file":"string","model":"string","prompt":"string","responseFormat":"string","temperature":0,"filename":"string"}'
const response = await fetch("http://localhost:8089/v1/audio/translations", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "file": "string",
  "model": "string",
  "prompt": "string",
  "responseFormat": "string",
  "temperature": 0,
  "filename": "string"
}),
});
const data = await response.json();
import requests

response = requests.post(
    "http://localhost:8089/v1/audio/translations",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
  "file": "string",
  "model": "string",
  "prompt": "string",
  "responseFormat": "string",
  "temperature": 0,
  "filename": "string"
},
)
data = response.json()

Response

{
  "text": "string",
  "task": "string",
  "language": "string",
  "duration": 0,
  "segments": [
    {
      "id": 0,
      "seek": 0,
      "start": 0,
      "end": 0,
      "text": "string",
      "tokens": [
        0
      ],
      "temperature": 0,
      "avgLogprob": 0,
      "compressionRatio": 0,
      "noSpeechProb": 0
    }
  ]
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string"
    }
  ]
}