mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
docs: sync api documentation
This commit is contained in:
@@ -51,7 +51,7 @@ curl -X POST http://localhost:1349/api/v1/tools/image/content-aware-resize \
|
||||
|
||||
## Notes
|
||||
|
||||
- This tool returns a synchronous response (not 202 async). Processing happens inline.
|
||||
- This custom route currently returns a synchronous 200 response.
|
||||
- Uses the `caire` seam carving library for content-aware resizing.
|
||||
- Only reduces dimensions (removes seams). Cannot expand an image beyond its original size.
|
||||
- The `protectFaces` option uses AI face detection to mark face regions as high-energy, preventing seams from passing through faces.
|
||||
|
||||
@@ -12,7 +12,7 @@ Restore and enhance faces in images using AI models (GFPGAN/CodeFormer).
|
||||
|
||||
**Processing:** Asynchronous (returns 202, poll `/api/v1/jobs/{jobId}/progress` for status via SSE)
|
||||
|
||||
**Model bundle:** `upscale-enhance` (4-5 GB)
|
||||
**Model bundles:** `upscale-enhance` (5-6 GB) and `face-detection` (200-300 MB)
|
||||
|
||||
## Parameters
|
||||
|
||||
@@ -74,7 +74,7 @@ data: {"phase":"processing","stage":"Enhancing faces...","percent":60}
|
||||
|
||||
## Notes
|
||||
|
||||
- Requires the `upscale-enhance` model bundle to be installed (4-5 GB).
|
||||
- Requires both the `upscale-enhance` model bundle (5-6 GB) and the `face-detection` model bundle (200-300 MB).
|
||||
- GFPGAN produces more aggressive enhancement; CodeFormer better preserves identity. `auto` selects the best model for the input.
|
||||
- Output is always PNG format for maximum quality.
|
||||
- A WebP preview is generated alongside the full-resolution output for faster frontend display.
|
||||
|
||||
@@ -12,7 +12,7 @@ One-click auto-improve with smart analysis. Analyzes the image and applies expos
|
||||
|
||||
**Processing:** Synchronous (uses `createToolRoute` factory, returns result directly)
|
||||
|
||||
**Model bundle:** None required for basic enhancement. The `upscale-enhance` bundle (4-5 GB) is used only when `deepEnhance` is enabled (for AI noise removal via SCUNet).
|
||||
**Model bundle:** None required for basic enhancement. The `upscale-enhance` bundle (5-6 GB) is used only when `deepEnhance` is enabled (for AI noise removal via SCUNet).
|
||||
|
||||
## Parameters
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ AI-powered noise and grain removal with multi-tier quality options, using the Py
|
||||
|
||||
**Processing:** Asynchronous (returns 202, poll `/api/v1/jobs/{jobId}/progress` for status via SSE)
|
||||
|
||||
**Model bundle:** `upscale-enhance` (4-5 GB)
|
||||
**Model bundle:** `upscale-enhance` (5-6 GB)
|
||||
|
||||
## Parameters
|
||||
|
||||
@@ -69,7 +69,7 @@ data: {"phase":"processing","stage":"Denoising...","percent":65}
|
||||
|
||||
## Notes
|
||||
|
||||
- Requires the `upscale-enhance` model bundle to be installed (4-5 GB).
|
||||
- Requires the `upscale-enhance` model bundle to be installed (5-6 GB).
|
||||
- Quality tiers trade speed for quality: `quick` is fastest with basic denoising, `maximum` uses the most thorough multi-pass approach.
|
||||
- The `detailPreservation` parameter is critical for textured subjects (fabric, hair, foliage). Higher values prevent the denoiser from smoothing away fine detail.
|
||||
- When `format` is set to `"original"`, the output format matches the input file format.
|
||||
|
||||
@@ -10,9 +10,9 @@ Extract text from images using AI-powered optical character recognition. Support
|
||||
|
||||
`POST /api/v1/tools/image/ocr`
|
||||
|
||||
**Processing:** Synchronous (returns extracted text directly, though progress is reported via SSE if a `clientJobId` is provided)
|
||||
**Processing:** Synchronous JSON response. If `clientJobId` is provided, progress is also reported through SSE.
|
||||
|
||||
**Model bundle:** `ocr` (3-4 GB)
|
||||
**Model bundle:** `ocr` (5-6 GB)
|
||||
|
||||
## Parameters
|
||||
|
||||
@@ -45,7 +45,7 @@ curl -X POST http://localhost:1349/api/v1/tools/image/ocr \
|
||||
|
||||
### Progress (SSE, optional)
|
||||
|
||||
If a `clientJobId` is provided, progress events are streamed:
|
||||
If a `clientJobId` form field is provided, progress events are streamed:
|
||||
|
||||
```
|
||||
event: progress
|
||||
@@ -54,8 +54,8 @@ data: {"phase":"processing","stage":"Recognizing text...","percent":50}
|
||||
|
||||
## Notes
|
||||
|
||||
- Requires the `ocr` model bundle to be installed (3-4 GB).
|
||||
- Unlike most AI tools, OCR returns a synchronous JSON response with extracted text (not an image download URL).
|
||||
- Requires the `ocr` model bundle to be installed (5-6 GB).
|
||||
- OCR returns extracted text directly rather than an image download URL.
|
||||
- Uses a fallback chain: if a higher-quality tier crashes (e.g., PaddleOCR segfault), it automatically retries with the next lower tier.
|
||||
- If a tier returns empty text without crashing, it also falls back to the next tier.
|
||||
- Quality tiers map to engines: `fast` = Tesseract, `balanced` = PaddleOCR v5, `best` = PaddleOCR VL.
|
||||
|
||||
@@ -12,7 +12,7 @@ Fix scratches, tears, and damage on old photos using a multi-step AI pipeline. C
|
||||
|
||||
**Processing:** Asynchronous (returns 202, poll `/api/v1/jobs/{jobId}/progress` for status via SSE)
|
||||
|
||||
**Model bundle:** `photo-restoration` (800 MB - 1 GB)
|
||||
**Model bundle:** `photo-restoration` (4-5 GB)
|
||||
|
||||
## Parameters
|
||||
|
||||
@@ -83,7 +83,7 @@ data: {"phase":"processing","stage":"Enhancing faces...","percent":60}
|
||||
|
||||
## Notes
|
||||
|
||||
- Requires the `photo-restoration` model bundle to be installed (800 MB - 1 GB).
|
||||
- Requires the `photo-restoration` model bundle to be installed (4-5 GB).
|
||||
- The pipeline runs multiple AI steps sequentially: scratch repair, face enhancement (GFPGAN), denoising, and optionally colorization.
|
||||
- The `steps` array in the result shows which processing steps were actually executed.
|
||||
- `scratchCoverage` is an estimated percentage of the image area that had scratch damage.
|
||||
|
||||
@@ -12,7 +12,7 @@ AI super-resolution enhancement using Real-ESRGAN. Upscales images 2x-4x while p
|
||||
|
||||
**Processing:** Asynchronous (returns 202, poll `/api/v1/jobs/{jobId}/progress` for status via SSE)
|
||||
|
||||
**Model bundle:** `upscale-enhance` (4-5 GB)
|
||||
**Model bundle:** `upscale-enhance` (5-6 GB)
|
||||
|
||||
## Parameters
|
||||
|
||||
@@ -73,7 +73,7 @@ data: {"phase":"processing","stage":"Upscaling...","percent":60}
|
||||
|
||||
## Notes
|
||||
|
||||
- Requires the `upscale-enhance` model bundle to be installed (4-5 GB).
|
||||
- Requires the `upscale-enhance` model bundle to be installed (5-6 GB).
|
||||
- Uses Real-ESRGAN when available; falls back to Lanczos interpolation if the AI model is unavailable.
|
||||
- The `faceEnhance` option applies GFPGAN face restoration during upscaling for better face quality.
|
||||
- For non-browser-previewable output formats (HEIC, JXL, TIFF), a WebP preview is generated alongside the main output.
|
||||
|
||||
Reference in New Issue
Block a user