WebFileTools API
Upload and share files directly from your scripts, CI/CD pipelines and automation workflows. Bearer API key, daily quota, JSON response.
Server-side tools (22)
These tools process files on the server. Upload your file via /api/upload then use the returned link directly in your workflow or open it in a browser to process it.
Partage de fichiers
Partage & Collaboration
Convertir Office en PDF
PDF — Conversion serveur
PDF vers Images
PDF — Conversion serveur
Images vers PDF
PDF — Conversion serveur
Compresser un PDF
PDF — Conversion serveur
PDF vers Texte
PDF — Conversion serveur
Réparer un PDF
PDF — Conversion serveur
Optimiser un PDF pour le web
PDF — Conversion serveur
Markdown vers PDF
PDF — Conversion serveur
OCR — Image et PDF vers texte
Images
OCR vers Markdown
Images
PDF vers Word
PDF — Conversion serveur
Partage de secret
Sécurité & Confidentialité
Partage de fichier secret
Sécurité & Confidentialité
Images vers GIF animé
Images
PDF vers Excel
PDF — Conversion serveur
PDF vers PowerPoint
PDF — Conversion serveur
Extraire images d'un PDF
PDF — Conversion serveur
HTML vers PDF
PDF — Conversion serveur
PDF vers PDF/A
PDF — Conversion serveur
Extracteur de signature email
Utilitaires
Nettoyeur de métadonnées
Sécurité & Confidentialité
Authentication
Add your key in the Authorization header:
Authorization: Bearer wft_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQuotas
| Plan | Calls / day | Returned header |
|---|---|---|
| Free | 100 | X-RateLimit-Remaining: 97 |
| Pro | Unlimited | — |
Exceeded → 429 Too Many Requests
POST /api/upload
Uploads a file, returns a share link.
cURL
curl -X POST https://webfiletools.com/api/upload \
-H "Authorization: Bearer wft_YOUR_KEY" \
-F "file=@document.pdf"Python
import requests
API_KEY = "wft_YOUR_KEY"
with open("document.pdf", "rb") as f:
r = requests.post(
"https://webfiletools.com/api/upload",
headers={"Authorization": f"Bearer {API_KEY}"},
files={"file": f},
)
print(r.json()["url"]) # https://webfiletools.com/f/xxxxxJavaScript (Node.js)
import FormData from "form-data";
import fs from "fs";
const API_KEY = "wft_YOUR_KEY";
const form = new FormData();
form.append("file", fs.createReadStream("document.pdf"));
const res = await fetch("https://webfiletools.com/api/upload", {
method: "POST",
headers: { Authorization: `Bearer ${API_KEY}`, ...form.getHeaders() },
body: form,
});
console.log((await res.json()).url);Response 201
{
"success": true,
"token": "abc123def456",
"filename": "document.pdf",
"size": 204800,
"mimeType": "application/pdf",
"expiresAt": null,
"url": "https://webfiletools.com/f/abc123def456"
}Processing endpoints
These endpoints process your files directly, no web interface needed. API key authentication required (scope upload). Results are returned synchronously — no polling required.
/api/v1/process/ocr→ JSONExtracts text from an image (PNG, JPG, TIFF, WebP, BMP) or a PDF. Up to 30 pages.
| Parameter | Type | Default |
|---|---|---|
| file | form-data (required) | — |
| lang | string | fra+eng |
curl -X POST https://webfiletools.com/api/v1/process/ocr \
-H "Authorization: Bearer wft_YOUR_KEY" \
-F "file=@scan.pdf" \
-F "lang=eng"{ "text": "Extracted content...", "pages": 3, "chars": 1842, "lang": "eng" }/api/v1/process/compress-pdf→ PDF binaryCompresses a PDF using Ghostscript. Returns the compressed PDF as a binary response.
| Parameter | Type | Default |
|---|---|---|
| file | form-data (required) | — |
| quality | screen · ebook · printer · prepress | ebook |
curl -X POST https://webfiletools.com/api/v1/process/compress-pdf \
-H "Authorization: Bearer wft_YOUR_KEY" \
-F "file=@report.pdf" \
-F "quality=screen" \
-o report-compressed.pdfUseful response headers: X-Original-Size, X-Compressed-Size, X-Savings-Percent
/api/v1/process/pdf-to-images→ ZIP (PNG)Converts a PDF to PNG images packed in a ZIP archive. Up to 30 pages.
| Parameter | Type | Default |
|---|---|---|
| file | form-data (required) | — |
| dpi | integer 72–300 | 150 |
curl -X POST https://webfiletools.com/api/v1/process/pdf-to-images \
-H "Authorization: Bearer wft_YOUR_KEY" \
-F "file=@slides.pdf" \
-F "dpi=200" \
-o images.zipResponse headers: X-Page-Count, X-DPI
Workflows API
Text-focused endpoint for support automation, useful to classify and reframe tickets without file upload. API key authentication required (scope read, upload or process).
/api/workflows/support/auto→ JSON| JSON field | Type | Notes |
|---|---|---|
| rawLog | string (required) | Raw ticket log |
| ticketContext | string | Optional free-form context |
| locale | fr | en | Default: fr |
curl -X POST https://webfiletools.com/api/workflows/support/auto \
-H "Authorization: Bearer wft_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"rawLog": "ERR 500 /checkout for tenant acme; customer cannot validate cart",
"ticketContext": "Priority B2B incident",
"locale": "en"
}'{
"ok": true,
"result": {
"anonymized": "...",
"summary": "...",
"draftResponse": "...",
"stats": {
"ipv4": 2,
"ipv6": 0,
"email": 1,
"domainUser": 1,
"fqdn": 1,
"total": 5
}
}
}Possible headers: X-RateLimit-Remaining
Workflow recipes
Not every pack listed on /en/workflows has a public endpoint for each step yet. Still, several flows can already be partially automated with the public endpoints documented above.
1. IT Support / MSP
API is available for the anonymization + summary/draft reply stage through /api/workflows/support/auto. Before/after comparison and final wording remain web-local.
2. Document Compliance
Already automatable today for initial ingestion with /api/v1/process/ocr, then for visual derivation with /api/v1/process/pdf-to-images or output optimization with /api/v1/process/compress-pdf. PDF redaction and PDF/A conversion still remain guided through the web interface.
3. Secure Multi-type Sharing
For API use, the reliable entry point is /api/upload to push a file and retrieve a share link. The one-time encrypted variant and the full separate-secret orchestration are still primarily web-oriented today.
Not exposed as public API yet
Social Marketing and Web Publishing Express mostly rely on 100% browser-local tools. They work well in web auto and guided assistant modes, but they do not yet have dedicated public endpoints.
Error codes
| Code | Cause | Fix |
|---|---|---|
| 201 | Success | Read the url field |
| 400 | Missing or invalid file | Check the file field |
| 401 | Missing or invalid key | Check Authorization header |
| 403 | Insufficient scope | Recreate the key with upload scope |
| 413 | Storage quota exceeded | Upgrade to Pro |
| 422 | File rejected (antivirus) | File contains a threat |
| 429 | Daily quota exceeded | Wait until tomorrow or upgrade to Pro |
| 503 | Antivirus unavailable | Retry in a few seconds |
Examples
Typical use cases covering upload, processing and automation.
Daily database backup (bash + cron)
#!/bin/bash
DATE=$(date +%Y-%m-%d)
pg_dump mydb > backup_$DATE.sql
URL=$(curl -s -X POST https://webfiletools.com/api/upload \
-H "Authorization: Bearer wft_YOUR_KEY" \
-F "file=@backup_$DATE.sql" | jq -r '.url')
echo "Backup available at: $URL"Batch upload invoice PDFs (Python)
import os, requests, time
API_KEY = "wft_YOUR_KEY"
for name in os.listdir("./invoices"):
if not name.endswith(".pdf"):
continue
with open(f"./invoices/{name}", "rb") as f:
r = requests.post(
"https://webfiletools.com/api/upload",
headers={"Authorization": f"Bearer {API_KEY}"},
files={"file": f},
)
print(f"{name} → {r.json().get('url')}")
time.sleep(0.5)GitHub Actions — publish a build artifact
- name: Publish artifact
run: |
URL=$(curl -s -X POST https://webfiletools.com/api/upload \
-H "Authorization: Bearer ${{ secrets.WFT_API_KEY }}" \
-F "file=@dist/app.zip" | jq -r '.url')
echo "Download: $URL" >> $GITHUB_STEP_SUMMARYIndex scanned contracts into a database (Python)
OCR a full folder and store extracted text in PostgreSQL.
import os, requests, psycopg2
API_KEY = "wft_YOUR_KEY"
conn = psycopg2.connect("dbname=docs user=admin")
cur = conn.cursor()
for pdf in os.listdir("./contracts"):
if not pdf.endswith(".pdf"):
continue
with open(f"./contracts/{pdf}", "rb") as f:
r = requests.post(
"https://webfiletools.com/api/v1/process/ocr",
headers={"Authorization": f"Bearer {API_KEY}"},
files={"file": f},
data={"lang": "eng"},
)
text = r.json()["text"]
cur.execute("INSERT INTO contracts (filename, content) VALUES (%s, %s)", (pdf, text))
conn.commit()Extract text from a screenshot (Node.js)
import FormData from "form-data";
import fs from "fs";
const form = new FormData();
form.append("file", fs.createReadStream("screenshot.png"));
form.append("lang", "eng");
const res = await fetch("https://webfiletools.com/api/v1/process/ocr", {
method: "POST",
headers: { Authorization: "Bearer wft_YOUR_KEY", ...form.getHeaders() },
body: form,
});
const { text, chars } = await res.json();
console.log(`Extracted ${chars} characters:`, text);Optimize PDFs before email attachment (Python)
Reduce file size before attaching, display compression ratio.
import requests
API_KEY = "wft_YOUR_KEY"
with open("annual-report.pdf", "rb") as f:
r = requests.post(
"https://webfiletools.com/api/v1/process/compress-pdf",
headers={"Authorization": f"Bearer {API_KEY}"},
files={"file": f},
data={"quality": "ebook"},
)
with open("annual-report-compressed.pdf", "wb") as out:
out.write(r.content)
orig = int(r.headers["X-Original-Size"])
comp = int(r.headers["X-Compressed-Size"])
saved = r.headers["X-Savings-Percent"]
print(f"{orig//1024} KB → {comp//1024} KB (-{saved}%)")Batch compression pipeline (bash)
#!/bin/bash
for f in ./reports/*.pdf; do
name=$(basename "$f" .pdf)
curl -s -X POST https://webfiletools.com/api/v1/process/compress-pdf \
-H "Authorization: Bearer wft_YOUR_KEY" \
-F "file=@$f" \
-F "quality=ebook" \
-o "./reports-compressed/$name-compressed.pdf"
echo "✓ $name"
doneGenerate presentation thumbnails (Node.js)
Convert a PDF to PNGs, extract the first page as a thumbnail.
import FormData from "form-data";
import fs from "fs";
import AdmZip from "adm-zip";
const form = new FormData();
form.append("file", fs.createReadStream("slides.pdf"));
form.append("dpi", "96"); // light DPI for thumbnails
const res = await fetch("https://webfiletools.com/api/v1/process/pdf-to-images", {
method: "POST",
headers: { Authorization: "Bearer wft_YOUR_KEY", ...form.getHeaders() },
body: form,
});
const zipBuf = Buffer.from(await res.arrayBuffer());
const zip = new AdmZip(zipBuf);
// Save only page 1 as thumbnail
zip.extractEntryTo("page-001.png", "./thumbs", false, true);
console.log(`Total pages: ${res.headers.get("X-Page-Count")}`);Make / n8n automation (cURL)
In an n8n or Make HTTP node, call the endpoint directly.
curl -X POST https://webfiletools.com/api/v1/process/pdf-to-images \
-H "Authorization: Bearer wft_YOUR_KEY" \
-F "file=@document.pdf" \
-F "dpi=150" \
-o pages.zip
# Unzip pages
unzip -o pages.zip -d ./pages/Security
- ✓Never commit your key to Git — use environment variables (.env or CI secrets)
- ✓Minimal scope — only enable the permissions you need (e.g. upload only)
- ✓One key per project — isolate access — if one key leaks, revoke it without affecting others
- ✓Immediate revocation — from your dashboard /dashboard/api-keys in seconds
- ✓Monitor quota — check X-RateLimit-Remaining to anticipate rate limiting
Ready to automate?
Create your account and get your first API key in under a minute.