Python SDK
The official Python client for the PixelPanda API. Remove backgrounds, upscale, enhance, reverse-prompt and generate product photos from scripts, notebooks, Django and FastAPI backends — without hand-rolling HTTP calls.
The Whole Image Pipeline From Python
Anything the PixelPanda web app does is available as a function call, which makes it easy to put AI imagery behind your own product, script or batch job.
The SDK wraps the REST API v2: authentication, retries, polling for long-running jobs and result URLs. Point it at a public image URL or hand it bytes, and it returns hosted results plus credit accounting so you can log spend per operation. It is MIT licensed and has one dependency (requests), which keeps it safe to add to an existing service.
What you can call
- Clean-up — remove_background, remove_text, enhance, unblur.
- Upscaling — 2x, 4x and 8x with fast, balanced or high-detail modes.
- Generation — product photos, contextual scenes, avatars and virtual try-on.
- Reverse prompting — image_to_prompt returns prompts in general, Flux, Midjourney and Stable Diffusion styles.
- Async jobs — submit and poll video and avatar jobs without writing your own loop.
What People Build With It
Image processing behind your own product.
One-line install
pip install pixelpanda pulls a single dependency and works on Python 3.8+.
Clean-up calls
remove_background, remove_text, enhance and unblur as ordinary functions.
Upscaling
2x, 4x and 8x super-resolution with quality modes exposed as parameters.
Generation
Product photos, scenes, avatars and try-on from the same client object.
Job polling built in
Async video and avatar jobs are submitted and polled without your own loop.
Credit accounting
Every response reports credits used and remaining, so you can log spend per operation.
One dependency, MIT licensed
pip install pixelpanda and you are three lines from a processed image.
How It Works
Install, key, call.
Install
pip install pixelpanda — one dependency, MIT licensed, Python 3.8 and up.
Get an API key
Copy the pk_live_ token from your PixelPanda profile page.
Create a client
PixelPanda(api_key=...) or set PIXELPANDA_API_KEY in the environment.
Call an operation
Pass a public URL or bytes; the response carries the result URL and credit balance.
Who Uses the Python SDK
Teams that need images processed by code, not by hand.
SaaS builders
Put background removal or upscaling inside your own product without training or hosting a model.
Data & ML teams
Clean and standardise image datasets in a notebook before training or evaluation.
E-commerce backends
Process catalogue images on upload inside a Django or FastAPI service.
Batch scripts
Walk a folder of thousands of photos and upscale or cut out each one, with credit accounting per call.
Automation engineers
Wire the SDK into Airflow, Prefect or a cron job for scheduled catalogue refreshes.
Agencies
Script the repetitive client work — white backgrounds, resizes, enhancement — once and reuse it.
Frequently Asked Questions
How do I install the PixelPanda Python SDK?
How do I authenticate?
What operations does it cover?
Can I pass local files instead of URLs?
How much does it cost?
Is there a JavaScript version?
Can I use it in production?
pip install pixelpanda
On PyPI, MIT licensed, works on Python 3.8 and up.
Explore More Resources
Browse our guides, tutorials, and tools