v5
latestOpenAPI 3.1.02026-08-025631,1012.8 MBExecute Adhoc Retriever
Execute a retriever ad-hoc without persisting the configuration.
This endpoint allows you to execute a retriever without saving it to the database. Useful for one-time queries, testing configurations, or temporary searches.
Streaming Execution (stream=True): Response uses Server-Sent Events (SSE) format with Content-Type: text/event-stream. Each stage emits events as it executes, formatted as: data: {json}\n\n
Event Types (StreamEventType):
- stage_start: Emitted when a stage begins (includes stage_name, stage_index, total_stages)
- stage_complete: Emitted when a stage finishes (includes documents, statistics, budget_used)
- stage_error: Emitted if a stage fails (includes error message)
- execution_complete: Final event with complete results and pagination
- execution_error: Emitted if entire execution fails
StreamStageEvent Fields:
- event_type: Type of event
- execution_id: Unique execution identifier
- stage_name/stage_index/total_stages: Stage progress info
- documents: Intermediate results (stage_complete only)
- statistics: Stage metrics (duration_ms, input_count, output_count, efficiency)
- budget_used: Cumulative consumption (credits_used, time_elapsed_ms, tokens_used)
Response Headers:
- Content-Type: text/event-stream
- Cache-Control: no-cache
- Connection: keep-alive
- X-Execution-Mode: adhoc
Standard Execution (stream=False, default): - Returns ExecuteRetrieverResponse after all stages complete - Includes X-Execution-Mode: adhoc header - execution_metadata.retriever_persisted = False
Use Cases: - One-time queries without saving retriever configuration - Testing stage configurations before persisting - Dynamic retrieval with varying parameters - Real-time progress tracking with streaming
Query parameters
Request body
Example request
{
"collection_identifiers": [
"my_collection"
],
"input_schema": {
"query": {
"description": "Search query",
"required": true,
"type": "text"
}
},
"stages": [
{
"config": {
"parameters": {
"final_top_k": 25,
"searches": [
{
"feature_uri": "mixpeek://text_extractor@v1/multilingual_e5_large_instruct_v1",
"query": {
"input_mode": "text",
"value": "{{INPUT.query_text}}"
},
"top_k": 100
}
]
},
"stage_id": "feature_search"
},
"description": "Feature search stage with uppercase template namespace",
"stage_name": "semantic_search",
"stage_type": "filter"
}
],
"inputs": {
"query": "machine learning"
},
"budget_limits": {
"max_credits": 100,
"max_time_ms": 60000
}
}Response
Successful Response