Create a key
- Register in the Partner Dashboard.
- Create an organization, then create an app inside it.
- Open the app and copy its mainnet or testnet API key.
Select an environment
Layerswap uses the same API base URL for both environments:config.version value must match the key’s environment.
Authenticate an API request
Send the key in theX-LS-APIKEY header:
Use a key with the Widget
LayerswapWidget or LayerswapDepositWidget. See the Swap Widget quickstart for a complete example.
Related resources
- Choose your integration — compare the Widget, Hosted Page, and API.
- Swap Widget quickstart — add the swap flow to your app.
- Build your first API swap — quote, create, fund, and track a swap.
- Partner Dashboard reference — manage apps, API keys, and webhooks.