The API number is coded in the manifest.xml file, with the USES SDK code element as shown in the example code on this
page. Where it says integer, simply replace that with the API number.
To find the API required for a code class your using, just look at the page at the android developer website for that particular code class. It is shown in the top right of the page. For example; goto this link, for the code class VIEW, and you can see the API for VIEW class was added at API 1.
You should code at least the MinSDK version and the TargetSDK version. This will ensure that users can only run your app if they a compatible version of the platform, and also, that they your app will run without issue on their device.
For example: if the code you add to your app requires API 14, and your device (tablet) is android platform 4 then the code should run without issue on your tablet because platform 4 is api 14. View all platforms and corresponding APIs here That API number is the required android:minSdkVersion. Add that number to the manifest.xml USES-SDK code element - android:minSdkVersion. If you do not declare the minSDKVersion, the system assumes that the required API for your app is 1.
For example: if your app is using the latest platform, but does not specify such in the SDK USES in the manifest.xml file AND the app is installed on a device that DOES have the latest platform; the app will work. However, when the same app trys to install on earlier versions of an android platform, it will crash because it does not have access to the required APIs.
For additional reading on APIs