Python client for Stability AI API
Project description
Stability AI Python SDK
A Python library to easily access the Stability AI API.
Installation
PIP
pip install stability-ai
Authentication
This environment variable must be set for authentication to take place.
export STABILITY_AI_API_KEY=<your key>
Table of Contents
Setup
Engines (v1)
User (v1)
Setup
Initialization
To begin using the Stability AI SDK, just import at the top of your python file.
import stability_ai
Engines (v1)
List
Fetches a list of all available engines.
results = stability_ai.v1.engines.list()
if not results.engines or len(results.engines) == 0:
raise Exception("No engines found")
engine = results.engines[0]
print(f"Engine found: {engine}")
Engines (v1)
Account
Fetches user account.
result = stability_ai.v1.user.account()
print(f"Account found with id: {result.id}")
List
Fetches a list of all available engines.
result = stability_ai.v1.user.balance()
print(f"Balance: {result.credits}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stability_ai_sdk-0.0.1.tar.gz.
File metadata
- Download URL: stability_ai_sdk-0.0.1.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2636ec48e33016e65cd2db65321fd7b4de6a1c448d83867cb47939b42f571dd0
|
|
| MD5 |
fbd73b92443c776218c2f1b40027640a
|
|
| BLAKE2b-256 |
4547301c011adf6125609976a548d3c375836c93ad2066de747d9968fb7656ab
|
File details
Details for the file stability_ai_sdk-0.0.1-py3-none-any.whl.
File metadata
- Download URL: stability_ai_sdk-0.0.1-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c2bc4c033f090e65bf670727d87baa21634b0932aadc4a48f3d5fa10f4b9947
|
|
| MD5 |
4d717a7385adf3339e0f341c0dd6db38
|
|
| BLAKE2b-256 |
0c584eb4b82dfd8d26848a21b35705aefa53be0c0c84ef3e1b20b2524fa75f62
|