PGP encryption
On Pro and Business plans you can encrypt a recording with PGP before you send it, and get the transcript back signed by us and encrypted to your own key. Cloudflare, file hosts and anything else between you and our computer then carry only encrypted data.
PGP is included at no extra cost on Pro and Business (monthly or yearly), on Enterprise, and while you have free minutes from an invitation. On Starter, or with prepaid minutes only, encrypted requests are refused with pgp_not_on_plan.
The keys
| Key | What it does | Where you get it |
|---|---|---|
| Your account's key | You encrypt audio to it. We make one for each account, and audio encrypted to it can be transcribed only in your account's requests. It does not expire. | Your account page, or GET /v1/pgp/key |
| Our signing key | Signs every encrypted transcript, and certifies your account's key. Nothing is encrypted to it. | api.getloquela.com/pgp-key.asc, your account page, and this page |
| Your own public key | We encrypt transcripts to it. An account can hold 5. | You add it on your account page |
Our signing key, Loquela Remote API (api.getloquela.com), has this fingerprint:
D0DA DEFA 3D12 4773 2624 A519 7B01 EA39 A25C 3FFF
This page is not served through Cloudflare, so it is a second place to compare the fingerprint that api.getloquela.com shows you. The key expires on 5 November 2028. It is renewed in place, so its fingerprint stays the same; when that happens, import the keys again.
Set up once
-
Import both keys. On your account page, under PGP encryption, press Download both keys and import the file with
gpg --import. Or with an API key:curl -s https://api.getloquela.com/v1/pgp/key \-H "Authorization: Bearer $LOQUELA_API_KEY" | gpg --import -
Check them. Compare our signing key's fingerprint with the one above, then check that it certifies your account's key. Your account key's fingerprint is on the account page, under Encrypt audio to your account's key.
gpg --fingerprint "Loquela Remote API"gpg --check-signatures <your account key's fingerprint>The second command should show a
sig!line fromLoquela Remote API (api.getloquela.com). -
Mark them as checked, so gpg uses them without asking:
gpg --quick-lsign-key <your account key's fingerprint>gpg --quick-lsign-key D0DADEFA3D1247732624A5197B01EA39A25C3FFFUntil you do, gpg asks "Use this key anyway?", and in a script it refuses with "There is no assurance this key belongs to the named user". The signature is local and stays on your computer. If you have no key of your own to sign with, add
--trust-model alwaysto the encrypt command instead, once you have compared the fingerprints. -
Add your public key, for encrypted transcripts. Export it with
gpg --armor --export <your key id>. On the account page, under Add your public key, give it a name, paste it or choose its.ascfile, and press Add key. See keys we accept.
Encrypt and send
gpg --encrypt --recipient <your account key's fingerprint> recording.m4a
curl https://api.getloquela.com/v1/audio/transcriptions \
-H "Authorization: Bearer $LOQUELA_API_KEY" \
-F file=@recording.m4a.gpg \
-F response_format=text \
-F encrypt_to=default \
| gpg --decrypt > transcript.txt
gpg --encryptwritesrecording.m4a.gpg. Armored files (gpg --armor,.asc) work too. We recognize an encrypted file by its contents, as with audio.- You can encrypt to other keys at the same time, your own for example. Signing the audio is fine too; we do not check that signature.
- One recording per encrypted file. A file encrypted with a passphrase only (
gpg --symmetric) cannot be opened. - The 100 MB limit applies to the file you send and again to the file inside it. Compress long recordings first (MP3, M4A or Opus): gpg's own compression does little for audio.
- Audio encrypted to your account's key cannot be transcribed by any other account. It fails there with
pgp_decrypt_failed.
Where the transcript goes
- With
encrypt_to, the transcript is signed with our key and encrypted to the key you name: its full fingerprint (spaces are fine), its last 16 characters (the long key id gpg shows), ordefaultfor your default key. Send the fingerprint, not the key itself. - Without
encrypt_to, the transcript comes back as plain text, even when the audio was encrypted, unless the API key is set to encrypted only. encrypt_toworks with unencrypted audio too.
Encrypted results
The encrypted message holds exactly what the request would otherwise have returned.
text,srtandvtt: the response is the armored message, astext/plain, with the headerx-loquela-encryptedset to the fingerprint of the key it is encrypted to.json,verbose_jsonanddiarized_json: the response is JSON with the armored message intext, so OpenAI's SDKs still parse it. The same header is set.
{
"text": "-----BEGIN PGP MESSAGE-----\n\n...\n-----END PGP MESSAGE-----\n",
"encrypted": true,
"format": "json",
"recipient": "<fingerprint of your key>",
"signed_by": "D0DADEFA3D1247732624A5197B01EA39A25C3FFF"
}
When only part of the file could be transcribed, "partial": true is added, as in a normal response.
With OpenAI's Python SDK, send encrypt_to through extra_body and decrypt text:
import json
import subprocess
from openai import OpenAI
client = OpenAI(base_url="https://api.getloquela.com/v1", api_key="lqr_...")
with open("recording.m4a.gpg", "rb") as f:
result = client.audio.transcriptions.create(
model="loquela-remote-beta",
file=f,
extra_body={"encrypt_to": "default"},
)
opened = subprocess.run(["gpg", "--decrypt"], input=result.text.encode(), capture_output=True, check=True)
print(json.loads(opened.stdout)["text"])
Check the signature
gpg --decrypt reports Good signature from "Loquela Remote API (api.getloquela.com)". The signature also carries two notes: the SHA-256 of the file as we received it (the encrypted file, if you sent one) and the request id from the response's x-request-id header. Together they show that a transcript is the answer to that file and that request, not an older one passed off as it.
gpg --verify-options show-notations --decrypt transcript.asc
# gpg: Signature notation: audio-sha256@getloquela.com=<SHA-256 of the file you sent>
# gpg: Signature notation: request-id@getloquela.com=<the x-request-id header>
sha256sum recording.m4a.gpg
Encrypted-only API keys
Once you have added a public key, the API keys table on your account page has a PGP column. Set a key to Encrypted only: one of your keys, or back to Plain or encrypted (the default). An encrypted-only API key:
- refuses audio that is not encrypted (
pgp_encryption_required); - returns every result encrypted to the key you chose, without
encrypt_to. A request can still name another key on your account withencrypt_to; - cannot be used with the MCP server, since your assistant has to read the transcript (
pgp_mcp_not_allowed). Assistants connected with the Connect button have no API key and are not affected; - refuses every request, rather than send anything as plain text, if your plan stops including PGP.
Upload links and MCP
transcribe_urlcan fetch a file encrypted to your account's key, so the file's host holds only encrypted data, which no other account can have transcribed.- Upload links take encrypted files:
curl -T recording.m4a.gpg "<upload_url>". For accounts with PGP, the upload page encrypts the file in your browser to your account's key before sending it (Encrypt and upload). transcribe_audiotakes an encrypted clip as base64 too.- MCP results are plain text, because your assistant has to read them. See MCP.
- The Transcribe page does both directions in Expert mode: it encrypts files in your browser to your account's key (or sends a
.gpgyou made as it is) and can return the transcript encrypted to one of your keys.
Keys we accept
- OpenPGP v4 keys with an encryption subkey: RSA from 2048 to 8192 bits, Curve25519 (what gpg makes by default), and NIST P-256, P-384 and P-521.
- Not yet: keys in OpenPGP's newest format (RFC 9580: v6 keys, and the new Ed25519 and X25519 key types). gpg, Kleopatra, GPG Suite and Proton make v4 keys by default. With OpenPGP.js 6, use
type: 'ecc', curve: 'curve25519Legacy'ortype: 'rsa'. - Refused: DSA and ElGamal keys, expired or revoked keys, and keys without a working encryption subkey.
- Paste only the public key. A private key is refused, and nothing you pasted is stored.
- Adding a key with the same fingerprint again updates it (a new expiry date or subkey) and keeps its name, its default setting and the API keys that use it. When a key expires, extend it (
gpg --quick-set-expire <fingerprint> 2y) or, if its encryption subkey expired, add a new one (gpg --quick-add-key <fingerprint> default encr 2y), then export the key and add it again. - Make default chooses the key
encrypt_to=defaultuses. Remove deletes a key at once. - We email your account's address whenever a key is added, updated or removed. If a fingerprint in that email is not your key's, or you did not make the change, remove the key on your account page.
What PGP does not cover
- Our computer. It has to decrypt the audio to transcribe it. The audio is held in memory for the request and then erased, as with any request (How your audio is handled). Your account's key is kept on our computer for that.
- The upload page's script. It encrypts in your browser, but the script and the key it uses arrive through Cloudflare. That stops anyone only reading the traffic, not someone able to change it. For the strongest protection, encrypt with your own tools, such as gpg.
- Adding and fetching keys. Both go through Cloudflare. That is why we email every key change, show fingerprints to compare, and certify your account's key with our signing key, whose fingerprint is on this page.
- Plain results. MCP results are plain text, and so are API results without
encrypt_toor an encrypted-only key. - Metadata. When a request was sent, its size and the audio's length are not hidden.
Errors
| Code | When |
|---|---|
pgp_not_on_plan | Your plan does not include PGP. |
pgp_encryption_required | An encrypted-only API key got unencrypted audio. |
pgp_decrypt_failed | The file could not be opened with your account's key. |
pgp_unknown_key | encrypt_to does not name a usable key on your account. |
pgp_key_expired | The key, or its encryption subkey, has expired. |
pgp_unavailable | PGP is not available right now. |
pgp_mcp_not_allowed | An encrypted-only API key was used with MCP. |
Fetch the keys: GET /v1/pgp/key
GET https://api.getloquela.com/v1/pgp/key, with your API key, returns your account's key and our signing key in one armored block (application/pgp-keys) for gpg --import. The header x-loquela-fingerprint carries your account key's fingerprint, and x-loquela-signing-fingerprint ours. Your account's key is made the first time it is asked for. Without PGP on your plan, the answer is pgp_not_on_plan.
https://api.getloquela.com/pgp-key.asc serves our signing key alone, without signing in, with its fingerprint in x-loquela-fingerprint.