Back to Documentation

API Reference

Complete endpoint documentation

Comprehensive reference for QBitShield's quantum-safe key generation API. All endpoints support JSON requests and return structured responses.

Authentication

All API requests require authentication via API key in the request header:

X-API-Key: your-api-key-here

Demo Keys

demo_key_for_testing
QSDemo

Rate Limits

Research: 1,000/month
Professional: 100,000/month
Enterprise: Unlimited
POST/api/v2/generate

Generate Quantum Key

Generate a quantum-safe cryptographic key using Prime Harmonic Modulation

Parameters

NameTypeRequiredDescription
security_levelintegerRequiredKey security level (128, 256, 384)
enable_nist_validationbooleanOptionalEnable NIST SP 800-22 validation
modulation_typestringOptionalModulation algorithm type

Example Request

curl -X POST "https://api.qbitshield.com/api/v2/generate" \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "security_level": 256,
    "enable_nist_validation": true
  }'

Example Response

{
  "success": true,
  "key_id": "qbit_1780254071056910",
  "key": "29fc49144d48c6ea...b6fe95d9",
  "security_level": 256,
  "latency_ms": 2937.0,
  "quantum_hardware": false,
  "entropy_job_id": null,
  "nist_score": 7,
  "nist_grade": "B",
  "entropy_bits": 255.89,
  "source": "aer_simulator",
  "hash_proof": "qbit_proof_1780254071",
  "timestamp": "2026-05-31T18:57:10.461704+00:00"
}
POST/api/v2/validate

Validate Quantum Key

Validate the integrity and security of a quantum-generated key

Parameters

NameTypeRequiredDescription
keystringRequiredThe quantum key to validate
hash_proofstringOptionalHash proof for verification

Example Request

curl -X POST "https://api.qbitshield.com/api/v2/validate" \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "694887d326681a6d1ba2d5b21e575787b8bea356065e0695c77641efba6b6341"
  }'

Example Response

{
  "success": true,
  "valid": true,
  "validation_details": {
    "key_format": "valid",
    "entropy_check": "passed",
    "proof_verification": "passed"
  },
  "timestamp": "2025-08-18T20:37:33.254699+00:00"
}
GET/api/v2/metrics

Get Analytics

Retrieve performance metrics and usage analytics

Parameters

NameTypeRequiredDescription
hoursintegerOptionalTime period in hours (default: 24)

Example Request

curl -X GET "https://api.qbitshield.com/api/v2/metrics?hours=24" \
  -H "X-API-Key: your-api-key-here"

Example Response

{
  "success": true,
  "metrics": {
    "performance": {
      "total_keys_generated": 1247,
      "average_latency_ms": 0.6,
      "nist_compliance_rate": 1.0,
      "error_rate": 0.0
    },
    "usage": {
      "api_key_count": 4,
      "total_usage": 1247
    }
  },
  "timestamp": "2025-08-18T20:37:33.254699+00:00"
}

SDKs & Libraries

Official SDKs and community libraries for popular programming languages:

JavaScript/Node.js

npm install qbitshield

Coming soon

Python

Live
pip install qbitshield

v2.3.0 — includes quantum hardware provenance

github.com/Sensorman/qbitshield-sdk ↗

Go

go get github.com/qbitshield/go-sdk

Coming soon