For this use case we have the /v1/quote/contractCall endpoint, which accepts the callData you want to execute along with the gas needed for that call and the amount of tokens on the destination chain. We then calculate internally how many token are needed on the source chain.
https://docs.li.fi/more-integration-options/li.fi-api/requesting-a-quote/xchain-contract-calls