API Gyorsútmutató
Próbáld ki az API-t azonnal kulcs nélkül (ingyenes csomag: 5 kérés/perc), vagy add meg az X-API-Key fejlécet a magasabb limitekért és havi kvótákért.
Végpont
POST https://fileapp.uk/api/v1/convert Content-Type: multipart/form-data X-API-Key: your_api_key_here # ingyenes csomagban opcionális
cURL példa
curl -X POST https://fileapp.uk/api/v1/convert \ -H "X-API-Key: YOUR_API_KEY" \ -F "[email protected]" \ --output invoice.pdf
Python példa
import requests
with open("report.xlsx", "rb") as f:
res = requests.post(
"https://fileapp.uk/api/v1/convert",
headers={"X-API-Key": "YOUR_API_KEY"},
files={"file": f},
timeout=30,
)
res.raise_for_status()
with open("report.pdf", "wb") as out:
out.write(res.content)
Node.js példa
import fs from "node:fs";
const form = new FormData();
const blob = new Blob([fs.readFileSync("deck.pptx")]);
form.append("file", blob, "deck.pptx");
const res = await fetch("https://fileapp.uk/api/v1/convert", {
method: "POST",
headers: { "X-API-Key": "YOUR_API_KEY" },
body: form,
});
if (!res.ok) throw new Error(await res.text());
fs.writeFileSync("deck.pdf", Buffer.from(await res.arrayBuffer()));
Kvóta és állapot ellenőrzése
GET https://fileapp.uk/api/v1/account # X-API-Key fejléccel GET https://fileapp.uk/api/v1/health
Támogatott kiterjesztések: csv, doc, docx, odt, ppt, pptx, rtf, txt, xls, xlsx. A hibák strukturált JSON formátumban ({"error": "...", "code": "..."}) érkeznek szabványos HTTP állapotkódokkal (400, 401, 402, 429, 503, 504).