mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
docs: audit all 157 tool pages against live schemas
Reconcile every tool page's parameters, defaults, and response shape against the tool's Zod settings schema and executionHint in code. Notable fixes: color-palette (add count + format params, hex output, median-cut algorithm), favicon (add 5 params, was documented as having none), qr-generate (add logoDataUri), convert (add ppm/eps/tga formats), video-loudnorm (-16 LUFS not -14), smart-crop (async 202 not sync 200), images-to-video (1080x1080 square), and several output-filename and behavior-note corrections. Also normalize API endpoint paths to /api/v1/tools/<id> (no modality segment) and standardize curl examples on the Docker API port 1349. Verified with a clean docs build.
This commit is contained in:
+2
-2
@@ -240,7 +240,7 @@ Analyzes the image and applies automatic corrections for exposure, contrast, whi
|
||||
| `corrections.sharpness` | boolean | true | Apply sharpness correction |
|
||||
| `corrections.denoise` | boolean | true | Apply denoising |
|
||||
|
||||
An additional analysis endpoint is available at `POST /api/v1/tools/image/image-enhancement/analyze` which returns the detected corrections without applying them.
|
||||
An additional analysis endpoint is available at `POST /api/v1/tools/image-enhancement/analyze` which returns the detected corrections without applying them.
|
||||
|
||||
## Content-Aware Resize (Seam Carving)
|
||||
|
||||
@@ -279,7 +279,7 @@ Fixes "fake transparent" PNGs where the background was removed but left behind f
|
||||
| `outputFormat` | `"png"` \| `"webp"` | `"png"` | Output image format |
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/image/transparency-fixer \
|
||||
curl -X POST http://localhost:1349/api/v1/tools/transparency-fixer \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-F "file=@fake-transparent.png" \
|
||||
-F 'settings={"defringe":30,"outputFormat":"png"}'
|
||||
|
||||
+16
-16
@@ -25,7 +25,7 @@ curl -X POST http://localhost:1349/api/auth/login \
|
||||
# Returns: {"token":"<session-token>"}
|
||||
|
||||
# Use token
|
||||
curl http://localhost:1349/api/v1/tools/image/resize \
|
||||
curl http://localhost:1349/api/v1/tools/resize \
|
||||
-H "Authorization: Bearer <session-token>"
|
||||
```
|
||||
|
||||
@@ -42,7 +42,7 @@ curl -X POST http://localhost:1349/api/v1/api-keys \
|
||||
# Returns: {"key":"si_<96 hex chars>","id":"...","name":"my-script"}
|
||||
|
||||
# Use the key
|
||||
curl http://localhost:1349/api/v1/tools/image/resize \
|
||||
curl http://localhost:1349/api/v1/tools/resize \
|
||||
-H "Authorization: Bearer si_<your-key>"
|
||||
```
|
||||
|
||||
@@ -329,7 +329,7 @@ All AI tools run on your hardware (CPU or NVIDIA GPU). No internet required.
|
||||
|
||||
Capture a webpage as an image. Unlike other tools, this endpoint accepts `application/json` instead of multipart form data (no file upload needed).
|
||||
|
||||
**Endpoint:** `POST /api/v1/tools/image/html-to-image`
|
||||
**Endpoint:** `POST /api/v1/tools/html-to-image`
|
||||
|
||||
**Content-Type:** `application/json`
|
||||
|
||||
@@ -346,7 +346,7 @@ Capture a webpage as an image. Unlike other tools, this endpoint accepts `applic
|
||||
**Example:**
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/image/html-to-image \
|
||||
curl -X POST http://localhost:1349/api/v1/tools/html-to-image \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"url": "https://snapotter.com", "format": "png", "devicePreset": "desktop"}'
|
||||
@@ -369,24 +369,24 @@ Some tools expose additional endpoints beyond the standard `POST /api/v1/tools/<
|
||||
|
||||
| Method | Path | Description |
|
||||
|--------|------|-------------|
|
||||
| `POST` | `/api/v1/tools/image/remove-background/effects` | Apply background effects (color/gradient/blur/shadow) without re-running AI. Uses cached mask from initial removal. |
|
||||
| `POST` | `/api/v1/tools/image/edit-metadata/inspect` | Read existing EXIF/IPTC/XMP metadata from an image |
|
||||
| `POST` | `/api/v1/tools/image/strip-metadata/inspect` | Inspect metadata fields before stripping |
|
||||
| `POST` | `/api/v1/tools/image/passport-photo/analyze` | Phase 1: AI face detection + background removal. Returns face landmarks and cached data. |
|
||||
| `POST` | `/api/v1/tools/image/passport-photo/generate` | Phase 2: Crop, resize, and tile using cached analysis. No AI re-run. |
|
||||
| `POST` | `/api/v1/tools/image/gif-tools/info` | Get GIF metadata (frame count, dimensions, duration) |
|
||||
| `POST` | `/api/v1/tools/pdf/pdf-to-image/info` | Get PDF metadata (page count, dimensions) |
|
||||
| `POST` | `/api/v1/tools/pdf/pdf-to-image/preview` | Generate a preview of a specific PDF page |
|
||||
| `POST` | `/api/v1/tools/image/svg-to-raster/batch` | Batch convert multiple SVGs to raster |
|
||||
| `POST` | `/api/v1/tools/image/image-enhancement/analyze` | Analyze image quality and return enhancement recommendations |
|
||||
| `POST` | `/api/v1/tools/image/optimize-for-web/preview` | Lightweight preview for live parameter tuning. Returns optimized image with size headers. |
|
||||
| `POST` | `/api/v1/tools/remove-background/effects` | Apply background effects (color/gradient/blur/shadow) without re-running AI. Uses cached mask from initial removal. |
|
||||
| `POST` | `/api/v1/tools/edit-metadata/inspect` | Read existing EXIF/IPTC/XMP metadata from an image |
|
||||
| `POST` | `/api/v1/tools/strip-metadata/inspect` | Inspect metadata fields before stripping |
|
||||
| `POST` | `/api/v1/tools/passport-photo/analyze` | Phase 1: AI face detection + background removal. Returns face landmarks and cached data. |
|
||||
| `POST` | `/api/v1/tools/passport-photo/generate` | Phase 2: Crop, resize, and tile using cached analysis. No AI re-run. |
|
||||
| `POST` | `/api/v1/tools/gif-tools/info` | Get GIF metadata (frame count, dimensions, duration) |
|
||||
| `POST` | `/api/v1/tools/pdf-to-image/info` | Get PDF metadata (page count, dimensions) |
|
||||
| `POST` | `/api/v1/tools/pdf-to-image/preview` | Generate a preview of a specific PDF page |
|
||||
| `POST` | `/api/v1/tools/svg-to-raster/batch` | Batch convert multiple SVGs to raster |
|
||||
| `POST` | `/api/v1/tools/image-enhancement/analyze` | Analyze image quality and return enhancement recommendations |
|
||||
| `POST` | `/api/v1/tools/optimize-for-web/preview` | Lightweight preview for live parameter tuning. Returns optimized image with size headers. |
|
||||
|
||||
## Batch Processing
|
||||
|
||||
Apply any tool to multiple files at once. Returns a ZIP archive.
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/image/compress/batch \
|
||||
curl -X POST http://localhost:1349/api/v1/tools/compress/batch \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-F "files=@a.jpg" \
|
||||
-F "files=@b.jpg" \
|
||||
|
||||
Reference in New Issue
Block a user