An example of what an API written in PHP without using any library or framework (but with OOP, URI routing in the code, dependency injection and friends) would look like.
Pure-PHP arbitrary precision integer arithmetic library.
Pure PHP polyfill for ext/sodium
PHP Secure Communications Library
Pure-PHP implementation to read and write TAR and ZIP archives