RikY2
Download OpenAPI specification:Download
Document input, JSON response
Make a request to RikY2 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 | 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, HEIC, SVG, TIFF, TIF, TXT, or GIF. |
required | list or string Examples: ["What is the first medication listed under Section C - Medical Information?","What is its strength?"] A string or list of strings containing the question(s) to be asked. |
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. Click here for an example of a webhook URL response. |
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 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. | |
ocr | object OCR data for the document (entire response from OCR endpoint (version: 2), example here). If included, we do not run OCR on the document and use these results instead. Only OCR data obtained from the Lazarus OCR endpoint (include version: 2 in the header) is supported as input. |
returnOCR | 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": {
- "0": {
- "0": "What is the name of the patient?"
}, - "1": {
- "0": "What is the first medication listed under Section C - Medical Information?",
- "1": "What is its strength?"
}
}, - "webhook": null,
- "webhookHeaders": null,
- "webhookSendFull": true,
- "fileId": "file1.pdf",
- "forceBase64": false,
- "forceOCR": false,
- "language": "en",
- "metadata": null,
- "ocr": null,
- "returnOCR": false,
- "sftp": null,
- "staticIP": false
}
Response samples
- 200
- 400
- 403
- 404
- 413
- 429
- 521
- 522
{- "model": "string",
- "pages": 0,
- "questions": 0,
- "apiVersion": "string",
- "baseModel": "string",
- "data": [
- {
- "answer": { },
- "question": { },
- "confidence": 0,
- "context": "string",
- "translated": "string",
- "translatedContext": "string"
}
], - "documentId": "string",
- "endTime": 0,
- "id": "string",
- "language": "string",
- "metadata": { },
- "ocrResults": { },
- "settings": { },
- "startTime": 0,
- "status": "SUCCESS"
}
OCR input, JSON response
Make a request to RikY2 by providing OCR results as input, receive JSON response data. This method skips the OCR process that typically precedes RikY2 calls. It is ideal for asking multiple questions of the same document.
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
ocr required | object OCR data for the document (entire response from OCR endpoint (version: 2), example here). Only OCR data obtained from the Lazarus OCR endpoint (include version: 2 in the header) is supported as input. |
required | list or string Examples: ["What is the first medication listed under Section C - Medical Information?","What is its strength?"] A string or list of strings containing the question(s) to be asked. |
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. Click here for an example of a webhook URL response. |
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 Default: "UUID" Examples: "file1.pdf" Custom ID for uploaded file, returned as |
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. | |
returnOCR | 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
{- "ocr": { },
- "question": {
- "0": "What is the first medication listed under Section C - Medical Information?",
- "1": "What is its strength?"
}, - "webhook": "string",
- "webhookHeaders": { },
- "webhookSendFull": true,
- "fileId": "file1.pdf",
- "language": "string",
- "metadata": { },
- "returnOCR": false,
- "sftp": {
- "user": "string",
- "password": "string",
- "privateKey": "string",
- "privateKeyPassphrase": "string"
}, - "staticIP": false
}
Response samples
- 200
- 400
- 403
- 404
- 413
- 429
- 521
- 522
{- "model": "string",
- "pages": 0,
- "questions": 0,
- "apiVersion": "string",
- "baseModel": "string",
- "data": [
- {
- "answer": { },
- "question": { },
- "confidence": 0,
- "context": "string",
- "translated": "string",
- "translatedContext": "string"
}
], - "documentId": "string",
- "endTime": 0,
- "id": "string",
- "language": "string",
- "metadata": { },
- "ocrResults": { },
- "settings": { },
- "startTime": 0,
- "status": "SUCCESS"
}
Document input, ZIP file response
Make a request to RikY2 and receive response data in a ZIP file.
To process your request asynchronously, include the async
query parameter. 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 thereturnJSON
parameter 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
query Parameters
async (boolean) or async (null) (async) 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 | 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, HEIC, SVG, TIFF, TIF, TXT, or GIF. |
required | list or string Examples: ["What is the first medication listed under Section C - Medical Information?","What is its strength?"] A string or list of strings 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 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 |
bulkStartTime | integer Bulk request start time in Unix timestamp in milliseconds. |
fileId | 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. | |
ocr | object OCR data for the document (entire response from OCR endpoint (version: 2), example here). If included, we do not run OCR on the document and use these results instead. Only OCR data obtained from the Lazarus OCR endpoint (include version: 2 in the header) is supported as input. |
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 |
returnOCR | boolean Default: false Set to |
SFTP (object) or InputOutputSFTP (object) SFTP authentication details. Required for SFTP URLs in | |
staticIP | boolean Default: false Set to |
zipQueuedTime | integer Time when /zip is sent to task queue in Unix timestamp in milliseconds. |
Responses
Request samples
- Payload
{- "question": {
- "0": {
- "0": "What is the name of the patient?"
}, - "1": {
- "0": "What is the first medication listed under Section C - Medical Information?",
- "1": "What is its strength?"
}
}, - "webhook": null,
- "webhookHeaders": null,
- "webhookSendFull": true,
- "fileId": "file1.pdf",
- "forceBase64": false,
- "forceOCR": false,
- "language": "en",
- "metadata": null,
- "ocr": null,
- "outputURL": null,
- "outputURLHeaders": null,
- "returnJSON": true,
- "returnOCR": false,
- "sftp": null,
- "staticIP": false
}
Response samples
- 200
- 400
- 403
- 404
- 413
- 429
- 521
- 522
{- "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 RikY2 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 thereturnJSON
parameter 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 | list or string Examples: ["What is the first medication listed under Section C - Medical Information?","What is its strength?"] A string or list of strings 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 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 |
returnOCR | 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": {
- "0": {
- "0": "What is the name of the patient?"
}, - "1": {
- "0": "What is the first medication listed under Section C - Medical Information?",
- "1": "What is its strength?"
}
}, - "webhook": "YOUR_WEBHOOK_URL",
- "settings": null,
- "webhookHeaders": null,
- "webhookSendFull": true,
- "fileId": "file1.pdf",
- "forceBase64": false,
- "forceOCR": false,
- "language": "en",
- "metadata": null,
- "outputURL": null,
- "outputURLHeaders": null,
- "returnJSON": true,
- "returnOCR": false,
- "sftp": null,
- "staticIP": false
}
Response samples
- 200
- 207
- 400
- 403
- 404
- 413
- 429
{- "message": "string",
- "model": "string",
- "statusId": { },
- "apiVersion": "string",
- "endTime": 0,
- "failedRequests": [
- null
], - "id": "string",
- "metadata": { },
- "startTime": 0,
- "status": "SUCCESS",
- "warning": [
- { }
]
}
Chat, no file input, JSON response
Make a RikY2 request using prompt as context. No document upload.
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 | list or string Examples: ["What is the first medication listed under Section C - Medical Information?","What is its strength?"] A string or list of strings containing the question(s) to be asked. |
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. Click here for an example of a webhook URL response. |
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 Default: "UUID" Examples: "file1.pdf" Custom ID for uploaded file, returned as |
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. | |
staticIP | boolean Default: false Set to |
Responses
Request samples
- Payload
{- "question": {
- "0": "What is the first medication listed under Section C - Medical Information?",
- "1": "What is its strength?"
}, - "webhook": "string",
- "webhookHeaders": { },
- "webhookSendFull": true,
- "fileId": "file1.pdf",
- "forceOCR": false,
- "language": "string",
- "metadata": { },
- "staticIP": false
}
Response samples
- 200
- 400
- 403
- 404
- 413
- 429
- 521
- 522
{- "model": "string",
- "pages": 0,
- "questions": 0,
- "apiVersion": "string",
- "baseModel": "string",
- "data": [
- {
- "answer": { },
- "question": { },
- "confidence": 0,
- "context": "string",
- "translated": "string",
- "translatedContext": "string"
}
], - "documentId": "string",
- "endTime": 0,
- "id": "string",
- "language": "string",
- "metadata": { },
- "ocrResults": { },
- "settings": { },
- "startTime": 0,
- "status": "SUCCESS"
}
Get async request status
Retrieves the status of an asynchronous request to /rikai/zip/riky2?async=True
or /rikai/bulk/riky2
. 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",
- "status": "SUCCESS",
- "documentId": "string",
- "error": { },
- "apiVersion": "string",
- "code": 0,
- "id": "string",
- "message": "string",
- "startTime": 0,
- "endTime": 0
}
Async Request Submitted Webhook
When an asynchronous request is submitted at a /bulk
endpoint, we'll send a POST request for each individual request in the submission with this data to the webhook
provided in your request body.
Request Body schema: application/jsonrequired
status | string Status of the request. |
statusId | string A list of document IDs, each representing an uploaded file. Each ID is a randomly generated UUID. These IDs serve as input for retrieving the status of an asynchronous request via the |
documentId | string The unique identifier for the document. If |
id | string Response ID |
model | string Model used to process the document. |
apiVersion | string 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. |
metadata | object JSON from the request |
organization | string Organization ID. |
provider | string Default: "lazarus" lazarus |
Responses
Request samples
- Payload
{- "status": "string",
- "statusId": "string",
- "documentId": "string",
- "id": "string",
- "model": "string",
- "apiVersion": "string",
- "metadata": { },
- "organization": "string",
- "provider": "lazarus"
}
Async Request Running Webhook
When an asynchronous request begins processing, we'll send a POST request with this data to the webhook
provided in your request body.
Request Body schema: application/jsonrequired
status | string Status of the request. |
statusId | string A list of document IDs, each representing an uploaded file. Each ID is a randomly generated UUID. These IDs serve as input for retrieving the status of an asynchronous request via the |
documentId | string The unique identifier for the document. If |
id | string Response ID |
model | string Model used to process the document. |
apiVersion | string 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. |
metadata | object JSON from the request |
organization | string Organization ID. |
provider | string Default: "lazarus" lazarus |
startTime | integer Request start time recorded in epoch (Unix timestamp) format. |
Responses
Request samples
- Payload
{- "status": "string",
- "statusId": "string",
- "documentId": "string",
- "id": "string",
- "model": "string",
- "apiVersion": "string",
- "metadata": { },
- "organization": "string",
- "provider": "lazarus",
- "startTime": 0
}
Async Request Failed Webhook
When an asynchronous request fails during processing, we'll send a POST request with this data, including an error message, to the webhook provided in your request body.
Request Body schema: application/jsonrequired
status | string Status of the request. |
code | integer Response code. |
message | string Status message. |
error | object Present only when the request fails. Contains details about the error. |
statusId | string A list of document IDs, each representing an uploaded file. Each ID is a randomly generated UUID. These IDs serve as input for retrieving the status of an asynchronous request via the |
documentId | string The unique identifier for the document. If |
id | string Response ID |
model | string Model used to process the document. |
apiVersion | string 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. |
metadata | object JSON from the request |
organization | string Organization ID. |
provider | string Default: "lazarus" lazarus |
startTime | integer Request start time recorded in epoch (Unix timestamp) format. |
endTime | integer Request end time recorded in epoch (Unix timestamp) format. |
property name* additional property | any |
Responses
Request samples
- Payload
{- "status": "string",
- "code": 0,
- "message": "string",
- "error": { },
- "statusId": "string",
- "documentId": "string",
- "id": "string",
- "model": "string",
- "apiVersion": "string",
- "metadata": { },
- "organization": "string",
- "provider": "lazarus",
- "startTime": 0,
- "endTime": 0
}
Async Request OutputURL Failure Warning Webhook
When our PUT request to your outputURL
fails, we'll send a POST request with this warning message to the webhook provided in your request body. Results will be posted to this webhook in a separate request.
Request Body schema: application/jsonrequired
required | object (OutputURLFailureWarning) Warnings such as outputURL failure. |
statusId | string A list of document IDs, each representing an uploaded file. Each ID is a randomly generated UUID. These IDs serve as input for retrieving the status of an asynchronous request via the |
documentId | string The unique identifier for the document. If |
id | string Response ID |
model | string Model used to process the document. |
apiVersion | string 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. |
metadata | object JSON from the request |
Responses
Request samples
- Payload
{- "warning": {
- "message": "string",
- "url": "string",
- "code": 0,
- "error": { },
- "field": "outputURL"
}, - "statusId": "string",
- "documentId": "string",
- "id": "string",
- "model": "string",
- "apiVersion": "string",
- "metadata": { }
}
Request Succeeded Webhook
When a request completes successfully, we'll send a POST request with full response data to the webhook provided in your request body.
Request Body schema: application/jsonrequired
required | Array of objects (Answer) Question and answer data for each question asked in the request. |
status | string Status of the request. |
code | integer Response code. |
statusId | string A list of document IDs, each representing an uploaded file. Each ID is a randomly generated UUID. These IDs serve as input for retrieving the status of an asynchronous request via the |
documentId | string The unique identifier for the document. If |
id | string Response ID |
model | string Model used to process the document. |
apiVersion | string 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. |
metadata | object JSON from the request |
baseModel | string Base model used during data extraction. |
questions | integer Number of questions asked. |
pages | integer Number of pages in the document. |
settings | object JSON containing any custom user settings specified in the request. |
language | string Language results are translated into. |
organization | string Organization ID. |
provider | string Default: "lazarus" lazarus |
startTime | integer Request start time recorded in epoch (Unix timestamp) format. |
endTime | integer Request end time recorded in epoch (Unix timestamp) format. |
ocrResults | object OCR results from the document. Returned only if |
Responses
Request samples
- Payload
{- "status": "string",
- "code": 0,
- "data": [
- {
- "answer": { },
- "question": { },
- "confidence": 0,
- "context": "string",
- "translated": "string",
- "translatedContext": "string"
}
], - "statusId": "string",
- "documentId": "string",
- "id": "string",
- "model": "string",
- "apiVersion": "string",
- "metadata": { },
- "baseModel": "string",
- "questions": 0,
- "pages": 0,
- "settings": { },
- "language": "string",
- "organization": "string",
- "provider": "lazarus",
- "startTime": 0,
- "endTime": 0,
- "ocrResults": { }
}
Request Succeeded Truncated Webhook
When a request completes successfully and your request body includes webhookSendFull: False
, we'll send a POST request with truncated response data to the webhook provided in your request body.
Request Body schema: application/jsonrequired
status | string Status of the request. |
code | integer Response code. |
statusId | string A list of document IDs, each representing an uploaded file. Each ID is a randomly generated UUID. These IDs serve as input for retrieving the status of an asynchronous request via the |
documentId | string The unique identifier for the document. If |
id | string Response ID |
model | string Model used to process the document. |
apiVersion | string 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. |
metadata | object JSON from the request |
organization | string Organization ID. |
provider | string Default: "lazarus" lazarus |
startTime | integer Request start time recorded in epoch (Unix timestamp) format. |
endTime | integer Request end time recorded in epoch (Unix timestamp) format. |
Responses
Request samples
- Payload
{- "status": "string",
- "code": 0,
- "statusId": "string",
- "documentId": "string",
- "id": "string",
- "model": "string",
- "apiVersion": "string",
- "metadata": { },
- "organization": "string",
- "provider": "lazarus",
- "startTime": 0,
- "endTime": 0
}