API to upload images for labeling

For the training part, when I need to upload images to then label them,
Is there an API that allows me to upload images for labeling using a script instead of using the browser?