API reference
Gateway
POST /api/v1/chat/completions
OpenAI-compatible. The API key is sent as
Authorization: Bearer <key>; the key is a bundle of request proofs.
| Field | Required | Notes |
|---|---|---|
messages | yes | A list of chat messages |
model | no | Replaced by the gateway's configured model |
| other | no | Passed through after identifying fields are removed |
max_tokens | no | Between 1,024 and 8,192; the model thinks before it answers, so smaller values are raised to 1,024 and missing ones become 8,192 |
reasoning_effort | no | low (default), medium or high |
Response: the model's answer, plus the header x-paranoid-requests-left with the slots left in the proofs you sent.
GET /api/v1/models
Lists the model the gateway forwards to.
GET /api/health
{"status":"ok","network":"solana-mainnet","program":"pending","stage":"pre-launch"}
GET /api/token
{"stage":"pre-launch","ca":null} until launch.
Program instructions
| Instruction | Who | Arguments | Effect |
|---|---|---|---|
initialize | upgrade authority, once | LaunchParams | Creates config, tree and vaults; fixes every constant |
set_burn_target | upgrade authority, once | none | Sets the burn mint and its |
deposit | anyone | commitment: [u8; 32], epochs: u32 | Pays rate x epochs, inserts the leaf |
accrue | anyone | none | Pays treasury and burn vault for epochs reached |
request_exit | depositor | siblings: Vec<[u8; 32]> | Removes the leaf; membership ends after this epoch |
withdraw | depositor | siblings: Vec<[u8; 32]> | After the slashing window, refunds unpaid epochs |
slash | anyone with the secret | secret: [u8; 32], siblings | Forfeits unpaid epochs of a double-spender |
crank_burn | anyone | amount: u64 | Buys the token with burn-vault |
Circuit
Request(DEPTH = 20, W = 4). Public inputs: root, epoch, x, limit, weight. Outputs: nullifiers[4], ys[4] (unused outputs are zero).