Reference
GraphRAG API
Graph-based retrieval augmented generation endpoints
Graph-based retrieval augmented generation endpoints
GET /api/graphrag/explain
Explain a GraphRAG query
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
queryId | string | Yes | The query ID to explain |
Response: 200 Query explanation retrieved successfully
| Field | Type | Required | Description |
|---|---|---|---|
data | object | No | Query explanation details |
Example:
curl -X GET "https://api.memnexus.ai/api/graphrag/explain" \
-H "Authorization: Bearer cmk_live_xxx.yyy"
POST /api/graphrag/query
Execute a GraphRAG query
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | GraphRAG query string |
maxDepth | integer | No | Maximum graph traversal depth (alias: depth) |
depth | integer | No | Graph traversal depth (deprecated, use maxDepth) |
limit | integer | No | Maximum number of results to return |
includeRelationships | boolean | No | Include relationship data in response |
Response: 200 GraphRAG query results
| Field | Type | Required | Description |
|---|---|---|---|
data | GraphRAGQueryResponse | No |
Example:
curl -X POST "https://api.memnexus.ai/api/graphrag/query" \
-H "Authorization: Bearer cmk_live_xxx.yyy" \
-H "Content-Type: application/json" \
-d '{}'
POST /api/graphrag/query-communities
Query communities
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | |
limit | integer | No |
Response: 200 Community query results
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | No |
Example:
curl -X POST "https://api.memnexus.ai/api/graphrag/query-communities" \
-H "Authorization: Bearer cmk_live_xxx.yyy" \
-H "Content-Type: application/json" \
-d '{}'