Ask a question based on uploaded documents or sessions.
Ask a question based on uploaded documents or sessions.
Authorization
: Bearer tokenaccept
: application/jsonContent-Type
: application/jsonquestion
(string, required): The user queryuser_name
(string, optional): User nameuser_instructions
(string, optional): Accept custom, specific instructions from the usersession_id
(string, required): Chat session IDtenant_id
(string, required): Tenant identifiersub_tenant_id
(string, optional): Sub-tenant identifierstream
(boolean, optional): Enable streamingcontext_list
(list of strings, optional): List of document IDssearch_modes
(list of strings, optional): e.g., ‘creative’, ‘web’top_n
(number, optional): Number of results to returnai_generation
(boolean, optional): Enable AI answer generationhighlight_chunks
(boolean, optional): Return source chunkssearch_alpha
(float, optional): Weight for semantic matchrecency_bias
(float, optional): Recency preferencemulti_step_reasoning
(boolean, optional, default: true): If enabled, the system will automatically activate multi-step search for complex queries. If set to false, auto-enabling of multi-step search is disabled, and only single-step search will be used regardless of query complexity.auto_agent_routing
(boolean, optional, default: true): If true, enables routing for choosing the best suitable agent automatically; if false, the answer is generated from the default modelmetadata
(object, optional): Filter context to only sources matching the provided metadata. Allowed keys: source_title
, source_type
. For example, { "source_title": "contract.pdf", "source_type": "document" }
will restrict the context to sources with that title and/or type.Important Note: Cortex internally relies on the
metadata
field for source matching. You should use this field when you want to deterministically fetch specific documents based on their metadata.
Returns a JSON object containing the AI-generated answer and supporting source chunks with layout information for creating bounding boxes around cited sources.
The layout
field provides coordinates for creating bounding boxes around cited sources:
Note: For PowerPoint (PPT) and Excel (XLSX) files, the
page
field will be returned as an empty string since these file formats don’t use traditional page numbering.
page
(number): The page number where the content appearsbbox
(array): Bounding box coordinates as [x1, y1, x2, y2]coordinates
(object): Alternative coordinate format with:
x
(number): Left positiony
(number): Top positionwidth
(number): Width of the bounding boxheight
(number): Height of the bounding boxThis layout information enables you to highlight or create visual indicators around the exact location of cited content within PDF documents.
400
: Missing required parameters (question, session_id, tenant_id)401
: Invalid or missing API key500
: Internal server error during processingBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Question answered successfully
Ask a question based on uploaded documents or sessions.
Ask a question based on uploaded documents or sessions.
Authorization
: Bearer tokenaccept
: application/jsonContent-Type
: application/jsonquestion
(string, required): The user queryuser_name
(string, optional): User nameuser_instructions
(string, optional): Accept custom, specific instructions from the usersession_id
(string, required): Chat session IDtenant_id
(string, required): Tenant identifiersub_tenant_id
(string, optional): Sub-tenant identifierstream
(boolean, optional): Enable streamingcontext_list
(list of strings, optional): List of document IDssearch_modes
(list of strings, optional): e.g., ‘creative’, ‘web’top_n
(number, optional): Number of results to returnai_generation
(boolean, optional): Enable AI answer generationhighlight_chunks
(boolean, optional): Return source chunkssearch_alpha
(float, optional): Weight for semantic matchrecency_bias
(float, optional): Recency preferencemulti_step_reasoning
(boolean, optional, default: true): If enabled, the system will automatically activate multi-step search for complex queries. If set to false, auto-enabling of multi-step search is disabled, and only single-step search will be used regardless of query complexity.auto_agent_routing
(boolean, optional, default: true): If true, enables routing for choosing the best suitable agent automatically; if false, the answer is generated from the default modelmetadata
(object, optional): Filter context to only sources matching the provided metadata. Allowed keys: source_title
, source_type
. For example, { "source_title": "contract.pdf", "source_type": "document" }
will restrict the context to sources with that title and/or type.Important Note: Cortex internally relies on the
metadata
field for source matching. You should use this field when you want to deterministically fetch specific documents based on their metadata.
Returns a JSON object containing the AI-generated answer and supporting source chunks with layout information for creating bounding boxes around cited sources.
The layout
field provides coordinates for creating bounding boxes around cited sources:
Note: For PowerPoint (PPT) and Excel (XLSX) files, the
page
field will be returned as an empty string since these file formats don’t use traditional page numbering.
page
(number): The page number where the content appearsbbox
(array): Bounding box coordinates as [x1, y1, x2, y2]coordinates
(object): Alternative coordinate format with:
x
(number): Left positiony
(number): Top positionwidth
(number): Width of the bounding boxheight
(number): Height of the bounding boxThis layout information enables you to highlight or create visual indicators around the exact location of cited content within PDF documents.
400
: Missing required parameters (question, session_id, tenant_id)401
: Invalid or missing API key500
: Internal server error during processingBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Question answered successfully