Documentation Index
Fetch the complete documentation index at: https://agents.laso.finance/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Laso Finance API uses two authentication mechanisms:- x402 payment headers — For paywalled endpoints (
/auth,/get-card,/order-gift-card,/get-push-to-card). Your wallet address is extracted from the payment header to identify you. No API key needed. - Bearer tokens — For free authenticated endpoints (
/get-card-data). Pass anid_tokenas aBearertoken in theAuthorizationheader.
Getting tokens
CallGET /auth (costs $0.001 USDC) or GET /get-card to receive auth credentials:
| Field | Description |
|---|---|
id_token | Firebase ID token. Use as Bearer token for authenticated endpoints. Expires after ~1 hour. |
refresh_token | Long-lived token for getting new id_tokens without paying again. |
expires_in | Token lifetime in seconds (typically 3600 = 1 hour). |
user_id | Your user ID, derived from your wallet address (lowercased). |
Using tokens
Pass theid_token as a Bearer token in the Authorization header:
Refreshing tokens
When yourid_token expires, use POST /auth with grant_type: "refresh_token" to get a new one. This is free — no x402 payment required.
Token lifecycle
Getting a login link for humans
If a human wants to see what their agent has been doing (cards, transactions, balances), useGET /get-auth-link to generate a one-time login URL:
auth_url in a browser to log in to the Laso Finance dashboard as that user. The link expires after a short time, so generate a new one if needed.
How wallet identity works
Your identity in the Laso Finance system is your wallet address:- You call a paywalled endpoint with an x402 payment header
- The server extracts your wallet address from the payment header
- If it’s your first time, an account is created automatically
- Your
user_idis your wallet address (lowercased) - All tokens and cards are tied to this wallet address