This commit is contained in:
seb
2026-09-27 18:01:08 +02:00
parent 9f97e3f3c6
commit 65b4ce5098
6 changed files with 516 additions and 1 deletions

View File

@@ -1126,6 +1126,114 @@
}
}
},
"/serper/image": {
"post": {
"tags": [
"Serper"
],
"summary": "Crawl image from URL, crop white/transparency borders, and return AVIF",
"description": "Fetches the image at the provided `url`, crops surrounding white and\ntransparent border margins, resizes to max 1000px, and returns the AVIF image.\n",
"security": [
{
"cookieAuth": []
}
],
"x-markdown": "serper/image.md",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "Absolute HTTP/HTTPS URL of the image to crawl",
"example": "https://example.com/logo.png"
}
}
}
}
}
},
"responses": {
"200": {
"description": "AVIF image bytes",
"headers": {
"Content-Type": {
"schema": {
"type": "string",
"example": "image/avif"
}
},
"X-Image-Width": {
"schema": {
"type": "integer",
"example": 540
}
},
"X-Image-Height": {
"schema": {
"type": "integer",
"example": 179
}
}
},
"content": {
"image/avif": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "URL missing, invalid input, or image processing error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Not authorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"502": {
"description": "Bad Gateway (crawling the upstream image URL failed)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/quote": {
"get": {
"tags": [