Converse with a document

Converse with a document in a conversation.

This endpoint supports querying a single document at a time and supports the standard and advanced models. To converse with multiple documents, or to use the multistep model or research mode, use the Run query endpoint.

Path parameters

conversation_idstringRequired

The conversation ID.

You can list conversations and get their IDs with the List conversations endpoint.

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

IB-ContextstringOptional

Specify whether to use your community account or organization account to complete the request. To use your community account, define as your user ID. To use your organization account, define as your organization ID. If unspecified, defaults to community account context. See Authorization and context identification for details.

Request

This endpoint expects an object.
questionstringRequired
The question to ask the document.
document_idslist of integersRequired
The IDs of the documents to query.
modeenumOptional

The model to use to answer the question. Supports the standard (default) and advanced (advanced) models. See Choosing a model for details about each model.

The multistep model and research mode are not supported. To use the multistep model or research mode in a query, use the Run query endpoint.

Allowed values:

Response

Successful response, the answer is returned.
prompt_idstring or null
The ID of the prompt.
answerstring or null
The answer to the question asked.