RikAI-Extract
Download OpenAPI specification:Download
Document input, JSON response
Make a request to RikAI2-Extract and receive JSON response data.
File upload options
We support requests with Content-Type application/json
or multipart/form-data
.
[application/json]
inputURL link to file[application/json]
base64 base64 encoded file data[multipart/form-data]
file upload local file from browser
header Parameters
orgId required | string (orgId) non-empty ^[a-zA-Z0-9\-_]+$ Organization ID |
authKey required | string (authKey) non-empty ^[a-zA-Z0-9\-_]+$ Authentication key |
apiVersion required | string (apiVersion) API version used for the request. Defaults to the latest production version. To pin to a specific API version, please contact your Lazarus representative to receive the appropriate version header. |
Request Body schema: required
inputURL required | string (https?|s?ftp)://(?:www\\.)?[a-zA-Z0-9./:]+ URL for the file to extract data from: Must be a PDF, JPEG, JPG, PNG, TIFF, TIF or TXT. |
required | object or string Examples: "{\"PatientInfo\": {\"FirstName\": {\"data\": \"Patient first name\", \"page_number\": 0}, \"LastName\": {\"data\": \"Patient last name\", \"page_number\": 0}}}" A JSON string or a dictionary containing the question(s) to be asked. |
object (Settings) Optional user settings. | |
webhook | string https?://(?:www\\.)?[a-zA-Z0-9./:]+ Webhook URL to which status updates and JSON response will be sent. This is where you will receive the model output. Here is an example of a webhook URL response. |
webhookHeaders | object Request headers to include in the POST requests to the webhook. |
webhookSendFull | boolean Default: true Receive the full JSON response at the webhook URL upon request completion. Set to |
fileId | string Examples: "file1.pdf" Custom ID for document. Requests with multiple files accept unique fileIds for each file. |
forceBase64 | boolean Default: false Setting this parameter to true converts files to Base64 format before sending them on to the model. |
forceOCR | boolean Default: false Will rasterize a pdf. Set this parameter to |
language | string A language code (e.g. 'EN') or the name of the language you wish to translate answers into. List of supported codes. |
metadata | object Custom JSON to be included in the returned response. |
SFTP (object) or InputOutputSFTP (object) SFTP authentication details. Required for SFTP URLs in | |
staticIP | boolean Default: false Set to |
Responses
Request samples
- Payload
{- "question": {
- "PatientInfo": {
- "FirstName": {
- "data": "Patient first name",
- "page_number": 0
}, - "LastName": {
- "data": "Patient last name",
- "page_number": 0
}
}
}, - "webhook": null,
- "settings": {
- "returnConfidence": true
}, - "webhookHeaders": null,
- "webhookSendFull": false,
- "fileId": "form1.pdf",
- "forceBase64": false,
- "forceOCR": false,
- "language": "en",
- "metadata": null,
- "outputURL": null,
- "outputURLHeaders": null,
- "returnJSON": false,
- "sftp": null,
- "staticIP": false
}
Response samples
- 200
- 400
- 403
- 404
- 500
- 502
{- "model": "string",
- "pages": 0,
- "questions": 0,
- "apiVersion": "string",
- "baseModel": "string",
- "data": [
- {
- "answer": { },
- "question": { }
}
], - "documentId": "string",
- "endTime": 0,
- "id": "string",
- "language": "string",
- "metadata": { },
- "settings": { },
- "startTime": 0,
- "status": "SUCCESS"
}
Document input, ZIP file response
Make a request to RikAI2-Extract and receive response data in a ZIP file.
To process your request asynchronously and send the ZIP file to an outputURL
, include the async
query parameter.
File upload options
We only support requests with Content-Type application/json
at this endpoint.
[application/json]
inputURL link to file[application/json]
base64 base64 encoded file data
Response zip file contents
File | Description |
---|---|
.csv | CSV containing a breakdown of the itemization |
.json | JSON file containing the entire JSON response |
.txt | TXT file containing the entire JSON response |
file | The original uploaded file |
The default name for the file is an epoch timestamp if fileId
field is not included in the request.
query Parameters
boolean or null Runs request asynchronously |
header Parameters
orgId required | string (orgId) non-empty ^[a-zA-Z0-9\-_]+$ Organization ID |
authKey required | string (authKey) non-empty ^[a-zA-Z0-9\-_]+$ Authentication key |
apiVersion required | string (apiVersion) API version used for the request. Defaults to the latest production version. To pin to a specific API version, please contact your Lazarus representative to receive the appropriate version header. |
Request Body schema: application/jsonrequired
inputURL required | string (https?|s?ftp)://(?:www\\.)?[a-zA-Z0-9./:]+ URL for the file to extract data from: Must be a PDF, JPEG, JPG, PNG, TIFF, TIF or TXT. |
required | object or string Examples: "{\"PatientInfo\": {\"FirstName\": {\"data\": \"Patient first name\", \"page_number\": 0}, \"LastName\": {\"data\": \"Patient last name\", \"page_number\": 0}}}" A JSON string or a dictionary containing the question(s) to be asked. |
outputURL required | string (https?|s?ftp)://(?:www\\.)?[a-zA-Z0-9./:]+ URL where resulting zip file or JSON can be sent. Must be open to PUT requests. |
webhook | string https?://(?:www\\.)?[a-zA-Z0-9./:]+ Webhook URL to which status updates and JSON response will be sent. This is where you will receive the model output. Here is an example of a webhook URL response. |
object (Settings) Optional user settings. | |
webhookHeaders | object Request headers to include in the POST requests to the webhook. |
webhookSendFull | boolean Default: true Receive the full JSON response at the webhook URL upon request completion. Set to |
fileId | string Examples: "file1.pdf" Custom ID for document. Requests with multiple files accept unique fileIds for each file. |
forceBase64 | boolean Default: false Setting this parameter to true converts files to Base64 format before sending them on to the model. |
forceOCR | boolean Default: false Will rasterize a pdf. Set this parameter to |
language | string A language code (e.g. 'EN') or the name of the language you wish to translate answers into. List of supported codes. |
metadata | object Custom JSON to be included in the returned response. |
outputURLHeaders | object Request headers to include in the PUT request to the output URL. |
returnJSON | boolean Default: false Set to |
SFTP (object) or InputOutputSFTP (object) SFTP authentication details. Required for SFTP URLs in | |
staticIP | boolean Default: false Set to |
Responses
Request samples
- Payload
{- "question": {
- "PatientInfo": {
- "FirstName": {
- "data": "Patient first name",
- "page_number": 0
}, - "LastName": {
- "data": "Patient last name",
- "page_number": 0
}
}
}, - "webhook": null,
- "settings": {
- "returnConfidence": true
}, - "webhookHeaders": null,
- "webhookSendFull": false,
- "fileId": "form1.pdf",
- "forceBase64": false,
- "forceOCR": false,
- "language": "en",
- "metadata": null,
- "outputURL": null,
- "outputURLHeaders": null,
- "returnJSON": false,
- "sftp": null,
- "staticIP": false
}
Response samples
- 200
- 207
- 400
- 403
- 404
- 500
- 502
{- "code": 0,
- "model": "string",
- "organization": "string",
- "pages": 0,
- "apiVersion": "string",
- "documentId": "string",
- "endTime": 0,
- "id": "string",
- "metadata": { },
- "questions": 0,
- "startTime": 0,
- "status": "SUCCESS",
- "statusId": "string",
- "warning": { }
}
Bulk file upload
Upload 1 or more files to a custom model for asynchronous processing. By default, a ZIP file will be uploaded to your outputURL
for each document in the request. If you set the returnJSON
parameter to true, a JSON file will be provided to the outputURL
instead.
File upload options
We only support requests with Content-Type application/json
at this endpoint.
[application/json]
inputURL link to file[application/json]
base64 base64 encoded file data
Response zip file contents
File | Description |
---|---|
.csv | CSV containing a breakdown of the itemization |
.json | JSON file containing the entire JSON response |
.txt | TXT file containing the entire JSON response |
file | The original uploaded file |
The default name for the file is an epoch timestamp if a file name could not be extracted from file data.
header Parameters
orgId required | string (orgId) non-empty ^[a-zA-Z0-9\-_]+$ Organization ID |
authKey required | string (authKey) non-empty ^[a-zA-Z0-9\-_]+$ Authentication key |
apiVersion required | string (apiVersion) API version used for the request. Defaults to the latest production version. To pin to a specific API version, please contact your Lazarus representative to receive the appropriate version header. |
Request Body schema: application/jsonrequired
required | Array of strings or string URL for the file to extract data from: Must be a PDF, JPEG, JPG, PNG, TIFF, TIF or TXT. |
required | object or string Examples: "{\"PatientInfo\": {\"FirstName\": {\"data\": \"Patient first name\", \"page_number\": 0}, \"LastName\": {\"data\": \"Patient last name\", \"page_number\": 0}}}" A JSON string or a dictionary containing the question(s) to be asked. |
outputURL required | string (https?|s?ftp)://(?:www\\.)?[a-zA-Z0-9./:]+ URL where resulting zip file or JSON can be sent. Must be open to PUT requests. |
webhook | string https?://(?:www\\.)?[a-zA-Z0-9./:]+ Webhook URL to which status updates and JSON response will be sent. This is where you will receive the model output. Here is an example of a webhook URL response. |
object (Settings) Optional user settings. | |
webhookHeaders | object Request headers to include in the POST requests to the webhook. |
webhookSendFull | boolean Default: true Receive the full JSON response at the webhook URL upon request completion. Set to |
Array of strings or string Examples: "file1.pdf" Custom ID for document. Requests with multiple files accept unique fileIds for each file. | |
forceBase64 | boolean Default: false Setting this parameter to true converts files to Base64 format before sending them on to the model. |
forceOCR | boolean Default: false Will rasterize a pdf. Set this parameter to |
language | string A language code (e.g. 'EN') or the name of the language you wish to translate answers into. List of supported codes. |
metadata | object Custom JSON to be included in the returned response. |
outputURLHeaders | object Request headers to include in the PUT request to the output URL. |
returnJSON | boolean Default: false Set to |
SFTP (object) or InputOutputSFTP (object) SFTP authentication details. Required for SFTP URLs in | |
staticIP | boolean Default: false Set to |
Responses
Request samples
- Payload
{- "question": {
- "PatientInfo": {
- "FirstName": {
- "data": "Patient first name",
- "page_number": 0
}, - "LastName": {
- "data": "Patient last name",
- "page_number": 0
}
}
}, - "webhook": null,
- "settings": {
- "returnConfidence": true
}, - "webhookHeaders": { },
- "webhookSendFull": false,
- "fileId": "form1.pdf",
- "forceBase64": false,
- "forceOCR": false,
- "language": "en",
- "metadata": null,
- "outputURL": "YOUR_OUTPUT_URL",
- "outputURLHeaders": null,
- "returnJSON": false,
- "sftp": null,
- "staticIP": false
}
Response samples
- 200
- 207
- 400
- 403
- 404
- 500
- 502
{- "message": "string",
- "model": "string",
- "statusId": { },
- "apiVersion": "string",
- "endTime": 0,
- "failedRequests": [
- null
], - "id": "string",
- "metadata": { },
- "startTime": 0,
- "status": "SUCCESS",
- "warning": { }
}
Get async request status
Retrieves the status of an asynchronous request to /rikai/zip/rikai2-extract?async=True
or /rikai/bulk/rikai2-extract
. Identifiable by statusId.
path Parameters
statusId required | string (statusId) Status ID |
header Parameters
orgId required | string (orgId) non-empty ^[a-zA-Z0-9\-_]+$ Organization ID |
authKey required | string (authKey) non-empty ^[a-zA-Z0-9\-_]+$ Authentication key |
apiVersion required | string (apiVersion) API version used for the request. Defaults to the latest production version. To pin to a specific API version, please contact your Lazarus representative to receive the appropriate version header. |
Responses
Response samples
- 200
- 400
- 403
- 404
- 500
{- "model": "string",
- "apiVersion": "string",
- "endTime": 0,
- "id": "string",
- "startTime": 0,
- "status": "SUCCESS"
}