I am supposed to design a simple REST API(possibly having only one endpoint) which takes an image as the request body does some processing on it and then give back a response .
The processing can be extracting some crop from the image or making some machine learning predictions.
I am thinking of just exposing a POST endpoint for the service. My confusion from all the REST documentation i find on the internet it says that a POST endpoint should return a status code of 201 created if it is created successfully and should not return some data .
I cannot make a GET endpoint since i think technically it is not possible to send data to GET request endpoint.
Can someone guide me what the HTTP verb should be for the endpoint and is it ok to use POST for this .
Many thanks in advance for any answers.