跳轉到主要內容
POST
/
v1
/
audio
/
translations
Create translation
curl --request POST \
  --url https://api.dgrid.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=json \
  --form temperature=0
{
  "text": "<string>"
}

授權

Authorization
string
header
必填

Your DGrid API key. All endpoints use Authorization: Bearer <DGRID_API_KEY>.

主體

multipart/form-data
file
file
必填

Source audio file.

model
string
必填

Model ID, such as whisper-1.

prompt
string

Optional English prompt.

response_format
enum<string>
預設值:json
可用選項:
json,
text,
srt,
verbose_json,
vtt
temperature
number
預設值:0

Sampling temperature.

必填範圍: 0 <= x <= 1

回應

English translation result.

text
string

English translation of the uploaded audio.