curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/rag/query' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"include_sources": true,
"max_context_triples": 1,
"model": "string",
"query": "string",
"strategy": "string",
"verify": true
}'
{
"answer": "string",
"confidence": 1,
"context_triples_used": 1,
"hallucinations": [
{
"claim": "string",
"correction": "string",
"status": "Verified"
}
],
"sources": [
{
"confidence": 1,
"object": "string",
"predicate": "string",
"subject": "string"
}
],
"verified": true
}
Handler for POST /api/v1/rag/query
Required scope: write
POST
/
api
/
v1
/
rag
/
query
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/rag/query' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"include_sources": true,
"max_context_triples": 1,
"model": "string",
"query": "string",
"strategy": "string",
"verify": true
}'
{
"answer": "string",
"confidence": 1,
"context_triples_used": 1,
"hallucinations": [
{
"claim": "string",
"correction": "string",
"status": "Verified"
}
],
"sources": [
{
"confidence": 1,
"object": "string",
"predicate": "string",
"subject": "string"
}
],
"verified": true
}
Required scope:
write
Request body
RAGQueryRequest
boolean
integer
string
string
required
string
boolean
Response
RAGQueryResponse
string
required
number (float)
required
integer
required
HallucinationReport[]
required
SourceTriple[]
required
boolean
required
Status codes
| Code | Meaning |
|---|---|
200 | RAG response |
400 | Invalid request (empty query or bad parameters) |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
422 | Query too long |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
503 | RAG unavailable (LLM not configured) |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/rag/query' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"include_sources": true,
"max_context_triples": 1,
"model": "string",
"query": "string",
"strategy": "string",
"verify": true
}'
{
"answer": "string",
"confidence": 1,
"context_triples_used": 1,
"hallucinations": [
{
"claim": "string",
"correction": "string",
"status": "Verified"
}
],
"sources": [
{
"confidence": 1,
"object": "string",
"predicate": "string",
"subject": "string"
}
],
"verified": true
}