Grade a new assignment
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
materialId: '<string>',
textToGrade: '<string>',
userId: '<string>',
model: '<string>',
rubricTemplateId: '<string>',
assignmentId: '<string>',
studentIdentifier: '<string>',
assignmentContent: '<string>'
})
};
fetch('https://studyfetchapi.com/api/v1/assignment-grader/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://studyfetchapi.com/api/v1/assignment-grader/create \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"title": "<string>",
"materialId": "<string>",
"textToGrade": "<string>",
"userId": "<string>",
"model": "<string>",
"rubricTemplateId": "<string>",
"assignmentId": "<string>",
"studentIdentifier": "<string>",
"assignmentContent": "<string>"
}
'import requests
url = "https://studyfetchapi.com/api/v1/assignment-grader/create"
payload = {
"title": "<string>",
"materialId": "<string>",
"textToGrade": "<string>",
"userId": "<string>",
"model": "<string>",
"rubricTemplateId": "<string>",
"assignmentId": "<string>",
"studentIdentifier": "<string>",
"assignmentContent": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"gradedAssignment": {
"_id": "<string>",
"title": "<string>",
"grade": 123,
"rubric": {
"attemptFeedback": "<string>",
"criteria": [
{
"title": "<string>",
"pointsAwarded": 123,
"pointsPossible": 123,
"feedback": "<string>",
"description": "<string>"
}
]
},
"organizationId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"__v": 123,
"userId": "<string>",
"materialId": "<string>",
"textToGrade": "<string>",
"rubricTemplateId": "<string>",
"assignmentId": "<string>",
"studentIdentifier": "<string>",
"assignmentContent": "<string>"
}
}Assignment Grader
Grade a new assignment
Submits student work to the AI grader. You must provide exactly one of materialId or textToGrade, and at least one of rubric or rubricTemplateId.
POST
/
api
/
v1
/
assignment-grader
/
create
Grade a new assignment
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
materialId: '<string>',
textToGrade: '<string>',
userId: '<string>',
model: '<string>',
rubricTemplateId: '<string>',
assignmentId: '<string>',
studentIdentifier: '<string>',
assignmentContent: '<string>'
})
};
fetch('https://studyfetchapi.com/api/v1/assignment-grader/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://studyfetchapi.com/api/v1/assignment-grader/create \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"title": "<string>",
"materialId": "<string>",
"textToGrade": "<string>",
"userId": "<string>",
"model": "<string>",
"rubricTemplateId": "<string>",
"assignmentId": "<string>",
"studentIdentifier": "<string>",
"assignmentContent": "<string>"
}
'import requests
url = "https://studyfetchapi.com/api/v1/assignment-grader/create"
payload = {
"title": "<string>",
"materialId": "<string>",
"textToGrade": "<string>",
"userId": "<string>",
"model": "<string>",
"rubricTemplateId": "<string>",
"assignmentId": "<string>",
"studentIdentifier": "<string>",
"assignmentContent": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"gradedAssignment": {
"_id": "<string>",
"title": "<string>",
"grade": 123,
"rubric": {
"attemptFeedback": "<string>",
"criteria": [
{
"title": "<string>",
"pointsAwarded": 123,
"pointsPossible": 123,
"feedback": "<string>",
"description": "<string>"
}
]
},
"organizationId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"__v": 123,
"userId": "<string>",
"materialId": "<string>",
"textToGrade": "<string>",
"rubricTemplateId": "<string>",
"assignmentId": "<string>",
"studentIdentifier": "<string>",
"assignmentContent": "<string>"
}
}Authorizations
x-api-keybearerAuth
API Key for server-to-server authentication. Resolves to the owning organization.
Body
application/json
Title of the assignment
Material ID to grade
Text content to grade
User ID for tracking
AI model to use
Grading rubric
Show child attributes
Show child attributes
Rubric template ID to use
Assignment ID for grouping submissions
Student identifier (email or ID)
Source material / passage / instructions students were given. The AI grader uses this as the authoritative reference when evaluating the student's submission.
Was this page helpful?