API Alur Kerja
Semua titik akhir memerlukan sesi yang sudah masuk (cookie) kecuali dinyatakan lain. Respons berupa JSON: { ok: true, data } atau { ok: false, error }. Kesalahan umum: 400 validasi, 401 tidak terautentikasi, 403 terlarang, 404 tidak ditemukan, 429 dibatasi laju, 502/503 upstream. Titik akhir publik /api/v1 mengautentikasi dengan Authorization: Bearer pdflean_… dan harus mengirimkan tipe konten JSON.
Alur Kerja
| Metode | Jalur | Deskripsi |
|---|---|---|
| GET | /api/workflows | Daftar alur kerja Anda |
| POST | /api/workflows | Buat alur kerja (draf) |
| GET | /api/workflows/:id | Ambil alur kerja |
| PUT | /api/workflows/:id | Perbarui alur kerja (draf, versi+1) |
| DELETE | /api/workflows/:id | Hapus alur kerja |
| POST | /api/workflows/:id/publish | Terbitkan versi |
| GET | /api/workflows/:id/versions | Daftar versi |
| POST | /api/workflows/:id/versions/:version/restore | Pulihkan versi |
Pemicu & Hook
| Metode | Jalur | Deskripsi |
|---|---|---|
| GET | /api/workflows/triggers | Daftar pemicu |
| POST | /api/workflows/triggers | Buat pemicu (webhook/jadwal/email/drive) |
| POST | /api/workflows/triggers/:id/run | Jalankan pemicu sekarang |
| DELETE | /api/workflows/triggers/:id | Hapus pemicu |
| POST | /api/workflows/hook/:token | Webhook masuk (auth token, tanpa sesi; body JSON) |
Eksekusi & Tinjauan
| Metode | Jalur | Deskripsi |
|---|---|---|
| POST | /api/workflows/runs | Buat eksekusi (antrean) |
| GET | /api/workflows/runs | Daftar eksekusi |
| GET | /api/workflows/runs/:id | Detail eksekusi dan langkah-langkahnya |
| POST | /api/workflows/runs/:id/retry | Ulangi eksekusi yang gagal/antre |
| GET | /api/workflows/reviews | Tinjauan oleh manusia yang tertunda |
| POST | /api/workflows/reviews/:id | Setujui/tolak tinjauan |
Jembatan Cloud
| Metode | Jalur | Deskripsi |
|---|---|---|
| GET | /api/workflows/cloud/status | Status jembatan VPS mandiri |
| POST | /api/workflows/cloud/convert | Office → PDF melalui VPS mandiri (LibreOffice) |
| POST | /api/workflows/cloud/ocr | OCR melalui VPS mandiri (Tesseract) |
| POST | /api/workflows/cloud/extract | Ekstrak bidang faktur/generik dari PDF (pdfjs + aturan) |
Arsip & Retensi
| Metode | Jalur | Deskripsi |
|---|---|---|
| GET | /api/workflows/archive | Daftar dokumen arsip dan integritas rantai |
| POST | /api/workflows/archive | Arsipkan dokumen (base64, rantai hash SHA-256) |
| GET | /api/workflows/archive/:id/verify | Verifikasi rantai hash arsip |
| GET | /api/workflows/archive/export | Ekspor CSV audit arsip (termasuk penanda penghapusan) |
| POST | /api/workflows/archive/:id/hold | Tetapkan/hapus legal hold |
| POST | /api/workflows/archive/:id/compliance | Aktifkan kunci kepatuhan WORM yang tidak dapat dibatalkan |
| DELETE | /api/workflows/archive/:id | Hapus arsip (diblokir selama legal hold) |
API Publik v1
| Metode | Jalur | Deskripsi |
|---|---|---|
| GET | /api/v1/openapi.json | Spesifikasi OpenAPI 3.1 (publik, tanpa autentikasi) |
| GET | /api/v1/me | Pemilik kunci API saat ini (kunci Bearer) |
| GET | /api/v1/usage | Dasbor penggunaan: saldo, riwayat 30 hari, panggilan terbaru |
| GET | /api/v1/workflows | Daftar alur kerja (scope workflow.read) |
| GET | /api/v1/workflows/:id | Mendapatkan alur kerja (scope workflow.read) |
| POST | /api/v1/workflows/:id/run | Mengantrekan sebuah run (scope workflow.run) |
| GET | /api/v1/runs | Daftar run (scope workflow.read) |
| POST | /api/v1/pdf/merge | Menggabungkan PDF (scope pdf.merge; 2–10 file base64) |
| POST | /api/v1/pdf/split | Menyimpan halaman yang dipilih (scope pdf.split; rentang seperti "1-3,5") |
| POST | /api/v1/pdf/compress | Kompresi struktural PDF (scope pdf.compress) |
| GET | /api/v1/jobs/:id | Status pekerjaan (gratis) |
| GET | /api/v1/jobs/:id/download | Mengunduh hasil pekerjaan (gratis) |
| POST | /api/v1/convert/office | Mengonversi dokumen Office/ODF (scope pdf.convert) |
| POST | /api/v1/convert/linearize | Melinierkan PDF untuk tampilan web cepat (scope pdf.convert) |
| POST | /api/v1/convert/typst | Mengompilasi sumber Typst/Markdown menjadi PDF (scope pdf.convert) |
| POST | /api/v1/ocr | OCR PDF hasil pindaian menjadi PDF yang dapat dicari (scope pdf.ocr) |
| POST | /api/v1/ocr/text | OCR satu gambar menjadi teks (scope pdf.ocr) |
| POST | /api/v1/validate/pdfa | Pemeriksaan kepatuhan PDF/A (scope pdf.validate) |
| POST | /api/v1/validate/pdfua | Pemeriksaan aksesibilitas PDF/UA (scope pdf.validate) |
| POST | /api/v1/validate/signature | Laporan verifikasi tanda tangan digital (scope pdf.validate) |
| POST | /api/v1/sign | Tanda tangan digital PAdES (scope pdf.sign; pasangan kunci PEM opsional) |
| POST | /api/v1/redact | Redaksi sesungguhnya dari kecocokan teks atau area (scope pdf.redact) |
| POST | /api/v1/extract | Ekstraksi bidang berbasis teks dan aturan (scope pdf.extract) |
| POST | /api/v1/docling | Penguraian tata letak terstruktur melalui Docling (scope pdf.extract) |
| POST | /api/v1/scan/pii | Memindai teks untuk informasi pribadi (scope pii.detect) |
Credit consumption
Member credits refresh each billing cycle (no rollover) and are spent before purchased credits. Credits are $0.001 each.
Top up API credits in your account (from $5, never expires)
| Method | Endpoint | Credits |
|---|---|---|
| GET | /jobs/:id | 0 per call |
| GET | /jobs/:id/download | 0 per call |
| GET | /me | 0 per call |
| GET | /runs | 0 per call |
| GET | /usage | 0 per call |
| GET | /workflows | 0 per call |
| GET | /workflows/:id | 0 per call |
| POST | /ai/chat | 3 per call |
| POST | /ai/extract | 5 per call |
| POST | /ai/pii-detect | 4 per call |
| POST | /ai/summarize | 3 per call |
| POST | /ai/translate | 3 per call |
| POST | /convert/linearize | 1 per call |
| POST | /convert/office | 2 per call |
| POST | /convert/typst | 1 per call |
| POST | /docling | 3 per call |
| POST | /extract | 2 per call |
| POST | /ocr | 3 per page |
| POST | /ocr/text | 1 per call |
| POST | /pdf/compress | 1 per call |
| POST | /pdf/merge | 1 per call |
| POST | /pdf/split | 1 per call |
| POST | /redact | 3 per call |
| POST | /scan/pii | 2 per call |
| POST | /sign | 5 per envelope |
| POST | /validate/pdfa | 2 per call |
| POST | /validate/pdfua | 2 per call |
| POST | /validate/signature | 2 per call |
| POST | /workflows/:id/run | 1 per call |
| ai.chat | 2 per call | |
| convert.html_to_pdf | 4 per page | |
| convert.office_to_pdf | 10 per page | |
| convert.pdf_to_office | 12 per page | |
| convert.pdfa | 8 per page | |
| esign.envelope | 750 per envelope | |
| pdf.ocr | 3 per page | |
| pdf.ocr.high | 8 per page |