zkTLS Attestation · Developer docs
Generate a cryptographic proof that a specific HTTPS request was made and returned a specific response, without trusting the party who made it. Credentials stay hidden, chosen response fields are selectively revealed, and proofs verify off-chain in milliseconds or on-chain on any EVM.
zkFetch proxies an HTTPS request through a decentralized attestor. The attestor observes the encrypted TLS session, verifies a zero-knowledge proof of correct decryption, and signs a claim about the response. The result is a portable proof: anyone can confirm what the API returned, and you decide which fields are revealed and which stay hidden.
zkFetch is a REST service you run. Point at your deployment’s base URL, referred to below as $ZKFETCH_URL, and start proving requests. The server holds the Reclaim credentials and the attestor connection, so callers send no API key to zkFetch itself. The only secrets you handle are the ones your own target APIs need, and those stay hidden in privateOptions.headers.
Confirm the service is in production mode, then make a proven request. Put every credential in privateOptions.headers so it is hidden from anyone who inspects the proof.
curl $ZKFETCH_URL/health
# { "status": "ok", "mode": "production", "reclaim_configured": true }curl -X POST $ZKFETCH_URL/zkfetch \
-H 'Content-Type: application/json' \
-d '{
"url": "https://api.example.com/v2/booking/8821",
"publicOptions": { "method": "GET" },
"privateOptions": {
"headers": { "Authorization": "Bearer YOUR_SECRET" },
"responseMatches": [
{ "type": "regex", "value": "\"status\"\\s*:\\s*\"(?<status>[A-Z]+)\"" }
]
},
"redactions": [ { "jsonPath": "$.card_number" } ]
}'From code, reject anything where verified is not true or metadata.mock is set. The full wrapper pattern is in the skill.
A successful /zkfetch returns data, proof, onchainProof, and verified. Store the entire proof object verbatim; it is what verifiers need.
Two independent mechanisms, used together. Reveal fields with named regex capture groups, and hide fields with redactions.
Reveal
Each named group in responseMatches becomes a revealed value. Only named groups are disclosed.
{ "type": "regex",
"value": "\"usd\":(?<price>[0-9.]+)" }
// reveals price: "3631.24", nothing elseRedact
Top-level redactions hide bytes cryptographically. Values are removed, not replaced.
{ "jsonPath": "$.user.email" }
{ "regex": "\"card\"\\s*:\\s*\".*?\"" }
// prove success, hide the body:
{ "regex": ".*" }Anyone holding a stored proof can confirm it. Signature verification is the standard, fast check; add zk verification only when the application demands maximum assurance.
curl -X POST $ZKFETCH_URL/verify \
-H 'Content-Type: application/json' \
-d '{ "proof": <stored proof object> }'
# { "success": true, "valid": true, "extractedData": { "status": "CONFIRMED" } }For smart contracts, /zkfetch already returns an onchainProof. Submit it to a Reclaim verifier contract on Ethereum, Base, Optimism, Polygon, or zkSync Era.
The service has a mock mode. If its Reclaim credentials are missing, a request still returns success: true with a fake proof that proves nothing. Guard every integration.
This page is the short reference. The full integration guide, including every option and common mistake, is the zkfetch skill. Copy it above and hand it to your coding agent.