{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/butterbase-ai/json-schema/butterbase-ai-post-v1-appid-rag-collections-name-query-request-schema.json",
  "title": "PostV1AppidRagCollectionsNameQueryRequest",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/butterbase-ai-openapi-generated.yml#/components/schemas/PostV1AppidRagCollectionsNameQueryRequest",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Natural language question"
    },
    "topK": {
      "type": "number",
      "description": "Number of chunks to return. Default: 5"
    },
    "threshold": {
      "type": "number",
      "description": "Minimum cosine similarity (0–1). Chunks below excluded."
    },
    "synthesize": {
      "type": "boolean",
      "description": "Generate an AI answer from retrieved chunks. Default: false"
    },
    "model": {
      "type": "string",
      "description": "Model for synthesis (e.g. anthropic/claude-haiku-4-5 ). Auto-selected if omitted."
    },
    "filter": {
      "type": "object",
      "description": "Metadata filter (key-value pairs). Only chunks with matching metadata are returned."
    }
  },
  "required": [
    "query"
  ]
}