Skip to content
Documentation menu

Quickstart

Connect a wallet, fund a balance, create a key, route a request through the market. About five minutes.

1. Connect your wallet

Open /sign-in and connect a Solana wallet (Phantom, Solflare, or any wallet-standard wallet). You sign a short message to prove you own the address. The signature is free — it is not a transaction.

A workspace is created for new wallets automatically.

2. Fund your balance

Go to Funding, enter an amount in USDC, and approve the transfer in your wallet. The page shows the network (devnet or mainnet) and tracks the deposit through Prepare → Await signature → Submitted → Confirming → Credited. Funds are spendable only once the transfer reaches the configured finality.

3. Create an API key

On API keys, create a key with the scopes it needs (for most integrations: tools:execute, usage:read, balance:read). Optionally set a monthly budget and a per-request ceiling.

Copy your key now. You won’t be able to view it again.

Keys look like lcl_live_<kid>.<secret>. Only the prefix is shown afterwards.

4. Route your first request

Native routes go through the market first: the cheapest healthy offer for the provider serves the request, and the in-house catalog route is the fallback. A Solana RPC call needs the rpc:execute scope:

bash
curl https://api.uselocal.sh/v1/rpc/solana \
  -H "Authorization: Bearer $LOCAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getSlot","params":[]}'

The response carries X-Local-Route: market (an offer served it) or fallback (the in-house route did), X-Local-Offer and X-Local-Units next to the usual charge headers. The default policy is market_first; change it on Settings → Routing. Details in Market routing.

Catalog tools are called directly. Pick one from the catalog, then execute it with an Idempotency-Key and a ceiling:

bash
curl https://api.uselocal.sh/v1/tools/{provider}/{slug}/execute \
  -H "Authorization: Bearer $LOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"input": { ... }, "max_charge_usd": "0.05"}'

The response carries the data and a receipt:

json
{
  "request_id": "…",
  "status": "succeeded",
  "tool": "{provider}/{slug}",
  "tool_version": "…",
  "data": { ... },
  "billing": { "state": "captured", "reserved_usd": "0.05", "charged_usd": "0.018", "currency": "USD", "final": true }
}

Headers X-Local-Request-Id, X-Local-Charged-Usd and X-Local-Billing-State repeat the receipt for logging.

Next

  • Market routing — routing policy, headers, fallback and fees.
  • Selling capacity — list the plan capacity you will not use.
  • Requests & billing — quotes, idempotency, receipts and billing states.
  • Errors — every error code and whether it is retryable.
  • SDK — a typed client for TypeScript.