Skip to main content

🎨 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.

PyPI version Python versions License Downloads Typed

PyPI · API Docs · Homepage


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-Key so a retry never double-charges a GPU job
  • 🧩 Typed end to end — frozen dataclasses, a py.typed marker, 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

🛠️ 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)

Source distribution for image-studio-sdk 1.0.1
File Size Uploaded
image_studio_sdk-1.0.1.tar.gz 23.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for image-studio-sdk 1.0.1
File Interpreter ABI Platform
image_studio_sdk-1.0.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page