Agent Bank is the treasury control plane for agents: spend accounts, wallet funding, approvals, cards, API keys, and ledger-backed audit trails.
Today, the stable public integration surface for Agent Bank is the agent spend REST API on https://api.dino.id/v1.
#What is public today
Use these endpoints with a Dino spending key (Authorization: Bearer din_...):
POST /v1/spendGET /v1/spend/:idGET /v1/balance
You can also subscribe to state changes through Agent Spend Webhooks.
#Recommended integration flow
- In dashboard, fund team wallet and create a spend account.
- Issue a Dino spending key for that account.
- Call
POST /v1/spendwith idempotency. - If
status=needs_approval, route operator to approval UI and wait for webhook. - Reconcile final state in your app using webhook event payload or
GET /v1/spend/:id.
#Example: create spend request
curl -sS -X POST "https://api.dino.id/v1/spend" \
-H "Authorization: Bearer YOUR_DINO_SPEND_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"amount_cents": 25000,
"currency": "usd",
"merchant_name": "OpenAI",
"reason": "model inference for support agent"
}'
#Example: check request status
curl -sS "https://api.dino.id/v1/spend/req_123" \
-H "Authorization: Bearer YOUR_DINO_SPEND_KEY"
#Example: check account budget/balance context
curl -sS "https://api.dino.id/v1/balance" \
-H "Authorization: Bearer YOUR_DINO_SPEND_KEY"
#Core implementation guidance
- Always send
Idempotency-KeyforPOST /v1/spend. - Treat
needs_approvalas pending, not failure. - Use webhooks first, polling second for approval outcomes.
- Never expose spending keys to client-side code.
- Keep LLMs away from raw keys; use a server-side tool boundary.
#Error handling
Expect machine-readable errors (example):
{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded"
}
}
Common codes include:
invalid_api_keyrevoked_api_keyinvalid_requestfunding_source_budget_exceededplan_spend_volume_exceededrate_limited