Skip to main content

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 typesapplication/pdf or application/octet-stream
Any other Content-Type returns 415 Unsupported Content Type.


Request

Headers

HeaderRequiredValue
Content-Typeapplication/pdf or application/octet-stream
AuthorizationBearer YOUR_API_KEY

Query Parameters

NameTypeRequiredDescription
pagesstringNoPages to convert ("1", "1,3", "1-5", "1,3-5").
confidencenumberNoDetection confidence (conf). Default: 0.1.
resolutionnumberNoInference 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"
}