Yeah, that's true, but it's also true that you're
always building on someone else's API. I mean, even if you build a native desktop application, you're still relying on Windows, Linux or OSX APIs. Granted, those APIs tend to be more stable than the APIs for mobile clients and web clients, but it's not like there haven't been painful breaking changes on that front either.
So what's your solution? Write everything in assembly and run it on your own servers?
I think the way to proceed is to look at the stability of the API and the historical level of backwards compatibility that the API creator has provided and explicitly take that into account when you're developing an application. This is one of the things that Microsoft does very well, better than Linux (where GUI APIs, especially, seem to mutate every few years) and OSX. In general, though, any desktop API is much better, in terms of maintaining backwards compatibility and announcing breaking changes, than any mobile (iOS, Android, etc.) API, and mobile APIs, in turn, are better than web APIs. This isn't a case for never using mobile or web APIs, but it is a case for ensuring that you have enough resources (or a loose enough timeline) to deal with API churn as well as developing new features.
The only way to get away from APIs entirely is to write your own code, run it on your own OS, using custom hardware that you've designed yourself. That way lies madness, or, equivalently, game console programming ;)