MinervaMinerva
Documentation
API Reference

Proof API

Generate, retrieve, and verify ZK-STARK proofs via the Minerva REST API.

The Proof API is the core of Minerva. It accepts circuit inputs, runs the Winterfell STARK prover, and returns a portable cryptographic proof that anyone can verify.

Endpoints

MethodPathDescription
POST/api/v1/proofs/generateGenerate a new ZK-STARK proof
GET/api/v1/proofsList all proofs for your account
GET/api/v1/proofs/:idGet a specific proof by ID
POST/api/v1/proofs/:id/verifyVerify a proof by ID
POST/api/v1/proofs/verifyVerify a raw proof blob (no auth required)
DELETE/api/v1/proofs/:idDelete a proof

Generate a Proof

http
POST /api/v1/proofs/generate HTTP/1.1
Host: api.zkesg.com
Authorization: Bearer <your-api-key>
Content-Type: application/json

{
  "template": "carbon-emissions",
  "public_inputs": {
    "threshold_tonnes": 10000
  },
  "private_inputs": {
    "actual_emissions_tonnes": 7342
  },
  "webhook_url": "https://your-app.com/minerva/webhook"
}
FieldTypeRequiredDescription
templatestringYes*Template slug (e.g. carbon-emissions). Use this OR circuit.
circuitobjectYes*Custom circuit definition. Use this OR template.
public_inputsobjectYesKey-value map of public inputs (visible in proof)
private_inputsobjectYesKey-value map of private inputs (never leave server)
webhook_urlstringNoURL to notify when proof completes (async mode)

Synchronous response (proof completes within timeout):

json
{
  "id": "proof_01HX4KQZR9BNT5E2FPMCDVWJ3",
  "status": "completed",
  "template": "carbon-emissions",
  "public_inputs": { "threshold_tonnes": 10000 },
  "proof_blob": "WINTERFELL_PROOF_AAAAEAAAABAAAAAgA...",
  "duration_ms": 1842,
  "created_at": "2026-03-16T12:00:00Z"
}

Async response (proof is queued, webhook will fire on completion):

json
{
  "id": "proof_01HX4KQZR9BNT5E2FPMCDVWJ3",
  "status": "pending",
  "template": "carbon-emissions",
  "created_at": "2026-03-16T12:00:00Z"
}

List Proofs

bash
curl https://api.zkesg.com/api/v1/proofs \
  -H "Authorization: Bearer $MINERVA_API_KEY"
json
{
  "proofs": [
    {
      "id": "proof_01HX4KQZR9BNT5E2FPMCDVWJ3",
      "status": "completed",
      "template": "carbon-emissions",
      "duration_ms": 1842,
      "created_at": "2026-03-16T12:00:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "per_page": 20
}

Verify a Proof

Verification is public — no authentication required. Anyone with the proof blob and public inputs can verify independently.

http
POST /api/v1/proofs/verify HTTP/1.1
Host: api.zkesg.com
Content-Type: application/json

{
  "proof_blob": "WINTERFELL_PROOF_AAAAEAAAABAAAAAgA...",
  "template": "carbon-emissions",
  "public_inputs": { "threshold_tonnes": 10000 }
}
json
{
  "valid": true,
  "template": "carbon-emissions",
  "public_inputs": { "threshold_tonnes": 10000 },
  "verified_at": "2026-03-16T15:00:00Z"
}

Proof Status Values

StatusMeaning
pendingProof generation queued or in progress
completedProof generated successfully, ready to verify
failedProof generation failed (constraint error, invalid inputs, or timeout)
expiredProof was removed after the retention window

Error Reference

StatusCodeMeaning
400invalid_inputsInput values do not satisfy circuit constraints
400unknown_templateTemplate slug does not exist
401unauthorizedMissing or invalid authentication
404proof_not_foundProof ID does not exist in your account
422constraint_errorCircuit constraint evaluation failed (report this)
429rate_limit_exceededToo many proof requests — back off and retry
500prover_errorInternal STARK prover error — retry or contact support
Documentation
API Reference

Proof API

Generate, retrieve, and verify ZK-STARK proofs via the Minerva REST API.

The Proof API is the core of Minerva. It accepts circuit inputs, runs the Winterfell STARK prover, and returns a portable cryptographic proof that anyone can verify.

Endpoints

MethodPathDescription
POST/api/v1/proofs/generateGenerate a new ZK-STARK proof
GET/api/v1/proofsList all proofs for your account
GET/api/v1/proofs/:idGet a specific proof by ID
POST/api/v1/proofs/:id/verifyVerify a proof by ID
POST/api/v1/proofs/verifyVerify a raw proof blob (no auth required)
DELETE/api/v1/proofs/:idDelete a proof

Generate a Proof

http
POST /api/v1/proofs/generate HTTP/1.1
Host: api.zkesg.com
Authorization: Bearer <your-api-key>
Content-Type: application/json

{
  "template": "carbon-emissions",
  "public_inputs": {
    "threshold_tonnes": 10000
  },
  "private_inputs": {
    "actual_emissions_tonnes": 7342
  },
  "webhook_url": "https://your-app.com/minerva/webhook"
}
FieldTypeRequiredDescription
templatestringYes*Template slug (e.g. carbon-emissions). Use this OR circuit.
circuitobjectYes*Custom circuit definition. Use this OR template.
public_inputsobjectYesKey-value map of public inputs (visible in proof)
private_inputsobjectYesKey-value map of private inputs (never leave server)
webhook_urlstringNoURL to notify when proof completes (async mode)

Synchronous response (proof completes within timeout):

json
{
  "id": "proof_01HX4KQZR9BNT5E2FPMCDVWJ3",
  "status": "completed",
  "template": "carbon-emissions",
  "public_inputs": { "threshold_tonnes": 10000 },
  "proof_blob": "WINTERFELL_PROOF_AAAAEAAAABAAAAAgA...",
  "duration_ms": 1842,
  "created_at": "2026-03-16T12:00:00Z"
}

Async response (proof is queued, webhook will fire on completion):

json
{
  "id": "proof_01HX4KQZR9BNT5E2FPMCDVWJ3",
  "status": "pending",
  "template": "carbon-emissions",
  "created_at": "2026-03-16T12:00:00Z"
}

List Proofs

bash
curl https://api.zkesg.com/api/v1/proofs \
  -H "Authorization: Bearer $MINERVA_API_KEY"
json
{
  "proofs": [
    {
      "id": "proof_01HX4KQZR9BNT5E2FPMCDVWJ3",
      "status": "completed",
      "template": "carbon-emissions",
      "duration_ms": 1842,
      "created_at": "2026-03-16T12:00:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "per_page": 20
}

Verify a Proof

Verification is public — no authentication required. Anyone with the proof blob and public inputs can verify independently.

http
POST /api/v1/proofs/verify HTTP/1.1
Host: api.zkesg.com
Content-Type: application/json

{
  "proof_blob": "WINTERFELL_PROOF_AAAAEAAAABAAAAAgA...",
  "template": "carbon-emissions",
  "public_inputs": { "threshold_tonnes": 10000 }
}
json
{
  "valid": true,
  "template": "carbon-emissions",
  "public_inputs": { "threshold_tonnes": 10000 },
  "verified_at": "2026-03-16T15:00:00Z"
}

Proof Status Values

StatusMeaning
pendingProof generation queued or in progress
completedProof generated successfully, ready to verify
failedProof generation failed (constraint error, invalid inputs, or timeout)
expiredProof was removed after the retention window

Error Reference

StatusCodeMeaning
400invalid_inputsInput values do not satisfy circuit constraints
400unknown_templateTemplate slug does not exist
401unauthorizedMissing or invalid authentication
404proof_not_foundProof ID does not exist in your account
422constraint_errorCircuit constraint evaluation failed (report this)
429rate_limit_exceededToo many proof requests — back off and retry
500prover_errorInternal STARK prover error — retry or contact support