curl --request POST \
--url https://api.trymorse.ai/v1/audio/transcriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form model=whisper-large-v3-tee \
--form file=@example-file \
--form language=enimport requests
url = "https://api.trymorse.ai/v1/audio/transcriptions"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"model": "whisper-large-v3-tee",
"language": "en"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('model', 'whisper-large-v3-tee');
form.append('file', '(the recording, as a 16-bit PCM WAV file)');
form.append('language', 'en');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.trymorse.ai/v1/audio/transcriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"text": "And so, my fellow Americans, ask not what your country can do for you.",
"usage": {
"type": "duration",
"seconds": 11
}
}{
"error": {
"message": "file must be a WAV file of 16-bit PCM, mono or stereo, at 8 to 48 kHz.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_parameter"
}
}{
"error": {
"message": "Incorrect API key provided.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}{
"error": {
"message": "The account balance does not cover this request. Add credit.",
"type": "insufficient_balance",
"param": null,
"code": "insufficient_balance"
}
}{
"error": {
"message": "This account has been disabled. Contact support.",
"type": "invalid_request_error",
"param": null,
"code": "account_disabled"
}
}{
"error": {
"message": "The requested model does not exist.",
"type": "invalid_request_error",
"param": null,
"code": "model_not_found"
}
}{
"error": {
"message": "The request body did not arrive in time.",
"type": "invalid_request_error",
"param": null,
"code": "request_timeout"
}
}{
"error": {
"message": "Request body is too large.",
"type": "invalid_request_error",
"param": null,
"code": "request_too_large"
}
}{
"error": {
"message": "Rate limit reached for this account. Retry after the time in the Retry-After header.",
"type": "requests",
"param": null,
"code": "rate_limit_exceeded"
}
}{
"error": {
"message": "The transcription provider failed.",
"type": "upstream_error",
"param": null,
"code": "upstream_error"
}
}{
"error": {
"message": "The transcription provider is busy. Try again shortly.",
"type": "upstream_error",
"param": null,
"code": "upstream_busy"
}
}Transcribe audio
Turns a recording of speech into text, with OpenAI’s transcription request and reply. Send the recording as a WAV file of 16-bit PCM in a multipart form, at most 5 minutes long and 10 MiB. Each call costs a flat 200 micros, a fiftieth of a credit. A failed call costs nothing. whisper-large-v3-tee runs Whisper Large v3 on NEAR’s attested hardware, and Morse sends the audio to it only over the TLS key its attestation report binds.
curl --request POST \
--url https://api.trymorse.ai/v1/audio/transcriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form model=whisper-large-v3-tee \
--form file=@example-file \
--form language=enimport requests
url = "https://api.trymorse.ai/v1/audio/transcriptions"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"model": "whisper-large-v3-tee",
"language": "en"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('model', 'whisper-large-v3-tee');
form.append('file', '(the recording, as a 16-bit PCM WAV file)');
form.append('language', 'en');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.trymorse.ai/v1/audio/transcriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"text": "And so, my fellow Americans, ask not what your country can do for you.",
"usage": {
"type": "duration",
"seconds": 11
}
}{
"error": {
"message": "file must be a WAV file of 16-bit PCM, mono or stereo, at 8 to 48 kHz.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_parameter"
}
}{
"error": {
"message": "Incorrect API key provided.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}{
"error": {
"message": "The account balance does not cover this request. Add credit.",
"type": "insufficient_balance",
"param": null,
"code": "insufficient_balance"
}
}{
"error": {
"message": "This account has been disabled. Contact support.",
"type": "invalid_request_error",
"param": null,
"code": "account_disabled"
}
}{
"error": {
"message": "The requested model does not exist.",
"type": "invalid_request_error",
"param": null,
"code": "model_not_found"
}
}{
"error": {
"message": "The request body did not arrive in time.",
"type": "invalid_request_error",
"param": null,
"code": "request_timeout"
}
}{
"error": {
"message": "Request body is too large.",
"type": "invalid_request_error",
"param": null,
"code": "request_too_large"
}
}{
"error": {
"message": "Rate limit reached for this account. Retry after the time in the Retry-After header.",
"type": "requests",
"param": null,
"code": "rate_limit_exceeded"
}
}{
"error": {
"message": "The transcription provider failed.",
"type": "upstream_error",
"param": null,
"code": "upstream_error"
}
}{
"error": {
"message": "The transcription provider is busy. Try again shortly.",
"type": "upstream_error",
"param": null,
"code": "upstream_busy"
}
}Authorizations
An API key from the Morse app. It starts with sk_morse_.
Body
A transcription model's id, such as whisper-large-v3-tee.
The recording, as a WAV file of 16-bit PCM, mono or stereo, at 8 to 48 kHz, read from its bytes whatever its file name or Content-Type. At most 5 minutes long, and 10 MiB with the other fields.
The spoken language as an ISO-639-1 code Whisper transcribes, such as en. Without it, Whisper detects the language.
Only json, the default.