Errors
Errors use OpenAI's shape, so OpenAI's SDKs show our messages unchanged. We add doc_url, which links to the code's entry on this page:
{
"error": {
"message": "This API key is not valid. It may be mistyped, cut short when copied, or revoked. Check it on your account page, or make a new one: https://api.getloquela.com/account",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key",
"doc_url": "https://docs.getloquela.com/remote/errors#invalid_api_key"
}
}
The message is written for people: it says what happened and what to do. Program against code, which does not change. When we know how long to wait, the Retry-After header carries it, and the message says it too. Errors on our side (status 500 and up) end with a request id, which is also in the x-request-id header; quote it if you contact us.
MCP tools report the same codes. Their error text ends with a Help: link to the entry here.
Looking for a fix by symptom instead? See Troubleshooting.
Summary
| Status | Code | In short |
|---|---|---|
| 400 | invalid_upload | The form is not built the way the endpoint expects. |
| 400 | invalid_audio | The file could not be read as audio. |
| 400 | unsupported_format | Not an audio or video file we accept. |
| 400 | audio_too_long | Over 3 hours. |
| 400 | model_not_found | Unknown model name. |
| 400 | invalid_value | A field has a value we do not offer. |
| 400 | unsupported_language | A language that is not on for your account, or not one we transcribe. |
| 400 | speaker_labels_not_offered | Speaker labels are switched off for now. |
| 400 | invalid_request | The request could not be read at all. |
| 400 | pgp_encryption_required | An encrypted-only API key got unencrypted audio. |
| 400 | pgp_decrypt_failed | The PGP file could not be opened with your account's key. |
| 400 | pgp_unknown_key | encrypt_to does not name a usable key on your account. |
| 400 | pgp_key_expired | That PGP key, or its encryption subkey, has expired. |
| 401 | invalid_api_key | Missing, wrong or revoked key or token. |
| 403 | https_required | Sent over plain http. |
| 403 | pgp_not_on_plan | Your plan does not include PGP encryption. |
| 404 | unknown_endpoint | Nothing at that address. |
| 404 | upload_link_expired | The upload link is unknown, expired or used. |
| 405 | method_not_allowed | Wrong HTTP method for the address. |
| 409 | upload_link_used | A file was already uploaded to that link. |
| 413 | file_too_large | Over 100 MB (8 MB for inline MCP audio). |
| 429 | insufficient_quota | Out of minutes. |
| 429 | key_limit_reached | This key's own monthly limit is used up. |
| 429 | concurrency_limit | Too many requests running at once. |
| 429 | rate_limit_exceeded | Too many requests in a minute. |
| 429 | too_many_failed_attempts | Too many invalid keys from your address. |
| 500 | transcription_failed | Transcription failed on our side. Not charged. |
| 500 | internal_error | Something else failed on our side. Not charged. |
| 503 | server_busy | Busy, starting up or paused for maintenance. |
| 503 | service_unavailable | The service cannot be reached right now. |
| 503 | pgp_unavailable | PGP encryption is not available right now. |
| MCP | download_failed | transcribe_url could not download the file. |
| MCP | upload_pending | Nothing has been uploaded to the link yet. |
| MCP | too_many_upload_links | 5 upload links are already open. |
| MCP | pgp_mcp_not_allowed | An encrypted-only API key cannot use the MCP tools. |
You are never charged for a request that fails, with one rare exception described under internal_error.
Your request
invalid_upload
400. POST /v1/audio/transcriptions takes a multipart/form-data form with the audio in a field named file. The message names what is off:
- Sent as JSON or raw bytes. Send a multipart form. With curl:
-F file=@meeting.m4a. OpenAI's SDKs build the form for you. - No boundary. The
Content-Typeheader was set by hand tomultipart/form-datawithout its boundary. Remove yourContent-Typeheader and let your HTTP library set it when it attaches the file. - The file is in another field (for example
audio). Name the fieldfile. filearrived as text. With curl, the@before the path is missing (-F file=meeting.m4asends the words "meeting.m4a"). In code, attach the file as a file, with a file name.- More than one file, or more than 32 fields, or a field over 8 KB. Send one file and only the fields you need.
invalid_audio
400. The file is a type we accept, but its audio could not be read. The message gives the likely reason:
- Cut off. An MP4 or M4A whose recording did not finish saving has no index, so nothing in it can be read. This happens when a recording app is closed mid-recording or a copy is interrupted. Re-export or re-record it.
- Ends early. The upload or the copy stopped partway. Check the file plays to the end, then send it again.
- No audio track. A video without sound, or a recording that captured nothing.
- Damaged, or not really that type. Check it plays in a media player, or convert it to MP3 or M4A.
- Empty. The file had 0 bytes, usually because the code sent it before reading it.
Over MCP, transcribe_audio also returns this when audio_base64 is not valid base64.
unsupported_format
400 (415 on upload links). We read the type from the file's contents, not its name, and accept WAV, MP3, M4A, MP4, MOV, 3GP, OGG, Opus, WebM, MKV, FLAC, AAC, CAF and AIFF. Renaming a file does not change its type; convert it instead.
When the file is recognizably something else, the message says what it is:
- A web page (HTML). Usually a share link. Google Drive, OneDrive and similar links open a page about the file, not the file. Download the file and send it, or have your assistant use
create_upload_link. For Dropbox, changedl=0todl=1at the end of the link. - JSON, a PDF, an image or a ZIP archive. Send the audio file itself.
- Base64 text. The API and upload links take the file's raw bytes. Only the MCP tool
transcribe_audiotakes base64.
The same code is used when the container is fine but the audio inside uses an encoding we do not decode. Convert it to MP3, M4A (AAC), Opus or WAV.
audio_too_long
400. One request takes up to 3 hours of audio. Split longer recordings and send each part. If the audio is longer than the minutes left on your account, you get insufficient_quota instead.
model_not_found
400, param: "model". Use loquela-remote-beta, or leave model out. For apps that cannot change the model name, whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe and gpt-transcribe are accepted and use the same model; gpt-4o-transcribe-diarize also turns on speaker labels.
invalid_value
400, with param naming the field. For response_format, use json (the default), text, verbose_json, srt, vtt or diarized_json. See response formats. For written_numbers, use true or false, or leave it out (Numbers).
unsupported_language
400, param: "language". Other languages are off for your account: switch them on from Languages on your account page, or send language=en or leave it out. When they are on, the message lists the codes we accept (two-letter codes such as es, or auto).
speaker_labels_not_offered
400. Speaker labels are switched off for the moment. Send the request without diarize=true, and with a response_format other than diarized_json.
invalid_request
400. The request could not be read at all, usually because it was cut off before it finished sending, or is malformed. Check your connection and send it again; if it keeps happening, compare it with the quick start.
Keys and addresses
invalid_api_key
401. The message says which of these it is:
- No key. Send
Authorization: Bearer lqr_.... - No
Bearer. The header must be the wordBearer, a space, then the key. - An OpenAI key (
sk-...). Loquela Remote keys start withlqr_and are made on your account page. - A connector token on the API. Tokens that Claude or ChatGPT get when you press Connect work only at
/mcp. The API needs an API key. - The key is not valid. It may be mistyped, cut short when copied, or revoked. Check it on your account page, or make a new one.
On /mcp without sign-in, the message says how to connect. An assistant whose connection has expired or was disconnected needs to reconnect in its connector settings.
To test a key, GET /v1/models answers 200 for a valid key and 401 otherwise.
https_required
403. The request went to http://, so it was not encrypted. Use https://api.getloquela.com. If it carried a key, treat the key as exposed: revoke it and make a new one on your account page.
unknown_endpoint
404. Nothing is at that address. Loquela Remote offers POST /v1/audio/transcriptions, GET /v1/models, GET /v1/usage, GET /v1/pgp/key (PGP encryption), and the MCP server at /mcp. The message points out the common slips:
/v1missing (/audio/transcriptions): set the base URL tohttps://api.getloquela.com/v1./v1twice (/v1/v1/...): the app adds/v1itself, so set its base URL tohttps://api.getloquela.com.- Chat, completions, embeddings, translations, text to speech or realtime: not offered. Loquela Remote turns speech into text, one recording per request.
method_not_allowed
405. The address exists but takes another method; the message and the Allow header say which. Transcription is a POST. Opening an API address in a browser sends a GET; browsers get a page explaining the address instead.
Minutes and limits
insufficient_quota
429. Your account has no minutes left, or fewer than this audio needs. Buy minutes, turn on automatic top-up, or upgrade on your account page. An account with no minutes at all is refused before the upload is read.
key_limit_reached
429. This API key has used the monthly minute limit you set on it. Raise or remove the limit on your account page, or use another key. Key limits reset on the 1st of each month (UTC).
concurrency_limit
429. Your plan runs a set number of requests at a time (see limits), and that many are running. Wait for one to finish, or send fewer in parallel. Higher plans run more at once.
rate_limit_exceeded
429. Too many requests in a minute, either for your plan (API requests and MCP messages are counted separately) or from your address. Wait for Retry-After. If your code retries in a loop, add a delay that grows with each attempt.
too_many_failed_attempts
429. 20 requests with an invalid key or token from one address within 10 minutes close the API and MCP to that address for 15 minutes. Usually a script is retrying with a wrong key. Fix the key first (see invalid_api_key), then wait for Retry-After.
PGP encryption
How encryption works, step by step: PGP encryption.
pgp_not_on_plan
403. PGP encryption is included on Pro and Business plans, on Enterprise, and while you have free minutes from an invitation. Upgrade on your account page, or send the audio without PGP encryption and without encrypt_to. GET /v1/pgp/key and upload links answer the same. An API key set to encrypted only refuses every request this way once the plan no longer includes PGP, rather than send anything as plain text.
pgp_encryption_required
400. This API key is set to encrypted only, and the audio was not encrypted. Encrypt it to your account's key (Encrypt and send), or use another API key. The setting is in the PGP column of the API keys table on your account page.
pgp_decrypt_failed
400. The file is PGP data, but it could not be opened with your account's key. The message says why:
- Encrypted to another key. The message names the key ids the file is encrypted to, and your account key's id. Encrypt to your account's key, from your account page or
GET /v1/pgp/key. Audio encrypted to another account's key cannot be transcribed in yours. - Encrypted with a passphrase (
gpg --symmetric). Encrypt it to your account's key instead. - Signed but not encrypted, or a key. Signing alone does not encrypt a file.
- No integrity check. Old PGP encryption, which can be altered without anyone noticing. Encrypt it again with a current tool (gpg 2.2 or later, OpenPGP.js, Kleopatra).
- Damaged, cut off or changed on the way, or with more data after the encrypted message. Send the whole
.gpgor.ascfile again. - More than one file inside, or another encrypted message inside. Encrypt one audio file, once.
- Encrypted to more than 64 keys, or carrying more than 16 signatures. Encrypt to your account's key and only the other keys that need it.
pgp_unknown_key
400, param: "encrypt_to". The transcript cannot be encrypted to the key you asked for. The message says which case it is:
- Not one of your keys. Send the full fingerprint shown on your account page, its last 16 characters, or
default. - The last 16 characters match two of your keys. Send the full fingerprint.
- No keys yet. Add your public key on your account page first.
- The key itself was sent.
encrypt_totakes a fingerprint, because a key sent with each request could be swapped on the way. Add the key on your account page once. - The key an encrypted-only API key used was removed. Choose a key for that API key on your account page.
- Results cannot be encrypted to the key's encryption subkey. Add a new subkey (
gpg --quick-add-key <fingerprint> default encr 2y), export the key and add it again, or choose another key.
pgp_key_expired
400, param: "encrypt_to". The key has expired, or its encryption subkey has. Extend it (gpg --quick-set-expire <fingerprint> 2y) or, if the subkey expired, add a new one (gpg --quick-add-key <fingerprint> default encr 2y). Then export the key and add it again on your account page: it is updated in place and keeps its settings. Or choose another key.
pgp_unavailable
503. PGP encryption is not available right now. Wait for Retry-After and try again, or send the request without PGP encryption and without encrypt_to. On upload links the message says the same. https://api.getloquela.com/pgp-key.asc answers 404 with this code if our signing key is missing.
pgp_mcp_not_allowed
MCP. This API key is set to encrypted only, so the MCP transcribe tools refuse it: your assistant has to read the transcript. Use another API key for the connection, or connect with the Connect button instead. With those, MCP still takes audio encrypted to your account's key and returns the transcript as plain text (Upload links and MCP).
Our side
server_busy
503. Loquela Remote is busy, starting up, paused for maintenance, or holding a lot of audio at once. Wait for Retry-After and send the request again; the message says how long. Over MCP, the same applies to transcribe_upload: the upload stays on its link for a retry.
service_unavailable
503. The service cannot be reached right now, during a restart or an outage. Wait for Retry-After (a minute); the status page shows what is happening.
transcription_failed
500. The transcription did not finish, or the audio could not be processed, because of a problem on our side. You are not charged. Try again; if it keeps happening, email info@getloquela.com with the request id from the message.
internal_error
500. Something else failed on our side. You are not charged. Try again; if it keeps happening, email info@getloquela.com with the request id from the message.
One rare case is charged: with encrypt_to or an encrypted-only API key, the transcript was made but could not be encrypted to your key, so it was not sent. The message says so. The key is tried before any work starts, so this should not happen; if it does, email info@getloquela.com with the request id.
MCP and upload links
download_failed
transcribe_url could not download the file. The message says why:
- Refused (401 or 403). The file must be public: anyone with the link can download it without signing in. For a private file, use
create_upload_link. - Not found (404). The link is incomplete, or the file is no longer shared.
- Not https, has a username or password, or points to a private network. Only public
https://links can be fetched. - Larger than 100 MB, too many redirects, too slow, or the server could not be reached.
A link that opens a web page instead of the file gives unsupported_format.
upload_pending
transcribe_upload was called before the file arrived. Upload it first, with curl -T "<file>" "<upload_url>" or by opening the link in a browser, then call transcribe_upload again.
upload_link_expired
The upload id is unknown, its link has expired (links last 15 minutes) or its file was already transcribed. Call create_upload_link for a new one. An upload link opened in a browser after that says so too.
upload_link_used
409. A file was already uploaded to this link. Call transcribe_upload with its id, or create a new link for another file.
too_many_upload_links
An account can have 5 upload links open at once. Use one with transcribe_upload, or wait for one to expire.
file_too_large
413. The API and upload links take files up to 100 MB; transcribe_audio takes clips up to 8 MB. Compressed audio fits far more than WAV: about 3 hours of speech fits as a 64 kbps MP3 or Opus file. Convert large files first, or send long recordings to an assistant with create_upload_link.
An upload very close to 100 MB can be refused by the network in front of the service with its own 413 page (HTML, not the JSON above) before the service sees it.
A PGP-encrypted file is checked twice: as sent, and once decrypted. Compress the audio before encrypting it.
Long requests
A JSON response (json, verbose_json, diarized_json) that takes longer than 80 seconds starts with status 200 and sends a space every 15 seconds, so the connection is not closed while the audio is transcribed. If the request then fails, the error object above arrives in that 200 response. On long files, check the body for error rather than relying on the status code alone. You are not charged for a failed request.
text, srt and vtt responses cannot carry those spaces, so a request that waits more than about two minutes for its answer (a long file while the service is busy) can be cut off by the network in front of the service with a 524 page. For long files, ask for verbose_json and build text or subtitles from its segments.