Skip to main content
POST
AI Search

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body for AI-powered search.

query
string
required

The natural language search query. The AI will search your indexed knowledge and generate an answer.

record_types
enum<string>[] | null

Optional filter to restrict search to specific record types (rows, tables, files, pages, cells).

The record type in the vector database.

Available options:
rows,
tables,
files,
pages,
cells
display_type
enum<string> | null

Optional filter to restrict results to one display type (dataset, document, image, or channel). Applied before pagination, so pages cover the full filtered result pool. Honored when paginated search is enabled for the teamspace (Gen Search phase 3).

Available options:
dataset,
document,
image,
channel
limit
integer | null
default:10

Maximum number of search results to consider when generating the answer.

offset
integer | null
default:0

Number of results to skip before the returned page, for paginating search results. Combine with skip_ai_generation: true to fetch subsequent pages without regenerating the AI answer. Honored when paginated search is enabled for the teamspace (Gen Search phase 3).

skip_ai_generation
boolean | null
default:false

When true, returns the requested page of search results without generating an AI answer (answer is null and sources is empty). Cannot be combined with streaming. Honored when paginated search is enabled for the teamspace (Gen Search phase 3).

Response

An AI-generated answer with source citations and the underlying search tree results.

AI-generated answer with source citations and the underlying search results.

object
enum<string>
required

The object type, always search_ai_result.

Available options:
search_ai_result
answer
string | null
required

AI-generated natural language answer based on the search results. Contains numbered citations like [1], [2] that reference entries in the sources array. Null when the request set skip_ai_generation: true.

sources
object[]
required

Sources cited in the answer, ordered by citation index. Each source links back to the original data in your teamspace.

search_results
object
required

The full search tree results used to generate the answer. Useful for displaying raw results alongside the AI summary.

credits
object | null
required

Credit consumption for this search. When present, consumed reflects the actual variable cost of the retrieval work performed for this request. null when the billing write fails or the request is aborted before billing completes.