Python SDK

pip install pixelpanda

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.

1 line
To install
MIT
Licensed
3.8+
Python
# pip install pixelpanda
1. from pixelpanda import PixelPanda
2. pp = PixelPanda(api_key="pk_live_...")
3. out = pp.remove_background(url)
4. print(out.result_url)

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

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.

View on PyPI

How It Works

Install, key, call.

1

Install

pip install pixelpanda — one dependency, MIT licensed, Python 3.8 and up.

2

Get an API key

Copy the pk_live_ token from your PixelPanda profile page.

3

Create a client

PixelPanda(api_key=...) or set PIXELPANDA_API_KEY in the environment.

4

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?
Run pip install pixelpanda. It is on PyPI, MIT licensed, supports Python 3.8 and newer, and has one dependency (requests).
How do I authenticate?
Create the client with PixelPanda(api_key='pk_live_...') or set the PIXELPANDA_API_KEY environment variable. Get the key from your Profile page at pixelpanda.ai.
What operations does it cover?
Background removal, text removal, enhancement, unblur, upscaling at 2x/4x/8x, image-to-prompt, product photo and scene generation, avatars and virtual try-on, plus polling for async video and avatar jobs.
Can I pass local files instead of URLs?
Yes. Operations accept a public image URL or base64-encoded image data, so local files work without hosting them anywhere first.
How much does it cost?
The SDK is free. Calls spend PixelPanda credits at the standard rate: 1 credit for most image operations, 2 for AI edits, 50 per UGC video. Credits never expire.
Is there a JavaScript version?
Yes — a Node SDK is available, along with a REST API, an MCP server for AI agents, and Zapier, Make and n8n integrations.
Can I use it in production?
Yes. The same API v2 backs the web app, and every response includes credit accounting so you can meter usage inside your own product.

pip install pixelpanda

On PyPI, MIT licensed, works on Python 3.8 and up.

View on PyPI

Explore More Resources

Browse our guides, tutorials, and tools

AI Ad Generator
Full ad packs — video, images, static ads, captions
AI UGC
Authentic UGC ads with AI creators
Tool Comparisons
See how PixelPanda compares to competitors
Best For Guides
Find the best AI tools for your use case
Alternative Guides
Compare top alternatives for every tool
Tutorials
Step-by-step guides for AI image creation
Industries
AI solutions for your specific industry
Product Photos
AI product photography for every platform
UGC Content
AI-generated UGC videos and photos
AI Headshots
Professional headshots for any platform
Free Tools
30+ free image editing tools, no signup
Statistics
Ecommerce, AI & marketing statistics library