Skip to content
GlobTool

GlobTool API

Every GlobTool tool is one HTTP request: upload a file as multipart form data, get JSON back with a download link. No SDK needed.

1. Get a key

Buy the API plan (5,000 credits a month). Lemon Squeezy emails you a license key: that key is your API key. Keep it secret and call the API from your server, never from a web page.

2. Make a request

Send the key as a Bearer token.

curl https://globtool.com/api/document/pdf/compress \
  -H "Authorization: Bearer $GLOBTOOL_KEY" \
  -F "[email protected]" \
  -F "level=recommended"

Response:

{
  "success": true,
  "downloadUrl": "/media/documents/compressed_3f9c….pdf",
  "originalBytes": 2483021,
  "outputBytes": 611240
}

Download the result from https://globtool.com + downloadUrl within an hour. After that it is deleted.

curl -o result.pdf "https://globtool.com/media/documents/compressed_3f9c….pdf"

3. Endpoints

All are POST with multipart form data. Each successful request uses one credit. The response headers X-Plan and X-Credits-Remaining show your balance.

PDF /api/document/pdf/…

merge
files (repeat the field for each PDF, 2 or more, in order)
split
files, settings JSON: {"method":"all"} or {"method":"range","fromPage":1,"toPage":3}
compress
files, level: low | recommended | extreme
rotate
file, angle: 90 | 180 | 270, pages (optional, e.g. 1-3,5)
remove-pages
file, pages
extract-pages
file, pages
organize
file, order (e.g. 3,1-2,5)
crop
file, top, right, bottom, left (mm)
protect
file, password
unlock
file, password
watermark
file, text, placement: diagonal | center | top | bottom, opacity: 10–100
page-numbers
file, position, format: plain | of | page
metadata
file, action: remove | set, title, author, subject, keywords
repair · to-pdfa · grayscale · flatten · booklet
file
nup
file, perSheet: 2 | 4 | 6 | 9 | 16
page-size
file, size: a4 | letter | legal | a3 | a5
to-images
file, format: jpg | png, dpi: 72 | 150 | 300
to-text · to-html · extract-images
file
from-images
files (repeated; JPG, PNG or WebP), pageSize: fit | a4
ocr
file, lang: eng | fra | deu | spa | por

Images /api/image/…

convert
image, format: jpg | png | webp | gif | bmp | tiff
compress
image, quality, format (optional)
resize
image, width, height, fit
crop
image, x, y, width, height
rotate
image, angle: 0 | 90 | 180 | 270, flip: horizontal | vertical
remove-background
image
watermark
image, text, position, opacity, color
add-text
image, top, bottom
blur
image, mode: blur | pixelate, strength: 1–100
filter
image, filter: grayscale | sepia | invert
border
image, size, color (#RRGGBB)
round
image, shape: circle | rounded, radius
favicon
image
combine
files (repeated, 2–20 images), direction, gap, background
split
image, rows, cols

Documents /api/document/…

convert
file (DOCX, XLSX, PPTX, ODT, RTF, TXT, HTML, Markdown, PDF…), format: pdf | docx | txt | html

Check your usage

curl https://globtool.com/api/billing/license -H "Authorization: Bearer $GLOBTOOL_KEY"

Errors

Errors return {"success": false, "error": "…", "code": "…"}. Failed requests don’t use credits.

400
The file or a field is invalid. The message says which.
401 INVALID_LICENSE
The key is missing or wrong.
402 LICENSE_INACTIVE
The subscription behind the key has ended.
402 CREDITS_EXHAUSTED
This month’s credits are used up. They reset on the 1st (UTC).
413
The file is over 200 MB.
429
Too many requests per minute. Slow down and retry.
5xx
Something failed on our side. Retry with backoff.

Privacy

Same rules as the website: files are processed on GlobTool’s own servers, never shared, and deleted after an hour. See privacy and file handling.