Query Parameters
The job ID of the extraction request
Response
Job ID of the extraction request
Response object containing OCR results and extracted data
OCR results from document processing
Array of processed pages
Raw text content extracted from the page
Length of the extracted content
Name of the processed file
Number of input tokens processed
Number of output tokens generated
Processing time in milliseconds
Structured data extracted according to the provided schema
Total number of input tokens
Total number of output tokens
Confidence intervals for OCR and extracted values
Confidence intervals per OCR page
Confidence interval for the page
Confidence intervals for extracted structured data
Custom JSON from the request, returned in the response
Current state of the job, which can be PENDING
| IN_PROGRESS
| ERROR
|
COMPLETE
Time taken to process in milliseconds
const jobId = "<job-id>";
const options = {
method: "GET",
headers: {
"x-api-key": "<your-api-key>",
},
};
fetch(`https://api.getomni.ai/extract?jobId=${jobId}`, options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
{
"jobId": "087d73cc-e88a-43be-8bbb-5fcb932e7ef1",
"result": {
"ocr": {
"pages": [
{
"page": 1,
"content": "# Invoice ...",
"contentLength": 698
}
],
"fileName": "7faf9e7fd6cb4b3dbb4accca979023bb",
"inputTokens": 931,
"outputTokens": 220,
"completionTime": 8593
},
"extracted": {
"file_type": "invoice"
},
"inputTokens": 292,
"outputTokens": 7
},
"status": "COMPLETE",
"timeElapsed": 1852
}