{"openapi":"3.1.0","info":{"title":"nuza — GPU compute, settled","version":"2.2.0","description":"One live GPU market with two rails: native USDG escrow on Robinhood Chain for browser rentals and x402 USDC on Solana for autonomous agents.","contact":{"name":"nuza","email":"ali@nuza.io","url":"https://nuza.io"}},"servers":[{"url":"https://nuza.io"}],"paths":{"/api/board":{"get":{"summary":"Live GPU offers","responses":{"200":{"description":"Live offers with price, measured machine specs, availability, and reliability."}}}},"/api/quote":{"get":{"summary":"Exact read-only GPU rental quote","parameters":[{"name":"model","in":"query","required":true,"schema":{"type":"string"},"example":"rtx5090"},{"name":"region","in":"query","required":true,"schema":{"type":"string"},"example":"us-east"},{"name":"count","in":"query","schema":{"type":"integer","minimum":1},"example":1},{"name":"seconds","in":"query","schema":{"type":"integer","minimum":60},"example":3600},{"name":"mode","in":"query","schema":{"type":"string","enum":["spot","on_demand"]}},{"name":"image","in":"query","schema":{"type":"string"},"description":"Curated image that a matching live host has reported as built; defaults to the platform image."},{"name":"rail","in":"query","schema":{"type":"string","enum":["robinhood"]},"description":"Browser quotes use Robinhood; Solana rentals use the separately attested x402 endpoints."}],"responses":{"200":{"description":"Per-second micro-USD rate and exact USDG escrow deposit."},"400":{"description":"Unsupported browser settlement rail or invalid quote input."},"404":{"description":"No matching live capacity."},"503":{"description":"The active worker's complete Robinhood chain/code/config/authority proof is absent, stale, or cannot admit this liability."}}}},"/api/rentals":{"post":{"summary":"Create a five-minute Robinhood browser funding quote","responses":{"200":{"description":"Immutable soft quote; no GPU is reserved until a matching Open is verified."},"400":{"description":"Invalid input, unavailable capacity, or unsupported Solana browser rail."},"503":{"description":"Fresh exact Robinhood funding readiness is unavailable."}}}},"/api/rentals/{id}/topup":{"get":{"summary":"Preflight a Robinhood top-up before approval or send","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"seconds","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Exact runtime increment the browser intends to fund."}],"responses":{"200":{"description":"Top-up is currently admissible under the fresh worker proof and contract limits."},"503":{"description":"Do not send: fresh exact Robinhood funding readiness is unavailable."}}},"post":{"summary":"Reconcile a Robinhood top-up that already landed","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Observed chain max/deposit were applied monotonically. This callback remains available after readiness changes."},"400":{"description":"No matching landed top-up was observed or the rental is not extendable."}}}},"/api/v1/pricing":{"get":{"summary":"Stable public pricing feed","responses":{"200":{"description":"Per-model live prices, regions, capacity, Robinhood network, asset, and fee."}}}},"/api/v1/settlements":{"get":{"summary":"Public settlement ledger","responses":{"200":{"description":"Conserved settlement splits with per-row chain and explorer receipt."}}}},"/api/v1/work":{"get":{"summary":"Work-credit policy and fail-closed season state","responses":{"200":{"description":"Eligibility gates, organic GPU-second proof, and provisional epoch totals."}}}},"/api/x402/quote":{"get":{"summary":"x402-payable live GPU quote on Solana","responses":{"200":{"description":"Quote after a valid USDC payment."},"402":{"description":"Solana USDC payment challenge."}}}},"/api/x402/rent":{"post":{"summary":"Open a private GPU sandbox with one x402 payment","parameters":[{"name":"X-Nuza-Recovery-Secret","in":"header","required":false,"description":"Recommended client-generated 32-byte base64url secret for lost-response recovery. If omitted, the successful response returns a generated recoverySecret to store privately.","schema":{"type":"string","minLength":43,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sshPubkey":{"type":"string","description":"Complete OpenSSH public-key line controlled by the caller."},"model":{"type":"string","default":"rtx5090"},"region":{"type":"string","default":"us-east"},"count":{"type":"integer","minimum":1,"default":1},"seconds":{"type":"integer","minimum":60,"default":3600}},"required":["sshPubkey"]}}}},"responses":{"200":{"description":"Reserved rental ID and bearer capability after payment."},"400":{"description":"Invalid SSH public key, JSON body, or optional recovery-secret header."},"402":{"description":"Exact Solana USDC rental-deposit challenge."},"503":{"description":"x402 unavailable or the funding worker's complete Solana readiness tuple is not freshly attested."}}}},"/api/x402/rentals/{id}/run":{"post":{"summary":"Queue one bounded command inside an active paid GPU sandbox","security":[{"rentalCapability":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string","minLength":1,"maxLength":16384},"timeoutSeconds":{"type":"integer","minimum":1,"maximum":900,"default":120}},"required":["command"]}}}},"responses":{"200":{"description":"Idempotent replay of an existing run job."},"202":{"description":"New durable run job queued."},"404":{"description":"Rental capability is invalid."},"409":{"description":"Rental/host cannot run the job or another job is pending."}}}},"/api/x402/rentals/{id}/run/{jobId}":{"get":{"summary":"Read bounded run-job status and terminal output","security":[{"rentalCapability":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Job state; terminal states include capped stdout/stderr and exit status."},"404":{"description":"Rental capability or job ID is invalid."}}}}},"components":{"securitySchemes":{"rentalCapability":{"type":"http","scheme":"bearer","description":"Rental-scoped capability returned once by the paid x402 open call."}}}}