curl --request POST \
--url http://localhost:8080/api/v1/endpoints/legal-qa/query \
--header 'Authorization: Bearer SYFT_HUB_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
],
"similarity_threshold": 0.5,
"limit": 5,
"max_tokens": 100,
"temperature": 0.7
}'
{
"summary": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"model": "gpt-4",
"message": {
"role": "assistant",
"content": "The capital of France is Paris.",
"tokens": 8
},
"finish_reason": "stop",
"usage": {
"prompt_tokens": 10,
"completion_tokens": 8,
"total_tokens": 18
},
"cost": 0.0025,
"provider_info": {
"api_version": "v1",
"response_time_ms": 150
}
},
"references": {
"documents": [
{
"document_id": "doc1",
"content": "Paris is the capital of France.",
"metadata": {
"source": "wikipedia"
},
"similarity_score": 0.95
}
],
"provider_info": {
"search_engine": "weaviate",
"response_time_ms": 50
},
"cost": 0.001
}
}
curl --request POST \
--url http://localhost:8080/api/v1/endpoints/legal-qa/query \
--header 'Authorization: Bearer SYFT_HUB_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
],
"similarity_threshold": 0.5,
"limit": 5,
"max_tokens": 100,
"temperature": 0.7
}'
{
"summary": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"model": "gpt-4",
"message": {
"role": "assistant",
"content": "The capital of France is Paris.",
"tokens": 8
},
"finish_reason": "stop",
"usage": {
"prompt_tokens": 10,
"completion_tokens": 8,
"total_tokens": 18
},
"cost": 0.0025,
"provider_info": {
"api_version": "v1",
"response_time_ms": 150
}
},
"references": {
"documents": [
{
"document_id": "doc1",
"content": "Paris is the capital of France.",
"metadata": {
"source": "wikipedia"
},
"similarity_score": 0.95
}
],
"provider_info": {
"search_engine": "weaviate",
"response_time_ms": 50
},
"cost": 0.001
}
}
Query an endpoint to get responses from your RAG system. This is the core endpoint that orchestrates dataset search, model chat, and policy enforcement.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/openmined/syft-space/llms.txt
Use this file to discover all available pages before exploring further.
role (user/assistant/system) and content fields.reference_options and summarize_options.Show summary properties
Show references properties
curl --request POST \
--url http://localhost:8080/api/v1/endpoints/legal-qa/query \
--header 'Authorization: Bearer SYFT_HUB_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
],
"similarity_threshold": 0.5,
"limit": 5,
"max_tokens": 100,
"temperature": 0.7
}'
{
"summary": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"model": "gpt-4",
"message": {
"role": "assistant",
"content": "The capital of France is Paris.",
"tokens": 8
},
"finish_reason": "stop",
"usage": {
"prompt_tokens": 10,
"completion_tokens": 8,
"total_tokens": 18
},
"cost": 0.0025,
"provider_info": {
"api_version": "v1",
"response_time_ms": 150
}
},
"references": {
"documents": [
{
"document_id": "doc1",
"content": "Paris is the capital of France.",
"metadata": {
"source": "wikipedia"
},
"similarity_score": 0.95
}
],
"provider_info": {
"search_engine": "weaviate",
"response_time_ms": 50
},
"cost": 0.001
}
}