Need to send a file for an API endpoint and use the response

Hello fellow Hazlers!
I need to send a file to an OCR API endpoint which will process it and send me a response which I'll use to rename the file.
I know how to do it in cURL, but apparently Hazel can't use shell scripts' response later. Am I right? Do you have any suggestions on how to do it in another way?
I need to send a file to an OCR API endpoint which will process it and send me a response which I'll use to rename the file.
I know how to do it in cURL, but apparently Hazel can't use shell scripts' response later. Am I right? Do you have any suggestions on how to do it in another way?