For the complete documentation index, see llms.txt. This page is also available as Markdown.

RAG

Retrieval, generative answer, and highlight related APIs

Get Answer Highlight

get
/webapi/v2/highlights/{clue_id}

This API allows you to retrieve bounding box coordinates for answer highlights in a knowledge base document page.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Authorizations
API-KEYstringRequired

Your API key for authentication

Path parameters
clue_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

application/json
typestring · enumRequired

Enum representing different types of answers that can be provided.

Possible values:
get/webapi/v2/highlights/{clue_id}
GET /webapi/v2/highlights/{clue_id} HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
{
  "bboxes": [
    {
      "left": 1,
      "top": 1,
      "right": 1,
      "bottom": 1
    }
  ],
  "type": "PARAGRAPH"
}

Highlight Retrieval Result

post
/webapi/v2/retrieval/highlight

Return highlight bboxes for a single Retrieval result resolved straight from the retrieved page chunk (kbId + pageNo + subTextIndex), without a generative-answer clue id.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
kbIdstring · min: 1Required
pageNointeger · min: 1Required
subTextIndexintegerOptionalDefault: 1
passageTextstring · nullableOptional
questionstring · nullableOptional
answerstring · nullableOptional
Responses
200

OK

application/json
typestring · enumRequired

Enum representing different types of answers that can be provided.

Possible values:
post/webapi/v2/retrieval/highlight
POST /webapi/v2/retrieval/highlight HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 98

{
  "kbId": "text",
  "pageNo": 1,
  "subTextIndex": 1,
  "passageText": "text",
  "question": "text",
  "answer": "text"
}
{
  "bboxes": [
    {
      "left": 1,
      "top": 1,
      "right": 1,
      "bottom": 1
    }
  ],
  "type": "PARAGRAPH"
}

Get RARE Status

get
/webapi/v2/rare/status

This API allows you to retrieve the RARE build/generate status for the project.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

application/json
build_statusstringRequired
job_statusstringRequired
job_typestringRequired
build_run_idstring · nullableOptional
error_messagestring · nullableOptional
folder_idsstring[] · nullableOptional
default_modelstringOptionalDefault: ""
generation_modelstringOptionalDefault: ""
get/webapi/v2/rare/status
GET /webapi/v2/rare/status HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
{
  "build_status": "text",
  "job_status": "text",
  "job_type": "text",
  "build_run_id": "text",
  "error_message": "text",
  "build_progress": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "generate_progress": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "build_stats": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "generate_stats": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "folder_ids": [
    "text"
  ],
  "default_model": "",
  "generation_model": ""
}

Start RARE Build

post
/webapi/v2/rare/build

This API allows you to start a RARE build task for the project.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Request Body

  • language (string, optional): Language for the build.

  • default_model (string, optional): Default LLM model to use.

  • similarity_threshold (number, optional): Similarity threshold for matching.

  • top_k_per_chunk (integer, optional): Top K results per chunk.

  • max_similar_items (integer, optional): Maximum similar items to return.

  • max_workers (integer, optional): Maximum parallel workers.

  • folder_ids (array[string], optional): Folder IDs to include in the build.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
languagestringOptionalDefault: Korean
default_modelstringOptionalDefault: gpt54_nano
similarity_thresholdnumberOptionalDefault: 0.5
top_k_per_chunkintegerOptionalDefault: 1
max_similar_itemsintegerOptionalDefault: 256
max_workersintegerOptionalDefault: 100
folder_idsstring[] · nullableOptional
Responses
200

OK

application/json
messagestringRequired
task_idstringRequired
post/webapi/v2/rare/build
POST /webapi/v2/rare/build HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 161

{
  "language": "Korean",
  "default_model": "gpt54_nano",
  "similarity_threshold": 0.5,
  "top_k_per_chunk": 1,
  "max_similar_items": 256,
  "max_workers": 100,
  "folder_ids": [
    "text"
  ]
}
{
  "message": "text",
  "task_id": "text"
}

Start RARE Generate

post
/webapi/v2/rare/generate

This API allows you to start a RARE generate task. Requires build to be completed first.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Request Body

  • num_samples (integer, optional): Number of samples to generate.

  • input_pool_size (integer, optional): Input pool size.

  • num_questions (integer, optional): Number of questions per sample.

  • num_information (integer, optional): Number of information items per sample.

  • language (string, optional): Language for generation.

  • default_model (string, optional): Default LLM model.

  • generation_model (string, optional): Model to use for generation.

  • rare_user_prompt (string, optional): Custom user prompt for generation.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
num_samplesintegerOptionalDefault: 10
input_pool_sizeintegerOptionalDefault: 50
num_questionsintegerOptionalDefault: 10
num_informationintegerOptionalDefault: 2
languagestringOptionalDefault: Korean
default_modelstringOptionalDefault: gpt54_nano
generation_modelstringOptionalDefault: gpt54
rare_user_promptstringOptionalDefault: ""
Responses
200

OK

application/json
messagestringRequired
task_idstringRequired
post/webapi/v2/rare/generate
POST /webapi/v2/rare/generate HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 176

{
  "num_samples": 10,
  "input_pool_size": 50,
  "num_questions": 10,
  "num_information": 2,
  "language": "Korean",
  "default_model": "gpt54_nano",
  "generation_model": "gpt54",
  "rare_user_prompt": ""
}
{
  "message": "text",
  "task_id": "text"
}

Cancel RARE Job

post
/webapi/v2/rare/cancel

This API allows you to request cooperative cancellation for a running RARE job.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

application/json
messagestringRequired
task_idstringRequired
post/webapi/v2/rare/cancel
POST /webapi/v2/rare/cancel HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
{
  "message": "text",
  "task_id": "text"
}

List RARE Results

get
/webapi/v2/rare/results

This API allows you to list recent RARE generate results for the project.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

application/json
get/webapi/v2/rare/results
GET /webapi/v2/rare/results HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
{
  "results": [
    {
      "id": "text",
      "created_at": "text",
      "n_samples": 1,
      "rare_config": "text",
      "result_file_url": "text"
    }
  ]
}

Delete RARE Result

delete
/webapi/v2/rare/results/{result_id}

This API allows you to delete a RARE generate result by ID.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Authorizations
API-KEYstringRequired

Your API key for authentication

Path parameters
result_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

No content

delete/webapi/v2/rare/results/{result_id}
DELETE /webapi/v2/rare/results/{result_id} HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*

No content

Download RARE CSV

get
/webapi/v2/rare/csv

This API allows you to download a RARE CSV result file from storage.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Query Parameters

  • path (string, optional): The storage path of the CSV file.

Authorizations
API-KEYstringRequired

Your API key for authentication

Query parameters
pathstringOptionalDefault: ""
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

No content

get/webapi/v2/rare/csv
GET /webapi/v2/rare/csv HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*

No content

Run Bulk Processing

post
/webapi/v2/bulk_processing/run

This API allows you to start bulk processing (GA or RAG) by uploading a CSV file.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Query Parameters

  • bulk_type (string, optional): Must be ga, rag, or rag_agent_v2. Defaults to ga. rag_agent_v2 runs RAG Agent V2 (General Agent) with the same CSV as rag.

Request Body (multipart/form-data)

  • file (binary, required): CSV file with columns: question, model, search_type.

Authorizations
API-KEYstringRequired

Your API key for authentication

Query parameters
bulk_typestring · enumOptionalDefault: gaPossible values:
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
filestring · binaryRequired
Responses
200

OK

No content

post/webapi/v2/bulk_processing/run
POST /webapi/v2/bulk_processing/run HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}

No content

List Bulk Processing Results

get
/webapi/v2/bulk_processing/results

This API allows you to list bulk processing results with pagination.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Query Parameters

  • page (integer, optional): Page number for pagination. Defaults to 1.

Authorizations
API-KEYstringRequired

Your API key for authentication

Query parameters
pageintegerOptionalDefault: 1
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

No content

get/webapi/v2/bulk_processing/results
GET /webapi/v2/bulk_processing/results HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*

No content

Download Bulk Processing Result

get
/webapi/v2/bulk_processing/download

This API allows you to download a bulk processing result as a CSV file.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Query Parameters

  • file_url (string, required): The URL of the result file to download.

Authorizations
API-KEYstringRequired

Your API key for authentication

Query parameters
file_urlstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

No content

get/webapi/v2/bulk_processing/download
GET /webapi/v2/bulk_processing/download?file_url=text HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*

No content

Delete Bulk Processing Result

delete
/webapi/v2/bulk_processing/results/{result_id}

This API allows you to delete a bulk processing result by ID.

Headers

  • API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.

  • AGENT-EMAIL (string, optional): The email address of the agent performing the API call.

  • USER-EMAIL (string, optional): The email address to associate with the user.

  • OWN-USER-ID (string, optional): The user ID to identify or create a user.

Authorizations
API-KEYstringRequired

Your API key for authentication

Path parameters
result_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

No content

delete/webapi/v2/bulk_processing/results/{result_id}
DELETE /webapi/v2/bulk_processing/results/{result_id} HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*

No content

Generative Answer API

post
/webapi/generative_answer

Generative Answer API finds an answer from your unstructured text documents, Q&A, and even from complex tables. It synthesizes information from various sources to provide comprehensive responses to user queries.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
querystringOptional

This is a query string.

modelstringOptional

Utilize the LLM of your choice when generating answers. Default model is GPT4o. Please see documentation for available options.

answerFormatstringOptional

Determine the format of the response given for easier integrations. Acceptable values are DRAFTJS and MARKDOWN. Default format is DRAFTJS.

isStatefulbooleanOptional

To use follow-up question, previous conversation history is required. The conversation history is managed by threadId. If you set isStateful option to True and enter a threadId, the query will be rewritten with reference to the previous conversation history. Default = False.

threadIdstring · uuidOptional

threadId is used when isStateful = True. The first time you start a conversation, send it empty, and from the next query on, send it using the threadId from the output. However, if you want to set the threadId from the beginning, write it as a UUID and send it. Example UUID - 36e7bb2b-1063-47ec-. Default = None.

promptGroupIdstringOptional

Select which group prompt from your project to use for generating responses. The ID is located within the URL when viewing the group prompt within the Settings page. This is a very helpful option for a project with multiple different group prompts that are altered for specific tasks.

modestringOptional

Whether to output data as stream or sync. Current available values: sync OR stream (default=sync). When in stream mode, .json strings with the same output format as sync are outputted as streaming.

clueTextbooleanOptional

Whether to include the text of the document used as a clue. Default = False. ONLY works if clues is enabled.

cluesbooleanOptional

Whether to include clues in the output that will be used to create a generative answer. Default = False.

includeCitationsbooleanOptional

Whether to include detailed citation information in the response. Citations provide structured references to source documents used in generating the answer. Default = False.

search_fromstring[]Optional

Specifies the range of source data for Generative Answer to find data from. Currently available values are: web, qna, document, and enter data in the form of a list. For example -> ["web", "qna"]

temperaturenumberOptional

Controls the randomness of the output. Higher values make the output more random. Default = 0.

knowledgeBaseIdsstring[]Optional

(Legacy) Limits the search to specific knowledge base IDs. Use 'source' parameter instead for better control over shared/personal documents.

folderIdsstring[]Optional

(Legacy) Limits the search to specific folder IDs. Use 'source' parameter instead for better control over shared/personal documents.

Responses
200

Successfully generated answer

application/json
answerobjectOptional

It's the answer extracted from uploaded documents in the dashboard, formatted according to the answerFormat parameter.

answerHashstringOptional

This is used to identify the answer to give or cancel feedback.

confidencenumberOptional

It shows the confidence value from AI model. Shown as a number value between 0 and 1.

effectiveConfidencenumberOptional

When you provide feedback to the query result, it automatically trains the AI model. Effective confidence is the adjusted score with these users' and agents' feedback. Shown as a number value between 0 and 1.

documentIdstringOptional

The document's ID where the answer is extracted from.

documentNamestringOptional

The document's name where the answer is extracted from.

hashtagsarrayOptional

The hashtags attached to the document.

pageNointegerOptional

The page number in the document where the answer was derived.

createdDatestring · dateOptional

The date when the document was uploaded.

agentFeedbackobjectOptional

The feedback from agents (through dashboard and REST calls) about this document.

userFeedbackobjectOptional

The feedback from users about this document.

bodystringOptional

If returnPreview is true in the request, the html body of the document search preview is displayed.

cssstringOptional

If returnPreview is true in the request, the css of the document search preview is displayed.

pdfPreviewstringOptional

If returnPdfPreview is true in the request, the URL to a PDF preview of the document with the answer highlighted is displayed. Note that the URL can be restricted using the Download IP Allowlist setting.

folderstringOptional

If the answer is found from a folder under the Documents database, the folder name will be returned here.

editorstring[]Optional

List of the agents' email who has the editor access to the documents (if they're set in the Alli dashboard).

viewerstring[]Optional

List of the agents' email who has the viewer access to the documents (if they're set in the Alli dashboard).

threadIdstringOptional

A UUID that can be used for follow-up questions when isStateful is true.

fuQuestionstringOptional

Suggested follow-up question for the user when isStateful is true.

intentstringOptional

The detected intent of the query.

cluesarrayOptional

If clues is true in the request, the sources used to generate the answer are returned here.

post/webapi/generative_answer
POST /webapi/generative_answer HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 609

{
  "query": "text",
  "model": "text",
  "answerFormat": "text",
  "isStateful": true,
  "threadId": "123e4567-e89b-12d3-a456-426614174000",
  "promptGroupId": "text",
  "mode": "text",
  "clueText": true,
  "clues": true,
  "includeCitations": true,
  "hashtags": {
    "qnaInclude": [
      "text"
    ],
    "qnaIncludeOption": "or",
    "qnaExclude": [
      "text"
    ],
    "qnaExcludeOption": "or",
    "docsInclude": [
      "text"
    ],
    "docsIncludeOption": "or",
    "docsExclude": [
      "text"
    ],
    "docsExcludeOption": "or"
  },
  "search_from": [
    "text"
  ],
  "temperature": 1,
  "source": {
    "sharedKnowledgeBaseNodeIds": [
      "text"
    ],
    "personalKnowledgeBaseNodeIds": [
      "text"
    ],
    "webSites": [
      "text"
    ]
  },
  "knowledgeBaseIds": [
    "text"
  ],
  "folderIds": [
    "text"
  ]
}
{
  "answer": {},
  "answerHash": "text",
  "confidence": 1,
  "effectiveConfidence": 1,
  "documentId": "text",
  "documentName": "text",
  "hashtags": [],
  "pageNo": 1,
  "createdDate": "2026-01-01",
  "agentFeedback": {},
  "userFeedback": {},
  "body": "text",
  "css": "text",
  "pdfPreview": "text",
  "folder": "text",
  "editor": [
    "text"
  ],
  "viewer": [
    "text"
  ],
  "threadId": "text",
  "fuQuestion": "text",
  "intent": "text",
  "clues": [],
  "citations": [
    {
      "index": 1,
      "clueId": "text",
      "source": "text",
      "title": "text",
      "pageNo": 1,
      "knowledgeBaseId": "text",
      "faqId": "text",
      "url": "text",
      "text": "text"
    }
  ]
}

Alli Retrieval API

post
/webapi/retrieval

The Retrieval API allows you to obtain the top N page information related to a question from documents uploaded to Alli. This API combines keyword search and semantic search capabilities to provide the most relevant document pages for your queries.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
questionstringOptional

Question to search for in the document base

maxDocumentCluesintegerOptional

Determines how many related pages to retrieve. The default value is 3.

bm25_score_weightnumber · floatOptional

This is the weight for keyword search. The higher this value, the more the keyword score is reflected. Values between 0-9 are appropriate, with a value of 0 meaning keyword search is not used. The default value is 9.

text_vector_score_weightnumber · floatOptional

This is the weight for semantic search on document content. The higher this value, the more it is reflected. Values between 0-9 are appropriate, with a value of 0 meaning semantic search on document content is not used. The default value is 1.

title_vector_score_weightnumber · floatOptional

This is the weight for semantic search on document titles. Similarly, values between 0-9 are appropriate, with a value of 0 meaning semantic search on document titles is not used. The default value is 0.

hashtagsstring[]Optional

Filter results to include only documents with these hashtags

hashtags_operatorstring · enumOptional

Logical operator for hashtags (default is "or")

Possible values:
exclude_hashtagsstring[]Optional

Filter results to exclude documents with these hashtags

exclude_hashtags_operatorstring · enumOptional

Logical operator for exclude_hashtags (default is "or")

Possible values:
targetFoldersstring[]Optional

Names of folders to search within

folderIdsstring[]Optional

IDs of folders to search within

knowledgeBaseIdsstring[]Optional

IDs of specific knowledge bases to search within

enablePersonalFolderSearchbooleanOptional

Also search the requesting user's personal documents (default false). Takes effect only when the request also carries a user identity (Own-User-Id / User-Email) AND names personal ids below; otherwise the personal half is skipped and only shared documents are searched. There is deliberately no "all of my personal documents" mode.

personalFolderIdsstring[]Optional

IDs of the requesting user's personal folders to search within. Ids the user does not own are dropped. Personal ids belong here, not in folderIds — the shared and personal scopes are OR-ed, so a personal id sent as a shared one matches nothing.

personalDocumentIdsstring[]Optional

IDs of the requesting user's personal knowledge bases to search within. See personalFolderIds.

use_keywordsbooleanOptional

Whether to extract and use keywords for search

use_clue_feedbackbooleanOptional

Whether to use feedback data to improve search results

use_rerankerbooleanOptional

Overrides the project's cognitive_config.use_reranker for this request. When omitted, the project config value is used.

reranker_candidates_numintegerOptional

Overrides the number of candidate pages passed to the reranker. Only effective when reranking is enabled. Defaults to 16 when omitted.

reranker_max_tokensintegerOptional

Overrides the maximum token length per candidate sent to the reranker. Only effective when reranking is enabled. Defaults to 1024 when omitted.

Responses
200

Successfully retrieved results

application/json
post/webapi/retrieval
POST /webapi/retrieval HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 514

{
  "question": "text",
  "maxDocumentClues": 1,
  "bm25_score_weight": 1,
  "text_vector_score_weight": 1,
  "title_vector_score_weight": 1,
  "hashtags": [
    "text"
  ],
  "hashtags_operator": "and",
  "exclude_hashtags": [
    "text"
  ],
  "exclude_hashtags_operator": "and",
  "targetFolders": [
    "text"
  ],
  "folderIds": [
    "text"
  ],
  "knowledgeBaseIds": [
    "text"
  ],
  "enablePersonalFolderSearch": true,
  "personalFolderIds": [
    "text"
  ],
  "personalDocumentIds": [
    "text"
  ],
  "use_keywords": true,
  "use_clue_feedback": true,
  "use_reranker": true,
  "reranker_candidates_num": 1,
  "reranker_max_tokens": 1
}
{
  "result": [
    {
      "ranking": 1,
      "title": "text",
      "text": "text",
      "pageNo": 1,
      "kb_id": "text"
    }
  ]
}

Last updated