PDF KVADRATI / API

From request to document.

Two endpoints. JSON in. PDF out. Everything for your first integration.

Get an API keyOpen Swagger ↗

Download Postman collection (sign-in required)

Delete a customer account

DELETE /api/v1/portal/admin/accounts/{id} permanently deletes a customer account. Use a signed-in superadministrator session. List eligible IDs with GET /api/v1/portal/admin/deletable-accounts.

Get a CSRF token from GET /api/v1/account/csrf in the same session. Send it in the X-CSRF-TOKEN header.

const { token } = await (await fetch('/api/v1/account/csrf')).json();
const response = await fetch('/api/v1/portal/admin/accounts/' + encodeURIComponent(id), {
  method: 'DELETE',
  headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': token },
  body: JSON.stringify({ confirmation: 'DELETE' })
});
StatusMeaning
204Deleted. Empty response.
400Missing or incorrect confirmation or CSRF token.
401 / 403Administrator session required, or target account is protected.
404Customer account ID could not be found.

Files in Uploaded/<user-id> are removed before account records. Shared tenants remain available to their other users.

Authentication

Create an account and open your workspace. Send the API key in the Authorization header. Keep it on your server, never in public browser code.

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Base URL: https://pdf.kvadrati.com

Turnstile protects website forms. The conversion API uses your API key and does not need a Turnstile token.
POST /pdf/from-html

HTML → PDF

Send HTML and an optional filename. The result is a binary A4 PDF with backgrounds included.

FieldDescription
htmlRequired string. HTML document with CSS.
fileNameOptional string. The .pdf extension is added automatically.
{
  "html": "<html><body><h1>Hello PDF</h1></body></html>",
  "fileName": "report.pdf"
}

200 OK · Content-Type: application/pdf

POST /pdf/from-url

URL → PDF

Send a publicly accessible URL. The service fetches its HTML and resolves relative resource links. Pages requiring sign-in or an interactive session are not suitable.

{
  "url": "https://example.com/report",
  "fileName": "report.pdf"
}

The URL must use HTTP or HTTPS. Only use content you are authorised to access and convert.

Integration examples

cURL

curl https://pdf.kvadrati.com/pdf/from-html \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Hello PDF</h1>","fileName":"report.pdf"}' \
  --output report.pdf

Python

import os
import requests

response = requests.post(
    "https://pdf.kvadrati.com/pdf/from-html",
    headers={"Authorization": "Bearer " + os.environ["PDF_API_KEY"]},
    json={"html": "<h1>Hello PDF</h1>", "fileName": "report.pdf"},
    timeout=60,
)
response.raise_for_status()
with open("report.pdf", "wb") as file:
    file.write(response.content)

C# / .NET 10

using System.Net.Http.Headers;
using System.Net.Http.Json;

using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
    "Bearer", Environment.GetEnvironmentVariable("PDF_API_KEY"));
using var response = await client.PostAsJsonAsync(
    "https://pdf.kvadrati.com/pdf/from-html",
    new { html = "<h1>Hello PDF</h1>", fileName = "report.pdf" });
response.EnsureSuccessStatusCode();
await File.WriteAllBytesAsync("report.pdf", await response.Content.ReadAsByteArrayAsync());

Limits and errors

A free account has 2 conversions per day. The daily period uses UTC; a failed conversion can consume an attempt. Enquire for higher volumes.

HTTPMeaning
400Invalid or missing API key, empty input or daily quota reached.
429Too many requests. Wait before retrying.
500Content retrieval or PDF generation failed.

Check HTTP status before saving a response. Error responses are not PDF files.

GET /pdf/ping

A simple service availability check, without an API key.

Necessary cookies support sign-in, security and language preferences. Optional analytics is off by default. Google Analytics (G-SWX5P5DZD7) loads only with your consent to measure page visits. You can change your choice at any time in cookie settings.

Read our privacy notice