Skip to main content
POST
/
search
Ask a question and get an answer
curl --request POST \
  --url https://sdk.senso.ai/api/v1/search \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "query": "<string>",
  "max_results": 123,
  "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "topic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
  "query": "<string>",
  "answer": "<string>",
  "results": [
    {
      "content_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "chunk_index": 123,
      "chunk_text": "<string>",
      "score": 123,
      "title": "<string>",
      "vector_id": "<string>"
    }
  ],
  "total_results": 123,
  "max_results": 123,
  "processing_time_ms": 123
}

Authorizations

X-API-Key
string
header
required

API key authorization

Body

application/json
query
string
required

The natural language question to search for

max_results
integer

Maximum number of results to return (default is 5)

org_id
string<uuid>

Organization ID (defaults to user's current org)

category_id
string<uuid>

Optional filter for specific category

topic_id
string<uuid>

Optional filter for specific topic

Response

Search completed successfully with an answer

query
string

The original search query

answer
string

The AI-generated answer to the query

results
object[]

Source chunks used to generate the answer

total_results
integer

Total number of results found

max_results
integer

Maximum number of results requested

processing_time_ms
integer

Processing time in milliseconds

I