REST API
POST /prove
Generate Web Proof
Under Development: This API is currently in development. Documentation and endpoints may change. For production use, please contact our team.
POST /api/v1/prove
Generate a cryptographic Web Proof by making a notarized HTTP request to the specified URL.
Request Body
url: HTTPS URL to make a request to and generate a proof for. Only HTTPS URLs are supportedmethod: HTTP method to use for the request. Defaults toGETheaders: Array of HTTP headers formatted as"Header-Name: Header-Value"body: Request body data for POST requests as a stringnotaryUrl: URL of the notary server for TLS notarization. Defaults to vlayer's test notary serverhost: Optional override for the target hostmaxRecvData: Optional maximum number of bytes to receive from the server.
Response Body
The response is a presentation object containing the complete cryptographic Web Proof:
data: Hex-encoded proof dataversion: Version of the TLSN protocol usedmeta: Metadata about the verification processnotaryUrl: URL of the notary service that was used
Example
Generate a Web Proof for a Binance API call:
curl -X POST https://web-prover.vlayer.xyz/api/v1/prove \
-H "Content-Type: application/json" \
-H "x-client-id: 4f028e97-b7c7-4a81-ade2-6b1a2917380c" \
-H "Authorization: Bearer jUWXi1pVUoTHgc7MOgh5X0zMR12MHtAhtjVgMc2DM3B3Uc8WEGQAEix83VwZ" \
-d '{
"url": "https://data-api.binance.vision/api/v3/exchangeInfo?symbol=ETHUSDC",
"headers": []
}'const response = await fetch('https://web-prover.vlayer.xyz/api/v1/prove', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-client-id': '4f028e97-b7c7-4a81-ade2-6b1a2917380c',
'Authorization': 'Bearer jUWXi1pVUoTHgc7MOgh5X0zMR12MHtAhtjVgMc2DM3B3Uc8WEGQAEix83VwZ'
},
body: JSON.stringify({
url: 'https://data-api.binance.vision/api/v3/exchangeInfo?symbol=ETHUSDC',
headers: []
})
});
const data = await response.json();
console.log(JSON.stringify({
...data,
data: data.data.substring(0, 100) + '...'
}, null, 2));The included credentials are for limited public use. For production use, please contact our team.
Response:
{
"data": "014000000000000000899cdccd31337c96bb9e519aa438ed73cdb47dda5c80e995ef0a1c04bf6c563730cde41724dafc1391b1b81acc5d989a7f7add8...",
"version": "0.1.0-alpha.12",
"meta": {
"notaryUrl": "https://test-notary.vlayer.xyz/v0.1.0-alpha.12"
}
}