Skip to main content
POST
/
v1
/
submissions
/
{id}
/
ai
Grade with AI
curl --request POST \
  --url https://api.example.com/v1/submissions/{id}/ai \
  --header 'Content-Type: application/json' \
  --data '
{
  "rubric": {},
  "model": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.hawkings.education/llms.txt

Use this file to discover all available pages before exploring further.

Path parameters

id
string
required

Body

rubric
Rubric
Override the assignment’s rubric for this submission only.
model
string
Pin a specific model.

Behaviour

Triggers async grading. The submission’s ai_status flips pendingready (or error). Subscribe to the submission.graded webhook or poll.

Examples

await hk.submissions.gradeWithAi("sub_123");

const graded = await hk.poll(
  () => hk.submissions.retrieve("sub_123"),
  { until: s => s.ai_status === "ready" },
);

Returns

The submission with ai_status: "pending".