That is a terrible analogy since the potential conceptual range of APIs is so wide and because it does disservice to the conceptual power of APIs.
Good APIs embody the key architectural and conceptual decisions. They define the key concepts and how they interact. But at the level of a programming language, this is of immense scope and power. Java defines an imperative language with built in garbage collection with abstraction from physical hardware.
Furthermore, the real distinction between API and implementation is that API are that which needs to be exposed to the world.
Programming languages are more akin to defining the fundamental laws of a universe. Physics to chemistry.
It is true that other APIs are of much smaller scope but the point is that the range is so wide.