---
updatedAt: 2025-09-02T07:17:19.000Z
agentTools:
  projectIndex: https://jamaibase.readme.io/llms.txt
---

# Perform hybrid search on a table.

Permissions: `organization.MEMBER` OR `project.MEMBER`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "JamAI Base API",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "0.1.0",
    "x-logo": {
      "url": "https://www.jamaibase.com/favicon.svg"
    }
  },
  "servers": [
    {
      "url": "https://api.jamaibase.com"
    }
  ],
  "paths": {
    "/api/v2/gen_tables/{table_type}/hybrid_search": {
      "post": {
        "tags": [
          "Generative Table (V2)"
        ],
        "summary": "Perform hybrid search on a table.",
        "description": "Permissions: `organization.MEMBER` OR `project.MEMBER`.",
        "operationId": "hybrid_search_api_v2_gen_tables__table_type__hybrid_search_post",
        "parameters": [
          {
            "name": "table_type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TableType",
              "description": "Table type."
            },
            "description": "Table type."
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "description": "User PAT or service key.",
              "title": "Authorization"
            },
            "description": "User PAT or service key."
          },
          {
            "name": "X-USER-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "User ID. Can be omitted if PAT is used as token.",
              "default": "",
              "title": "X-User-Id"
            },
            "description": "User ID. Can be omitted if PAT is used as token."
          },
          {
            "name": "X-PROJECT-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Project ID. Can be omitted if PAT is used as token.",
              "default": "",
              "title": "X-Project-Id"
            },
            "description": "Project ID. Can be omitted if PAT is used as token."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Hybrid Search Api V2 Gen Tables  Table Type  Hybrid Search Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "SearchRequest": {
        "properties": {
          "table_id": {
            "type": "string",
            "title": "Table Id",
            "description": "Table name or ID."
          },
          "query": {
            "type": "string",
            "minLength": 1,
            "title": "Query",
            "description": "Query for full-text-search (FTS) and vector search. Must not be empty."
          },
          "limit": {
            "type": "integer",
            "maximum": 1000,
            "exclusiveMinimum": 0,
            "title": "Limit",
            "description": "_Optional_. Min 1, max 1000. Number of rows to return.",
            "default": 100
          },
          "metric": {
            "type": "string",
            "title": "Metric",
            "description": "_Optional_. Vector search similarity metric. Defaults to \"cosine\".",
            "default": "cosine"
          },
          "float_decimals": {
            "type": "integer",
            "title": "Float Decimals",
            "description": "_Optional_. Number of decimals for float values. Defaults to 0 (no rounding).",
            "default": 0
          },
          "vec_decimals": {
            "type": "integer",
            "title": "Vec Decimals",
            "description": "_Optional_. Number of decimals for vectors. If its negative, exclude vector columns. Defaults to 0 (no rounding).",
            "default": 0
          },
          "reranking_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reranking Model",
            "description": "Reranking model to use for hybrid search."
          }
        },
        "type": "object",
        "required": [
          "table_id",
          "query"
        ],
        "title": "SearchRequest"
      },
      "TableType": {
        "type": "string",
        "enum": [
          "action",
          "knowledge",
          "chat"
        ],
        "title": "TableType"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "Authentication": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "Authentication": []
    }
  ]
}
```