What is an SDK?
SDKs contain the tools and instructions for developers to build applications within a standardized operating system, environment, or development process. For example, to build Android mobile apps, a developer would get the Android SDK, to build ios mobile apps, the developer would get the ios SDK. An SDK contains a standard set of tools for a specific platform or use case, similar to buying Lego building blocks to build the model depicted on the box.
What's in an SDK?
- Code Libraries - This is raw code that software developers usually need to download and use. Including the libraries saves time, and means the included code will play nicely with itself.
- Application programming interfaces (APIs): These are interfaces that allow the application to connect easily to other web applications via the API interface.
- Integrated development environment (IDE): This is the interface through which developers do their programming. It includes a compiler, which translates the high-level programming language of the SDK's source code into a lower-level language that can be used to build applications.
- Documentation and code samples: This tells developers how to use the code, and includes examples.
- A debugger: Language-specific debugging automatically corrects minor errors.
What is an API?
An API, or Application Programming Interface, is a set of rules that define how computers and applications can communicate with each other. If you recall the old switchboards that operators used to field phone calls to their destinations, APIs are a little like that. A client makes a request to an API at an endpoint which it has access to. The API validates the request and passes the request to the destination server or program. The server sends a response back, first through the API, which then transfers it back to the client.
What's in an API?
At the heart of RESTful APIs is the contract between client and server. This contract defines what the API will do and what kind of requests and responses it will issue. If you call the API, you must do so in a way that it understands, and you must be able to accept its responses, also. An example of an API contract can be seen here. You can see the APIs URLs, verbs, HTTP responses, and contract statuses- all the rules of interacting with this API are defined in the contract. For more on contracts, check out the Open API spec.
SDK vs API
An SDK may contain APIs, but APIs do not contain SDKs. A developer who wants to develop a new application for a specific platform would be best served with that platform's SDK. If they already have an application that just needs a certain functionality- for example, an IP geolocation feature- an API would serve their needs.
How do SDKs and API relate? Well, consider what service SDKs provide to programmers. SDKs provide the building blocks and tools to construct a software product, and as web developers know, software isn't built in isolation. SDKs allow programmers to communicate with resources via the APIs, drawing in functions as they are needed without having to build everything from scratch. SDK APIs also ensure developers are receiving up-to-date resources and employing them correctly within their environment.
SDK vs API Example
A recent example of SDKs and APIs is the new Android Game Developer Kit, or AGDK. This is a SDK specially tooled for- you guessed it- Android game development. It includes:
- A code extension for coding Android apps in C++
- Game engine integrations for Godot, Unity, Unreal, etc.
- Game engine plug-ins, for things like Unity engine, performance tuning, and virtual reality
- C/C++ game libraries
- GPU Optimization tools
The AGDK includes other tools, but you can see in this example what this SDK is all about: encouraging game development in Android by providing developers the tools they might need. In the AGDK documentation there is information on the `GameTextInput` REST API. This API displays the soft keyboard, sets or gets the currently-edited text, and receives notifications when the text is changed, all without the developer having to write a keyboard function from scratch. Actually using this API is outside the scope of this article, but as you've seen, the `GameTextInput` API is called from the SDK if the developer decides its function would solve a problem for their Android application. The API exists only as a contract and interface for the SDK to access resources.
Conclusion
SDKs include APIs in their libraries for added functionality beyond the included development tools, while still keeping developers inside of the development environment. APIs provide functions without developers having to write code from scratch to solve common problems. This helps companies extend their reach with developers, so an SDK is both a technical product and a marketing product, part of the developer experience, or DX. The more developers happily building games in Android, the happier Google will be. Devkits provide API solutions to make developers' lives easier on their platform, which will persuade developers to adopt the technology.
Frequently Asked Questions
What is the difference between an SDK and an API?
An API is a communication contract that defines how two applications exchange data: it specifies the requests you can make and the responses you'll get back. An SDK is a full toolkit for building on a specific platform, and it typically bundles libraries, documentation, debuggers, and often one or more APIs. The short version: an API is an interface; an SDK is a development environment.
Can an SDK contain an API?
Yes: SDKs commonly include APIs as part of their package, but the reverse is not true. An API is a standalone interface and does not ship with the broader tooling (compilers, code samples, debuggers) that an SDK provides. When a company releases an SDK, it usually wraps its own API to make integration faster for developers targeting that platform.
When should I use an SDK instead of an API?
Choose an SDK when you are building a new application for a specific platform (for example, using the Android SDK or iOS SDK to create a mobile app). The SDK keeps you inside a structured environment with pre-built components so you are not writing everything from scratch. If you only need to add a discrete, self-contained feature (such as IP geolocation or currency conversion) to an existing application, calling the API directly is usually simpler.
Are SDKs language-specific?
Generally yes. An SDK is designed to work with a particular programming language or runtime environment, which is why developers working in different languages typically need different SDKs. APIs, by contrast, can be language-agnostic: a REST API, for example, can be called from Python, JavaScript, PHP, or any language that can make HTTP requests.
Do I need an SDK to use an API?
No. APIs can be called directly using standard HTTP libraries or tools like curl without any SDK. An SDK just makes API consumption more convenient by handling authentication boilerplate, serialization, and error handling for you. If speed of integration matters more than minimal dependencies, using a vendor-provided SDK wrapper around their API is usually the faster path.
What are real-world examples of SDKs and APIs?
The Android SDK and iOS SDK are classic platform SDKs: they include everything a developer needs to build and ship a mobile app. Game developers use SDKs like the Android Game Developer Kit (AGDK) or engines like Unity and Unreal. On the API side, a REST API such as one for IP geolocation or email validation is a focused interface that any application can call to fetch or verify data without requiring a full SDK install.


