LeaflyPDF API

250 jobb/månad gratis, därefter från 0,005 €/jobb · REST + webhooks · SDK:er

OpenAPI reference · openapi.json · API-nycklar

1. Create a job

curl -X POST https://api.leaflypdf.com/v1/jobs \
  -H "Authorization: Bearer $LEAFLYPDF_KEY" \
  -F tool=compress \
  -F 'options={"preset":"recommended"}' \
  -F file=@input.pdf

2. Poll or receive a webhook

curl https://api.leaflypdf.com/v1/jobs/$JOB_ID -H "Authorization: Bearer $LEAFLYPDF_KEY"
# webhook: POST with header LeaflyPDF-Signature: t=<ts>,v1=<hmac-sha256(secret, "<ts>.<body>")>

3. Download

curl -o out.pdf https://api.leaflypdf.com/v1/jobs/$JOB_ID/outputs/0 -H "Authorization: Bearer $LEAFLYPDF_KEY"

SDKs

npm i @pdfworks/sdk
import { PdfWorks } from '@pdfworks/sdk';
const pw = new PdfWorks({ apiKey: process.env.LEAFLYPDF_KEY });
const [out] = await pw.run('merge', [a, b]);

pip install pdfworks
from pdfworks import PdfWorks
PdfWorks(api_key=KEY).run("ocr", ["scan.pdf"], {"langs": ["deu"]})

Tools (68)

idVerktygengine
mergeSammanfoga PDFlocal
splitDela PDFlocal
remove-pagesTa bort sidorlocal
extract-pagesExtrahera sidorlocal
organizeOrganisera PDFlocal
rotateRotera PDFlocal
remove-blank-pagesTa bort tomma sidorlocal
insert-blankInfoga tom sidalocal
alternate-mixVarva och blandalocal
split-halfDela sidor på mittenlocal
n-upFlera sidor per arklocal
scanSkanna till PDFlocal
compressKomprimera PDFlocal
repairReparera PDFlocal
ocrOCR PDFhybrid
deskewRäta upplocal
grayscalePDF i gråskalalocal
linearizeWebboptimeralocal
flattenPlatta till PDFlocal
images-to-pdfJPG till PDFlocal
word-to-pdfWord till PDFserver
excel-to-pdfExcel till PDFserver
powerpoint-to-pdfPowerPoint till PDFserver
html-to-pdfHTML till PDFserver
text-to-pdfText till PDFlocal
epub-to-pdfEPUB till PDFserver
pdf-to-imagesPDF till JPGlocal
extract-imagesExtrahera bilderlocal
pdf-to-wordPDF till Wordlocal
pdf-to-excelPDF till Excellocal
pdf-to-powerpointPDF till PowerPointlocal
pdf-to-pdfaPDF till PDF/Alocal
pdf-to-textPDF till textlocal
pdf-to-markdownPDF till Markdownlocal
attachmentsExtrahera bilagorlocal
editRedigera PDFlocal
edit-textRedigera textlocal
page-numbersSidnummerlocal
header-footerSidhuvud och sidfotlocal
watermarkVattenstämpellocal
overlayLägg över PDFlocal
batesBates-numreringlocal
cropBeskär PDFlocal
resizeÄndra sidstorleklocal
flipVänd sidorlocal
metadataRedigera metadatalocal
bookmarksRedigera bokmärkenlocal
fill-formFyll i PDF-formulärlocal
create-formSkapa formulärlocal
protectSkydda PDFlocal
unlockLås upp PDFlocal
signSignera PDFlocal
request-signaturesBegär signaturerserver
redactMaskera PDFlocal
compareJämför PDFlocal
chatChatta med PDFserver
summarizeAI-sammanfattningserver
translateÖversätt PDFserver
questionsFrågegeneratorserver
extract-dataExtrahera dataserver
smart-renameSmart namnbyteserver
smart-splitSmart delningserver
smart-redactAI-maskeringserver
einvoiceE-fakturavisarelocal
create-zugferdSkapa ZUGFeRDlocal
accessibilityTillgänglighetskontrolllocal
alt-textFörslag på alternativtextserver
inspectPDF-infolocal