Semantic search over an account's RAG documents
GET
/v1/adapters/llm/rag/document/search
const url = 'https://example.com/v1/adapters/llm/rag/document/search?query=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/adapters/llm/rag/document/search?query=example' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”query
required
string
document_id
Array<string>
top_k
integer
threshold
number format: float
Header Parameters
Section titled “Header Parameters”X-Account-Sid
string
Target account for principals broader than one account (tenant / account API key); account-scoped principals use their own.
Responses
Section titled “Responses”OK
Media typeapplication/json
object
chunks
Array<object>
object
key
additional properties
any
Examplegenerated
{ "chunks": [ {} ]}Invalid request body or parameters
Media typeapplication/json
Flat error shape emitted by the RAG document, public models and admin
registry handlers. details is present only on validation failures that
carry per-field diagnostics.
object
error
required
string
details
string
Examplegenerated
{ "error": "example", "details": "example"}Unauthorized
Forbidden
Internal server error
Media typeapplication/json
Flat error shape emitted by the RAG document, public models and admin
registry handlers. details is present only on validation failures that
carry per-field diagnostics.
object
error
required
string
details
string
Examplegenerated
{ "error": "example", "details": "example"}Bad gateway (upstream adapter error)