Skip to main content
POST
Use POST /retrieve/ to search your organization’s indexed documents and return up to topk ranked chunks — without invoking the chat agent. Send X-API-KEY in the header. Base URL is typically https://api-prod.voltai.ai/source/api. Keys with granular scopes need the retrieval permission to call this endpoint.

Request body

  • keyword (required) — the search string.
  • search_mode (required) — keyword (exact-term) or semantic (meaning-based).
  • topk (optional) — max chunks to return; default 10, max 100.

Response

  • chunks — ranked array (highest relevance first), each with:
    • filename — source name.
    • page — page number or list of pages.
    • llm_context — the chunk text.
    • bbox — bounding box(es) for the region.
    • score — relevance score (may be null).
    • chunk_id — stable chunk identifier.

Errors

  • 400 — invalid input (e.g. empty keyword or invalid search_mode).
  • 403 — missing/invalid API key, or key lacks the retrieval scope.

Example request

Example response

See the basic operations guide for sources and topics workflows.

Authorizations

X-API-KEY
string
header
required

API key from organization settings. Must include the retrieval scope when the key uses granular permissions.

Body

application/json
keyword
string
required

Search text. For keyword mode, use terms that appear in the documents; for semantic mode, short phrases or questions work well.

search_mode
enum<string>
required

keyword — full-text search on indexed text. semantic — dense vector similarity search.

Available options:
keyword,
semantic
topk
integer
default:10

Maximum number of texts to return.

Required range: 1 <= x <= 100
topic_uuid
string<uuid> | null

If set, restricts results to sources linked to this topic (including its subtree). Omit to search across all sources the key may access.

Response

Ranked texts (may be empty if nothing matches).

chunks
object[]
required