API Reference
Base URL
https://api.workproof.run
Authentication
No API keys required. WorkProof uses the x402 payment protocol for authentication.
Payment Header
Include your transaction hash in the X-402-Payment header. Each transaction can only be used once (replay protection).
POST /verify
Submit a verification request. Requires x402 payment.
POST
/verify
Headers
| Header | Required | Description |
|---|---|---|
Content-Type |
Yes | Must be application/json |
X-402-Payment |
Yes | Transaction hash of payment (0x...) |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
taskType |
string | Yes | code-execution (only type currently) |
code |
string | Yes | Code to execute (max 100KB) |
expectedHash |
string | Yes | Expected SHA-256 hash of output |
inputData |
object | No | Additional input parameters |
timeoutSeconds |
number | No | Max execution time (5-60s, default: 30) |
Example Request
Request
curl
curl -X POST https://api.workproof.run/verify \
-H "Content-Type: application/json" \
-H "X-402-Payment: 0x33ea3f3dabb6ab23ae129bb6cc8c6ed62f21045c0e8823b72d421fb42731e49f" \
-d '{
"taskType": "code-execution",
"code": "console.log(2 + 2)",
"expectedHash": "8e9075af536963a013f70415769180b9d432ff452612392d364ca87db359d7bd",
"inputData": {
"expectedOutput": "4"
},
"timeoutSeconds": 30
}'
Example Response (200 OK)
Response
json
{
"jobId": "a125a3a5-b75d-4e1d-8c5d-17c02455d648",
"status": "completed",
"result": "VALID",
"executionTimeMs": 2066,
"totalTimeMs": 11976,
"registryTxHash": "0x75667bdecb5612f00ef23cbadd56f2927fd2d9f5bcd0e64f96762928afd4405a",
"expectedHash": "8e9075af536963a013f70415769180b9d432ff452612392d364ca87db359d7bd",
"refundEligible": false
}
Response Fields
| Field | Type | Description |
|---|---|---|
jobId |
string | Unique identifier for this verification |
status |
string | completed or failed |
result |
string | VALID, INVALID, ERROR, or TIMEOUT |
executionTimeMs |
number | Time spent in VM execution |
totalTimeMs |
number | Total request processing time |
registryTxHash |
string | Blockchain attestation transaction hash |
refundEligible |
boolean | Whether refund can be requested |
GET /verify/:id
Get verification status by job ID.
GET
/verify/:id
Parameters
| Parameter | Type | Description |
|---|---|---|
id |
string | Job ID returned from POST /verify |
GET /metrics
Prometheus-formatted metrics for monitoring.
GET
/metrics
Example Output
prometheus
# HELP notary_verifications_total Total verifications by result
# TYPE notary_verifications_total counter
notary_verifications_total{result="VALID"} 42
notary_verifications_total{result="INVALID"} 5
# HELP notary_wallet_balance_eth Current ETH balance
# TYPE notary_wallet_balance_eth gauge
notary_wallet_balance_eth 0.039997
GET /notary/health
Health check endpoint.
GET
/notary/health
Response
json
{
"status": "healthy",
"timestamp": "2026-02-05T01:47:36.145Z",
"version": "0.1.0-hardened",
"uptime": 16.83847123
}