image upload API failing


Ask a Question
Back to All

image upload API failing

Dear people,

How do you use the image upload in the visual content moderation API? I mean uploading the data, not publicly hosting it and uploading the URL.

I tried to generate a request via the API docs:

I've downloaded the 1x1 pixel ( and uploaded it via the option "media stream". This generates the following requests on the docs page:

curl --request POST
--header 'Authorization: Token {MY_API_TOKEN}'
--header 'accept: application/json'
--header 'content-type: application/json'
--data '

However, executing the request results in the following error:

"return_code": 400,
"message": "Expected input to be an object, received: data:image/png;name=1x1.png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII= - context: ["image"]"

What is the proper way of using this image upload API? (And could you maybe fix the docs page?)

Thanks in advance!