Application layer

The application layer is the seventh level of the seven-layer OSI model. It interfaces directly to and performs common application services for the application processes; it also issues requests to the presentation layer.

In the Open Systems Interconnection (OSI) communications model, the application layer provides services for an application program to ensure that effective communication with another application program in a network is possible. The application layer is not the application itself that is doing the communication. It is a service layer that provides these services:

Makes sure that the other party is identified and can be reached
If appropriate, authenticates either the message sender or receiver or both
Makes sure that necessary communication resources exist (for example, is there a modem in the sender’s computer?)
Ensures agreement at both ends about error recovery procedures, data integrity, and privacy
Determines protocol and data syntax rules at the application level
It may be convenient to think of the application layer as the high-level set-up services for the application program or an interactive user.

Application programming interface (API)

An application programming interface (API) is a source code interface that an operating system or library provides to support requests for services to be made of it by computer programs. Advanced programming interface is a near synonym with wider application that predates the current common usage. In the original term the concept is meant to represent any well defined interface between two separate programs. The main difference is that this older term does not inculcate a parent-child relationship and can therefore be applied to peer-to-peer situations more logically, e.g. internal kernel services which can present themselves as separate programs.

API versus ABI

An API is similar to an application binary interface (ABI) in that both specify details of how two independent computer programs can interact. However, an API is typically defined at a higher level (i.e., in terms of a programming language that can be compiled when an application is built, rather than an explicit low level description of how data is laid out in memory). For example, the Linux Standard Base is an ABI, while POSIX is an API.