Rest API
Get quality control reports
GET /api/v1/ai/quality/control/report
Without reportId, list every quality control report for the website, newest first. With reportId, return that report’s per-question results.
Use cases
- Progress polling: After starting a report, poll the list until
processedequalstotalQuestionsInReport - Account investigation: Read
gradeover time to see whether answer quality is improving
Notes
- A report only appears in the list once its first question has been scored, so a run you just started is briefly absent
- Questions that fail to score are dropped rather than retried, so
processedcan stop short oftotalQuestionsInReportpermanently. Treat a report whosetimestamphas not moved for a few minutes as finished gradeis out of 10, and a question counts towardspassedat 6 or above
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Your API key from account settings.
The email address of your user.
The ID of your account. You can find this in the account settings.
The ID of the workspace you want to use.
Query Parameters
Section titled “Query Parameters ”Return the per-question results for this report instead of the report list.
Responses
Section titled “ Responses ”The report list, or the per-question results when reportId is given.
object
One quality control run, aggregated over its per-question records.
object
Unique identifier for this run, as returned when it was started.
Unix timestamp (ms) of the most recently scored question in this run.
Average grade out of 10 across the questions scored so far.
How many control questions the run was started with.
How many scored questions graded 6 or above.
How many questions have been scored. Can stop below totalQuestionsInReport, since failed questions are dropped rather than retried.
One question’s result within a quality control run.
object
Unix timestamp (ms) when this question was scored.
Grade out of 10 for this answer.
The question that was asked.
The expected answer.
What the AI actually answered.
Why the grader awarded this grade.
True when the AI declined to answer at all.
Example
{ "data": [ { "accountId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "reportId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "timestamp": 1641081900000, "grade": 8, "totalQuestionsInReport": 12, "passed": 10, "processed": 12 } ]}Bad request - missing websiteId.
Unauthorized - invalid API key.