Run query
Send an asynchronous query to the source app. Use this operation to query chatbots or query multiple documents in a conversation. Each request returns a `query_id` used to [check the query status and get the response](/api-sdk/api-reference/queries/get-query-status/).
<Tip>To query a single document in a conversation or to use the standard or advanced model in your query, use the [Converse with a document](/api-sdk/api-reference/conversations/converse) operation.</Tip>
Authentication
AuthorizationBearer
Bearer HTTP authentication.
Headers
IB-Context
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](/api-sdk/authorization#ib-context-header) for details.
Request
This endpoint expects an object.
query
Your query to source app.
<Info> Queries made by API are also visible in your query history when accessing the source app from the AI Hub user interface.</Info>
source_app
Information about the source app (chatbot or conversation).
model_name
The model to use to answer the query. Supports the multistep model (`multistep-lite`) and research mode (`multistep`), a more powerful but slower variant of the multistep model that's suited to complex reasoning queries. See [Choosing a model](/overview/models/) for details.
Allowed values:
include_source_info
Set to `true` to return information about the source documents referenced when generating the query response.
<Note> The multistep model (`model` set to `multistep-lite`) supports document-level source information. Research mode (`model` set to `multistep`) supports page-level source information.</Note>
filters
Filters to apply to the query. Filters narrow the scope of the query to specific documents.
<Note>Filters are only supported for converse. For chatbot, queries run on all documents.</Note>
Response
Query request accepted.
query_id
The unique identifier of the query.
