QuantumRand docs
Quick start

Your first call in a minute.

Create a free account and copy the key from your dashboard. It starts with qr_. Then pick a language:

curl "https://quantumrand.dev/v1/generate/hex?n=128" \
  -H "X-API-Key: qr_your_key"

The SDKs are open source on GitHub. To try every endpoint in the browser, use the interactive reference.

Authentication

One header.

Send your key in X-API-Key on every request. Keep it on your server: anyone with the key can spend your daily calls.

Two optional protections can be switched on from your dashboard, or through the API:

IP allowlistOnly the IP addresses you list can use the key; anything else gets 403. POST /keys/allowed-ips
Request signingSend X-Timestamp (Unix seconds) and X-Signature = hex HMAC-SHA256 of timestamp + METHOD + path + query, keyed with the secret POST /keys/signing/enable returns. Requests more than 5 minutes off are refused.
Responses

Same shape every time.

{ "success": true,
  "data": { "hex": "9f2c41d07be3a85e1c6f0b94d2e7a315",
            "num_bits": 128,
            "elapsed_ms": 0.4,
            "source": "quantum-seeded" } }

{ "success": false,
  "error": "Invalid or inactive API key.",
  "request_id": "5f0c…" }

Every response carries an X-Request-ID header. Quote it if you contact support at hello@qntyx.io.

Source labels

Check the source field.

Core endpoints call it source; sector endpoints call it entropy_source.

quantum-seededSeeded from IBM quantum hardware within the last 48 hours. The normal state.
quantum-seeded (stale seed)The last real seed is more than 48 hours old. Still served, clearly flagged.
csprng-fallback (awaiting first quantum seed)The first minute or so after a restart. The operating system's generator fills in.

If you need quantum-seeded values only, reject any response whose label is not exactly quantum-seeded.

Core endpoints

Six ways to ask for randomness.

Every path also works under /v1/. Bits per call are capped by your plan.

EndpointParameters
GET /generate/bitsn bits, 1 to 4,096 (default 256)
GET /generate/hexn bits, a multiple of 4, 4 to 4,096
GET /generate/integermin, max (defaults 0 and 100). Uniform, by rejection sampling
POST /generate/keybits: 128, 192, 256 or 512
POST /generate/batchBody: up to 20 requests, each with a type (bits, hex, integer, key) and params
POST /generate/webhookBody: an HTTPS callback_url. Returns a job ID at once and posts the result to your URL. Private and local addresses are refused
Sector endpoints

Thirty ready-made helpers.

All are POST, take a JSON body and draw from the same quantum-seeded generator by default. Expiry times and single-use flags are labels: QuantumRand doesn't track them, so your system enforces them. Parameters for each are in the interactive reference.

Finance/finance/txid · otp · nonce · keypair · audit-sign
Gaming/gaming/roll · seed · shuffle · loot · provable
Healthcare/health/record-seal · rx-sign · access-log · consent-seal · device-id
Legal and insurance/legal/timestamp · evidence-seal · contract-sign · claim-token · notarize
Cybersecurity/security/keygen · entropy-audit · token · salt · challenge
IoT and embedded/iot/device-id · firmware-sign · session-key · provision · telemetry-seal

Not ready: /gaming/provable returns a commitment and a seed hash, but the seed isn't stored and the verify step isn't live, so outcomes can't be checked by players yet.

Seals

Seal it now, check it later.

Twelve sector endpoints return a seal: finance/audit-sign, the four healthcare seals (record-seal, rx-sign, access-log, consent-seal), all five legal endpoints, iot/firmware-sign and iot/telemetry-seal. Each is an HMAC-SHA256 under a secret kept for your account, covering every field of the response's data object.

POST /v1/seals/verify
{ "data": { …the whole data object, exactly as you received it… } }

{ "success": true, "data": { "valid": true, "seal_type": "health/record-seal" } }

Change any field and valid is false. Only the account that made a seal can verify it, so these are not public signatures: a third party has to ask you to check. They are not qualified timestamps, electronic signatures or notarizations. The dashboard has a Verify a seal tab.

Backends

Leave it on the default.

Any endpoint takes an optional backend. Without one you get quantum_seeded, which is what almost everyone wants. The simulators are for teaching and testing: their responses say "security_grade": false, and every endpoint that returns a key, token, seed, nonce, seal or game outcome refuses them with 400. Never use simulator output as a secret.

quantum_seededDefault. The NIST SP 800-90A generator seeded from IBM quantum hardware. Instant.
aer_simulatorQiskit's circuit simulator. At most 32 bits of entropy per response. Not for secrets.
origin_cloud, origin_wuyuanA mock running inside QuantumRand: no circuit runs. Not Origin's real chip. Not for secrets.
ibm_hardwareA live job on IBM quantum hardware. Real, but queued: expect minutes, not milliseconds. Paid plans only, up to 3 runs a day per key; Free keys get 403.
Limits

Daily calls, reset at midnight UTC.

Your plan sets calls per day and bits per call: Free 1,000 and 256, Indie 50,000 and 1,024, Startup 500,000 and 2,048, Business 10,000,000 and 4,096. Every response tells you where you stand:

X-RateLimit-LimitCalls allowed today
X-RateLimit-UsedCalls made today, including this one
X-RateLimit-RemainingCalls left today
X-RateLimit-ResetSeconds until midnight UTC
X-RateLimit-WarningPresent when you are close to the limit
Errors

What went wrong, and what to do.

StatusMeaning
400A value is not allowed, such as n that isn't a multiple of 4, or a callback URL that isn't HTTPS. The error says which.
401No X-API-Key header, or a request signature that is missing, wrong or more than 5 minutes off.
403The key is invalid or revoked, your IP isn't on the key's allowlist, or a Free key asked for ibm_hardware.
422A parameter has the wrong type or is out of range.
429You've used today's calls (or today's direct IBM runs). They reset at midnight UTC.
502The backend you chose (usually ibm_hardware) is unavailable. Retry, or use the default.
503QuantumRand's database is briefly unreachable. Wait for the Retry-After seconds and try again.