v5
latestOpenAPI 3.1.02026-08-025631,1012.8 MBRetrievers
Clone Retriever
Clone a retriever with optional modifications.
Purpose: Creates a NEW retriever (with new ID) based on an existing one. This is the recommended way to iterate on retriever designs when you need to modify core logic that PATCH doesn't allow (stages, input_schema, collections).
Clone vs PATCH vs Template:
- PATCH: Update metadata only (name, description, tags, display_config)
- Clone: Copy and modify core logic (stages, input_schema, collections)
- Template: Start from a pre-configured pattern (for new projects)
Common Use Cases:
- Fix a typo in a stage name
- Add or remove stages
- Change target collections
- Create variants (e.g., "strict" vs "relaxed" versions)
- Test modifications before replacing production retriever
How it works:
- Source retriever is copied
- You provide a new name (REQUIRED)
- Optionally override any other fields
- A new retriever is created with a new ID
- Original retriever remains unchanged
All fields except retriever_name are OPTIONAL:
- Omit a field to copy from source
- Provide a field to override the source value
post/v1/retrievers/{retriever_id}/clone
Path parameters
retriever_idstring required
Source retriever ID or name to clone.
Source retriever ID or name to clone.
Request body
Example request
{
"example_desc": "Clone with just a new name (exact copy)",
"retriever_name": "product_search_backup"
}Response
Successful Response
Example response
{
"retriever": {
"budget_limits": {
"max_credits": 100,
"max_time_ms": 60000
},
"collection_ids": [
"col_marketing_ads"
],
"input_schema": {
"query_text": {
"description": "Full-text query",
"type": "string"
}
},
"retriever_id": "ret_abc123",
"retriever_name": "executive_ads_search",
"stages": [
{
"config": {
"parameters": {
"field": "metadata.spend",
"operator": "gt",
"value": 1000
},
"stage_name": "attribute_filter",
"version": "v1"
},
"name": "filter_high_spend",
"stage_type": "filter"
}
]
}
}