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
}
The job ID of the extraction request
Job ID of the extraction request
Response object containing OCR results and extracted data
Show result
OCR results from document processing
Show ocr
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
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
}
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
}
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
}
The job ID of the extraction request
Job ID of the extraction request
Response object containing OCR results and extracted data
Show result
OCR results from document processing
Show ocr
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
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
}
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
}