curl --request POST \
--url https://{VM_IP_ADDRESS}:{PORT}/response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userQuery": "How many users signed up last month?",
"knownData": {
"user_id": "12345",
"company_name": "Acme Corp"
}
}
'{
"__type__": "responseStart",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userQuery": "<string>"
}{
"__type__": "apiError",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": 400,
"description": "<string>"
}{
"__type__": "apiError",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": 401,
"description": "<string>"
}{
"__type__": "apiError",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": 500,
"description": "<string>"
}Endpoints
Response
Execute a natural language query and return the summarized results in natural language.
POST
/
response
curl --request POST \
--url https://{VM_IP_ADDRESS}:{PORT}/response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userQuery": "How many users signed up last month?",
"knownData": {
"user_id": "12345",
"company_name": "Acme Corp"
}
}
'{
"__type__": "responseStart",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userQuery": "<string>"
}{
"__type__": "apiError",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": 400,
"description": "<string>"
}{
"__type__": "apiError",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": 401,
"description": "<string>"
}{
"__type__": "apiError",
"callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": 500,
"description": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <api_key>, where <api_key> is your API token provided by the Snow Leopard team during deployment setup.
Body
application/json
Natural language query to execute against your dataset
Example:
"How many users signed up last month?"
Optional key-value pairs to provide additional context for Snow Leopard to use when answering the question.
Example:
{
"user_id": "12345",
"company_name": "Acme Corp"
}
Response
Streaming response with newline-delimited JSON objects
- responseStart
- responseData
- responseResult
- earlyTermination
Stream of JSON objects, one per line, in order: ResponseStart, ResponseData, ResponseLLMResult (or EarlyTermination)