跳转到主要内容
POST
/
v1
/
audio
/
translations
创建翻译文本
curl --request POST \
  --url https://api.dedaluslabs.ai/v1/audio/translations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'model=<string>' \
  --form 'prompt=<string>' \
  --form 'response_format=<string>' \
  --form temperature=123
{
  "language": "<string>",
  "duration": 123,
  "text": "<string>",
  "segments": [
    {
      "id": 123,
      "seek": 123,
      "start": 123,
      "end": 123,
      "text": "<string>",
      "tokens": [
        123
      ],
      "temperature": 123,
      "avg_logprob": 123,
      "compression_ratio": 123,
      "no_speech_prob": 123
    }
  ]
}

授权

Authorization
string
header
必填

使用 Bearer 令牌的 API 密钥身份验证

请求体

multipart/form-data
file
file
必填
model
string
必填
prompt
string | null
response_format
string | null
temperature
number | null

响应

成功响应

字段:

  • language(必需):str
  • duration(必需):float
  • text(必需):str
  • segments(可选):list[TranscriptionSegment]
language
string
必填

翻译结果的语言(始终为 english)。

duration
number
必填

输入音频的时长。

text
string
必填

翻译后的文本内容。

segments
TranscriptionSegment · object[]

已翻译文本的各个片段及其元数据。