Metadata-Version: 2.4
Name: pixelpanda
Version: 0.1.0
Summary: Python client for the PixelPanda API — upscale, remove backgrounds, enhance, and reverse-prompt AI-generated images
Author-email: PixelPanda <ryan@pixelpanda.ai>
License: MIT
Project-URL: Homepage, https://pixelpanda.ai
Project-URL: Documentation, https://pixelpanda.ai/developers
Project-URL: Repository, https://github.com/RyanKramer/pixelpanda-python
Keywords: ai,image-processing,upscale,background-removal,image-to-prompt,api
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25
Dynamic: license-file

# PixelPanda Python SDK

Python client for the [PixelPanda](https://pixelpanda.ai) API — the processing
layer for AI-generated images. Upscale Midjourney art for print, strip
backgrounds, enhance faces, reverse-engineer any image into prompts, and
generate product photography — all from code.

## Install

```bash
pip install git+https://github.com/RyanKramer/pixelpanda-python.git
```

## Quickstart

```python
from pixelpanda import PixelPanda

pp = PixelPanda(api_key="pk_live_...")   # or set PIXELPANDA_API_KEY

# Upscale AI art to print resolution (2x/4x = 1 credit, 8x = 2)
result = pp.upscale("midjourney_art.png", scale=4)
print(result["result_url"])

# Remove a background → transparent PNG (1 credit)
result = pp.remove_background("product.jpg")

# Reverse-engineer an image into prompts (1 credit)
result = pp.image_to_prompt("https://example.com/style-reference.jpg")
print(result["prompts"]["midjourney"])

# Generate product scene photography (1 credit/scene)
product = pp.upload_product("product.jpg")
job = pp.generate_scenes(product["uuid"], num_scenes=6)  # blocks until done
```

Every method accepts a **local path, raw bytes, or a public URL**.

## API surface

| Method | Endpoint | Credits |
|---|---|---|
| `upscale(image, scale, quality)` | `POST /api/v2/upscale` | 1 (2x/4x), 2 (8x) |
| `enhance(image)` | `POST /api/v2/enhance` | 1 |
| `image_to_prompt(image)` | `POST /api/v2/image-to-prompt` | 1 |
| `remove_background(image)` | `POST /api/v1/remove-background` | 1 |
| `upload_product(image)` | `POST /api/v2/products` | free |
| `generate_scenes(uuid, n, wait=True)` | `POST /api/v2/generate/scenes` | 1/scene |
| `get_job(id)` / `wait_for_job(id)` | `GET /api/v2/jobs/{id}` | free |

## Get an API key

Sign up at [pixelpanda.ai](https://pixelpanda.ai) and grab your key from the
dashboard — the **$10 one-time pack (50 credits, no subscription)** is the
cheapest way to test. Full docs: [pixelpanda.ai/developers](https://pixelpanda.ai/developers)
· [Image Generation API](https://pixelpanda.ai/api/image-generation)
· [Background Removal API](https://pixelpanda.ai/api/background-removal)

## License

MIT
