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
}
Show result
Show ocr
PENDING
| IN_PROGRESS
| ERROR
|
COMPLETE
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
}