Start here. This is the direct spoken answer to practice first.
Why this question matters
A queue separates an HTTP request from slow or bursty work, but it also introduces durable job state, repeated delivery, concurrency, backlog, poison messages, and recovery decisions that must be designed explicitly.
I would move the long operation into a durable workflow. The API creates a job record, stores any large input in durable storage, enqueues a message containing the job id, and returns a status endpoint to the client. A worker processes the message, updates job state, stores the result, and records errors. The queue message stays small, and the database or storage record becomes the source of truth.