API Documentation

Base URL: https://imgsharp.grabshot.dev

Authentication

Include your API key in the X-API-Key header or as a api_key query parameter. Anonymous requests use free tier limits.

curl "https://imgsharp.grabshot.dev/v1/image?url=https://example.com/photo.jpg&w=400" \
  -H "X-API-Key: img_your_api_key_here"

Transform Image (URL)

GET /v1/image

Fetch an image from a URL and apply transformations. Returns the processed image binary.

Parameters

ParamTypeDefaultDescription
urlstringrequiredSource image URL
w / widthinteger-Target width in pixels
h / heightinteger-Target height in pixels
format / fstringoriginalOutput format: webp, avif, png, jpg
quality / qinteger80Quality 1-100
fitstringcovercover, contain, fill, inside, outside
gravitystringcenterCrop anchor: center, north, south, east, west, northeast, etc.
blurfloat-Gaussian blur sigma (0.3-100)
sharpenbooleanfalseApply sharpening
grayscalebooleanfalseConvert to grayscale
rotateinteger-Rotation angle in degrees
flipbooleanfalseFlip vertically
flopbooleanfalseFlip horizontally
cropstring-Pixel crop: left,top,width,height
watermarkstring-Text watermark overlay
watermark_opacityfloat0.5Watermark opacity (0-1)
watermark_positionstringsoutheastWatermark position

Example

# Resize to 800x600, convert to WebP, quality 85
curl "https://imgsharp.grabshot.dev/v1/image?url=https://picsum.photos/2000/1500&w=800&h=600&format=webp&quality=85" \
  -H "X-API-Key: img_your_key" \
  -o resized.webp

Transform Image (Upload)

POST /v1/image

Upload an image file and apply transformations. Send as multipart/form-data with field name image. Same parameters as URL mode in form body.

curl -X POST "https://imgsharp.grabshot.dev/v1/image" \
  -H "X-API-Key: img_your_key" \
  -F "[email protected]" \
  -F "width=400" \
  -F "format=webp" \
  -o output.webp

Image Info

GET /v1/image/info?url=...

Get metadata about an image without transforming it.

{
  "width": 2000,
  "height": 1500,
  "format": "jpeg",
  "channels": 3,
  "space": "srgb",
  "hasAlpha": false,
  "size": 245832,
  "density": 72
}

Account Management

POST /v1/register

Body: { "email": "...", "password": "..." } - Returns API key

POST /v1/login

Body: { "email": "...", "password": "..." } - Returns API key

GET /v1/account

Get account info, plan, and usage. Requires API key.

GET /v1/health

Health check. No auth required.

Rate Limits

PlanRequests/minMonthly limitMax file size
Free101005MB
Starter305,00025MB
Pro6025,00050MB
Business120100,000100MB

Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining

Response Headers

Image responses include these headers: