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:
@@ -8,13 +8,19 @@ Generate a complete set of favicon and app icon files from a source image. Produ
|
||||
|
||||
## API Endpoint
|
||||
|
||||
`POST /api/v1/tools/image/favicon`
|
||||
`POST /api/v1/tools/favicon`
|
||||
|
||||
Accepts multipart form data with one or more image files. No settings are required.
|
||||
Accepts multipart form data with one or more image files and an optional JSON `settings` field.
|
||||
|
||||
## Parameters
|
||||
|
||||
This tool has no configurable parameters. It generates all standard sizes automatically.
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| background | string | No | - | Background hex color (e.g. `"#ffffff"`). When set, the icon is flattened onto this color. |
|
||||
| padding | integer | No | `0` | Padding percentage around the icon content (0 to 40) |
|
||||
| radius | integer | No | `0` | Corner radius percentage for rounded icons (0 to 50) |
|
||||
| sizes | integer[] | No | - | Restrict output to specific pixel sizes (e.g. `[16, 32, 180]`). Omit to generate all standard sizes. |
|
||||
| themeColor | string | No | `"#ffffff"` | Theme color hex for the web manifest |
|
||||
|
||||
## Generated Files
|
||||
|
||||
@@ -34,18 +40,19 @@ For each input image, the following files are produced:
|
||||
|
||||
## Example Request
|
||||
|
||||
Single source image:
|
||||
Single source image with rounded corners and padding:
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/image/favicon \
|
||||
curl -X POST http://localhost:1349/api/v1/tools/favicon \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@logo.png"
|
||||
-F "file=@logo.png" \
|
||||
-F 'settings={"padding": 10, "radius": 20, "themeColor": "#0a0a0a"}'
|
||||
```
|
||||
|
||||
Multiple source images (each gets its own set in a subfolder):
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/image/favicon \
|
||||
curl -X POST http://localhost:1349/api/v1/tools/favicon \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@logo-light.png" \
|
||||
-F "file=@logo-dark.png"
|
||||
|
||||
Reference in New Issue
Block a user