v10

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-0643140398.0 KB
Tools

Semantic Search

Run a semantic search using natural language and contextual filters. Supports citation formatting.

post/v1/tools/semantic-search

Request body

querystring required

The natural language query to search for relevant content.

format'default' | 'citations'

Format of the result content. 'default' returns standard content blocks. 'citations' returns blocks annotated for citation formatting.

Example request

{
  "query": "What were the Q4 revenue trends?",
  "context_filter": {
    "collection": "collection_name",
    "artifacts": [
      "artifact_id_1, artifact_id_2"
    ],
    "metadata_filter": [
      {
        "key": "file_id",
        "operator": "==",
        "value": "artifact_id_1"
      }
    ]
  },
  "format": "default"
}

Response

Semantic search completed successfully.

is_errorboolean

True if the tool encountered an error during execution.

Example response

{
  "content": [
    {
      "text": "The analysis shows that Q4 revenue increased by 25% compared to Q3.",
      "type": "text"
    }
  ],
  "is_error": false
}