SAGE Query
POST/api/sageSAGE
Ask a natural-language question and receive an AI-synthesized answer backed by curated knowledge sources.
Legacy URL
Also available at /api/sage/query — the legacy URL is still fully supported.
Also available as GET /api/sage?q=your+question.
Request
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Your question (2–500 characters). For GET requests, use the q query parameter instead. |
thd-api
Response
Response200
{
"success": true,
"data": {
"answer": "Gate 1, known as The Creative, is located in the G Center...",
"sources": ["Gate 1 - The Creative", "Channel 1-8 - Inspiration"],
"domain": "hd"
},
"meta": {
"query": "What is Gate 1 in Human Design?",
"model": "grok-4.1-fast",
"knowledge_chunks": 5
}
}| Field | Description |
|---|---|
data.answer | AI-synthesized answer in Markdown format |
data.sources | Array of knowledge node titles used to generate the answer |
data.domain | Detected domain: "hd" (Human Design) or "astrology" |
meta.query | The original query string |
meta.knowledge_chunks | Number of knowledge chunks retrieved |
GET variant
For simple integrations, you can 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.
Unit consumption
Each query consumes 5 units from your monthly quota, regardless of response length.
Errors
| Status | Error | Cause |
|---|---|---|
400 | Query is required | Missing query parameter |
400 | Query must be between 2 and 500 characters | Query too short or too long |
503 | Knowledge service unavailable | Knowledge database is temporarily down |
502 | AI service error | LLM provider returned an error |
