CLI tool
Stability-AI/stability-sdk avatar
Stability-AI/stability-sdk

stability-sdk: a Python client for Stability AI's generation APIs

SDK for interacting with stability.ai APIs (e.g. stable diffusion inference)

2,433 stars338 forksJupyter NotebookMIT

At a glance

What is it?
stability-sdk is the MIT-licensed client library for calling Stability AI's APIs, including Stable Diffusion image generation, from Python. It wraps the platform's endpoints and needs a Stability API key; its tagged releases are older than its last commit, so check currency against the platform docs.
Who is it for?
Adopt stability-sdk if you want to call Stability AI's hosted generation APIs from Python with a ready client and example notebooks, and you have a Stability API key and accept per-request costs. Do not expect offline generation or guaranteed coverage of the newest platform features, since its tagged releases predate recent platform changes.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 126 days ago.
What is it written in?
Mainly Jupyter Notebook, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What stability-sdk is for

stability-sdk is the client library that talks to Stability AI's hosted APIs from Python. Rather than generating images on your own hardware, it sends requests to Stability's platform, which runs the models and returns results, so the SDK is the convenience layer between your code and those endpoints. The README frames it plainly as client implementations that interact with the Stability API, with example notebooks including a Colab demo and Stable Image and SD3 notebooks. The audience is developers who want to call Stability's generation services programmatically and would rather use a maintained Python client than hand-roll HTTP or gRPC calls. Because it is a client for a hosted service, it presupposes a Stability account and API key, and it does nothing locally beyond formatting requests and handling responses; the generation happens on Stability's side.

A client over the platform's endpoints

The mechanism is a thin client with helpers for the platform's request and response formats. The SDK handles authentication with your API key, constructs the calls Stability's endpoints expect, and returns the generated images or other outputs, with example notebooks demonstrating flows such as Stable Image and SD3. It has historically used gRPC alongside the platform's interfaces, which is why grpcio appears among its dependencies, and it ships an optional extra for an animation UI. The practical point is separation of concerns: your program describes what it wants, the SDK marshals that into a valid request, and Stability's servers do the compute. That makes it fast to integrate and keeps you off the model-hosting treadmill, at the cost of every generation being a network call to a paid service rather than a local run.

Getting a key and installing

Using stability-sdk starts with an API key: you follow the authentication instructions on Stability's platform to obtain one. Then you install the package from PyPI:

bash
pip install stability-sdk

An optional extra pulls in the animation user interface if you need it, installed as stability-sdk with the anim_ui extra. With the package installed and your API key set, you import the client and issue a generation request, and the README's Colab and notebook examples are the fastest way to see a working call end to end. The first real use is running one of those notebooks or a minimal script that authenticates and requests an image, which confirms your key and connectivity before you build anything larger on top.

Where a hosted-API client has limits

The limitations are those of a client for a paid, remote service. You need a Stability API key and account, so generation costs money per request and depends on Stability's platform being available; there is no offline mode. The SDK also carries a currency caveat worth noting: its last push was on 2026-05-14, but its tagged releases date to 2024, and Stability has since expanded its REST platform, so parts of the client may lag the newest platform features, and you should check the platform documentation for what is current rather than assuming the SDK exposes everything. As a client, it is only as capable as the endpoints it targets, and it adds a dependency layer over calls you could also make directly, which matters if you need a feature the SDK has not yet wrapped.

stability-sdk versus calling the REST API directly

The alternative is to call Stability's REST API yourself with an HTTP client, skipping the SDK. Direct calls give you immediate access to any endpoint and parameter the platform documents, including features newer than the SDK, and one fewer dependency to track, at the cost of writing and maintaining the request and response handling yourself. stability-sdk's difference is convenience and examples: it packages authentication, request formatting and working notebooks so you integrate faster, which is valuable when the SDK already covers what you need. The decision hinges on currency. If you want the newest platform capability or minimal dependencies, call the REST API directly using the platform docs; if the SDK covers your use and you value the ready examples, it is the quicker path, provided you verify it against the current platform.

MIT license and project status

stability-sdk is MIT-licensed, so it is freely reusable, and it is distributed on PyPI with example notebooks in the repository. The status to hold in mind is the gap between activity signals: the last push was on 2026-05-14, but the most recent tagged release is from 2024, which for a client tracking an evolving hosted platform is a reason to confirm behavior against Stability's current API documentation rather than trusting the SDK to be complete. It remains a reasonable way to get started calling Stability's services from Python, especially via the bundled notebooks, but treat it as a convenience client whose coverage you should verify, and be ready to fall back to direct REST calls for anything the SDK does not yet support.

Editorial conclusion

Adopt stability-sdk if you want to call Stability AI's hosted generation APIs from Python with a ready client and example notebooks, and you have a Stability API key and accept per-request costs. Do not expect offline generation or guaranteed coverage of the newest platform features, since its tagged releases predate recent platform changes. Install it with pip install stability-sdk, obtain a key from Stability's platform, run a bundled notebook to confirm connectivity, and check the platform docs for any capability the SDK may not yet wrap.

Frequently asked questions

What is stability-sdk?

It is the MIT-licensed Python client for Stability AI's APIs, including Stable Diffusion image generation. It formats requests to Stability's hosted endpoints, which run the models, so generation happens remotely rather than on your machine.

Do I need an API key and does it cost money?

Yes. You obtain a Stability API key from the platform, and generation is a paid network call to Stability's service. There is no offline mode; the SDK only formats requests and handles responses.

Is stability-sdk up to date?

Its last commit was on 2026-05-14, but its tagged releases date to 2024 while Stability's REST platform has expanded, so verify features against the current platform docs and fall back to direct REST calls for anything the SDK lacks.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. Stability-AI/stability-sdk on GitHub
Community notes

Community notes