The Hubra Agent API is an HTTP surface that does what the Hubra app does, by JSON. Reads are public. Writes return unsigned Solana transactions that the caller signs locally with their own keypair, then submits viaDocumentation Index
Fetch the complete documentation index at: https://docs.hubra.app/llms.txt
Use this file to discover all available pages before exploring further.
/broadcast. Hubra never holds a key.
No API key. No sign-up. No database. The on-chain signature on the actual transaction is what authorizes the user’s intent.
What it is
A thin REST layer over the same server actions that power the human Hubra app. There is no second source of truth: when an agent stakes 1 SOL viaPOST /api/v1/stake, the underlying mechanism is identical to a human clicking “Stake” in the UI.
Auth model
There is no API key. There is no sign-up. Every endpoint accepts requests from any caller. Authorization comes from the on-chain signature on the actual stake transaction. If the wallet that signed the transaction does not own the assets being staked, the chain rejects the transaction. The HTTP layer adds nothing beyond that. If you want to attribute requests to a wallet for future loyalty/points, sendX-Hubra-Wallet: <pubkey> as a header. It is optional and currently informational only.
Base URL and versioning
/api/v1. Breaking changes ship as /api/v2.
Every response includes the header:
Conventions
| Content type | application/json on requests and successful responses |
| Error type | application/problem+json (RFC 9457) |
| Amounts | Decimal strings ("1.5"), never floats |
| CORS | Permissive Access-Control-Allow-Origin: * on read endpoints |
Strategy keys
The four canonical paths:| Key | Status | Asset | Description |
|---|---|---|---|
sol-native-stake | live | SOL | Direct delegation to Hubra’s validator |
sol-liquid-stake | live | SOL | Mint raSOL via Sanctum |
usdc-earn | live | USDC | Voltr-routed USDC vault |
GET /api/v1/strategies.
End-to-end flow
The hubra_token gate
/stake and /unstake responses include a hubra_token (an HMAC over the unsigned transaction’s message bytes). /broadcast requires this token; without a matching token, it rejects the request.
This prevents /broadcast from being used as a free Solana RPC for arbitrary transactions. Tokens are valid for ~2 minutes (matching Solana’s blockhash window). Rebuild via /stake or /unstake if expired.
For Sanctum-routed flows, you also need to forward sanctumKind and sanctum_order from the build response to /broadcast. See Hubra token for the full mechanics.
What’s next
Quickstart
First request to first stake transaction.
Conventions
JSON, errors, decimals, CORS.
Strategies
The strategy registry.
Stake
POST /api/v1/stake reference.