I'd recommend a design where your http function accepts + validates the work request and enqueues a message to a work queue that another function is listening on. So you'd start from the http trigger template, and add a queue output binding.
This way your request returns immediately, and your long running work can be done in the context of a Queue triggered function. One benefit is that you'll get the retry behavior of queue triggers for free. E.g. if your long running task fails half way through, the message will be reprocessed after some time (queue messages are only deleted from the queue after they are successfully processed).
The separation also gives you more options in the future for how the work is scheduled. E.g. the work could be kicked off via a queue output of another function in the future, w/o requiring an http request.