Endpoints
POST | /v1/backup/create | Create a snapshot. Multipart up to 10 MB, JSON body, or raw application/octet-stream. |
|---|---|---|
GET | /v1/backup/list | Point-in-time list. Filter by agent_did and a since/until window. |
GET | /v1/backup/{id} | Download a snapshot. Verifies SHA-256 before sending. Metered. |
POST | /v1/backup/restore | Restore a snapshot, returning JSON with base64 body. Metered. |
GET | /v1/backup/today | Daily counters and the most recent storage-cost roll-up. |
POST | /mcp | MCP 2024-11-05 over Streamable-HTTP / JSON-RPC 2.0. |
GET | /health | Service health, store statistics, and pricing. |
MCP tools
backup_create
Persist a payload up to 10 MB. Returns id and SHA-256 digest. Tier 0 at create; storage is metered nightly.
backup_list
Point-in-time list of snapshots. Filter by agent_did and a created_at window.
backup_restore
Restore by id with SHA-256 verification. Tier 2.
x402 pricing
| Storage | $0.01 USDC | Per GB-month, computed daily from the live byte total per agent_did. |
|---|---|---|
| Restore | $0.05 USDC | Per restore op. Charged on /v1/backup/{id} and /v1/backup/restore. |
| Prepay bundle | $1.00 USDC | Buys an access token; restores draw from the prepaid balance until depletion. |
| Settlement | USDC on Base L2. | |
Quick reference
curl -X POST $HOST/v1/backup/create \
-H 'content-type: application/json' \
-d '{"agent_did":"did:hive:agent-42","name":"state.json","body":{"v":1}}'
curl -i "$HOST/v1/backup/list?agent_did=did:hive:agent-42"
curl -i "$HOST/v1/backup/<id>" \
-H "X-Hive-Access: hive_..."