Answer the question
In order to leave comments, you need to log in
How to send photo api correctly?
For practice, I am writing a python bot that makes a comic out of photos (I use this service ). There is no official api with documentation, but I found a working version on github on typescript .
Generally. I need to send a photo to the address https://face.bubble.ru/_api/face, but when I try to send it says
b'{"errors":[{"title":"Validation error","detail":"Image should be set","status":"422","code":"6"}]}\n'
file = open("test.jpg", "rb").read()
data = {"image": file}
result = requests.post("https://face.bubble.ru/_api/face",
data=data).content
print(result)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question