---
title: "Generate zk circuit proof"
method: POST
path: "/v1/circuits/{circuitId}/prove"
---

# Generate zk circuit proof

`POST /v1/circuits/{circuitId}/prove`

## Request

- Base URL: `https://api.affix-io.com`
- URL: `https://api.affix-io.com/v1/circuits/{circuitId}/prove`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Generate a zero-knowledge proof for a circuit (POST /v1/circuits/:circuitId/prove). Recommended shape: credential + context; the server builds the witness. Every witness value must be a number: send numeric fields (claim_value, valid_from, valid_until, min_value, max_value) as JSON numbers, and id fields (schema_id, issuer_pubkey_hash, credential_id, context.secret, context.context_id) as strings holding a decimal or 0x hex number. Hash any text (an order id, an email) to a field element first; plain text is rejected with 400 invalid_fields and invalid_witness_fields. issuer_id may be any string. Range circuits such as ticket_age_entry take context.min_value and context.max_value, so a ticket age check works over REST: decision yes when claim_value is in range. The simple fields shape (condition_greater1..3) only applies to the yesno circuit.

## Path parameters

- `circuitId` string, required

## Request body

- object

## Response `200`

Success (JSON).

## Other responses

- `400`: Invalid request.
- `401`: API key missing or not accepted.
- `409`: Conflict, e.g. double_spend_detected on a spent proof.
- `429`: Rate limited; see Retry-After.

---

[API](https://skmtc.dev/affix-io/apis/affixio-verification-api.md) · [All operations](https://skmtc.dev/affix-io/apis/affixio-verification-api/llms.txt) · [OpenAPI document](https://skmtc.dev/affix-io/apis/affixio-verification-api/revisions/9a5f8ff2582d?raw)
