---
title: "Execute Retrieval"
method: POST
path: "/api/retrievals/execute"
tags: ["retrievals"]
---

# Execute Retrieval

`POST /api/retrievals/execute`

## Request

- Base URL: `https://www.gateco.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://www.gateco.ai/api/retrievals/execute`
- Auth: OAuth 2 (password, token URL `/api/auth/login`)

## Request body

- ExecuteRetrievalRequest
  - `query_vector` number[], nullable: Pre-computed query embedding. If omitted, server embeds query text.
  - `query` string, nullable: Natural language query. Required if query_vector is omitted.
  - `principal_id` string, required
  - `connector_id` string, required
  - `top_k` integer
  - `filters` object, nullable
  - `include_unresolved` boolean: Include unresolved results for diagnostics
  - `search_mode` 'vector' | 'keyword' | 'hybrid' | 'grep': Search mode: vector (ANN), keyword (FTS), hybrid (vector+keyword), grep (exact match)
  - `alpha` number, nullable: Hybrid weight: 1.0=all-vector, 0.0=all-keyword. Only for hybrid mode.
  - `pattern_type` 'substring' | 'regex', nullable: Grep pattern type. Only for grep mode.
  - `case_sensitive` boolean: Case-sensitive grep matching. Only for grep mode.
  - `content_mode` 'inline' | 'ref', nullable: Content delivery mode. 'ref' returns signed URLs instead of inline content (Enterprise only).

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gateco/apis/gateco-api.md) · [All operations](https://skmtc.dev/gateco/apis/gateco-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gateco/apis/gateco-api/revisions/5debaf204950?raw)
