Complete endpoint documentation
Comprehensive reference for QBitShield's quantum-safe key generation API. All endpoints support JSON requests and return structured responses.
All API requests require authentication via API key in the request header:
X-API-Key: your-api-key-here
/api/v2/generate
Generate a quantum-safe cryptographic key using Prime Harmonic Modulation
Name | Type | Required | Description |
---|---|---|---|
security_level | integer | Required | Key security level (128, 256, 384) |
enable_nist_validation | boolean | Optional | Enable NIST SP 800-22 validation |
modulation_type | string | Optional | Modulation algorithm type |
curl -X POST "http://localhost:8000/api/v2/generate" \
-H "X-API-Key: demo_key_for_testing" \
-H "Content-Type: application/json" \
-d '{
"security_level": 256,
"enable_nist_validation": true
}'
{
"success": true,
"key_id": "qbit_1755549791413078",
"key": "694887d326681a6d1ba2d5b21e575787b8bea356065e0695c77641efba6b6341",
"security_level": 256,
"entropy_bits": 99.9,
"latency_ms": 433.14,
"nist_validation": {
"certification_status": "PASS",
"tests_passed": 15,
"total_tests": 15,
"compliance_level": "CERTIFICATION_READY"
},
"timestamp": "2025-08-18T20:37:33.254699+00:00"
}
/api/v2/validate
Validate the integrity and security of a quantum-generated key
Name | Type | Required | Description |
---|---|---|---|
key | string | Required | The quantum key to validate |
hash_proof | string | Optional | Hash proof for verification |
curl -X POST "http://localhost:8000/api/v2/validate" \
-H "X-API-Key: demo_key_for_testing" \
-H "Content-Type: application/json" \
-d '{
"key": "694887d326681a6d1ba2d5b21e575787b8bea356065e0695c77641efba6b6341"
}'
{
"success": true,
"valid": true,
"validation_details": {
"key_format": "valid",
"entropy_check": "passed",
"proof_verification": "passed"
},
"timestamp": "2025-08-18T20:37:33.254699+00:00"
}
/api/v2/metrics
Retrieve performance metrics and usage analytics
Name | Type | Required | Description |
---|---|---|---|
hours | integer | Optional | Time period in hours (default: 24) |
curl -X GET "http://localhost:8000/api/v2/metrics?hours=24" \
-H "X-API-Key: demo_key_for_testing"
{
"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"
}
Official SDKs and community libraries for popular programming languages:
npm install qbitshield
Coming Soon
pip install qbitshield
Coming Soon
go get github.com/qbitshield/go-sdk
Coming Soon