RikAI-Extract
Bulk file upload
Upload 1 or more files to RikAI2-Extract for asynchronous processing. To receive the model output, use either a webhook or an outputURL:
- webhook(Recommended): Receives a JSON response by default.
- outputURL: Receives a ZIP file for each document in the request. If the- returnJSONparameter is set to true, a JSON file will be provided 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
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 | 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, HEIC, SVG, TIFF, TIF, TXT, or GIF. | 
| required | object or stringExamples: "{\"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. | 
| webhook required | 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. Click here for an example of a webhook URL response. | 
| object (Settings)  Optional user settings. | |
| 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  Default:  "UUID"Examples: "file1.pdf" Custom ID for uploaded file, returned as  | |
| 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 and explainability into. List of supported codes. | 
| object Custom JSON to be included in the returned response. | |
| outputURL | 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. | 
| object Request headers to include in the PUT request to the output URL. | |
| returnJSON | boolean  Default:  true Specifies the format of the response sent 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": "YOUR_WEBHOOK_URL",
- "settings": {- "returnConfidence": true
 },
- "webhookHeaders": null,
- "webhookSendFull": true,
- "fileId": "file1.pdf",
- "forceBase64": false,
- "forceOCR": false,
- "language": "en",
- "metadata": null,
- "outputURL": null,
- "outputURLHeaders": null,
- "returnJSON": true,
- "sftp": null,
- "staticIP": false
}Response samples
- 200
- 207
- 400
- 403
- 404
- 413
- 429
- 521
- 522
{- "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 | 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
- 429
- 521
{- "model": "string",
- "apiVersion": "string",
- "endTime": 0,
- "id": "string",
- "startTime": 0,
- "status": "SUCCESS"
}