Writing code takes time so instead of writing a code, you can use an API that can do the required done.
For instance, if you want to detect faces in a picture. You will need to learn face detection in a language that supports it and then perform the task. You may need to write different codes for mobile, web and desktop.
In case of an API, you will just have to pass your picture to an API URL and in response, you will get the required result.
In our case, we respond you back with the count of faces in the provided picture and a picture with squares drawn around the faces.