{ "openapi": "3.1.0", "info": { "title": "RikAI-Extract", "version": "", "description": "", "contact": { "name": "Lazarus IT", "url": "https://lazarus-ai.atlassian.net/servicedesk/customer/portal/8", "email": "support@lazarusai.com" }, "termsOfService": "https://www.lazarusai.com/legal", "license": { "name": "Get Lazarus", "url": "https://emvnha23ura.typeform.com/lazarus-rikai?typeform-source=dashboard.lazarusai.com" }, "summary": "" }, "paths": { "/rikai/bulk/rikai2-extract": { "post": { "tags": [ "Requests" ], "summary": "Bulk file upload", "description": "Upload 1 or more files to RikAI2-Extract for asynchronous processing. To receive the model output, use either a `webhook` or an `outputURL`:\n- **`webhook` (Recommended)**: Receives a [JSON response](/../../models/rikai/webhook-examples) by default.\n- `outputURL`: Receives a [ZIP file](../../outputurl) for each document in the request. If the `returnJSON` parameter is set to true, a JSON file will be provided instead.\n\n\n#### File upload options\nWe only support requests with Content-Type `application/json` at this endpoint.\n- `[application/json]` **inputURL** link to file\n- `[application/json]` **base64** base64 encoded file data\n\n", "operationId": "post_bulk_rikai2_extract", "parameters": [ { "name": "orgId", "in": "header", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "^[a-zA-Z0-9\\-_]+$", "title": "orgId", "description": "Organization ID" }, "description": "Organization ID" }, { "name": "authKey", "in": "header", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "^[a-zA-Z0-9\\-_]+$", "title": "authKey", "description": "Authentication key" }, "description": "Authentication key" }, { "name": "apiVersion", "in": "header", "required": false, "schema": { "type": "string", "title": "apiVersion", "description": "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." }, "description": "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." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkRequestBody" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkResponse" } } } }, "207": { "$ref": "#/components/responses/207" }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "413": { "$ref": "#/components/responses/413" }, "429": { "$ref": "#/components/responses/429" } } } }, "/rikai/zip/async/{statusId}": { "get": { "tags": [ "Requests" ], "summary": "Get async request status", "description": "Retrieves the status of an asynchronous request to `/rikai/zip/rikai2-extract?async=True` or `/rikai/bulk/rikai2-extract`. Identifiable by `statusId`.", "operationId": "get_async_status", "parameters": [ { "name": "statusId", "in": "path", "required": true, "schema": { "type": "string", "title": "statusId", "description": "Status ID" }, "description": "Status ID" }, { "name": "orgId", "in": "header", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "^[a-zA-Z0-9\\-_]+$", "title": "orgId", "description": "Organization ID" }, "description": "Organization ID" }, { "name": "authKey", "in": "header", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "^[a-zA-Z0-9\\-_]+$", "title": "authKey", "description": "Authentication key" }, "description": "Authentication key" }, { "name": "apiVersion", "in": "header", "required": false, "schema": { "type": "string", "title": "apiVersion", "description": "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." }, "description": "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": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AsyncStatusResponse" } } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "429": { "$ref": "#/components/responses/429" }, "521": { "$ref": "#/components/responses/521" } } } } }, "webhooks": { "async-request-submitted": { "post": { "tags": [ "Webhook Responses" ], "summary": "Async Request Submitted", "description": "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.", "operationId": "webhook_post_async_request_submitted", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmittedWebhook" } } }, "required": true }, "responses": { "200": { "description": "Our API expects a 200 status code response to our webhook requests" } } } }, "async-request-running": { "post": { "tags": [ "Webhook Responses" ], "summary": "Async Request Running", "description": "When an asynchronous request begins processing, we'll send a POST request with this data to the `webhook` provided in your request body.", "operationId": "webhook_post_async_request_running", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunningWebhook" } } }, "required": true }, "responses": { "200": { "description": "Our API expects a 200 status code response to our webhook requests" } } } }, "async-request-failed": { "post": { "tags": [ "Webhook Responses" ], "summary": "Async Request Failed", "description": "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.", "operationId": "webhook_post_async_request_failed", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AsyncWebhookError" } } }, "required": true }, "responses": { "200": { "description": "Our API expects a 200 status code response to our webhook requests" } } } }, "async-request-output-url-warning": { "post": { "tags": [ "Webhook Responses" ], "summary": "Async Request OutputURL Failure Warning", "description": "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.", "operationId": "webhook_post_async_request_output_url_warning", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WarningWebhook" } } }, "required": true }, "responses": { "200": { "description": "Our API expects a 200 status code response to our webhook requests" } } } }, "request-succeeded": { "post": { "tags": [ "Webhook Responses" ], "summary": "Request Succeeded", "description": "When a request completes successfully, we'll send a POST request with full response data to the webhook provided in your request body.", "operationId": "webhook_post_request_succeeded", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessWebhook" } } }, "required": true }, "responses": { "200": { "description": "Our API expects a 200 status code response to our webhook requests" } } } }, "request-succeeded-truncated-response": { "post": { "tags": [ "Webhook Responses" ], "summary": "Request Succeeded Truncated", "description": "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.", "operationId": "webhook_post_request_succeeded_truncated", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessWebhookShort" } } }, "required": true }, "responses": { "200": { "description": "Our API expects a 200 status code response to our webhook requests" } } } } }, "components": { "schemas": { "Answer": { "properties": { "answer": { "description": "Model's answer to the question asked. The model fills the JSON structure that was provided for input.", "type": "object" }, "question": { "description": "The question asked.", "type": "object" } }, "type": "object", "required": [ "answer", "question" ], "title": "Answer" }, "AsyncStatusResponse": { "properties": { "model": { "type": "string", "description": "Model used by the request identified by the status ID." }, "status": { "$ref": "#/components/schemas/StatusEnum", "description": "Status of the request." }, "documentId": { "description": "Document ID of the model request identified by the status ID. Document ID is the value of `fileId` if it is supplied in the model request; otherwise, a random UUID is generated.", "type": "string" }, "error": { "description": "Additional error details about the failure of the model request identified by status ID, if available.", "type": "object" }, "apiVersion": { "description": "API version passed into the header of this status 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.", "type": "string" }, "code": { "description": "Response code. Possible values are `200`, `400`, `401`, `403`, `404`, `413`, `521`, and `522`.", "type": "integer" }, "id": { "type": "string", "description": "Response ID for this status request. This is not an identifier of the model request being checked by the status ID." }, "message": { "description": "Status message.", "type": "string" }, "startTime": { "type": "integer", "description": "Start time for this status request, recorded in epoch (Unix timestamp, ms) format. This is not the start time of the model request being checked by status ID." }, "endTime": { "type": "integer", "description": "End time for this status request, recorded in epoch (Unix timestamp, ms) format. This is not the end time of the model request being checked by status ID." } }, "type": "object", "required": [], "title": "AsyncStatusResponse" }, "AsyncWebhookError": { "properties": { "status": { "description": "Status of the request.", "type": "string" }, "code": { "description": "Response code. The possible error codes you may receive at your webhook upon failure are `400`, `401`, `403`, `404`, `413`, `521`, and `522`. See this [guide](/../../models/Rikai/webhook-error-codes) for descriptions of all the error codes.", "type": "integer" }, "message": { "description": "Status message.", "type": "string" }, "error": { "description": "Present only when the request fails. Contains details about the error.", "type": "object" }, "statusId": { "description": "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 `/rikai/zip/async/{statusId}` endpoint.", "type": "string" }, "documentId": { "description": "The unique identifier for the document. If `fileId` is supplied in the request, it is used as the `documentId`; otherwise, a random UUID is generated.", "type": "string" }, "id": { "description": "Response ID", "type": "string" }, "model": { "description": "Model used to process the document.", "type": "string" }, "apiVersion": { "description": "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.", "type": "string" }, "metadata": { "description": "JSON from the request `metadata` field.", "type": "object" }, "organization": { "description": "Organization ID.", "type": "string" }, "provider": { "type": "string", "description": "lazarus", "default": "lazarus" }, "startTime": { "description": "Request start time recorded in epoch (Unix timestamp) format.", "type": "integer" }, "endTime": { "description": "Request end time recorded in epoch (Unix timestamp) format.", "type": "integer" } }, "additionalProperties": true, "type": "object", "title": "AsyncWebhookError", "required": [] }, "BulkBase64Request": { "properties": { "base64": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ], "description": "Base64 encoded string for the file from which data will be extracted. If the value is an array of base64 strings, you receive an individual response for each string." }, "question": { "anyOf": [ { "type": "object" }, { "type": "string" } ], "description": "A JSON string or a dictionary containing the question(s) to be asked.", "examples": [ "{\"PatientInfo\": {\"FirstName\": {\"data\": \"Patient first name\", \"page_number\": 0}, \"LastName\": {\"data\": \"Patient last name\", \"page_number\": 0}}}" ] }, "webhook": { "type": "string", "pattern": " https?://(?:www\\\\.)?[a-zA-Z0-9./:]+", "description": "Webhook URL to which status updates and JSON response will be sent. This is where you will receive the model output. \n[Click here](/../../models/rikai/webhook-examples) for an example of a webhook URL response." }, "settings": { "$ref": "#/components/schemas/Settings", "description": "Optional user settings.", "type": "object" }, "fileId": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ], "description": "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.", "examples": [ "file1.pdf" ], "default": "UUID" }, "webhookHeaders": { "additionalProperties": true, "type": "object", "description": "Request headers to include in the POST requests to the webhook." }, "metadata": { "additionalProperties": true, "type": "object", "description": "Custom JSON to be included in the returned response." }, "forceOCR": { "type": "boolean", "description": "Will rasterize a pdf. Set this parameter to `true` only if the input file is a fillable pdf.", "default": false }, "language": { "type": "string", "description": "A language code (e.g. 'EN') or the name of the language you wish to translate answers and explainability into. [List of supported codes.](../../../prompting-guide/faq/#supported-languages)" }, "sftp": { "anyOf": [ { "$ref": "#/components/schemas/SFTP" }, { "$ref": "#/components/schemas/InputOutputSFTP" } ], "description": "SFTP authentication details. Required for SFTP URLs in `inputURL` or `outputURL`. Option to provide separate server authentication info for `inputURL` and `outputURL`." }, "staticIP": { "type": "boolean", "description": "Set to `true` for static IP for webhook and outputURL if they exist", "default": false }, "webhookSendFull": { "type": "boolean", "description": "Receive the full JSON response at the webhook URL upon request completion. Set to `false` to only receive request status.", "default": true }, "outputURL": { "type": "string", "pattern": " (https?|s?ftp)://(?:www\\\\.)?[a-zA-Z0-9./:]+", "description": "URL where resulting [ZIP file](../../outputurl) or JSON can be sent. Must be open to PUT requests." }, "outputURLHeaders": { "additionalProperties": true, "type": "object", "description": "Request headers to include in the PUT request to the output URL." }, "returnJSON": { "type": "boolean", "description": "Specifies the format of the response sent to `outputURL`. When set to true, a JSON response is sent to the `outputURL`. Set to false to send a ZIP file instead.", "default": true } }, "type": "object", "required": [ "base64", "question", "webhook" ], "title": "BulkBase64Request", "examples": [ { "base64": "YOUR_BASE64_ENCODED_FILE", "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 } ] }, "BulkRequestBody": { "oneOf": [ { "$ref": "#/components/schemas/BulkURLRequest" }, { "$ref": "#/components/schemas/BulkBase64Request" } ], "title": "BulkRequestBody", "required": [], "properties": {} }, "BulkResponse": { "properties": { "message": { "type": "string", "description": "Status message." }, "model": { "type": "string", "description": "Model used to process the document." }, "statusId": { "additionalProperties": true, "type": "object", "description": "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 `/rikai/zip/async/{statusId}` endpoint." }, "apiVersion": { "description": "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.", "type": "string" }, "endTime": { "type": "integer", "description": "Request end time recorded in epoch (Unix timestamp) format." }, "failedRequests": { "items": {}, "type": "array", "description": "File requests that failed to queue." }, "id": { "type": "string", "description": "Response ID" }, "metadata": { "additionalProperties": true, "type": "object", "description": "JSON from the request `metadata` field." }, "startTime": { "type": "integer", "description": "Request start time recorded in epoch (Unix timestamp) format." }, "status": { "$ref": "#/components/schemas/StatusEnum", "description": "Status of the request." }, "warning": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "description": "Warnings such as webhook failure." } }, "type": "object", "required": [], "title": "BulkResponse" }, "BulkURLRequest": { "properties": { "inputURL": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ], "description": "URL for the file to extract data from: Must be a PDF, JPEG, JPG, PNG, HEIC, SVG, TIFF, TIF, TXT, or GIF." }, "question": { "anyOf": [ { "type": "object" }, { "type": "string" } ], "description": "A JSON string or a dictionary containing the question(s) to be asked.", "examples": [ "{\"PatientInfo\": {\"FirstName\": {\"data\": \"Patient first name\", \"page_number\": 0}, \"LastName\": {\"data\": \"Patient last name\", \"page_number\": 0}}}" ] }, "webhook": { "type": "string", "pattern": " https?://(?:www\\\\.)?[a-zA-Z0-9./:]+", "description": "Webhook URL to which status updates and JSON response will be sent. This is where you will receive the model output. \n[Click here](/../../models/rikai/webhook-examples) for an example of a webhook URL response." }, "settings": { "$ref": "#/components/schemas/Settings", "description": "Optional user settings.", "type": "object" }, "fileId": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ], "description": "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.", "examples": [ "file1.pdf" ], "default": "UUID" }, "webhookHeaders": { "additionalProperties": true, "type": "object", "description": "Request headers to include in the POST requests to the webhook." }, "metadata": { "additionalProperties": true, "type": "object", "description": "Custom JSON to be included in the returned response." }, "forceOCR": { "type": "boolean", "description": "Will rasterize a pdf. Set this parameter to `true` only if the input file is a fillable pdf.", "default": false }, "language": { "type": "string", "description": "A language code (e.g. 'EN') or the name of the language you wish to translate answers and explainability into. [List of supported codes.](../../../prompting-guide/faq/#supported-languages)" }, "sftp": { "anyOf": [ { "$ref": "#/components/schemas/SFTP" }, { "$ref": "#/components/schemas/InputOutputSFTP" } ], "description": "SFTP authentication details. Required for SFTP URLs in `inputURL` or `outputURL`. Option to provide separate server authentication info for `inputURL` and `outputURL`." }, "staticIP": { "type": "boolean", "description": "Set to `true` for static IP for webhook and outputURL if they exist", "default": false }, "webhookSendFull": { "type": "boolean", "description": "Receive the full JSON response at the webhook URL upon request completion. Set to `false` to only receive request status.", "default": true }, "outputURL": { "type": "string", "pattern": " (https?|s?ftp)://(?:www\\\\.)?[a-zA-Z0-9./:]+", "description": "URL where resulting [ZIP file](../../outputurl) or JSON can be sent. Must be open to PUT requests." }, "outputURLHeaders": { "additionalProperties": true, "type": "object", "description": "Request headers to include in the PUT request to the output URL." }, "returnJSON": { "type": "boolean", "description": "Specifies the format of the response sent to `outputURL`. When set to true, a JSON response is sent to the `outputURL`. Set to false to send a ZIP file instead.", "default": true } }, "type": "object", "required": [ "inputURL", "question", "webhook" ], "title": "BulkURLRequest", "examples": [ { "inputURL": "https://firebasestorage.googleapis.com/v0/b/lazarus-apis-testing.appspot.com/o/examples%2FSample%20Form.pdf?alt=media&token=5b537052-ea54-4be4-9d36-9620ee994c1c", "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 } ] }, "InputOutputSFTP": { "properties": { "inputURL": { "$ref": "#/components/schemas/SFTP", "description": "SFTP server authentication info for the `inputURL`." }, "outputURL": { "$ref": "#/components/schemas/SFTP", "description": "SFTP server authentication info for the `outputURL`." } }, "type": "object", "title": "InputOutputSFTP", "required": [] }, "OutputURLFailureWarning": { "properties": { "message": { "type": "string", "description": "Status message." }, "url": { "type": "string", "description": "URL where resulting [ZIP file](../../outputurl) or JSON can be sent. Must be open to PUT requests." }, "code": { "description": "Response code. The possible error codes you may receive at your webhook upon failure are `400`, `401`, `403`, `404`, `413`, `521`, and `522`. See this [guide](/../../models/Rikai/webhook-error-codes) for descriptions of all the error codes.", "type": "integer" }, "error": { "description": "Present only when the request fails. Contains details about the error.", "type": "object" }, "field": { "type": "string", "description": "Name of the field causing an error.", "default": "outputURL" } }, "type": "object", "required": [ "message", "url" ], "title": "OutputURLFailureWarning" }, "RunningWebhook": { "properties": { "status": { "description": "Status of the request.", "type": "string" }, "statusId": { "description": "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 `/rikai/zip/async/{statusId}` endpoint.", "type": "string" }, "documentId": { "description": "The unique identifier for the document. If `fileId` is supplied in the request, it is used as the `documentId`; otherwise, a random UUID is generated.", "type": "string" }, "id": { "description": "Response ID", "type": "string" }, "model": { "description": "Model used to process the document.", "type": "string" }, "apiVersion": { "description": "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.", "type": "string" }, "metadata": { "description": "JSON from the request `metadata` field.", "type": "object" }, "organization": { "description": "Organization ID.", "type": "string" }, "provider": { "type": "string", "description": "lazarus", "default": "lazarus" }, "startTime": { "description": "Request start time recorded in epoch (Unix timestamp) format.", "type": "integer" } }, "type": "object", "title": "RunningWebhook", "required": [] }, "SFTP": { "properties": { "user": { "type": "string", "description": "SFTP username." }, "password": { "type": "string", "description": "SFTP password. Either `password` or `privateKey` are required." }, "privateKey": { "type": "string", "description": "Base64 encoded SFTP private key. Either `password` or `privateKey` are required." }, "privateKeyPassphrase": { "type": "string", "description": "Optional passphrase to use if private key is protected." } }, "type": "object", "required": [ "user" ], "title": "SFTP" }, "Settings": { "properties": { "returnConfidence": { "type": "boolean", "description": "Set to true to include bounding boxes and confidence score in response. Click [here](/../../models/Rikai/rikai2-extract/overview#returning-confidence-scores-and-bounding-boxes) for prompting guidelines to ensure optimal results when using this field." } }, "type": "object", "title": "Settings", "required": [] }, "StatusEnum": { "type": "string", "enum": [ "SUCCESS", "SUBMITTED", "FAILURE", "AUTH_FAILURE", "RUNNING" ], "title": "StatusEnum", "required": [], "properties": {} }, "SubmittedWebhook": { "properties": { "status": { "description": "Status of the request.", "type": "string" }, "statusId": { "description": "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 `/rikai/zip/async/{statusId}` endpoint.", "type": "string" }, "documentId": { "description": "The unique identifier for the document. If `fileId` is supplied in the request, it is used as the `documentId`; otherwise, a random UUID is generated.", "type": "string" }, "id": { "description": "Response ID", "type": "string" }, "model": { "description": "Model used to process the document.", "type": "string" }, "apiVersion": { "description": "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.", "type": "string" }, "metadata": { "description": "JSON from the request `metadata` field.", "type": "object" }, "organization": { "description": "Organization ID.", "type": "string" }, "provider": { "type": "string", "description": "lazarus", "default": "lazarus" } }, "type": "object", "title": "SubmittedWebhook", "required": [] }, "SuccessWebhook": { "properties": { "status": { "description": "Status of the request.", "type": "string" }, "code": { "description": "`200` response code.", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/Answer" }, "type": "array", "description": "Question and answer data for each question asked in the request." }, "statusId": { "description": "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 `/rikai/zip/async/{statusId}` endpoint.", "type": "string" }, "documentId": { "description": "The unique identifier for the document. If `fileId` is supplied in the request, it is used as the `documentId`; otherwise, a random UUID is generated.", "type": "string" }, "id": { "description": "Response ID", "type": "string" }, "model": { "description": "Model used to process the document.", "type": "string" }, "apiVersion": { "description": "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.", "type": "string" }, "metadata": { "description": "JSON from the request `metadata` field.", "type": "object" }, "baseModel": { "description": "Base model used during data extraction.", "type": "string" }, "questions": { "description": "Number of questions asked.", "type": "integer" }, "pages": { "description": "Number of pages in the document.", "type": "integer" }, "settings": { "description": "JSON containing any custom user settings specified in the request.", "type": "object" }, "language": { "description": "Language results are translated into.", "type": "string" }, "organization": { "description": "Organization ID.", "type": "string" }, "provider": { "type": "string", "description": "lazarus", "default": "lazarus" }, "startTime": { "description": "Request start time recorded in epoch (Unix timestamp) format.", "type": "integer" }, "endTime": { "description": "Request end time recorded in epoch (Unix timestamp) format.", "type": "integer" } }, "type": "object", "required": [ "data" ], "title": "SuccessWebhook" }, "SuccessWebhookShort": { "properties": { "status": { "description": "Status of the request.", "type": "string" }, "code": { "description": "Response code. Possible values are `200`, `400`, `401`, `403`, `404`, `413`, `521`, and `522`.", "type": "integer" }, "statusId": { "description": "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 `/rikai/zip/async/{statusId}` endpoint.", "type": "string" }, "documentId": { "description": "The unique identifier for the document. If `fileId` is supplied in the request, it is used as the `documentId`; otherwise, a random UUID is generated.", "type": "string" }, "id": { "description": "Response ID", "type": "string" }, "model": { "description": "Model used to process the document.", "type": "string" }, "apiVersion": { "description": "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.", "type": "string" }, "metadata": { "description": "JSON from the request `metadata` field.", "type": "object" }, "organization": { "description": "Organization ID.", "type": "string" }, "provider": { "type": "string", "description": "lazarus", "default": "lazarus" }, "startTime": { "description": "Request start time recorded in epoch (Unix timestamp) format.", "type": "integer" }, "endTime": { "description": "Request end time recorded in epoch (Unix timestamp) format.", "type": "integer" } }, "type": "object", "title": "SuccessWebhookShort", "required": [] }, "WarningWebhook": { "properties": { "warning": { "$ref": "#/components/schemas/OutputURLFailureWarning", "description": "Warnings such as outputURL failure." }, "statusId": { "description": "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 `/rikai/zip/async/{statusId}` endpoint.", "type": "string" }, "documentId": { "description": "The unique identifier for the document. If `fileId` is supplied in the request, it is used as the `documentId`; otherwise, a random UUID is generated.", "type": "string" }, "id": { "description": "Response ID", "type": "string" }, "model": { "description": "Model used to process the document.", "type": "string" }, "apiVersion": { "description": "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.", "type": "string" }, "metadata": { "description": "JSON from the request `metadata` field.", "type": "object" } }, "type": "object", "required": [ "warning" ], "title": "WarningWebhook" }, "ErrorMessage": { "properties": { "status": { "allOf": [ { "$ref": "#/components/schemas/StatusEnum" } ], "description": "Status of the request." }, "message": { "type": "string", "description": "Error message." }, "id": { "type": "string", "description": "Response ID" }, "apiVersion": { "description": "API version used for request.", "type": "string" }, "startTime": { "description": "Request start time recorded in epoch (Unix timestamp) format.", "type": "integer" }, "endTime": { "description": "Request end time recorded in epoch (Unix timestamp) format.", "type": "integer" } }, "type": "object", "title": "ErrorMessage", "description": "Response when an error occurs." } }, "responses": { "207": { "description": "Bulk upload request failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" }, "examples": { "Failed to queue request": { "value": { "status": "FAILURE", "message": "Failed to queue 2/5 file requests.", "apiVersion": "YYYY-MM-DD", "id": "073b8e4c-3bc9-4105-8e3a-887a6aa7b4c5" } } } } } }, "400": { "description": "Bad request or failure to read. Request was invalid or we could not process your data.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" }, "examples": { "Missing required field": { "value": { "status": "FAILURE", "message": "Request body is missing required field(s): question", "apiVersion": "YYYY-MM-DD", "id": "073b8e4c-3bc9-4105-8e3a-887a6aa7b4c5" } } } } } }, "403": { "description": "Unauthorized attempt. There was an issue with your credentials, model permissions or billing.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" }, "examples": { "Invalid credentials": { "value": { "status": "AUTH_FAILURE", "message": "Invalid authentication", "apiVersion": "YYYY-MM-DD", "id": "073b8e4c-3bc9-4105-8e3a-887a6aa7b4c5" } } } } } }, "404": { "description": "Not found error. When a request references an invalid endpoint or resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" }, "examples": { "Custom model not found": { "value": { "status": "FAILURE", "message": "Model id 'abc' is not valid.", "apiVersion": "YYYY-MM-DD", "id": "073b8e4c-3bc9-4105-8e3a-887a6aa7b4c5" } } } } } }, "413": { "description": "Payload too large. The request payload or file size > 32MB and organization doesn't have 'big file' permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" }, "examples": { "Payload too large": { "value": { "status": "FAILURE", "message": "[File was too large](../../../prompting-guide/faq/#what-if-i-encounter-an-error-indicating-my-file-is-too-large). Model could not process request.", "apiVersion": "YYYY-MM-DD", "id": "073b8e4c-3bc9-4105-8e3a-887a6aa7b4c5" } } } } } }, "429": { "description": "Too many requests, rate limit exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" }, "examples": { "Too many requests": { "value": { "status": "FAILURE", "message": "You have exceeded the rate limit. Please retry your request later.", "apiVersion": "YYYY-MM-DD", "id": "073b8e4c-3bc9-4105-8e3a-887a6aa7b4c5" } } } } } }, "521": { "description": "An internal API error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" }, "examples": { "Internal server error": { "value": { "status": "FAILURE", "message": "An internal error occurred. Please retry your request and report this to support@lazarusai.com.", "apiVersion": "YYYY-MM-DD", "id": "073b8e4c-3bc9-4105-8e3a-887a6aa7b4c5" } } } } } } } }, "servers": [ { "url": "https://api.lazarusai.com/api", "description": "" } ], "tags": [ { "name": "Requests", "description": "Requests for the Lazarus API" }, { "name": "Webhook Responses", "description": "Responses from the Lazarus API" } ] }