API reference

The bridge serves accounts, keys and the market. Inference itself goes to the gateway.

Pre-launch

heura targets Robinhood Chain mainnet (chain id 4663) and takes payment in USDG. It is not launched and nothing has been audited. The API address is https://api.useheura.com/v1 and answers today, but only one seller (run by heura) is behind it so far, so do not send real funds until launch is announced.

Conventions

  • JSON in, JSON out. Errors look like {"error":"code"}.
  • Protected routes need Authorization: Bearer <session token>.
  • Money is in US dollars unless a field says otherwise.

Authentication

POST/v1/auth/noncepublic

Body {"wallet"}. Returns {"message"} to sign.

POST/v1/auth/verifypublic

Body {"wallet","signature"} (base64). Returns {"token","wallet"}.

Account

GET/v1/mewallet session

Returns balance_usd, used_usd and your top-up history with transaction hashes.

GET/v1/usagewallet session

Returns recent calls (model, tokens, cost, key label) and daily totals.

Keys

GET/v1/keyswallet session

Masked keys with cap and spend so far.

POST/v1/keyswallet session

Body {"name","limit_usd"|null}. Returns the full key once.

DELETE/v1/keys/{id}wallet session

Revokes a key you own.

Market

GET/v1/marketpublic

Per model: list and best input and output prices (USD per 1M tokens), best discount, healthy and total sellers.

GET/v1/statspublic

Seller counts, number of models, and processed top-ups.

Playground

POST/v1/playgroundwallet session

Body {"model","messages"}. Streams a server-sent-events reply and charges your balance. At most 40 messages, 8,000 characters each, 30,000 in total, ending with a user message. 30 requests per minute.

Selling

POST/v1/sell/applywallet session

Body {"name","endpoint"(https),"models","discount_percent"(5-80),"contact"}. Five per day.

USDG top-up

GET/v1/topup/infopublic

Whether top-up is on, the network (eip155:4663), USDG address, payee, limits and rate.

POST/v1/topup/quotewallet session

Body {"usd"} from 1 to 500. Returns quote_id, network, asset, payTo, decimals (6), amount (atomic USDG), calldata_suffix and an expiry.

POST/v1/topup/claimwallet session

Body {"quote_id","tx_hash"}. Returns credited_usd and tx_hash. The paying wallet must be the signed-in wallet.

x402

GET/x402/infopublic

Whether pay per request is switched on, the scheme, network, USDG address and payee.

POST/x402/v1/chat/completionsx402 payment

Inference (gateway)

POST/v1/chat/completionswallet session

OpenAI chat completions. Authenticate with an API key (sk-…), not the session token. Supports stream. Served from the gateway base URL.