Skip to content

Semantic search over an account's RAG documents

GET
/v1/adapters/llm/rag/document/search
curl --request GET \
--url 'https://example.com/v1/adapters/llm/rag/document/search?query=example' \
--header 'Authorization: Bearer <token>'
query
required
string
document_id
Array<string>
top_k
integer
threshold
number format: float
X-Account-Sid
string

Target account for principals broader than one account (tenant / account API key); account-scoped principals use their own.

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)