音频翻译
curl --request POST \
--url https://zero.cat/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=123import requests
url = "https://zero.cat/v1/audio/translations"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"model": "<string>",
"prompt": "<string>",
"response_format": "<string>",
"temperature": "123"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('model', '<string>');
form.append('prompt', '<string>');
form.append('response_format', '<string>');
form.append('temperature', '123');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://zero.cat/v1/audio/translations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"text": "<string>"
}音频
音频翻译
将音频翻译为英文文本
POST
/
v1
/
audio
/
translations
音频翻译
curl --request POST \
--url https://zero.cat/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=123import requests
url = "https://zero.cat/v1/audio/translations"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"model": "<string>",
"prompt": "<string>",
"response_format": "<string>",
"temperature": "123"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('model', '<string>');
form.append('prompt', '<string>');
form.append('response_format', '<string>');
form.append('temperature', '123');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://zero.cat/v1/audio/translations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"text": "<string>"
}
