Skip to main content
POST
/
query
/
ask
Run AutoRAG agent with streaming response
curl --request POST \
  --url https://api.datalinks.com/api/v1/query/ask \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "username": "<string>",
  "namespace": "<string>",
  "query": "What do llamas drink to cool themselves down?",
  "helperPrompt": "You're a prophet of the alpacalypse. Your task is to spit the word!",
  "model": "<string>",
  "provider": "<string>"
}
EOF
{
  "steps": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Use a Bearer token for authentication. Submit the token using the Authorization header: Authorization: Bearer <token>.

Body

application/json
username
string
required
namespace
string
required
query
string
required
Example:

"What do llamas drink to cool themselves down?"

helperPrompt
string
Example:

"You're a prophet of the alpacalypse. Your task is to spit the word!"

model
string
provider
string

Response

SSE stream of AutoRAG execution events.

SSE event containing the execution plan. Event name is "plan".

steps
string[]
required

List of step descriptions that will be executed.