docs: section-prefix tool API endpoints

This commit is contained in:
SnapOtter
2026-06-21 00:12:59 +08:00
parent b052241c92
commit 9f0b43271c
161 changed files with 404 additions and 402 deletions
+6 -6
View File
@@ -16,7 +16,7 @@ This tool uses a two-phase flow with separate endpoints for analysis and generat
### Phase 1: Analyze
`POST /api/v1/tools/passport-photo/analyze`
`POST /api/v1/tools/image/passport-photo/analyze`
Detects face landmarks and removes the background. Returns landmark data and a preview for the frontend to display a crop preview.
@@ -30,7 +30,7 @@ Detects face landmarks and removes the background. Returns landmark data and a p
#### Example Request
```bash
curl -X POST http://localhost:1349/api/v1/tools/passport-photo/analyze \
curl -X POST http://localhost:1349/api/v1/tools/image/passport-photo/analyze \
-F "file=@headshot.jpg"
```
@@ -75,7 +75,7 @@ If `clientJobId` is provided, progress is streamed (0-30% for face detection, 30
### Phase 2: Generate
`POST /api/v1/tools/passport-photo/generate`
`POST /api/v1/tools/image/passport-photo/generate`
Crops, resizes, and optionally tiles the photo onto a print sheet. Uses cached images from Phase 1 (no AI re-run).
@@ -103,7 +103,7 @@ Crops, resizes, and optionally tiles the photo onto a print sheet. Uses cached i
#### Example Request
```bash
curl -X POST http://localhost:1349/api/v1/tools/passport-photo/generate \
curl -X POST http://localhost:1349/api/v1/tools/image/passport-photo/generate \
-H "Content-Type: application/json" \
-d '{
"jobId": "a1b2c3d4-...",
@@ -149,13 +149,13 @@ curl -X POST http://localhost:1349/api/v1/tools/passport-photo/generate \
### Base Route
`POST /api/v1/tools/passport-photo`
`POST /api/v1/tools/image/passport-photo`
Returns guidance to use the correct sub-endpoint.
```json
{
"error": "Use /api/v1/tools/passport-photo/analyze or /generate"
"error": "Use /api/v1/tools/image/passport-photo/analyze or /generate"
}
```