@lifi/composer-sdk and compile it with POST /compose at https://composer.li.quest. The compiled Flow runs atomically in one signed transaction. A flow can also end in a bridge or LI.FI Intents order, and a cross-chain flow can run more steps on the destination chain after the funds arrive. The same mechanism, a continuation, can also run steps later on the flow’s own chain.
Before you start
-
API key. Every compile request needs a LI.FI API key from the LI.FI Partner Portal. The SDK sends it as the
x-lifi-api-keyheader, and requests without a valid key are rejected. Keep the key on your server: compile there and send only the resulting transactions to the browser. The metadata endpoints (GET /compose/manifest,GET /compose/zap-packs,GET /chainsand thellms.txtfiles) answer without a key. -
SDK and spec versions. Install both packages on the same version. These docs target 0.14.0.
- Runtime. The SDK runs on Node.js 24 or later.
-
Base URL. The SDK has no default host. Pass
baseUrl: 'https://composer.li.quest'and yourapiKeytocreateComposeSdk. -
Version check. The SDK sends its version in the
x-lifi-composer-sdkheader. The server rejects an SDK older than 0.5.0 with HTTP 400sdk_outdated: upgrade both packages. It rejects an SDK newer than the server with HTTP 400server_outdated: pin both packages to the server’s version, or wait for the server rollout.
What is a Flow?
A Flow declares its inputs, an ordered list of op calls that pass outputs to later calls, optional guards on those outputs, and an optional epilogue that moves leftover balances off the execution proxy. See Flow Structure for the authored fields and the compile response for whatPOST /compose returns.
Account model
Composer never holds your funds in a shared contract. Each signer gets their own execution proxy:- Deterministic. The proxy factory derives the proxy address from the signer’s address (CreateX
CREATE3), so a signer always maps to the same proxy on a given chain. The SDK exposes it asbuilder.context.executionAddress, and the compile response returns it asuserProxy. - You transact with your proxy. The signed transaction’s
tois your proxy. On the proxy’s first use it is the proxy factory, which deploys the proxy and runs the flow in the same transaction. - Access-controlled. Only the signer can run a flow against their proxy or move its balances.
- Funds stay put by default. Any balance the flow does not move out stays on the proxy. A later flow can spend it, for example with the
balanceOfmaterialiser.
run.sweepTo), or into the escrow of a continuation. See Terminal Resources for what each one moves, and Addresses for the proxy factory address per chain.
Endpoints
All paths are relative tohttps://composer.li.quest:
Machine-readable docs
These paths serve the API documentation for AI agents and coding assistants. They need no API key:Where to go next
Quickstart
One runnable same-chain flow in five minutes.
Build a cross-chain flow
Bridge, then act on the destination chain, with one signature.
Recipes
Runnable flows for common tasks.
Going cross-chain? If you only need to deposit into a supported vault on another chain, the LI.FI API’s cross-chain deposits do it with one quote. See Which cross-chain path?

