What is an API?
The Harvard Chan AI Glossary
In our classes, we often pause to explain the ideas behind AI and the language used to describe it. These posts grew out of those conversations. They’re for anyone who would like to understand AI better, with no technical background assumed.
An application programming interface, usually shortened to API, is an agreed way for one piece of software to request something from another. It specifies what can be requested, which information must accompany the request and what kind of response to expect. The caller does not need to know every detail of how the receiving software works internally.
Think of a postal service. To send a letter, you follow conventions about addressing and postage. You do not need to understand every sorting machine. Similarly, an application can request a weather forecast through an API by supplying a location in the required form and receiving a structured response.
“Structured” means that the information is organized into predictable fields rather than arbitrary prose. A response might contain a location, a temperature and a timestamp. The timestamp records when the information applies. A common format for such exchanges is JSON, a text notation that pairs field names with values.
An API is not necessarily a website meant for people to browse. It is a connection intended for software. A website may use several APIs behind its visible pages, and an AI application may use them to retrieve records, perform calculations or request changes in another system.
Access is a separate question. Authentication checks who is making a request. Authorization determines what that identity is allowed to do. An API key is a credential, rather like a password for an application, and should not be shared casually. Possessing a credential does not make every possible use appropriate.
A successful request also needs interpretation. The server—the software receiving and handling the request—may report an error, return outdated information or confirm only that a job has been accepted. An application should not confuse “request received” with “work completed.”
A clinic assistant might use a tool called “check appointment status,” which communicates with scheduling software through an API. The request needs the correct patient or booking identifier, and the response needs to distinguish confirmed, canceled and unknown states. If a change request is merely accepted for processing, the assistant should not report that the appointment has already changed. The tool is the capability offered to the agent; the API is the software interface used to perform it.
If you would like to find out more about AI and improve your leadership skills, consider the AI in Health Care Certificate of Specialization from the Advanced Learning Academy at Harvard T.H. Chan School of Public Health. You can take an individual course or work toward the full certificate.
AI is a fast-moving field. This explanation reflects our class discussions and related material at the time of writing. Terminology, capabilities and tools may change.
For suggested additions or corrections, please email me at tpanch@hsph.harvard.edu.
Dr. Trishan Panch
Program Director, AI in Health Care
Harvard T.H. Chan School of Public Health — Advanced Learning Academy