Skip to main content
POST
/
datafiles
/
{datafile_id}
/
response
curl --request POST \
--url https://api.snowleopard.ai/datafiles/{datafile_id}/response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userQuery": "How many superheroes are there?"
}
'
{
  "__type__": "responseStart",
  "callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "userQuery": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <api_key>, where <api_key> is your auth API key. Create an api_key

Path Parameters

datafile_id
string
required

Unique identifier for the Playground datafile to query

Body

application/json
userQuery
string
required

Natural language query to execute against the Playground datafile

Example:

"How many superheroes are there?"

Response

201 - application/json

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)

__type__
enum<string>
required

Type discriminator

Available options:
responseStart
callId
string<uuid>
required

Unique identifier for this API call

userQuery
string
required

The original user query