Using the python module fastAPI, I can\'t figure out how to return an image. In flask I would do something like this:
@app.route(\"/vector_image\", methods=[
It's not properly documented yet, but you can use anything from Starlette.
So, you can use a FileResponse if it's a file in disk with a path: https://www.starlette.io/responses/#fileresponse
If it's a file-like object created in your path operation, in the next stable release of Starlette (used internally by FastAPI) you will also be able to return it in a StreamingResponse.