vlayer docs
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 supported
  • method: HTTP method to use for the request. Defaults to GET
  • headers: Array of HTTP headers formatted as "Header-Name: Header-Value"
  • body: Request body data for POST requests as a string
  • notaryUrl: URL of the notary server for TLS notarization. Defaults to vlayer's test notary server
  • host: Optional override for the target host
  • maxRecvData: 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 data
  • version: Version of the TLSN protocol used
  • meta: Metadata about the verification process
    • notaryUrl: 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"
  }
}