Python client SDK for the Ross Image Studio API (studio.ross-developers.com/v1).
Project description
🎨 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
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 image_studio_sdk-1.0.1.tar.gz.
File metadata
- Download URL: image_studio_sdk-1.0.1.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd7e5b04eca5e3a30c60d57e546f71963709f99dfaaa59f7c9d849283d7d89ed
|
|
| MD5 |
2e7ebba6ef7eb6fa8ab2726fd20bc73d
|
|
| BLAKE2b-256 |
915fba5f5cf8c355525a9353ed1bfe1984c16a99dd9cfcf6798cd8704ca3268a
|
File details
Details for the file image_studio_sdk-1.0.1-py3-none-any.whl.
File metadata
- Download URL: image_studio_sdk-1.0.1-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f8e73e02177e22311d2212d90a738008efdffdfad5c0594dbeeef310e151933
|
|
| MD5 |
a6d1568e944e8f838ad79f3ccc9a2b4a
|
|
| BLAKE2b-256 |
4f569ee7b2b27425cf27fb2af63753cd3b437c7954448962c5be964d57fc58cc
|