Archive Inspector
Lists archive contents with compressed and uncompressed sizes and refuses to process archives whose compression ratio or entry count indicates a bomb.
POST /v1/files/zip-inspect $0.01 per call
Specification
- Endpoint
POST /v1/files/zip-inspect- Price
- $0.01 per call · tier
standard_data - Payment
-
x402 on X Layer (chain 196) · settled in USDG or USDT0 · scheme
exact - Data source
- Local sandboxed processing of the uploaded file
- Timeout
- 120 seconds
- Max request
- 20 MB
- Version
1.0.0
Calling it
The first call returns a 402 with the payment challenge. Retry with a
signed authorisation in the X-PAYMENT header — see
the payment guide for the exact shape.
curl -i -X POST "https://api.dana-edu.pp.ua/v1/files/zip-inspect" \
-H "content-type: application/json" \
-d '{ ... }' Response
Real output, captured by running this endpoint at build time — not written by hand. Volatile fields such as timestamps are elided. Captured 2026-07-30.
{
"filename": "<varies per call>",
"archive_size_bytes": 420,
"entry_count": 3,
"compressed_size_bytes": 92,
"uncompressed_size_bytes": 86,
"compression_ratio": 0.93,
"safe_to_extract": true,
"risks": [],
"entries": [
{
"name": "readme.txt",
"compressed_size": 34,
"uncompressed_size": 32,
"compression_ratio": 0.94,
"is_directory": false,
"modified": "2026-01-01T00:00:00",
"encrypted": false,
"path_traversal": false
},
{
"name": "data/values.csv",
"compressed_size": 20,
"uncompressed_size": 18,
"compression_ratio": 0.9,
"is_directory": false,
"modified": "2026-01-01T00:00:00",
"encrypted": false,
"path_traversal": false
},
{
"name": "data/notes.txt",
"compressed_size": 38,
"uncompressed_size": 36,
"compression_ratio": 0.95,
"is_directory": false,
"modified": "2026-01-01T00:00:00",
"encrypted": false,
"path_traversal": false
}
],
"method": "the ZIP central directory is read; no entry is ever extracted. The declared uncompressed sizes are sufficient to recognise a decompression bomb, so the dangerous operation is never performed."
}
Every response is wrapped in the same envelope: data plus
warnings, sources, confidence,
informational_only and a measured processing_ms.
See the envelope reference.
Related endpoints
File Type Detection
Identifies the true file type from magic bytes and structure rather than the filename, returning the matched signature.
MIME Type Validation
Checks whether a file's declared MIME type matches its actual content signature and flags mismatches.
PDF Text Extraction
Extracts text per page from a PDF with layout preservation options, reporting which pages held no extractable text.
PDF Metadata
Reads PDF metadata, version, page geometry, encryption state and embedded font and image inventory.