Convert Flat PDF to Fillable (Async)
Endpoint
POST /v1/forms/convert
Description
Starts an asynchronous flat → fillable PDF conversion using Instafill’s Python processing engine.
This endpoint accepts raw PDF bytes, forwards them to the Python service, and returns a job_id you can later use to check progress.
Supported parameters:
- pages — convert only specific pages (e.g.,
"1,3-5"). - confidence — Detection confidence threshold (default:
0.1). - resolution — image resolution (
imgsz) for inference (default:1600).
This endpoint does not return the final PDF — only a job_id.
Use: GET /v1/forms/convert/{job_id}/status
to track conversion progress and obtain the final PDF URL.
Accepted file types —
application/pdforapplication/octet-stream
Any otherContent-Typereturns 415 Unsupported Content Type.
Request
Headers
| Header | Required | Value |
|---|---|---|
Content-Type | ✓ | application/pdf or application/octet-stream |
Authorization | ✓ | Bearer YOUR_API_KEY |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
pages | string | No | Pages to convert ("1", "1,3", "1-5", "1,3-5"). |
confidence | number | No | Detection confidence (conf). Default: 0.1. |
resolution | number | No | Inference resolution (imgsz). Default: 1600. |
Body
Binary contents of the PDF file.
cURL Example
curl -X POST "https://api.instafill.ai/v1/forms/convert?pages=1,3-5&confidence=0.25&resolution=1900" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/pdf" \
--data-binary "@flat-form.pdf"
Response Body:
{
"job_id": "675f5d197d9800b68b5c4c44"
}