API Reference · POST /v1/entropy

Entropy API

Hardware-derived entropy with signed provenance per draw. From IBM Quantum backends, with NIST SP 800-90B health gating and FIPS 203 hybrid KEM at the edge.

Endpoint

POST/v1/entropy

Request

{
  "size_bytes": 32,
  "tier": "standard"
}

Headers

Response (200)

{
  "entropy": "base64:aBcD...",
  "size_bytes": 32,
  "key_exchange": "X25519+ML-KEM-1024",
  "source_class": "hardware-derived-premium",
  "entropy_score": 0.999,
  "source_id": "qrng-hardware-001",
  "health_check": {
    "rct_passed": true,
    "apt_passed": true
  },
  "fallback": {
    "is_fallback": false,
    "reason": null,
    "original_source": null
  },
  "provenance_id": "prov_2026_06_23_abc123",
  "issued_at": "2026-06-23T14:22:08.117Z"
}

Status codes

200Success. Body contains entropy bytes and provenance metadata. 401Unauthorized. Missing or invalid API key. 402Payment required. Tier cap exceeded or billing suspended. 422Validation error. size_bytes out of range or unsupported tier. 429Rate limit exceeded. Retry after the value in Retry-After. 503Service degraded. Fallback path engaged; body still issued with fallback.is_fallback: true and fallback.reason populated.

Field Reference

Fallback Reasons

When fallback.is_fallback is true, the fallback.reason field carries one of these codes.

pool_unavailableReservoir is below the 1 MB threshold. Draw re-issued from CSPRNG. entropy_score_below_thresholdCandidate batch scored < 0.99 on min-entropy. Re-issued from CSPRNG. health_tests_failed:RCTSP 800-90B Repetition Count Test failed on the 1024-byte sample. Re-issued from CSPRNG. health_tests_failed:APTSP 800-90B Adaptive Proportion Test failed on the 1024-byte sample. Re-issued from CSPRNG. health_tests_failed:RCT,APTBoth tests failed. Re-issued from CSPRNG.

What Hardware Backs This?

IBM Quantum backends — Falcon, FEZ, Kingston, Brussels. Raw measurement output is conditioned by a Toeplitz extractor before admission. Per-batch min-entropy is estimated against the conditioning circuit; only batches scoring ≥ 0.99 are admitted to the reservoir.

NIST SP 800-90B Repetition Count Test (RCT) and Adaptive Proportion Test (APT) are run on a rolling 1024-byte sample. Failed tests force CSPRNG fallback regardless of entropy_score.

Pool byte-age cap: 14 days. Reservoir must hold at least 1 MB before a hardware-derived draw is admitted. Maximum consumption per draw: 90%.

For the full architectural breakdown, see Service Architecture.

Rate Limits

Per-API-key rolling-window limits. Burst capacity up to 2× for 5 seconds. Higher tiers available on request.

TierRPSDaily
Builder510,000
Standard50500,000
Standard+2005,000,000
Verified50500,000
Verified+2005,000,000
EnterpriseCustomCustom

Get a sandbox key

Provisioned within 24–48 hours. Standard tier; full response shape; audit chain attached.