How to create API request?

How can i send image file to API?

I want to use API.

1 Like

Use the Web Component.

Set URL as Web URL you Headers should look like this:

blocks (12)

And then use Post or Put File to upload the Image. Make sure you set the whole Image Path.

I can’t send my image file to API.

Test it with „do it“ if it the full path.

The API needs the full Path from you Phone.

What is your android version?

I sent it with full path. but I am getting an interesting error.

[I can use the API with python without any problems.]


Some API I tested can’t do it to on Kodular. I can’t say why it isn’t working in some Cases.

Did you tried to use the ASD Folder?

There are examples made for API 2.0. My method of sending the image must be wrong.

I can do it in 4 lines with python. But I couldn’t do it with blocks. please help. How can I send a file to the API.

import requests, json

ML2 (1).aia (2.8 KB)

Is there any Documentation for your API?

I made ASD Folder.
API error message: BadRequestImageStream

We can help you without API Documentation.

@Ded_Sec_00 Thank you for your interest in the subject.

Microsoft Custom Vision API Documentation:

i think, this API need image in Binary content. but I don’t know how to convert it.


my Dropbox example also uses Content-Type octet-stream and works fine with an image

are you able to display the image in an image component?
make sure the path to the image is correct… try a relative path, for example /DCIM/Camera/... or a full path, for example file:///storage/emulated/0/DCIM/Camera/... (note the 3 slashes…)


yes, i am able to display the image in an image component.
When I add “file://” prefix it gives error 1104.
BadRequestImagStream throws error when “file://” is not prefixed.

I’ve been trying for 1 week. please help me.