docs: replace em dashes with hyphens throughout

This commit is contained in:
ashim-hq
2026-04-16 16:40:18 +08:00
parent de441df32e
commit c8dd454f74
6 changed files with 37 additions and 37 deletions
+11 -11
View File
@@ -2,7 +2,7 @@
The `@ashim/ai` package bridges Node.js to a **persistent Python sidecar** for all ML operations. The dispatcher process stays alive between requests for fast warm-start performance. GPU is auto-detected at startup and used when available.
13 AI tool routes. All models run locally no internet required after initial model download.
13 AI tool routes. All models run locally - no internet required after initial model download.
## Architecture
@@ -26,7 +26,7 @@ Node.js Tool Route
├─ noise_removal.py (tiered denoising)
├─ red_eye_removal.py (landmark + color analysis)
├─ restore.py (scratch repair + enhancement + denoising)
└─ seam_carving (Go caire binary not Python)
└─ seam_carving (Go caire binary - not Python)
```
**Timeouts:** 300 s default; OCR and BiRefNet background removal get 600 s.
@@ -39,11 +39,11 @@ Node.js Tool Route
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `model` | string | `birefnet-general` | Model variant see table below |
| `model` | string | `birefnet-general` | Model variant - see table below |
| `alphaMattingForeground` | number (1255) | 240 | Foreground threshold for alpha matting |
| `alphaMattingBackground` | number (1255) | 10 | Background threshold for alpha matting |
| `returnMask` | boolean | false | Return the mask instead of the cutout |
| `backgroundColor` | string | | Fill removed area (hex color or "transparent") |
| `backgroundColor` | string | - | Fill removed area (hex color or "transparent") |
**Available models:**
@@ -70,7 +70,7 @@ Node.js Tool Route
| `model` | string | `realesrgan-x4plus` | Model variant |
| `faceEnhance` | boolean | false | Apply GFPGAN face enhancement pass |
| `denoise` | number (01) | 0.5 | Denoising strength |
| `format` | string | | Output format override |
| `format` | string | - | Output format override |
| `quality` | number | 95 | Output quality (for JPEG/WebP) |
## OCR / Text Extraction
@@ -203,9 +203,9 @@ GPU-accelerated when an NVIDIA GPU is available.
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | `subject` \| `face` \| `trim` | `subject` | Crop strategy |
| `width` | number | | Output width |
| `height` | number | | Output height |
| `facePreset` | string | | Preset framing when `mode=face` |
| `width` | number | - | Output width |
| `height` | number | - | Output height |
| `facePreset` | string | - | Preset framing when `mode=face` |
**Face presets:**
@@ -220,14 +220,14 @@ GPU-accelerated when an NVIDIA GPU is available.
**Function:** `seamCarve`
**Tool route:** `content-aware-resize`
**Engine:** Go `caire` binary (not Python no GPU benefit)
**Engine:** Go `caire` binary (not Python - no GPU benefit)
Intelligently resizes images by removing or adding low-energy seams, preserving important content.
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `width` | number | | Target width |
| `height` | number | | Target height |
| `width` | number | - | Target width |
| `height` | number | - | Target height |
| `protectFaces` | boolean | true | Protect detected face regions from seam removal |
| `blurRadius` | number | 0 | Pre-blur to reduce noise sensitivity |
| `sobelThreshold` | number | 10 | Edge sensitivity threshold |
+21 -21
View File
@@ -3,9 +3,9 @@
Interactive API docs with request/response examples are available at [http://localhost:1349/api/docs](http://localhost:1349/api/docs).
Machine-readable specs:
- `/api/v1/openapi.yaml` OpenAPI 3.1 spec
- `/llms.txt` LLM-friendly summary
- `/llms-full.txt` Complete LLM-friendly docs
- `/api/v1/openapi.yaml` - OpenAPI 3.1 spec
- `/llms.txt` - LLM-friendly summary
- `/llms-full.txt` - Complete LLM-friendly docs
## Authentication
@@ -30,7 +30,7 @@ Sessions expire after 24 hours.
### API Keys
```bash
# Create a key (returns key once store it)
# Create a key (returns key once - store it)
curl -X POST http://localhost:1349/api/v1/api-keys \
-H "Authorization: Bearer <session-token>" \
-H "Content-Type: application/json" \
@@ -42,7 +42,7 @@ curl http://localhost:1349/api/v1/tools/resize \
-H "Authorization: Bearer si_<your-key>"
```
Keys are prefixed `si_` and stored as SHA-256 hashes the raw key is shown once and never retrievable again.
Keys are prefixed `si_` and stored as SHA-256 hashes - the raw key is shown once and never retrievable again.
### Auth Endpoints
@@ -64,10 +64,10 @@ Keys are prefixed `si_` and stored as SHA-256 hashes — the raw key is shown on
|-----------|:-----:|:----:|
| Use tools | ✓ | ✓ |
| Own files/pipelines/API keys | ✓ | ✓ |
| See all users' files/pipelines/keys | ✓ | |
| Write settings | ✓ | |
| Manage users & teams | ✓ | |
| Manage branding | ✓ | |
| See all users' files/pipelines/keys | ✓ | - |
| Write settings | ✓ | - |
| Manage users & teams | ✓ | - |
| Manage branding | ✓ | - |
## Using Tools
@@ -110,11 +110,11 @@ curl -X POST http://localhost:1349/api/v1/tools/<toolId>/batch \
| Tool ID | Name | Key settings |
|---------|------|-------------|
| `optimize-for-web` | Optimize for Web | `format` (auto/jpeg/webp/avif), `quality`, `maxWidthPx`, `stripMetadata` |
| `strip-metadata` | Strip Metadata | |
| `strip-metadata` | Strip Metadata | - |
| `edit-metadata` | Edit Metadata | `title`, `description`, `author`, `copyright`, `keywords`, `gps` (lat/lon), `dateTime` |
| `bulk-rename` | Bulk Rename | `pattern` (supports `{n}`, `{date}`, `{original}`), `startIndex`, `padding` |
| `image-to-pdf` | Image to PDF | `pageSize` (A4/Letter/…), `orientation`, `margin`, `fitMode` |
| `favicon` | Favicon Generator | `padding`, `backgroundColor`, `borderRadius` generates all standard sizes |
| `favicon` | Favicon Generator | `padding`, `backgroundColor`, `borderRadius` - generates all standard sizes |
### Adjustments
@@ -150,28 +150,28 @@ All AI tools run on your hardware (CPU or NVIDIA GPU). No internet required.
| Tool ID | Name | Key settings |
|---------|------|-------------|
| `watermark-text` | Text Watermark | `text`, `font`, `fontSize`, `color`, `opacity`, `position`, `rotation`, `tile` |
| `watermark-image` | Image Watermark | `opacity`, `position`, `scale` second file is the watermark |
| `watermark-image` | Image Watermark | `opacity`, `position`, `scale` - second file is the watermark |
| `text-overlay` | Text Overlay | `text`, `font`, `fontSize`, `color`, `x`, `y`, `background`, `padding`, `borderRadius` |
| `compose` | Image Composition | `x`, `y`, `opacity`, `blend` second file is layered on top |
| `compose` | Image Composition | `x`, `y`, `opacity`, `blend` - second file is layered on top |
### Utilities
| Tool ID | Name | Key settings |
|---------|------|-------------|
| `info` | Image Info | (returns width, height, format, size, channels, hasAlpha, DPI, EXIF) |
| `compare` | Image Compare | `mode` (side-by-side/overlay/diff), `diffThreshold` second file is the comparison target |
| `find-duplicates` | Find Duplicates | `threshold` (perceptual hash distance, default 8) multi-file |
| `info` | Image Info | - (returns width, height, format, size, channels, hasAlpha, DPI, EXIF) |
| `compare` | Image Compare | `mode` (side-by-side/overlay/diff), `diffThreshold` - second file is the comparison target |
| `find-duplicates` | Find Duplicates | `threshold` (perceptual hash distance, default 8) - multi-file |
| `color-palette` | Color Palette | `count` (dominant color count), `format` (hex/rgb) |
| `qr-generate` | QR Code Generator | `data`, `size`, `margin`, `colorDark`, `colorLight`, `errorCorrectionLevel`, `dotStyle`, `cornerStyle`, `logo` (optional file) |
| `barcode-read` | Barcode Reader | (auto-detects QR, EAN, Code128, DataMatrix, etc.) |
| `barcode-read` | Barcode Reader | - (auto-detects QR, EAN, Code128, DataMatrix, etc.) |
| `image-to-base64` | Image to Base64 | `format` (data-uri/plain), `mimeType` |
### Layout & Composition
| Tool ID | Name | Key settings |
|---------|------|-------------|
| `collage` | Collage / Grid | `template` (25+ layouts), `gap`, `backgroundColor`, `borderRadius` multi-file |
| `stitch` | Stitch / Combine | `direction` (horizontal/vertical/grid), `gap`, `backgroundColor`, `alignment` multi-file |
| `collage` | Collage / Grid | `template` (25+ layouts), `gap`, `backgroundColor`, `borderRadius` - multi-file |
| `stitch` | Stitch / Combine | `direction` (horizontal/vertical/grid), `gap`, `backgroundColor`, `alignment` - multi-file |
| `split` | Image Splitting | `mode` (grid/rows/cols), `rows`, `cols`, `tileWidth`, `tileHeight` |
| `border` | Border & Frame | `width`, `color`, `style` (solid/gradient/pattern), `borderRadius`, `padding`, `shadow` |
@@ -268,8 +268,8 @@ To auto-save a tool result to the library, include `fileId` in the settings payl
| Method | Path | Access | Description |
|--------|------|--------|-------------|
| `POST` | `/api/v1/api-keys` | Auth | Generate new key shown once |
| `GET` | `/api/v1/api-keys` | Auth | List keys (name, id, lastUsedAt not raw key) |
| `POST` | `/api/v1/api-keys` | Auth | Generate new key - shown once |
| `GET` | `/api/v1/api-keys` | Auth | List keys (name, id, lastUsedAt - not raw key) |
| `DELETE` | `/api/v1/api-keys/:id` | Auth | Delete key |
## Teams