An API contract describes available operations, accepted inputs, returned outputs, errors, and compatibility expectations. Clients call that contract without needing the service's internal implementation. APIs may be local library interfaces, operating-system interfaces, or network services.