mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
docs: section-prefix tool API endpoints
This commit is contained in:
@@ -8,7 +8,7 @@ AI-powered background removal with optional effects (blur, shadow, gradient, cus
|
||||
|
||||
## API Endpoint
|
||||
|
||||
`POST /api/v1/tools/remove-background`
|
||||
`POST /api/v1/tools/image/remove-background`
|
||||
|
||||
**Processing:** Asynchronous (returns 202, poll `/api/v1/jobs/{jobId}/progress` for status via SSE)
|
||||
|
||||
@@ -36,7 +36,7 @@ AI-powered background removal with optional effects (blur, shadow, gradient, cus
|
||||
## Example Request
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/remove-background \
|
||||
curl -X POST http://localhost:1349/api/v1/tools/image/remove-background \
|
||||
-F "file=@photo.jpg" \
|
||||
-F 'settings={"backgroundType":"transparent","edgeRefine":2,"outputFormat":"png"}'
|
||||
```
|
||||
@@ -80,7 +80,7 @@ data: {"phase":"processing","stage":"Removing background...","percent":50}
|
||||
|
||||
## Effects Endpoint (Phase 2)
|
||||
|
||||
`POST /api/v1/tools/remove-background/effects`
|
||||
`POST /api/v1/tools/image/remove-background/effects`
|
||||
|
||||
Re-applies background effects without re-running the AI model. Uses cached mask and original from Phase 1.
|
||||
|
||||
@@ -111,7 +111,7 @@ Re-applies background effects without re-running the AI model. Uses cached mask
|
||||
### Example Request
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/remove-background/effects \
|
||||
curl -X POST http://localhost:1349/api/v1/tools/image/remove-background/effects \
|
||||
-F 'settings={"jobId":"a1b2c3d4-...","filename":"photo.jpg","backgroundType":"color","backgroundColor":"#FF5500","outputFormat":"png"}'
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user