Skip to main content
Version: 1.1

Remote Proving using Bonsai

Bonsai lets users generate proofs for their zkVM applications, without using their own hardware for proof generation. Users specify which zkVM application they want to run, as well as the inputs to that program, and Bonsai returns a proof.

Bonsai is highly parallelized and highly performant: proving work on Bonsai is split among a dynamically-sized GPU cluster, offering ultra-fast proving. To get a taste of what you can do with Bonsai, check out Zeth, our Governance Showcase, Bonsai Pay, and our blog post about using Bonsai as a zk coprocessor.

If you already have an API key, you can request proofs from Bonsai in any of the following ways:

  • via cargo risczero (great for experimenting or for non-blockchain applications)
    • Enable Bonsai by setting the environment variables BONSAI_API_KEY=<YOUR_API_KEY> and BONSAI_API_URL=<BONSAI_URL> when running your program
  • via the RISC Zero Foundry Template (for integrating with Ethereum)
  • via the Bonsai SDK (for accessing Bonsai from Rust)
  • via the Bonsai REST API (for building your own client or accessing Bonsai directly)

If you don't have an API key, you can request access. While you wait, you can make use of the local proving option on the RISC Zero Foundry Template, or you can focus on developing for the zkVM.

API Limits

Bonsai enforces a number of API limits. These limits are configurable on a per API key basis. If your limits are too low to support your use case or you run out cycles, email us at devrel@risczero.com to request more.

These limits are:

  • Concurrent proofs: The max number of proofs you can generate simultaneously.
  • Cycle budget: The max number of cycles you can prove on Bonsai.
  • Cycle usage: The historical count of cycles used by your API key.
  • Executor cycle limit: The max number of cycles your API key can prove for an individual proof.
  • Max parallelism: The maximum number of workers an individual proof can be parallelized across (this limit is currently inactive).

Checking your limits

You can request your individual limits using the user/quotas API route.

Understanding cycle counts

You can log the cycle count and other performance info for your zkVM Guest program by following these instructions.