Document Extraction

post
Extract fields from the uploaded image

https://worker.formextractorai.com/extract
Extraction fields are isolated from an uploaded image before OCR takes place on them. Form ID can be submitted as multipart/form-data or through a header. Image can be uploaded as is (binary) or through an image_url. For uploading image directly, it can be uploaded in the request body or via multipart/form-data. On the other hand, if you want to specify an image_url, it can be submitted via a header or multipart/form-data.
Request
Response
Request
Headers
X-WORKER-TOKEN
required
string
Access Token
X-WORKER-FORM-ID
required
string
Form ID
X-WORKER-IMAGE-URL
optional
string
URL of the image to extract fields in JPG or PNG format, required if request body is empty
X-WORKER-ENCODING
optional
string
Encoding of the request body, 'raw' or 'base64'; Default value: 'raw'
Content-Type
optional
string
`image/jpeg` or `image/png`, required if sent image content in the request body
Form Data Parameters
form_id
required
string
Form ID
image
optional
object
Image to extract in JPG or PNG format, either this parameter or image_url are required
image_url
optional
string
URL of image to extract in JPG or PNG format
Response
200: OK
status String "ok" if success
form_id String Form ID
fields Field[] List of extracted fields
Field.idoptional string Field ID (only appear in fields NOT belong in Detection Region)
Field.region_idoptional string Detection region ID (only appear in fields belong in Detection Region)
Field.label string Field label
Field.typeoptional string Field type (only appear in fields belong in Detection Region)
Field.languagesoptional string[] List of languages to support (only appear in fields NOT belong in Detection Region)
Field.content any Extracted content (For fields NOT belong to Detection Region, its type will always be string)
Field.erroroptional string Message of the error if exists