FastAPI service that embeds images into portable text files and extracts them back.
| # | File | Description |
|---|---|---|
| 001 | Overview | What PixelFuse does and the text file format |
| 002 | API Reference | Endpoint contracts, fields, and error codes |
| 003 | Configuration | Env vars and CLI flags |
| 004 | Development | Local setup, tests, lint, Docker |
| 005 | Deployment | Render, CI, self-hosted Docker |
| Method | Path | Description |
|---|---|---|
| POST | /convert-embed/ |
Upload images → download base64 text file |
| POST | /extract-images/ |
Upload text file → download ZIP of images |
Supports JPEG, PNG, and HEIC formats. Max 10 files per request (configurable).
No distortion. Embed → extract is lossless. Raw image bytes are base64-encoded and decoded back exactly — no re-encoding at any stage.
pip install -e ".[dev]"
pixelfuse serve --reloadAll settings are overridable via environment variables prefixed PIXELFUSE_:
| Variable | Default | Description |
|---|---|---|
PIXELFUSE_HOST |
0.0.0.0 |
Bind host |
PIXELFUSE_PORT |
8000 |
Bind port |
PIXELFUSE_LOG_LEVEL |
info |
Uvicorn log level |
PIXELFUSE_MAX_UPLOAD_FILES |
10 |
Max files per request |
PIXELFUSE_RATE_LIMIT_PER_MINUTE |
60 |
Max requests per minute per IP (0 = disabled) |
PIXELFUSE_ALLOWED_ORIGINS |
(required) | CORS origins (JSON array) |
Copy .env.example to .env for local overrides.
# Lint
flake8 src tests
# Type check
mypy src
# All environments
toxDeployed on Render via render.yaml. CI runs on every push via GitHub Actions.