API Endpoints & curl Commands
curl -s http://localhost:8000/health | jq
Generate Randomness (Async - Queued Job)
Request quantum random bits (queued job)
curl -s -X POST http://localhost:8000/generate \
-H " Content-Type: application/json" \
-d ' {"n_bits": 64}' | jq
Request with simulator only (faster)
curl -s -X POST http://localhost:8000/generate \
-H " Content-Type: application/json" \
-d ' {"n_bits": 1024, "force_simulator": true}' | jq
Response includes job_id - check status below
curl -s http://localhost:8000/job/< job_id> | jq
Get Random Bits (Sync - Direct from Entropy Pool)
Get N bits directly from the entropy pool
curl -s " http://localhost:8000/random?n=64" | jq
curl -s " http://localhost:8000/random?n=256" | jq
Check Entropy Pool Status
curl -s http://localhost:8000/entropy-pool | jq
python qaas_cli.py otp -d 4
Random number in range [min, max]
python qaas_cli.py range 1 100
python qaas_cli.py range 0 255
python qaas_cli.py hex
python qaas_cli.py hex -b 64
python qaas_cli.py otp --api-url http://your-server:8000
chmod +x qaas_cli.py && ./qaas_cli.py otp