PARANOID

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.

FieldRequiredNotes
messagesyesA list of chat messages
modelnoReplaced by the gateway's configured model
other OpenAI fieldsnoPassed through after identifying fields are removed
max_tokensnoBetween 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_effortnolow (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

InstructionWhoArgumentsEffect
initializeupgrade authority, onceLaunchParamsCreates config, tree and vaults; fixes every constant
set_burn_targetupgrade authority, oncenoneSets the burn mint and its Raydium pool
depositanyonecommitment: [u8; 32], epochs: u32Pays rate x epochs, inserts the leaf
accrueanyonenonePays treasury and burn vault for epochs reached
request_exitdepositorsiblings: Vec<[u8; 32]>Removes the leaf; membership ends after this epoch
withdrawdepositorsiblings: Vec<[u8; 32]>After the slashing window, refunds unpaid epochs
slashanyone with the secretsecret: [u8; 32], siblingsForfeits unpaid epochs of a double-spender
crank_burnanyoneamount: u64Buys the token with burn-vault USDC and burns it

Circuit

Request(DEPTH = 20, W = 4). Public inputs: root, epoch, x, limit, weight. Outputs: nullifiers[4], ys[4] (unused outputs are zero).

Next: Error reference