SAPI ( Server Application Programming Interface ) also know as ISAPI ( Internet Server Application Programming Interface) for Microsoft, NSAPI (Netscape Server Application Programming Interface) for Netscape.
API meaning.
For web developer, you can think of API such as REST, SOAP. You call a link you get a data from server. It allows you interact with the web server.
SAPI is different with REST or SOAP, SAPI is API (contract) used for server.
For example: Common Gateway Interface is an SAPI. If a web server support CGI and another executable program implement it so web server can inteface and generate web pages dynamically.
Look the picture below:
![SAPI apache and php]()
mod_php implement an interface which apache and php can understand each other.
So what is SAPI exactly: It is a contract between Server (any kind of server) and the program. Just follow the contract and they don't need to know other side details.