docs
UAEN
API Reference

Form Filling

Fill PDF or image forms with provided field data. Supports PDFs with and without native form fields.

POST/api/v1/fill

Authorizations

X-API-Keystringheaderrequired
Your API key for authentication

Body Parameters

field_datastringbodyrequired
JSON string mapping field keys to values and descriptions. Format: {"field_key": {"value": "...", "description": "..."}}
file_urlstringbody
Optional file URL (http/https). If provided, the server will download and process it.
contextstringbody
Optional context to guide form filling (e.g., 'Initial hire for new employee').
confidence_thresholdnumberbody
Minimum confidence for field matching (0.0-1.0). Fields below this threshold won't be filled.
page_rangestringbody
Pages to process, comma separated like 0,5-10,20.
skip_cachebooleanbody
Skip the cache and re-run the inference. Defaults to false.
filefilebody
Input PDF, Word, PowerPoint, or image file. Images must be png, jpg, or webp.

Cookies

wos-sessionstringcookie
Session cookie
access_tokenstringcookie
Access token cookie
datalab_active_teamstringcookie
Active team cookie

Response

Successful Response
Form Filling
import requests

url = "https://www.datalab.to/api/v1/fill"
files = {
    "file.0": ("example-file", open("example-file", "rb"))
}
payload = {
    "field_data": "<string>",
    "file_url": "<string>",
    "context": "<string>",
    "confidence_threshold": "0.5",
    "page_range": "<string>",
    "skip_cache": "false"
}
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)
200Success
{
  "request_id": "<string>",
  "request_check_url": "<string>",
  "success": true,
  "error": "<string>",
  "versions": {}
}