curl --request POST \
--url https://api-prod.voltai.ai/source/api/retrieve/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"keyword": "GPIO interrupt mask",
"search_mode": "keyword",
"topk": 10
}
'{
"chunks": [
{
"filename": "<string>",
"page": 123,
"llm_context": "<string>",
"bbox": "<array>",
"score": 123,
"chunk_id": "<string>"
}
]
}{}{}{}Sources & Topics
Chunk retrieval
Search your indexed sources and receive ranked chunks with text, page, and layout.
POST
/
retrieve
/
curl --request POST \
--url https://api-prod.voltai.ai/source/api/retrieve/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"keyword": "GPIO interrupt mask",
"search_mode": "keyword",
"topk": 10
}
'{
"chunks": [
{
"filename": "<string>",
"page": 123,
"llm_context": "<string>",
"bbox": "<array>",
"score": 123,
"chunk_id": "<string>"
}
]
}{}{}{}Use
See the basic operations guide for sources and topics workflows.
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) orsemantic(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 benull).chunk_id— stable chunk identifier.
Errors
- 400 — invalid input (e.g. empty
keywordor invalidsearch_mode). - 403 — missing/invalid API key, or key lacks the
retrievalscope.
Example request
curl -s -X POST "https://api-prod.voltai.ai/source/api/retrieve/" \
-H "X-API-KEY: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword":"EMC radiated emissions","search_mode":"keyword","topk":8}'
Example response
{
"chunks": [
{
"filename": "emc-guide.pdf",
"page": 14,
"llm_context": "Radiated emissions shall be measured at 3 m with a biconical antenna...",
"bbox": [[72.0, 120.5, 540.0, 200.0]],
"score": 0.91,
"chunk_id": "abc123..."
}
]
}
Authorizations
API key from organization settings. Must include the retrieval scope when the key uses granular permissions.
Body
application/json
Search text. For keyword mode, use terms that appear in the documents; for semantic mode, short phrases or questions work well.
keyword — full-text search on indexed text. semantic — dense vector similarity search.
Available options:
keyword, semantic Maximum number of texts to return.
Required range:
1 <= x <= 100If 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).
Show child attributes
Show child attributes