🎨 Image Studio Python SDK
Official Python client for the Ross Image Studio API — 13 image-generation & image-editing diffusion models behind one async-job REST API.
image-studio-sdk is a pure client SDK: it talks to the hosted Image Studio API and nothing else. Its only dependencies are httpx + Pillow — no torch, no model downloads, no server code.
✨ Features
- 🖼️ Generate & edit — text-to-image and image editing across 13 diffusion models
- ⏳ Async jobs done right —
submit → poll → download; never holds a long HTTP read open - 🔁 Safe retries — automatic, replay-safe retries plus an auto
Idempotency-Keyso a retry never double-charges a GPU job - 🧩 Typed end to end — frozen dataclasses, a
py.typedmarker, and a full typed error hierarchy - 🪶 Featherweight — two runtime dependencies (
httpx,Pillow)
📦 Install
pip install image-studio-sdk
export IMAGE_STUDIO_API_KEY=isk_... # issued per client
🚀 Quick start
from image_studio import ImageStudio
with ImageStudio() as studio:
job = studio.generate("irie", "a fluffy orange cat in aviator goggles", seed=42)
studio.download(job.images[0], "cat.png")
Image editing
with ImageStudio() as studio:
job = studio.edit("bashment", "add a rainbow to the sky", image="photo.jpg")
studio.download(job.images[0], "photo_rainbow.png")
Async submit + poll (long jobs)
with ImageStudio() as studio:
handle = studio.submit("biggup", "a detailed cityscape", image="city.png")
print(handle.job.id, handle.job.status) # job_..., queued
job = handle.result(timeout=600) # polls until terminal
Discover models & tasks at runtime
with ImageStudio() as studio:
# Every task the API offers — structure-control, local-redrawing, super-resolution, …
for t in studio.tasks():
print(t.id, "->", t.endpoint, t.models)
print(" ", t.description)
# Each model carries its task id and the endpoint that takes it:
for m in studio.models():
print(m.id, m.task, m.endpoint, sorted(m.parameters))
⚙️ Configuration
| Environment variable | Purpose | Default |
|---|---|---|
IMAGE_STUDIO_API_KEY |
Bearer token (required) | — |
IMAGE_STUDIO_BASE_URL |
API root | https://studio.ross-developers.com/v1 |
Both can also be passed directly: ImageStudio(api_key=..., base_url=...).
🧨 Errors
All failures raise typed exceptions from image_studio:
AuthenticationError, ValidationError, RateLimitError (queue full — carries retry_after),
JobFailedError, JobCanceledError, PollTimeoutError, and friends. Submits send an automatic
Idempotency-Key, so retrying a failed submit never double-charges a job.
from image_studio.client import JobFailedError, ValidationError
try:
job = studio.generate("roots", "portrait", age=500)
except ValidationError as e:
print(e.param, e.code) # "age", "invalid_parameter"
except JobFailedError as e:
print(e.job.id, e.code) # inspect and resubmit
📚 Documentation
- Full SDK reference & examples ship with the package —
docs/client.mdanddocs/examples.mdare bundled in the source distribution. - Interactive API docs: https://studio.ross-developers.com/v1/docs
- Homepage: https://studio.ross-developers.com
🛠️ Development
pip install -e . pytest
python -m pytest tests/ -q # offline — httpx.MockTransport, no server needed
python -m build # → dist/image_studio_sdk-<version>-py3-none-any.whl
The server/API implementation lives in the separate image-studio-server-api-python repository.
📄 License
Apache-2.0 © Andre Ross
Metadata
Release files for image-studio-sdk 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| image_studio_sdk-1.0.1.tar.gz | 23.8 kB | Without provenance | Details for image_studio_sdk-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| image_studio_sdk-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for image_studio_sdk-1.0.1-py3-none-any.whl |
Total release size: 41.1 kB
Release files / image_studio_sdk-1.0.1.tar.gz
| Download URL | image_studio_sdk-1.0.1.tar.gz |
|---|---|
| Size | 23.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd7e5b04eca5e3a30c60d57e546f71963709f99dfaaa59f7c9d849283d7d89ed
|
|
BLAKE2b-256 checksum How to use checksums |
915fba5f5cf8c355525a9353ed1bfe1984c16a99dd9cfcf6798cd8704ca3268a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / image_studio_sdk-1.0.1-py3-none-any.whl
| Download URL | image_studio_sdk-1.0.1-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f8e73e02177e22311d2212d90a738008efdffdfad5c0594dbeeef310e151933
|
|
BLAKE2b-256 checksum How to use checksums |
4f569ee7b2b27425cf27fb2af63753cd3b437c7954448962c5be964d57fc58cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for image-studio-sdk 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.