Next time I say API or HMI, this is what I mean

Have you ever used a torch and a battery? If yes, you are not that far away from understanding what an API and an HMI is.


API stands for Application programming Interface. And since it is an interface, let’s understand what an Interface is.

In computing, an interface is a shared boundary across which two or more separate components of a computer system exchange information.

- Wikipedia

Or in simpler terms, Interface is the medium through which two systems interact.

In the context of computers, those two systems can be humans and software. Based on this difference, interfaces can be HMI and API.

HMI (Human Machine Interface)

An interface used by humans to interact with any software is an HMI. HMIs can be of various types. A Command Line Interface, a button on your laptop to mute the mic, or a desktop software with clickable buttons (Graphical User Interface) are all HMIs.

API (Application Programming Interface)

Unlike HMIs, APIs are interfaces used by software to interact with software. APIs exist to use existing software solutions in other software. API is more of a communication standard than the actual software itself. Because of that, the actual implementation of the software is abstracted, and developers get a structured and easy-to-use interface.

Torch and Battery

If you want a simple way of remembering things, let me give you an analogy of a torch and a battery.

A battery itself is a tool that provides electricity. Its terminals are the interfaces. You can take a bulb and connect it to the battery terminals, and you’ll have a lit bulb. In this case, you are directly interacting with the battery.

Now let’s take the case of a torch. It is a circuit with a bulb and a power source. For the power source, you don’t have to build a battery by yourself. You can take a battery made by someone else and put it in the torch. In this case, you are not directly interacting with the battery. You are interacting with the torch, and the torch is the one using the battery. And for the torch maker, they don’t have to know how a battery works. They use a third-party battery for the torch.

In the above analogy, both torch and battery are like individual software. Except battery is like software used by both humans and other electronic devices. When used alone battery’s terminals act like an HMI, and when used with a torch, the terminals act like an API.


Unlike the above analogy, HMIs and APIs will not be in the same form. While HMIs are for end users, programmers and engineers are the usual users of APIs. For that reason, unlike HMIs which are easy to use and attractive, APIs will be light, experience-demanding, and text-based.