Troubleshooting

HTTP status codes

Symptom, likely cause and fix for each response
CodeSymptomLikely causeFix
400"'size' must be an integer between 1 and 512"size is 0, over 512, or not a number; often someone passed a byte count (e.g. 32) thinking size is in bytes.Use size=1; it returns 1,024 bytes. Slice 32 bytes for AES-256.
401"Missing or malformed Authorization header"No Authorization header, or it is not Bearer <token>. An empty .env value also causes this.Send Authorization: Bearer YOUR_TOKEN. Check .env is in the folder you run from. Note: expired tokens are documented to return 401.
403"Forbidden or entropy quota reached"Either the token is wrong (live API returns 403, not 401, for a bad token) or the monthly quota is used up. An HTML "Error 1010" page instead means Cloudflare blocked your client's User-Agent.Check the token first: no spaces or quotes, correct service (Entropy). Then check quota in the portal. For Error 1010, use requests or set a custom User-Agent; don't use Python's urllib defaults.
429Too many requestsRate limit. Docs say 30 requests per 10 seconds, but live can return 429 about 1 s after a single prior call (seen Oct 14, 2026). The API sends no Retry-After header.Wait 10 s or more, then retry once. Never loop; request a larger size instead of many calls.
500Internal errorProblem on Qrypt's side.Try again shortly. If it persists, contact support@qrypt.com.
503Entropy temporarily insufficientQrypt's entropy supply is briefly low.Try again shortly, with a delay. Don't loop.

Common mistakes

Environment issues

Environment problems
IssueSymptomCauseFix
Runtime versionNode: process.loadEnvFile is not a function or fetch is not defined. Python: syntax errors.Node older than 20.12, or Python older than 3.9.Run node -v / python3 --version and upgrade.
Missing .env"QRYPT_API_KEY is missing"No .env in the current directory, or the variable name is misspelled.Copy .env.example to .env in the folder you run from, or export QRYPT_API_KEY.
Missing packagesModuleNotFoundError: requestsDependencies not installed in the active environment.pip install -r requirements.txt inside your virtualenv.
Proxy / TLSSSLError, CERTIFICATE_VERIFY_FAILED, UNABLE_TO_GET_ISSUER_CERT_LOCALLY, fetch failed, or timeoutsCorporate proxy or TLS-inspecting firewall.Python: requests honors HTTPS_PROXY; set REQUESTS_CA_BUNDLE to your company CA. Node: built-in fetch in Node 20 and 22 ignores HTTPS_PROXY. On Node 24+, run with NODE_USE_ENV_PROXY=1 plus HTTPS_PROXY. On older Node, npm i undici and call setGlobalDispatcher(new EnvHttpProxyAgent()) before fetch. Set NODE_EXTRA_CA_CERTS to your company CA. Never disable certificate checks.