Image processing through API works on the principle of sending the image via HTTP request and getting a response with the result (contains Context by default, but there are also other response types available). Only one image can be sent per request.
...
Query parameter ‘response_type’ determines what content will be sent in the response that is returned from PEKAT VISION after processing the request. The request url changes in the following way (example for annotated_image response type):
Code Block | ||
---|---|---|
| ||
response = requests.post( url='http://127.0.0.1:8000/analyze_image?response_type=annotated_image', data=image.read(), headers={'Content-Type': 'application/octet-stream'} ) |
...