API
API Reference

API Reference

Heron's backend exposes a REST API (FastAPI) that serves the consumer wallet UI and provides programmatic access to vault state, decisions, and pay.sh management.

Base URL

http://localhost:8787/api

Endpoints

Health

MethodPathDescription
GET/api/healthServer health check

Response:

{ "ok": true, "llm": true }

Configuration

MethodPathDescription
GET/api/configVault addresses + chain info for signing

Query params: chain (arc, giwa, solana), wallet (user's address)

Response (Solana):

{
  "program": "BSPwK2zXA4K887pbm5ovxzVQS2rWJAaQkkiEU3TRY632",
  "token": "So11111111111111111111111111111111111111112",
  "mandateRoot": "a1b2c3...",
  "executor": "HeroN...",
  "decimals": 9,
  "vault": "...",
  "asset": "wSOL",
  "assetSym": "◎",
  "network": "Solana"
}

Summary

MethodPathDescription
GET/api/summaryTVL, APY, decision count for a chain

Query params: chain

Response:

{
  "tvl": 1.5,
  "tvlDisplay": "1.5000 wSOL",
  "netApy": 0.89,
  "verifiedDecisions": 12,
  "reservesLive": true,
  "chain": "solana",
  "asset": "wSOL",
  "network": "Solana"
}

Overview (Dashboard)

MethodPathDescription
GET/api/overviewFull dashboard data for a vault

Query params: chain, wallet

Returns: TVL, idle/deployed breakdown, net APY, decision history, allocations, money-flow chart data, and activity feed.


Portfolio

MethodPathDescription
GET/api/portfolioVault positions breakdown

Query params: chain, wallet

Response:

{
  "total": 1.5,
  "idle": 0.5,
  "deployed": 1.0,
  "reservesLive": true,
  "positions": [...]
}

Chains

MethodPathDescription
GET/api/chainsAll chains with aggregate TVL/decisions

Returns multi-chain portfolio view.


Tiers

MethodPathDescription
GET/api/tiersRisk tier presets (safe, balanced, aggressive)

Query params: chain


Portfolio Plan

MethodPathDescription
GET/api/portfolio-planTarget-weight preview for a tier

Query params: tier (safe, balanced, aggressive), chain


TEE Attestation

MethodPathDescription
GET/api/teeCurrent attestation status + metadata
POST/api/tee/verifyRun cryptographic verification
GET/api/tee/downloadFull attestation document (JSON)

Pay.sh Wallet

MethodPathDescription
GET/api/paysh-walletWallet address + USDC balance
POST/api/paysh-wallet/createCreate new pay.sh wallet
POST/api/paysh-wallet/fundGet fund-to address for USDC

Query params: wallet (user's connected wallet address)


Pay.sh Subscriptions

MethodPathDescription
GET/api/paysh-subscriptionsWhich services are enabled
POST/api/paysh-subscriptionsToggle services on/off

POST body:

{
  "wallet": "...",
  "subscriptions": { "vybe-token-price": true }
}

Pay.sh Activity

MethodPathDescription
GET/api/paysh-activitySpending log for a wallet

Query params: wallet


Paid Loop (LLM)

MethodPathDescription
GET/api/paid-loopLLM inference loop status
POST/api/paid-loop/paysh-llm-budgetSet pay.sh LLM spend limits
POST/api/paid-loop/runTrigger paid-inference distribution run

Authentication

Most read endpoints are public. Write endpoints that affect system state require a bearer token:

Authorization: Bearer <HERON_API_TOKEN>

Rate limiting is applied to expensive operations (e.g., paid-loop runs: 5/hour).