A QRNG API is a web service that returns random numbers generated by measuring a quantum process: your code sends an authenticated HTTPS request and gets the numbers back as JSON. ANU, Cisco Outshift and Quantum Computing Inc. (QCi) each offer free access. Of the published free quotas, Outshift's works out to about 3 million bits a month and QCi's to 1 billion.
For how the hardware behind these services works, read Quantum random number generators: how they work and how fast.
How each API works
ANU Quantum Numbers. The Australian National University measures quantum fluctuations of the vacuum in its lab and serves the results in real time (ANU). You sign up for a free key and send it in an x-api-key header with a GET request to api.quantumnumbers.anu.edu.au (ANU docs). The request accepts these parameters:
type:uint8(0 to 255),uint16(0 to 65535),hex8orhex16length: from 1 to 1024 values per requestsize: a block size from 1 to 10, used only by the hex types
ANU offers a free tier but does not state its quota on the pages we could open. The paid plan, sold through AWS Marketplace, charges US$0.005 per request with unlimited requests and up to 100 requests per second (AWS Marketplace).
Cisco Outshift QRNG. Outshift runs its service on quantum hardware built by Cisco Research. You create a free account at qrng.outshift.com to get a key, then POST to api.qrng.outshift.com/api/v1/random_numbers with the key in an x-id-api-key header. The request body sets the bits per block and the number of blocks. The free tier gives 100,000 bits a day and 1,000 numbers per call, in hex, binary, decimal or octal. Outshift says the output was validated with the NIST SP 800-22 test suite, and labels the API as intended for evaluation only. Higher limits, production use and an SLA require contacting Cisco (Outshift).
QCi uQRNG. QCi authenticates with OAuth 2.0: you exchange an API token for a Bearer access token, then POST to api.qci-prod.com/qrng/random_numbers with a distribution, an output type, a sample count and a bit width. A separate usage endpoint reports how many bits you have drawn. The quickstart says access is free during the initial launch, with up to 1 billion bits a month and up to 1 million numbers per request (QCi quickstart). Check the current terms before relying on that quota.
Side-by-side limits
We converted each published free tier into bits per month so the quotas can be compared directly. For Outshift, we multiplied the daily quota by 30 days. A uint16 request to ANU returns up to 1,024 values of 16 bits each, or 16,384 bits.
| ANU Quantum Numbers | Cisco Outshift | QCi uQRNG | |
|---|---|---|---|
| Entropy source | Vacuum fluctuations, measured in ANU's lab | Quantum hardware built by Cisco Research | Not described in the quickstart |
| Auth | x-api-key header |
x-id-api-key header |
OAuth 2.0 Bearer token |
| Max per request | 1,024 values | 1,000 numbers | 1 million numbers |
| Free quota | Free tier, quota not stated | 100,000 bits a day | 1 billion bits a month |
| Free bits per month | Not stated | about 3,000,000 | 1,000,000,000 |
| Paid option | US$0.005 per request | Contact Cisco | Not stated |
A worked example: 10,000 random 32-bit values
Suppose a game needs 10,000 random 32-bit integers, for example one seed per item in a 10,000-item drop. That totals 320,000 bits.
- ANU. The largest integer type is
uint16, so each 32-bit value takes two of them: 20,000 values in all. At 1,024 per request, that needs 20 requests, the last one partly used. On the paid plan, 20 requests cost US$0.10 and fit well inside the 100-requests-per-second limit. - Outshift. With 32-bit blocks and 1,000 numbers per call, 10 calls would cover the job. The daily cap of 100,000 bits allows 3,125 values a day, so the job spreads over 4 days: three full days and 625 values on the fourth.
- QCi. The quickstart example uses
n_bitsof 16 and does not list other widths. At 16 bits, one request withn_samplesset to 20,000 covers the job, using 0.032% of the monthly quota.
Turning raw integers into a range such as 1 to 37 can skew results if done with a plain modulo. The casino RNG guide works through the numbers.
QRNG for smart contracts
ANU, Outshift and QCi each return numbers to a server over HTTPS. A smart contract gets random values differently: it sends a request to a randomness oracle and receives the values later through a callback (Quip docs: QVRF). The on-chain randomness guide compares the options and who can bias each one.
Quip's QVRF service delivers quantum randomness to contracts in this request-and-callback form. Quantum hardware on the Quip network runs sampling circuits, and Quip hashes every raw sample into a Merkle tree and publishes the root. After that, a subset gets re-simulated on classical hardware and scored by cross-entropy benchmarking, and a Toeplitz extractor condenses the audited samples into near-uniform bits (quip.network/qvrf).
The current release of QVRF has these limits:
- Centralized. Quip operates both the oracle and the trustee, so users trust a single operator. Quip says splitting the roles is next (quip.network/qvrf).
- Fidelity checked after delivery. The dispensing contract checks each word's Merkle proof against the posted root when it delivers. The fidelity checks run later, not at the moment of delivery (Quip docs: QVRF). Contracts for verifying a transcript on chain are in development (quip.network/qvrf).
- No lab certification yet. The QVRF page names no testing-lab certification (quip.network/qvrf).
- Interface still settling. The docs say the request interface, fee model and certification parameters are still being finalized, and QVRF is not a verifiable random function in the cryptographic sense (Quip docs: QVRF).
Next step
For random numbers in a backend or a test, pick an API from the table by quota. For random numbers inside a contract, read the QVRF docs and request access at quip.network/qvrf.
