Processor
Process Documents And Download the Result
This endpoint allows to use Build instructions to process a document. This allows to assemble a PDF from multiple parts, such as an existing document in supported content type, a blank page, or an HTML page. You can apply one or more actions, such as watermarking, rotating pages, or importing annotations. Once the entire PDF is generated from its parts, you can also apply additional actions, such as optical character recognition (OCR), to the assembled PDF itself.
post/api/build
Request
- Base URL: http://localhost:5000
- URL: http://localhost:5000/api/build
- Auth: one of:
- API key in header Authorization
- HTTP bearer
Request body
Example request
{
"parts": [
{
"file": "pdf-file-from-multipart"
}
],
"actions": [
{
"file": {
"url": "https://remote-file-storage/input-file"
}
}
],
"output": {
"metadata": {
"title": "Nutrient Document Engine API Specification",
"author": "Document Author"
},
"labels": [
{
"label": "Page I-III"
}
]
}
}Response
The processing result. One of the following:
- PDF file for pdf, pdfa and pdfua output types.
- Image file for image output types.
- JSON with document contents for json-content output type.
- Office file for docx, xlsx, and pptx output types.
- HTML for html output type.
- Markdown for markdown output type.
Example response
{
"pages": [
{
"plainText": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.\n",
"structuredText": {
"characters": [
{
"bbox": {
"width": 100,
"height": 100
},
"value": "T"
}
],
"lines": [
{
"bbox": {
"width": 100,
"height": 100
},
"wordCount": 5
}
],
"paragraphs": [
{
"bbox": {
"width": 100,
"height": 100
},
"lineCount": 3
}
],
"words": [
{
"bbox": {
"width": 100,
"height": 100
},
"characterCount": 4,
"isFromDictionary": true,
"value": "word"
}
]
},
"keyValuePairs": [
{
"confidence": 95.4,
"key": {
"bbox": {
"width": 100,
"height": 100
},
"content": "#"
},
"value": {
"bbox": {
"width": 100,
"height": 100
},
"content": "€",
"dataType": "Currency"
}
}
],
"tables": [
{
"confidence": 95.4,
"bbox": {
"width": 100,
"height": 100
},
"cells": [
{
"bbox": {
"width": 100,
"height": 100
},
"isHeader": true,
"text": "Invoice number"
}
],
"columns": [
{
"bbox": {
"width": 100,
"height": 100
}
}
],
"lines": [
{
"bbox": {
"width": 100,
"height": 100
}
}
],
"rows": [
{
"bbox": {
"width": 100,
"height": 100
}
}
]
}
]
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.