Our API does not require any authentication to be used. However, if your application requires higher rate limits you can request an API key via our partners support system.

Once you have your key you can authenticate all your requests by attaching it in the x-lifi-api-key header:

curl --location 'https://li.quest/v1/quote?fromChain=100&fromAmount=1000000&fromToken=0x4ecaba5870353805a9f068101a40e0f32ed605c6&fromAddress=0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0&toChain=137&toToken=0x2791bca1f2de4661ed88a30c99a7a9449aa84174&slippage=0.03' \
--header 'x-lifi-api-key: YOUR_CUSTOM_KEY'

It is highly recommended to update the key you received from us with a new one using the endpoint below with the attached x-lifi-api-keyheader with the initial key and your integrator string as a parameter in the request body.

curl --url 'https://li.quest/v1/keys/update' \
--header 'Content-Type: application/json' \
--header 'x-lifi-api-key: YOUR_CUSTOM_KEY' \
--data '{"name": YOUR_INTEGRATOR_STRING}'

To test if your authentication works, you can use our helper endpoint:

curl --location 'https://li.quest/v1/keys/test' --header 'x-lifi-api-key: YOUR_CUSTOM_KEY'

It will return a 401 Unauthorized error in case your key is invalid, or your username in case it's valid.