What is the Relationship Between SDK and API?
In software development, as the scale of systems continues to grow, it becomes crucial to decompose complex systems into smaller components. Among these, the design of programming interfaces is particularly critical. The primary task of interface design is to reasonably allocate responsibilities within the software system. Good interface design can reduce dependencies between different parts of the system, enhance module cohesion, and lower module coupling, thereby improving system maintainability and scalability. APIs, as a form of interface, play an important role in program interaction, and there is a close relationship between SDKs and APIs.
01 API
(1) The Concept of API
API, which stands for "Application Programming Interface," is a set of pre-defined functions designed to act as an "interface" connecting two different entities. It provides a way for applications and developers to access routines of a software or hardware without accessing the source code or understanding the details of its internal workings.
In essence, an API is a function pre-written by others that can implement specific functionality. You only need to call its methods according to the provided interface and pass the specified parameters, and the function will help you achieve these functionalities.

From the concept of "interface," in the field of computer science, it refers to the place where two different entities interact, which can be two completely different systems or two segments of a program. Therefore, the "I" in interface can be understood in this way. Based on this, the place where humans interact with a program is called UI (User Interface), including all forms of human input, such as mouse, keyboard, touch screen, and voice input, etc. The interaction between programs is called API, and all non-human-to-non-human interactions are conducted through APIs. The essence of this interaction is data transmission and function triggering.
(2) API Classification
APIs are divided into system-level APIs (such as Windows, Linux, Unix, etc.) and non-operating system-level custom APIs. As an effective code encapsulation pattern, Microsoft Windows' API development model has been adopted by many commercial application development companies, and they have developed certain API functions for commercial application systems for release, facilitating third-party functional extensions. For example, APIs developed by Google, Apple, and Nokia, among other mobile phone companies.
APIs are also divided into open APIs and private APIs. As the name suggests, open APIs are interfaces open to everyone, allowing anyone to call and obtain the data behind them. Sometimes companies will use APIs as their public open system, meaning the company establishes its own system interface standards, and all members of the company can call the source code through this interface standard when performing system integration, customization, and program applications. This interface standard is called an open API. Private APIs are interfaces that are not open to the public.
02 SDK
(1) The Concept of SDK
SDK, which stands for "Software Development Kit," is usually a collection of development tools used by software engineers to build application software for specific software packages, software frameworks, hardware platforms, operating systems, etc. In simple terms, an SDK is a toolkit provided by a third-party service provider to implement a certain function of a software product.
SDKs are usually provided by professional companies as a collection of professional services, such as providing Android development tools or services based on hardware development, etc. There are also SDKs for specific software functions, such as push technology, image recognition technology, mobile payment technology, voice recognition analysis technology, etc. In the trend of the Internet's openness, some functional SDKs have been operated as a product.
Developers no longer need to develop every function of the product themselves. They only need to choose a suitable and stable SDK service and spend very little time integrating a certain function into the product.
(2) The Difference Between SDK and API
SDK is equivalent to a development integration tool environment, while API is a data interface. APIs are called within the SDK environment.
In fact, the SDK contains the definition of the API. The API defines a capability, a specification of an interface, and the SDK can contain this capability and this specification. However, the SDK contains not only the API and its implementation, but also a software toolkit that includes many other auxiliary functions.
The SDK includes the materials needed to use the API, so people often refer to the development method of writing Windows applications using only APIs as "SDK programming."




