Create transcription
curl --request POST \
--url https://api.maxapi.ai/v1/audio/transcriptions \
--header 'Accept: <accept>' \
--header 'Content-Type: multipart/form-data' \
--form model=whisper-1 \
--form file='@example-file'import requests
url = "https://api.maxapi.ai/v1/audio/transcriptions"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "model": "whisper-1" }
headers = {"Accept": "<accept>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('model', 'whisper-1');
form.append('file', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Accept: '<accept>'}};
options.body = form;
fetch('https://api.maxapi.ai/v1/audio/transcriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/v1/audio/transcriptions"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nwhisper-1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/v1/audio/transcriptions")
.header("Accept", "<accept>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nwhisper-1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();{
"text": "Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that."
}Create transcription
Use this endpoint to call the provider-compatible create transcription operation through MaxAPI.
POST
https://api.maxapi.ai
/
v1
/
audio
/
transcriptions
Create transcription
curl --request POST \
--url https://api.maxapi.ai/v1/audio/transcriptions \
--header 'Accept: <accept>' \
--header 'Content-Type: multipart/form-data' \
--form model=whisper-1 \
--form file='@example-file'import requests
url = "https://api.maxapi.ai/v1/audio/transcriptions"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "model": "whisper-1" }
headers = {"Accept": "<accept>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('model', 'whisper-1');
form.append('file', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Accept: '<accept>'}};
options.body = form;
fetch('https://api.maxapi.ai/v1/audio/transcriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/v1/audio/transcriptions"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nwhisper-1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/v1/audio/transcriptions")
.header("Accept", "<accept>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nwhisper-1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();{
"text": "Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that."
}Body
multipart/form-data
要转录的音频文件,采用以下格式之一:mp3、mp4、mpeg、mpga、m4a、wav 或 webm。
要使用的模型的 ID。仅whisper-1当前可用。
Example:
"whisper-1"
成绩单输出的格式,采用以下选项之一:json、text、srt、verbose_json 或 vtt。
Example:
"json"
输入音频的语言。以ISO-639-1格式提供输入语言将提高准确性和延迟。
Example:
""
Response
200 - application/json
Request succeeded.