> ## Documentation Index
> Fetch the complete documentation index at: https://developer.usewarp.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a verification nonce

> Issues a single-use nonce that expires after 10 minutes. The nonce is a random integer below 2^248, returned as a decimal string so it fits in a BN254 field element and can be used directly as a circuit input. To make a proof replay-proof, add the nonce as a public input of your circuit, declare it in the proof policies with `{ "signal_index": <i>, "kind": "nonce" }`, and pass the same nonce to the verify endpoint.



## OpenAPI

````yaml /openapi.json post /v1/zk/proofs/{proofId}/nonces
openapi: 3.0.3
info:
  title: Warp API
  version: 1.0.0
  description: >-
    Public Warp API: hosted checkout sessions for Pay with Warp, hosted ZK proof
    verification, and Warp Verify attestation checks.
  contact:
    name: Warp Support
    email: support@usewarp.net
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.usewarp.net
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Checkout sessions
    description: Create and track hosted checkout sessions.
  - name: ZK verification
    description: Verify Groth16 proofs against circuits deployed from the Warp Platform.
  - name: Attestations
    description: Public Warp Verify attestation checks.
  - name: Health
    description: Service status.
paths:
  /v1/zk/proofs/{proofId}/nonces:
    post:
      tags:
        - ZK verification
      summary: Create a verification nonce
      description: >-
        Issues a single-use nonce that expires after 10 minutes. The nonce is a
        random integer below 2^248, returned as a decimal string so it fits in a
        BN254 field element and can be used directly as a circuit input. To make
        a proof replay-proof, add the nonce as a public input of your circuit,
        declare it in the proof policies with `{ "signal_index": <i>, "kind":
        "nonce" }`, and pass the same nonce to the verify endpoint.
      operationId: createZkNonce
      parameters:
        - name: proofId
          in: path
          required: true
          description: ZK proof ID from the Warp Platform.
          schema:
            type: string
      responses:
        '201':
          description: Nonce created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZkNonce'
        '401':
          description: Missing or invalid secret key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Invalid API key
        '404':
          description: Not found (or owned by another project)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_found
                  message: Resource not found
        '409':
          description: The proof has no verification key yet (`proof_not_ready`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: rate_limited
                  message: Too many requests. Retry after the window resets.
components:
  schemas:
    ZkNonce:
      type: object
      properties:
        nonce:
          type: string
          pattern: ^[0-9]{1,75}$
          description: >-
            Decimal integer below 2^248. Use this exact value as the circuit
            nonce input and in the verify request.
          example: >-
            1766847064778384329583297500742918515827483896875618958121606201292619776
        nonce_hex:
          type: string
          description: The same nonce as 0x-prefixed hex (62 hex digits), for display only.
          example: '0x0100000000000000000000000000000000000000000000000000000000000000'
        expires_at:
          type: string
          format: date-time
          description: 10 minutes after creation. Single use.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: >-
                Machine-readable error code: `invalid_request`, `unauthorized`,
                `not_found`, `proof_not_ready`, `onchain_unavailable`,
                `rate_limited` or `internal_error`.
              example: invalid_request
            message:
              type: string
              description: Human-readable description.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your project secret key: `sk_test_...` (testnet) or `sk_live_...`
        (mainnet). Use it only on your server.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.