API
API Reference
This section covers how developers can interact with the public API provided by spone.fun, which enables cryptographically verifiable random draws using Succinct’s SP1 zkVM.
POST https://api.spone.fun/draw
Description
Generates a random selection from a list of input strings, using a deterministic seed and SP1 zkVM to generate a zero-knowledge proof of fairness.
✅ Request Body
{
"seed": "any string",
"num": 3,
"strings": ["Alice", "Bob", "Charlie", "David"]
}
Parameters:
seed (string) – A deterministic seed used for random selection. Same inputs will always produce the same output and proof.
num (number) – Number of items to pick from the list.
strings (string[]) – The full list of possible choices.
✅ Response
{
"Program": "0x00b31293e0e610f00ad8f1bc5d16023830f4f5b0d59bc3a4112b38fb86e15563",
"elf_hash": "0x12c528ee8798e3f0ba9c3c3b1959bb0a07969bb6dab8f8ab4997a3ed5a7ba723",
"num": 1,
"origin": ["red", "blue", "green", "purple", "orange"],
"seed": "What team will I be on if I get Stage 2?",
"selected": ["blue"],
"sp1_trx": "0xc1ae868929dd83bd55e543648a3d566cc9d4d77f89b5b46bee9a41effa0aeea"
}
Field
Type
Description
Program
string
The SP1 zkVM program hash (commitment to the executed logic)
elf_hash
string
Hash of the compiled ELF binary, which is publicly accessible and verifiable
num
number
Number of elements selected from the input list
origin
string[]
Original list of strings provided as input
seed
string
Deterministic input to ensure reproducible randomness
selected
string[]
The final selected values from the list
sp1_trx
string
SP1 transaction hash, uniquely identifying the zk proof and output commitment
You can use the Program, elf_hash, and sp1_trx fields to verify the draw result independently or to anchor it on-chain (e.g., Ethereum, Base, etc.).
The Program and elf_hash values identify the exact logic that was executed.
The sp1_trx is the commitment output of the SP1 zkVM proof — you can use this as a verifiable fingerprint of the result.
Because the proof is deterministic and publicly reproducible, you do not need to trust the server. Instead, anyone can:
Re-execute the program using the same input,
Match the result and sp1_trx,
Confirm that the computation was done honestly.
These values can be stored on-chain, included in smart contracts, or posted in public audit logs.
Fairness is no longer a promise — it’s a proof.
Last updated