{"openapi":"3.1.0","info":{"title":"Twinvoir API","version":"1.0.0","description":"Blind AI-model arena on Robinhood Chain. Every number comes from real use, OpenRouter, or the chain; missing data is null. Times UTC."},"servers":[{"url":"https://twinvoir.xyz"}],"components":{"securitySchemes":{"session":{"type":"http","scheme":"bearer","description":"Session from POST /api/auth (EIP-191 sign-in), valid until 00:00 UTC."}}},"paths":{"/api/chamber":{"post":{"summary":"Start a Chamber (duel). Response is NDJSON.","security":[{},{"session":[]}],"description":"Lines: {\"t\":\"start\",\"id\",\"quota\":{\"left\",\"limit\"}} → {\"t\":\"d\",\"s\":\"a\"|\"b\",\"x\":\"<delta>\"}… → {\"t\":\"end\",\"s\",\"tokensOut\"} per side (or {\"t\":\"err\",\"s\",\"code\"}) → {\"t\":\"done\",\"id\",\"guess\":{\"a\":[4 labels],\"b\":[4 labels]}}. Model identity is never sent before the Verdict. Free: 5/day per IP (/64 for IPv6), 30/day for holder sessions. Daily free compute cap $3 → 429 {code:\"free-cap\",resetsAt}.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"category":{"type":"string","enum":["code","write","reason","bahasa","other"]},"tier":{"type":"string","enum":["budget","mid","premium"]}},"required":["prompt"]}}}},"responses":{"200":{"description":"NDJSON stream","content":{"application/x-ndjson":{}}},"429":{"description":"quota | free-cap | rate-limit"}}}},"/api/chamber/{id}/verdict":{"post":{"summary":"Give the Verdict once; returns the Reveal.","security":[{},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Counted on the Bench only if given >= 3 s after done, both sides answered, and neither answer named its own model (selfNamed).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"verdict":{"type":"string","enum":["a","b","tie","bad"]},"guess":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"}}}},"required":["verdict"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/chamber/{id}":{"get":{"summary":"The Reveal (404 before the Verdict).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/inspect":{"post":{"summary":"The exact body that would be forwarded to OpenRouter, without calling a model.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"prompt":{"type":"string","maxLength":4000}},"required":["prompt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/receipt/{generationId}":{"get":{"summary":"Our billed record vs OpenRouter's record for a generation ID.","parameters":[{"name":"generationId","in":"path","required":true,"schema":{"type":"string","pattern":"^gen-"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/bench":{"get":{"summary":"Bench: Bradley-Terry Elo and Elo per dollar.","parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["all","code","write","reason","bahasa"]}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["human","house"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/house":{"get":{"summary":"House Arena feed and model probes.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/house/prompts":{"get":{"summary":"The public House / Daily prompt set and judge rubric.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/daily":{"get":{"summary":"Today's Daily Chamber (votes null until you vote).","security":[{},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/daily/verdict":{"post":{"summary":"Vote once per IP/session per day; returns shares + Reveal.","security":[{},{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"verdict":{"type":"string","enum":["a","b","tie","bad"]},"guess":{"type":"object"}},"required":["verdict"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/auth/message":{"get":{"summary":"EIP-191 sign-in message (domain, UTC date, nonce; valid 10 min).","parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/auth":{"post":{"summary":"Exchange the signature for a session.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"address":{"type":"string"},"signature":{"type":"string"}},"required":["address","signature"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/ledger":{"get":{"summary":"Hourly ledger records.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/ledger/{hour}":{"get":{"summary":"One hour with every leaf and proof.","parameters":[{"name":"hour","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/ledger/{hour}/raw":{"get":{"summary":"Exact manifest bytes hashed into uriHash.","parameters":[{"name":"hour","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/juror/{wallet}":{"get":{"summary":"Wallet balance, juror today, Juror Credit balance and history with proofs.","parameters":[{"name":"wallet","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/token":{"get":{"summary":"$JUROR, Splitter and graduation (null before launch).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/burns":{"get":{"summary":"Buy-and-burn transfers to 0x…dEaD from the Splitter.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/verify":{"get":{"summary":"Contracts, on-chain checks and build hash.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/stats":{"get":{"summary":"Hero numbers.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/health":{"get":{"summary":"Liveness, pool, jobs.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/pick":{"get":{"summary":"Best model per dollar for a task (60/min per IP, no key).","parameters":[{"name":"task","in":"query","required":false,"schema":{"type":"string","enum":["code","write","reason","bahasa","any"]}},{"name":"max_cost","in":"query","required":false,"schema":{"type":"number"},"description":"USD per answer"},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["human","house","both"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/mcp":{"post":{"summary":"MCP (Streamable HTTP, JSON responses, read-only).","description":"Tools: pick_model, bench, house_feed, verify_receipt, ledger_hour.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}