An API contract is a definition of the functionality that an API provides, including the inputs it accepts, the outputs it returns, and the behavior.
The API contract is more of a promise than a contract. You tell the API consumers how the API is going to work and they don't have much to do other than trust you.