FileSlap API Quick Start

Convert HTML to a PDF in a single request.

cURL

curl -X POST https://api.fileslap.com/api/convert   -H "X-API-KEY: YOUR_KEY"   -H "Content-Type: application/json"   -d "{"html":"<h1>Hello PDF</h1>"}"   -o hello.pdf

Node example

import fetch from 'node-fetch';
import fs from 'fs';
import { pipeline } from 'stream/promises';

const res = await fetch('https://api.fileslap.com/api/convert', {
  method: 'POST',
  headers: {
    'X-API-KEY': 'YOUR_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ html: '<h1>Hello PDF</h1>' }),
});
await pipeline(res.body, fs.createWriteStream('hello.pdf'));

Need more examples? View pricing or contact us.