Skip to main content

Keys, URLs and profiles

One RPC key, saved once in .env, reaches every profile its account has: Lasso’s premium and public pools and each of your Custom profiles. The URL, not a key setting, picks the profile, the strategy and the chain. Use this page to build URLs and scope keys you have to expose.

URL grammar

  • <chain> is a chain name or decimal chain ID from chains and prices.
  • <strategy> is optional; balanced-fast is the default on Premium and load-balanced elsewhere. See routing.
  • <profile> is premium, public or one of your Custom profile slugs. A URL without a profile segment is served by premium.
  • <base>[/profile/<profile>]/provider/<name>/<chain> pins one provider for debugging. Managed providers use their public aliases.
Creating or rotating an unrestricted key returns rpc_url_template and ws_url_template ending in /profile/premium/{chain}; a scoped key’s templates name an allowed profile. Replace {chain} with a chain or <strategy>/<chain> before calling. To use another profile, replace that segment rather than adding a second one.

Scope a key

allowed_profiles sets which profiles a key can name in its URL. It defaults to all: every current and future profile of the account. Scope any key whose URL ships to a browser or mobile app to public, so a copied key can’t spend the balance:
Its rpc_url_template ends in /profile/public/{chain}. A scoped key that names another profile, or a URL without a profile segment when premium isn’t allowed, gets forbidden, listing what it can use. A key scoped to a Custom profile isn’t safe to expose: it serves your providers to whoever holds it, and while a Stripe subscription is past due it’s served and charged as premium. PATCH /api/v1/keys/{id} changes a key’s scope.

How a profile segment resolves

Whether premium is served by premium providers depends on the account’s payment state, not the URL. See serving access and pricing.

Rotate and revoke

POST /api/v1/keys/{id}/rotate issues a new secret and keeps the old one working for an overlap you choose, so deploys catch up with no downtime; see rotate a key. DELETE /api/v1/keys/{id} revokes a key. Every URL Lasso has issued keeps serving, including the older round-robin strategy segment, /rpc/<chain>/<provider> pins and ?key= query parameter, until a form goes 30 days without traffic.

Limits

  • The API returns a key’s secret only on create and rotate. If you lose it, rotate the key or create another; admins can view active keys’ URLs in the dashboard.
  • An account holds at most 100 active keys.
  • premium and public are reserved; Custom profile slugs can’t use them.

Next