API Reference
Introduction
Build PDF workflows, integrations and automations with the OpenPDF REST API.
https://pdf.rochlabs.online/v1Getting started
Upload a document, send an authenticated request and work with JSON responses. All public API routes live under /v1.
Quickstart
Make your first request
- Create an account — a default API key is generated for you.
- Upload a file (or use any public URL) and call an operation.
- Read the result from the returned
url(links expire per your plan).
Security
Authentication
Pass your key in the x-api-key header (or Authorization: Bearer).
curl https://pdf.rochlabs.online/v1/account/credit/balance -H "x-api-key: YOUR_API_KEY"
Async jobs & webhooks
Add "async": true to any operation. You get a jobId immediately:
{"jobId": "a1b2c3…", "error": false, "status": 200, "async": true}
Poll POST /v1/job/check with {"jobId": "…"} until status is success / failed. Or pass "callback": "https://your.app/hook" and OpenPDF will POST the final payload to you (3 retries with backoff).
File workflow
- Direct:
POST /v1/file/upload(multipart) →{"url": …} - Presigned:
GET /v1/file/upload/get-presigned-url?name=doc.pdf→ PUT your bytes topresignedUrl(valid 30 min) → useurl. - From the web:
POST /v1/file/upload/urlwith any public URL; operations also accept public URLs directly inurl. - Inline: most operations accept
file= base64 bytes instead ofurl.
Temporary files & results auto-delete when their link expires (60 min default; up to 24 h on top plans via expiration).
Errors & credits
{"error": true, "status": 402, "message": "Not enough credits for 'pdf/merge' …"}
| Status | Meaning |
|---|---|
| 400 | Bad parameters / unreadable input |
| 401 | Missing or invalid API key |
| 402 | Not enough credits |
| 404 / 410 | File not found / link expired |
| 429 | Rate limit (120 req/min per key) |
| 501 | Optional engine (OCR / zbar) not installed on this server |
Successful responses always include credits (charged) and remainingCredits. Cost = base + per-page, shown on each endpoint below.
Convert from PDF
/v1/pdf/convert/to/text2 + 1/page crText
Extract plain text from a PDF (layout-aware).
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
pages | string | 1-based page filter, e.g. "1,3-5,7-". Empty = all pages. | |
password | string | Password of the source PDF if protected. | |
inline | boolean | Also return the result content in the `body` field. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/convert/to/text \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"inline": true, "url": "https://example.com/invoice.pdf"}'/v1/pdf/convert/to/json2 + 1/page crJson
Structured JSON: per-page text, dimensions and detected tables.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
pages | string | 1-based page filter, e.g. "1,3-5,7-". Empty = all pages. | |
password | string | Password of the source PDF if protected. | |
inline | boolean | Also return the result content in the `body` field. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/convert/to/json \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/report.pdf"}'/v1/pdf/convert/to/csv2 + 1/page crCsv
Detected tables as CSV (falls back to text lines).
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
pages | string | 1-based page filter, e.g. "1,3-5,7-". Empty = all pages. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/convert/to/csv \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/table.pdf"}'/v1/pdf/convert/to/xml2 + 1/page crXml
XML document with per-page text nodes.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
pages | string | 1-based page filter, e.g. "1,3-5,7-". Empty = all pages. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/convert/to/xml \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/doc.pdf"}'/v1/pdf/convert/to/html2 + 1/page crHtml
Simple HTML rendition of the PDF text.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
pages | string | 1-based page filter, e.g. "1,3-5,7-". Empty = all pages. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/convert/to/html \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/doc.pdf"}'/v1/pdf/convert/to/image2 + 2/page crImage
Render pages to PNG/JPG/WEBP/TIFF images.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
pages | string | 1-based page filter, e.g. "1,3-5,7-". Empty = all pages. | |
password | string | Password of the source PDF if protected. | |
format | string | png (default), jpg, webp, tiff | |
dpi | integer | Render resolution, 36-600 (default 150) | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/convert/to/image \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"dpi": 150, "format": "png", "url": "https://example.com/doc.pdf"}'Convert to PDF
/v1/pdf/convert/from/html5 crHtml
HTML string or web page URL to PDF.
| Param | Type | Description | |
|---|---|---|---|
html | string | Raw HTML to convert (or use url). | |
url | string | Web page to fetch and convert. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/convert/from/html \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"html": "\u003ch1\u003eHello\u003c/h1\u003e\u003cp\u003eGenerated by OpenPDF\u003c/p\u003e", "name": "hello.pdf"}'/v1/pdf/convert/from/url5 crUrl
Alias of from/html for web pages.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Web page to fetch and convert. |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/convert/from/url \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'/v1/pdf/convert/from/image3 + 1/page crImage
One or more images (JPG/PNG/WEBP/TIFF) into a single PDF.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Image URL(s), comma-separated. |
urls | array | Alternative: JSON array of image URLs. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/convert/from/image \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/a.png,https://example.com/b.png"}'Edit & organize
/v1/pdf/merge4 + 1/page crMerge
Merge PDFs (and images) into one document.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | 2+ file URLs, comma-separated. |
urls | array | Alternative: JSON array of URLs. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/merge \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/a.pdf,https://example.com/b.pdf"}'/v1/pdf/split4 + 1/page crSplit
Split by page ranges; each comma token becomes one output PDF.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
pages | string | e.g. "1-2,3-" → two documents. Empty = one PDF per page. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/split \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"pages": "1-2,3-", "url": "https://example.com/doc.pdf"}'/v1/pdf/edit/rotate3 crRotate
Rotate pages by 90/180/270 degrees.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
angle | integer | required | 90, 180 or 270 |
pages | string | 1-based page filter, e.g. "1,3-5,7-". Empty = all pages. | |
rotations | object | Visual editor map: {pageNumber: angle}. Overrides angle/pages. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/edit/rotate \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"angle": 90, "url": "https://example.com/doc.pdf"}'/v1/pdf/edit/delete-pages3 crDelete Pages
Remove pages from the document.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
pages | string | required | Pages to delete, e.g. "2,5-6" |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/edit/delete-pages \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"pages": "2", "url": "https://example.com/doc.pdf"}'/v1/pdf/edit/add4 + 1/page crAdd
Stamp text, watermarks and images onto pages (top-left coordinates).
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
annotations | array | [{text,x,y,size,color,opacity,bold,pages,type:'watermark'}] | |
images | array | [{url,x,y,width,height,pages}] | |
text | string | Shortcut: single text stamp (with x,y). | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/edit/add \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"annotations": [{"color": "#d33", "text": "APPROVED", "type": "watermark"}], "url": "https://example.com/doc.pdf"}'/v1/pdf/edit/fill4 crFill
Fill AcroForm fields ({fieldName: value}).
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
fields | object | required | {"FullName": "Jane"} |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/edit/fill \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"fields": {"FullName": "Jane Doe"}, "url": "https://example.com/form.pdf"}'/v1/pdf/optimize4 + 1/page crOptimize
Compress a PDF (lossless; or rasterize=true for maximum reduction).
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
rasterize | boolean | Re-render pages as images (lossy, much smaller). | |
dpi | integer | Rasterize resolution (default 120). | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/optimize \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/big.pdf"}'Security & OCR
/v1/pdf/security/add3 crAdd
Encrypt with user/owner passwords (AES-256).
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
password | string | User password (to open). | |
ownerPassword | string | Owner password (permissions). | |
encryptionAlgorithm | string | AES-256 (default), AES-128, RC4-128 | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/security/add \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"password": "secret123", "url": "https://example.com/doc.pdf"}'/v1/pdf/security/remove3 crRemove
Remove password protection (requires the password).
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/security/remove \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"password": "secret123", "url": "https://example.com/locked.pdf"}'/v1/pdf/makesearchable5 + 4/page crMakesearchable
OCR scanned pages into a searchable PDF (tesseract).
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
lang | string | OCR language, e.g. eng, spa (default eng) | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/makesearchable \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"lang": "spa", "url": "https://example.com/scan.pdf"}'/v1/pdf/makeunsearchable4 + 2/page crMakeunsearchable
Rasterize pages so text cannot be selected or extracted.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
dpi | integer | 72-300 (default 150) | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/makeunsearchable \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/doc.pdf"}'Extract & parse
/v1/pdf/info1 crInfo
Metadata, page count, encryption and form detection.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
password | string | Password of the source PDF if protected. |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/info \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/doc.pdf"}'/v1/pdf/find2 + 1/page crFind
Find text (or regex) with page + coordinates of each match.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
searchString | string | required | Text or regex to find. |
regexSearch | boolean | Treat searchString as a regex. | |
caseInsensitive | boolean | Default true. | |
pages | string | 1-based page filter, e.g. "1,3-5,7-". Empty = all pages. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/find \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"regexSearch": false, "searchString": "Total", "url": "https://example.com/doc.pdf"}'/v1/pdf/documentparser5 + 2/page crDocumentparser
Template-driven field extraction (regex templates) or automatic key/value sweep.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
template | object | {fields:[{name, regex}]} — first capture group is the value. | |
templateId | string | Built-in template id, e.g. invoice-default. | |
includeTables | boolean | Also extract tables. | |
pages | string | 1-based page filter, e.g. "1,3-5,7-". Empty = all pages. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/documentparser \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"templateId": "invoice-default", "url": "https://example.com/invoice.pdf"}'/v1/ai-invoice-parser10 + 2/page crAi Invoice Parser
Invoice fields (number, dates, totals, tax, IBAN…) without a template.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/ai-invoice-parser \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/invoice.pdf"}'/v1/pdf/forms/info1 crInfo
List fillable form fields with types, values and options.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
password | string | Password of the source PDF if protected. |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/forms/info \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/form.pdf"}'/v1/pdf/attachments/extract2 crExtract
Extract embedded file attachments.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/pdf/attachments/extract \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/portfolio.pdf"}'Barcodes
/v1/barcode/generate1 crGenerate
Generate QR / Code128 / EAN13 / UPC-A... as PNG.
| Param | Type | Description | |
|---|---|---|---|
value | string | required | Content to encode. |
type | string | qrcode (default), code128, code39, ean13, ean8, upca, isbn13 | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/barcode/generate \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"type": "qrcode", "value": "https://openpdf.dev"}'/v1/barcode/read3 + 2/page crRead
Read barcodes/QR from an image or PDF pages.
| Param | Type | Description | |
|---|---|---|---|
url | string | required | Source file URL. Your own /f/... links, any public URL, or comma-separated for multi-input ops. |
file | string | Alternative to url: base64-encoded input file. | |
pages | string | 1-based page filter, e.g. "1,3-5,7-". Empty = all pages. | |
password | string | Password of the source PDF if protected. | |
async | boolean | Run in background: response carries `jobId` for /v1/job/check. | |
callback | string | Webhook URL to POST the final result to (async mode). | |
name | string | Output file name. | |
expiration | integer | Output link lifetime in minutes (capped by your plan). |
curl example
curl -X POST https://pdf.rochlabs.online/v1/barcode/read \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/label.png"}'Platform
/v1/job/checkfreeCheck a job
Check an async job. Status: working, success, failed, aborted, unknown. On success the payload carries the full operation result.
curl -X POST https://pdf.rochlabs.online/v1/job/check -H "x-api-key: KEY" -d '{"jobId": "…"}'/v1/file/uploadfreeUpload a file
Multipart upload (file field). Also: GET /v1/file/upload/get-presigned-url, POST /v1/file/upload/url, POST /v1/file/delete, GET /v1/file/list.
/v1/account/credit/balancefreeCredit balance
Remaining credits, current plan and next reset date. Also GET /v1/account/profile and GET /v1/capabilities.