---
title: "Semantic search over deep diligence claims and sources. Uses pgvector to find claims and sources most semantically similar to the query using cosine similarity on text embeddings."
method: POST
path: "/v2/rag/search"
tags: ["RAG"]
---

# Semantic search over deep diligence claims and sources. Uses pgvector to find claims and sources most semantically similar to the query using cosine similarity on text embeddings.

`POST /v2/rag/search`

## Request

- Base URL: `https://api.omtx.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.omtx.ai/v2/rag/search`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

## Headers

- `Idempotency-Key` string, required

## Request body

- object: Request model for RAG semantic search over claims and sources.
  - `query` string, required: Search query for semantic matching
  - `top_k` integer: Maximum number of results to return
  - `min_similarity` number: Minimum similarity score (0-1)
  - `gene_key` string, nullable: Filter claims by gene key (case-insensitive)
  - `include_claims` boolean: Include claims in search results
  - `include_sources` boolean: Include sources in search results
  - `only_true` boolean: Only return claims marked as true

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/omtx/apis/gateway.md) - [All operations](https://skmtc.dev/omtx/apis/gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/omtx/apis/gateway/revisions/232715a75205?raw)
