Transcribe audio
Turn a recording of speech into text.
https://inference.trymorse.ai/v1/audio/transcriptionsTurns 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.
Transcription is not offered to API keys for now: GET /v1/models lists no such model to a key, and a key's request here gets 404 model_not_found. A Morse app login can still use it.
curl https://inference.trymorse.ai/v1/audio/transcriptions \
-H "Authorization: Bearer $MORSE_API_KEY" \
-F file=@speech.wav \
-F model=whisper-large-v3-tee \
-F language=en{
"text": "And so, my fellow Americans, ask not what your country can do for you.",
"usage": {
"type": "duration",
"seconds": 11
}
}Form fields
modelstringRequiredA transcription model's id, such as whisper-large-v3-tee.
filestringRequiredThe 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.
languagestringThe spoken language as an ISO-639-1 code Whisper transcribes, such as en. Without it, Whisper detects the language.
response_format"json"Only json, the default.
Response
The transcript.
textstringRequiredThe transcript, without surrounding whitespace.
usageobjectRequiredShow 2 fields
type"duration"RequiredsecondsintegerRequiredThe length of the audio, rounded up to a whole second. A flat price per call does not depend on it.
Response headers
| Header | What it says |
|---|---|
X-Morse-Version | The running build. Every reply carries it. |
X-Funding | What pays for the request. With a key, the value is always credits. A request that Morse refuses before it bills anything has no X-Funding. |
X-Request-Id | An id for this request. Quote it when you contact support about the request. An error that arrives after the request starts carries it too. A request that Morse refuses before it bills anything has no X-Request-Id. |
Errors
Every error has the same shape. Errors explains it and when to retry.
400The request is malformed.4 codes
invalid_parameter- The body is not a multipart form with a model and a file, a field is unknown or sent twice, the file is not a WAV file of 16-bit PCM, mono or stereo, at 8 to 48 kHz, or holds no audio, language is not a code Whisper transcribes, or response_format is not json. The message names the problem.
invalid_request- The provider could not read the audio.
e2ee_unsupported_model- The request carries end-to-end encryption headers, which no transcription model takes. An incomplete set gets the e2ee_ code that names what is wrong with it instead.
privacy_floor_unmet- The model's tier is below the API key's min_privacy. param is key.min_privacy, and the message names both tiers. GET /v1/models lists only the models the key may call. Morse refuses before it calls the model or holds any credit.
401The key is missing or wrong.3 codes
invalid_api_key- The Authorization header is missing or not Bearer, the key is unknown or revoked, a token that starts with sk_ is not a whole sk_morse_ key, or the bearer is no Morse key or login token at all, such as another service's API key (sk-proj-...).
api_key_expired- The key is past the expiry set on it. Make a new key, or set a later expiry before a key expires.
invalid_token- The bearer is shaped as a Morse login token (a JWT) but its signature fails or it has expired. An API key sends the whole sk_morse_ key.
402The account's credits, or what the key's spend limit has left, do not cover the request.2 codes
insufficient_balance- The balance is below the amount the request must hold. While the balance is negative, the API refuses every metered request.
key_spend_limit_reached- What the key's spend limit has left in its window is below the amount the request must hold. A limit that resets daily, weekly, or monthly sends Retry-After, the seconds until it resets. A limit that never resets sends none. Raise or remove the limit in the dashboard, and the next request is served.
403The key's account may not make this request.5 codes
account_disabled- Morse has disabled the key's account.
account_deleted- The key's account has been deleted.
account_under_18- The account's owner said they are under 18.
ip_not_allowed- The key allows requests only from its allowed IPs, and the request came from another address. The message names the address the proxy saw.
sealed_required- The key is sealed_only, and the request came unsealed. Send it inside POST /v1/sealed, as the Morse app does.
404The model does not exist, or it is not a model for this endpoint.1 code
model_not_found- No model of this endpoint's type has that name.
408The request body arrived too slowly.1 code
request_timeout- The request body did not arrive within one minute.
413The request body is too large.1 code
request_too_large- The body is over 10 MiB, or the recording is longer than 5 minutes.
429The account is over its rate limit or its concurrency limit. Transcription also allows 30 calls a minute per account. Wait the number of seconds in Retry-After, then retry.2 codes
rate_limit_exceeded- The account used up its requests per minute. All of the account's keys and its owner's use of the Morse app share one budget.
concurrency_limit_exceeded- The account already has its maximum number of requests in flight. Retry-After is 1.
502The transcription provider failed.2 codes
upstream_error- The provider failed or did not answer.
upstream_unavailable- The provider is unavailable right now. Retry later.
503Morse or the provider is busy or unavailable. Retry the request later.4 codes
service_unavailable- Morse could not start the request. Retry it.
server_busy- Morse is busy. Retry-After is 1.
upstream_busy- The transcription provider is busy for every Morse account, or busy itself. Retry later.
upstream_unattested- Morse could not verify the attested endpoint. Try again shortly.