SAGE query

POST/api/sageSAGE

Ask a natural-language question and receive an answer grounded in the THD knowledge base.

Also available as GET /api/sage?q=your+question.

Request

Parameters
query reqstringYour question (2–500 characters). For GET requests, use the q query parameter instead.
thd-api

Response

✓ doneapplication/json
{
"success": true,
"data": {
  "answer": "Gate 1, known as The Creative, is located in the G Center...",
  "domain": "hd"
}
}
FieldDescription
data.answerAI-synthesized answer in Markdown format
data.domainDetected domain: "hd" (Human Design), "astrology" (Western astrology), or "bazi" (Four Pillars / BaZi)

The response contains exactly these two data fields. SAGE does not return retrieval metadata (sources, model, knowledge_chunks). Cached answers return the same shape with header X-Cache: HIT and count 0 SAGE responses.

GET variant

Use a GET request with a query parameter:

GET /api/sage?q=What+is+Gate+1

Both q and query are accepted as parameter names.

SAGE responses

Each answered query counts as 1 SAGE response against your monthly SAGE allowance. A cache hit counts as 0.

Errors

StatusErrorCause
400Query is requiredMissing query parameter
400Query must be between 2 and 500 charactersQuery too short or too long
503Knowledge service unavailableKnowledge database is temporarily down
502AI service errorLLM provider returned an error