Skip to main content
Version: 2025-02-13

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
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
One of
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
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. 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 false to only receive request status.

fileId
string
Examples: "file name"

Custom ID for uploaded file, returned as documentId in the response. Requests with multiple files accept unique fileIds for each file. FileIds can be used to facilitate tracking, referencing, and managing input and output files efficiently.

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 true only if the input file is a fillable pdf.

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.

ocr
object

OCR data for the document (entire response from OCR endpoint, example here). If included, we do not run OCR on the document and use these results instead.

returnOCR
boolean
Default: false

Set to true to include OCR results in response. Does not work if advanced_vision is also set to true.

SFTP (object) or InputOutputSFTP (object)

SFTP authentication details. Required for SFTP URLs in inputURL or outputURL. Option to provide separate server authentication info for inputURL and outputURL.

staticIP
boolean
Default: false

Set to true for static IP for webhook and outputURL if they exist

Responses

Request samples

Content type
Example
{}

Response samples

Content type
application/json
{
  • "model": "string",
  • "pages": 0,
  • "questions": 0,
  • "apiVersion": "string",
  • "baseModel": "string",
  • "data": [
    ],
  • "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
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/json
required
ocr
required
object

OCR data for the document (entire response from OCR endpoint, example here).

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. 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 false to only receive request status.

fileId
string
Examples: "file name"

Custom ID for uploaded file, returned as documentId in the response. Requests with multiple files accept unique fileIds for each file. FileIds can be used to facilitate tracking, referencing, and managing input and output files efficiently.

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.

returnOCR
boolean
Default: false

Set to true to include OCR results in response. Does not work if advanced_vision is also set to true.

SFTP (object) or InputOutputSFTP (object)

SFTP authentication details. Required for SFTP URLs in inputURL or outputURL. Option to provide separate server authentication info for inputURL and outputURL.

staticIP
boolean
Default: false

Set to true for static IP for webhook and outputURL if they exist

Responses

Request samples

Content type
application/json
{
  • "ocr": { },
  • "question": {
    },
  • "webhook": null,
  • "webhookHeaders": null,
  • "webhookSendFull": true,
  • "fileId": "file1.pdf",
  • "language": "en",
  • "metadata": null,
  • "returnOCR": false,
  • "sftp": null,
  • "staticIP": false
}

Response samples

Content type
application/json
{
  • "model": "string",
  • "pages": 0,
  • "questions": 0,
  • "apiVersion": "string",
  • "baseModel": "string",
  • "data": [
    ],
  • "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 the returnJSON 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
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/json
required
One of
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
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. 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 false to only receive request status.

fileId
string
Examples: "file name"

Custom ID for uploaded file, returned as documentId in the response. Requests with multiple files accept unique fileIds for each file. FileIds can be used to facilitate tracking, referencing, and managing input and output files efficiently.

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 true only if the input file is a fillable pdf.

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.

ocr
object

OCR data for the document (entire response from OCR endpoint, example here). If included, we do not run OCR on the document and use these results instead.

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.

outputURLHeaders
object

Request headers to include in the PUT request to the output URL.

returnJSON
boolean
Default: false

Set to true to send a JSON response rather than a ZIP file to the outputURL.

returnOCR
boolean
Default: false

Set to true to include OCR results in response. Does not work if advanced_vision is also set to true.

SFTP (object) or InputOutputSFTP (object)

SFTP authentication details. Required for SFTP URLs in inputURL or outputURL. Option to provide separate server authentication info for inputURL and outputURL.

staticIP
boolean
Default: false

Set to true for static IP for webhook and outputURL if they exist

Responses

Request samples

Content type
application/json
Example
{
  • "inputURL": "string",
  • "question": {
    },
  • "webhook": "string",
  • "webhookHeaders": { },
  • "webhookSendFull": true,
  • "fileId": "file name",
  • "forceBase64": false,
  • "forceOCR": false,
  • "language": "string",
  • "metadata": { },
  • "ocr": { },
  • "outputURL": "string",
  • "outputURLHeaders": { },
  • "returnJSON": false,
  • "returnOCR": false,
  • "sftp": {
    },
  • "staticIP": false
}

Response samples

Content type
application/json
{
  • "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 the returnJSON 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
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/json
required
One of
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
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. 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 false to only receive request status.

Array of strings or string
Examples: "file name"

Custom ID for uploaded file, returned as documentId in the response. Requests with multiple files accept unique fileIds for each file. FileIds can be used to facilitate tracking, referencing, and managing input and output files efficiently.

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 true only if the input file is a fillable pdf.

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.

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.

outputURLHeaders
object

Request headers to include in the PUT request to the output URL.

returnJSON
boolean
Default: false

Set to true to send a JSON response rather than a ZIP file to the outputURL.

returnOCR
boolean
Default: false

Set to true to include OCR results in response. Does not work if advanced_vision is also set to true.

SFTP (object) or InputOutputSFTP (object)

SFTP authentication details. Required for SFTP URLs in inputURL or outputURL. Option to provide separate server authentication info for inputURL and outputURL.

staticIP
boolean
Default: false

Set to true for static IP for webhook and outputURL if they exist

Responses

Request samples

Content type
application/json
Example
{}

Response samples

Content type
application/json
{
  • "message": "string",
  • "model": "string",
  • "statusId": { },
  • "apiVersion": "string",
  • "endTime": 0,
  • "failedRequests": [
    ],
  • "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
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/json
required
required
list or string
Examples: "Tell me about the history of AI"

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. 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 false to only receive request status.

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.

staticIP
boolean
Default: false

Set to true for static IP for webhook and outputURL if they exist

Responses

Request samples

Content type
application/json
{
  • "question": "Tell me about the history of AI",
  • "webhook": "string",
  • "webhookHeaders": { },
  • "webhookSendFull": true,
  • "language": "string",
  • "metadata": { },
  • "staticIP": false
}

Response samples

Content type
application/json
{
  • "model": "string",
  • "pages": 0,
  • "questions": 0,
  • "apiVersion": "string",
  • "baseModel": "string",
  • "data": [
    ],
  • "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
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

Content type
application/json
{
  • "model": "string",
  • "apiVersion": "string",
  • "endTime": 0,
  • "id": "string",
  • "startTime": 0,
  • "status": "SUCCESS"
}