FileSlap API Quick Start
Convert HTML to a PDF in a single request. All requests require a valid API key.
cURL
curl -X POST https://api.fileslap.com/api/convert \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{"html": "<h1>Hello World</h1>"}' \
--output hello.pdfNode.js
import fetch from "node-fetch";
import fs from "fs";
const res = await fetch("https://api.fileslap.com/api/convert", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
},
body: JSON.stringify({ html: "<h1>Hello World</h1>" })
});
if (!res.ok) {
throw new Error(`HTTP ${res.status}`);
}
const buffer = await res.arrayBuffer();
fs.writeFileSync("hello.pdf", Buffer.from(buffer));Python
import requests
response = requests.post(
"https://api.fileslap.com/api/convert",
headers={
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
},
json={"html": "<h1>Hello World</h1>"}
)
if response.status_code == 200:
with open("hello.pdf", "wb") as f:
f.write(response.content)
else:
print(f"Error: {response.status_code}")JavaScript (Browser)
const response = await fetch("https://api.fileslap.com/api/convert", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
},
body: JSON.stringify({ html: "<h1>Hello World</h1>" })
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
const blob = await response.blob();
const url = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = "hello.pdf";
a.click();
window.URL.revokeObjectURL(url);API Reference
- • Content-Type: application/json
- • X-API-KEY: Your API key
{
"html": "<h1>Your HTML content</h1>"
}Developer Tools
Complete Integration Guides
Step-by-step guides for every major platform. From Node.js to no-code tools, we've got you covered with production-ready code examples.
Node.js Integration
Convert HTML to PDF with Node.js - Complete guide with Express.js and Next.js integration
Python Integration
Generate PDFs with Python - Flask, Django, and async processing examples
React Integration
Convert React components to PDFs - Browser-based generation with custom hooks
Zapier Integration
Automate PDF generation with Zapier - No-code workflows for business automation
Make.com Integration
Advanced automation with Make.com - Complex workflows and multi-source data
n8n Integration
Self-hosted automation with n8n - Developer-focused workflows with unlimited flexibility
Google Apps Script
Automate PDF generation in Google Workspace - Sheets, Forms, and Gmail integration
The Ultimate Guide
Get the complete overview of all integration options and choose the perfect platform for your needs.
Read Ultimate Guide