跳转到主要内容
POST
/
v1
/
audio
/
transcriptions
创建转录文本
curl --request POST \
  --url https://api.dedaluslabs.ai/v1/audio/transcriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'model=<string>' \
  --form 'language=<string>' \
  --form 'prompt=<string>' \
  --form 'response_format=<string>' \
  --form temperature=123
{
  "language": "<string>",
  "duration": 123,
  "text": "<string>",
  "words": [
    {
      "word": "<string>",
      "start": 123,
      "end": 123
    }
  ],
  "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
    }
  ],
  "usage": {
    "type": "<string>",
    "seconds": 123
  }
}

授权

Authorization
string
header
必填

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

请求体

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

响应

成功的响应

表示基于提供的输入,由模型返回的详细 JSON 转录响应。

字段:

  • language(必填):str
  • duration(必填):float
  • text(必填):str
  • words(可选):list[TranscriptionWord]
  • segments(可选):list[TranscriptionSegment]
  • usage(可选):TranscriptTextUsageDuration
language
string
必填

输入音频所使用的语言。

duration
number
必填

输入音频的时长。

text
string
必填

转录生成的文本内容。

words
TranscriptionWord · object[]

提取出的单词及其对应的时间戳。

segments
TranscriptionSegment · object[]

转录文本的各个片段及其对应的详细信息。

usage
TranscriptTextUsageDuration · object

按音频输入时长计费的 model 使用情况统计。