Skip to main content

Base URL

http://localhost:3001

Response Format

All endpoints return a consistent JSON envelope:
{
  "success": true,
  "data": { ... }
}
On error:
{
  "success": false,
  "error": "Description of what went wrong"
}

Authentication

Most endpoints are public. Two exceptions:
EndpointAuth Method
GET /report/:idXRPL micropayment (0.05 XRP via X-Payment-TxHash header, disabled if FOUNDER_SEED not set)
POST /xrpl/escrow/:id/releaseAuthorization: Bearer {AGENT_API_SECRET} header

Status Codes

CodeMeaning
200Success
201Created (new resource)
400Bad request / validation error
401Unauthorized
402Payment required (XRPL paywall)
404Resource not found
500Server error

Endpoints at a Glance

Analysis

MethodPathDescription
POST/analyzeSubmit a GitHub URL for AI analysis
GET/report/:id/scorePoll analysis status and scores (free)
GET/report/:idFull report card (XRPL paywalled)

Prediction Markets

MethodPathDescription
POST/market/:reportIdOpen a prediction market
GET/market/:marketIdGet market data
POST/market/:marketId/betPlace a valuation bet
POST/market/:marketId/closeClose market manually

Settlement

MethodPathDescription
POST/market/:marketId/settleSettle market on XRPL + Base Sepolia
GET/safe/:marketIdGet SAFE agreement status from Base
GET/xrpl/statusXRPL wallet and settlement status
POST/xrpl/escrow/:marketId/releaseRelease a vesting escrow

Monitoring

MethodPathDescription
POST/monitor/:reportIdStart monitoring a repo
DELETE/monitor/:reportIdStop monitoring
GET/monitorList all monitored repos
GET/monitor/:reportIdCheck if a repo is monitored