Extraction and Conversion¶
These endpoints are useful when you need image intelligence or format normalization in a pipeline.
Intelligence and web asset endpoints¶
| Endpoint | Purpose |
|---|---|
POST /v1/image/extract/metadata |
Read EXIF and other metadata |
GET /v1/image/extract/metadata |
Read metadata from a URL |
POST /v1/image/extract/colors |
Extract dominant colours |
GET /v1/image/extract/colors |
Extract colours from a URL |
GET /v1/image/favicon |
Fetch the highest-resolution favicon for a domain |
POST /v1/image/convert |
Convert and return JSON/base64 output |
GET /v1/image/convert |
Convert and stream a file |
GET /v1/image/download/{object_name} |
Download a processed image |
Example favicon lookup¶
from toolkitapi import Image
with Image(api_key="tk_...") as image:
favicon = image.favicon("github.com")
print(favicon)
Example format conversion¶
from toolkitapi import Image
with Image(api_key="tk_...") as image:
converted = image.convert(
"jpeg",
"png",
url="https://toolkitapi.io/photo.jpg",
)
print(converted["to_format"])