> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lasso.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Trial your own providers behind Lasso

> Put the provider accounts and nodes you already use behind one Lasso URL, from a provisional account, before anyone signs up

# Trial your own providers behind Lasso

An agent can put your existing provider accounts and nodes behind Lasso,
prove it works on your app's real traffic, and hand you the result, all before
anyone signs up. This guide builds a Custom profile from a provisional
account, routes the app's key over it, and verifies failover.

## 1. Create an endpoint

```bash theme={null}
curl -sS https://lasso.sh/api/v1/keys \
  -H 'content-type: application/json' -d '{"name":"prod"}'
```

Put `rpc_url_template` in the app's secret store. The profile steps below use the
response's `management_token`, which makes you the account's agent.

## 2. Dry-run the profile

List the provider URLs the app already uses. A dry run checks each provider's
chain identity and stores nothing, so it needs no payment:

```http theme={null}
PUT https://lasso.sh/api/v1/profiles/prod-base?dry_run=true
Authorization: Bearer <management token>
Content-Type: application/json

{"name": "Production Base", "chains": {"base": {"providers": [
  {"name": "primary", "url": "<existing primary RPC URL>"},
  {"name": "backup",  "url": "<existing backup RPC URL>"}
]}}}
```

Each provider comes back `verified`, `verifying` (didn't answer yet) or
`failed` (wrong chain). Fix any failure before you pay. Start with URLs only;
add `limits` only for a cap you know, such as your plan's log span. Lasso
learns the rest from traffic.

## 3. Custom access for the trial

Holding a profile needs Custom access, but a provisional account that has
never had it gets seven free days the moment it saves its first profile below
— no payment needed for this trial. `GET /api/v1/accounts/{account_id}` shows
when they end under `subscriptions`, and the profile's `trial_ends_at` gives the
same time.

If this account already used its free days, or the trial needs longer than
seven days, buy more with the user's wallet, within their approved budget:

```http theme={null}
POST https://lasso.sh/api/v1/accounts/{account_id}/custom-access
Content-Type: application/json

{"days": 7}
```

The 402 exchange is the same as a balance top-up: sign one x402 or MPP
challenge and repeat the request with it. The per-day price and day range are
in [`agent.json`](https://lasso.sh/agent.json). Traffic on your own providers
has no request price.

## 4. Save it and route the key over it

Repeat the `PUT` without `dry_run`. Then point the app at the profile's URL:
use the template's base with `/profile/prod-base` in place of `/profile/premium/{chain}`.

```bash theme={null}
LASSO_RPC_URL=https://lasso.sh/rpc/k/<key>/profile/prod-base
```

## 5. Verify on real traffic

```bash theme={null}
curl -fsS --retry 5 -D - "$LASSO_RPC_URL/fastest/base?include_meta=body" \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
```

Confirm `x-lasso-access: custom` and a `selected_provider` from your list.
Then run the app's own reads, its largest `eth_getLogs` range and any
historical queries through the profile. Compare latency, errors and head
freshness with the direct provider URLs.

To see failover, pin each provider once with
`$LASSO_RPC_URL/provider/primary/base`, then watch which
provider serves the unpinned URL while one of them is throttled or down.

## 6. Hand it over

Give your user the `claim_url` from the response that created the account,
privately. If it expired, request a replacement:

```http theme={null}
POST https://lasso.sh/api/v1/accounts/current/claim-link
Authorization: Bearer <management token>
```

When they claim it, the profile, its Custom access, the key and its URL come
with it. If they add it to an account that already has a `prod-base` profile,
the incoming one is renamed and the app's URL keeps reaching it.

## Choose behavior for your workload

| Requirement | Profile setting | URL strategy |
| - | - | - |
| Responsive current reads | Two or more providers | `fastest` or `balanced-fast` |
| Latest block never goes backwards | `block_protection: true` | Any |
| Several values from one block | Nothing; use [read at one block](https://docs.lasso.sh/advanced/read-at-one-block.md) | Any |
| Subscriptions survive a provider outage | `ws_url` on at least two providers | Any |
| Preferred primary with a backup | Primary first in the list | `priority` |

## Limits

* Custom access is per account and covers up to five Custom profiles. When the
  trial's days run out, the profile is kept and its URLs return HTTP 402
  `custom_access_expired`, with a `next_action` that says how to buy Custom,
  until access is renewed. Nothing is charged to the balance.
* Two URLs on the same provider account, region or plan can fail together.
  Test the failure you need to survive.
* A dry run checks chain identity only. Archive coverage, WebSocket support and
  method coverage come from testing and from what Lasso learns over time.
* Your upstream providers still bill you for the traffic they serve.

## Next

* [Custom profiles](https://docs.lasso.sh/cloud/custom-profiles.md): every field and what Lasso
  learns.
* [Routing](https://docs.lasso.sh/cloud/routing.md#trial-it-against-your-current-endpoint): decide
  whether the trial worked.
* [Accounts, people and agents](https://docs.lasso.sh/cloud/accounts-and-agents.md): what the claim
  does.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.