Get AI Insights
Returns analytics for the project's AI assistant — query volume, answer confidence, visitor satisfaction, per-topic confidence, and the questions the AI couldn't answer well.
Path Parameters
The project ID.
Query Parameters
Time window: 24h, 7d, or 30d. Takes precedence over days.
Time window in days (used when period is not provided).
Example
curl "https://api.syntext.dev/v1/projects/prj_abc123/analytics/ai?period=7d" \
-H "Authorization: Bearer stx_abc12345_..."
Response
{
"data": {
"totalQueries": 412,
"avgConfidence": 0.83,
"lowConfidenceCount": 17,
"satisfactionRate": 0.91,
"avgAnswerLength": 264,
"topTopics": [
{ "topic": "guides/authentication", "count": 96, "avgConfidence": 0.94 },
{ "topic": "api-reference/webhooks", "count": 41, "avgConfidence": 0.61 }
],
"unresolvedIntents": [
{ "intent": "how do i rotate my api keys", "count": 8 }
]
}
}
avgConfidence— 0–1 score derived from retrieval similarity: how well the docs grounded each answer.satisfactionRate— thumbs-up share of all rated answers.topTopics— confidence grouped by the page where the question was asked.unresolvedIntents— low-confidence questions clustered into documentation gaps, ranked by frequency.