Loading page
Read your keys, fill and earnings, and reprice keys from a program with a lender API token instead of the /lend page.
Sign in to /lend with your wallet and open API tokens at the bottom of the page. A token always reads; tick "Allow price changes" to let it reprice keys too, and set a floor factor it can never go below. The token is shown once, so store it as a secret. You can hold five at a time and revoke any of them from the same list; a revoked token stops working on its next request.
curl https://api.gondola-ai.com/v1/lender/keys \
-H "Authorization: Bearer $GONDOLA_LENDER_TOKEN"The same figures /lend shows: avail_diem is what the router gates on, fill is the estimated share of the routing draw at your factor, and size_fallback: true means the estimate was computed for a small request because nothing could serve a typical one.
{
"as_of": "2026-10-19T12:00:00.000Z",
"data": [{
"id": "clx...", "label": "Main", "status": "ACTIVE", "status_reason": null,
"pricing_factor": 0.5, "avail_diem": 41.2, "capacity_today": 60,
"sold_today_diem": 18.8, "avg_daily_diem_7d": 52.1,
"fill": { "reason": "routing", "share": 0.31, "in_tier": false,
"size_diem": 1.3, "size_fallback": false }
}]
}curl -X PATCH https://api.gondola-ai.com/v1/lender/keys/$KEY_ID \
-H "Authorization: Bearer $GONDOLA_LENDER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"pricing_factor": 0.45}'Needs a token with price changes allowed. The body takes pricing_factor only, between your token's floor and 0.98. Below the floor answers 400 below_token_floor, and each key takes at most 4 price changes per 10 minutes (429 with retry-after).
curl "https://api.gondola-ai.com/v1/lender/earnings?limit=50" \
-H "Authorization: Bearer $GONDOLA_LENDER_TOKEN"
# next page: pass the next_cursor from the previous response
curl "https://api.gondola-ai.com/v1/lender/earnings?limit=50&cursor=$NEXT_CURSOR" \
-H "Authorization: Bearer $GONDOLA_LENDER_TOKEN"One row per settled request, newest first: what you were credited after a platform fee of up to 2%, with add-ons reimbursed in full. No buyer identity is ever included.
curl https://api.gondola-ai.com/v1/lender/balance \
-H "Authorization: Bearer $GONDOLA_LENDER_TOKEN"
{ "data": { "withdrawable_usd": 12.34, "min_payout_usd": 1, "usd_per_diem_sold_30d": 0.41 } }Each token gets 120 requests per minute (429 with retry-after past that). Errors use the OpenAI shape, {"error": {"type", "code", "message"}}; switch on code. Responses are never cached. Call the API from a server: it sends no CORS headers.