What is the underlying API that Appium follows?

The underlying selenium API is followed by Appium so that it can automate test cases. It is said that since all the selenium APIs are present in Appium as well so Appium is an extension to the selenium.