u
This commit is contained in:
34
docs/api/routes/serper/image.md
Normal file
34
docs/api/routes/serper/image.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# `POST /serper/image`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Crawl image from URL, crop white/transparency borders, and return AVIF
|
||||
|
||||
Fetches the image at the provided `url`, crops surrounding white and
|
||||
transparent border margins, resizes to max 1000px, and returns the AVIF image.
|
||||
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
```json
|
||||
{
|
||||
"url": "https://example.com/logo.png"
|
||||
}
|
||||
```
|
||||
|
||||
## Response `200`
|
||||
|
||||
AVIF image bytes
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | URL missing, invalid input, or image processing error — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 403 | Not authorized — `{"error":"…"}` |
|
||||
| 502 | Bad Gateway (crawling the upstream image URL failed) — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user