Run query

POST

Send an asynchronous query to the source app. Each request returns a query_id that can be used to check the query status and get the response.

Headers

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.
querystringRequired

Your query to source app.

Queries made by API are also visible in your query history when accessing the source app from the AI Hub user interface.
source_appobjectRequired

Information about the source app (chatbot or converse).

model_name"multistep" or "multistep-lite"OptionalDefaults to multistep-lite
Allowed values: multistepmultistep-lite

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 for details.

include_source_infobooleanOptionalDefaults to false

Set to true to return information about the source documents referenced when generating the query response.

The multistep model (model set to multistep-lite) supports document-level source information. Research mode (model set to multistep) supports page-level source information.
filtersobjectOptional

Filters to apply to the query. Filters narrow the scope of the query to specific documents.

Filters are only supported for converse. For chatbot, queries run on all documents.

Response

Query request accepted.

query_idstring

The unique identifier of the query.