KEATH.AIKEATH.AI
Home
API Documentation
Home
API Documentation
  • API Documentation

API Documentation

Initiate Evaluation Request

Description

This endpoint is used to initiate an assignment evaluation request, applicable for different versions of the evaluation system.

Request

  • Endpoint: /api/open/evaluation/start
  • Method: POST

Request Headers

ParameterTypeRequiredDescription
X-TOKEN-KEYstringYesYour API key

Request Parameters

ParameterTypeRequiredDescription
assignments_titlestringYesAssignment title
assignments_desstringYesAssignment description
rubricsArrayYesEvaluation criteria, format as per example below
contentstringYesAssignment content
assignments_typestringYesDissertation, General Essay, Publication, Report, Short Essay
total_scoreintYesTotal score
total_score_typestringYesTotal score mode: average or sum

Example Request

curl --location '/api/open/evaluation/start' \
--header 'X-TOKEN-KEY: X-TOKEN-KEY' \
--header 'Content-Type: application/json' \
--data '{
  "assignments_desc": "This is an assignment description",
  "assignments_title": "Assignment Title",
  "rubrics": [
  {
    "item": "Manage",
    "rubrics": {
      "8-9": "Exceptional management of project with clear, detailed planning, and adjustments documented. Demonstrates outstanding time management and resource allocation.",
      "6-7": "Very good management with clear planning and some adjustments. Demonstrates very good time management and resource allocation.",
      "4-5": "Adequate management with some planning and few adjustments. Adequate time management and resource allocation.",
      "2-3": "Limited management with minimal planning. Poor time management and resource allocation.",
      "0-1": "Very poor management with no planning. Very poor time management and resource allocation."
    }
  },
  // ... (other rubrics omitted for brevity)
],
  "content": "This is the student's assignment content",
  "assignments_type": "General Essay",
  "total_score_type": "sum",
  "total_score": 100
}'

Response

ParameterTypeRequiredDescription
statusstringYesRequest status
task_idstringYesTask ID

Example Response

{
    "status": "success",
    "task_id": "11ab486e-e761-4317-b441-fb683bc4b387"
}

Query Evaluation Results

Description

This endpoint is used to query the evaluation results and status, including the task's current position, total queue length, current step, and other information.

Request

  • Endpoint: /api/open/evaluation/result
  • Method: POST

Request Headers

ParameterTypeRequiredDescription
X-TOKEN-KEYstringYesYour API key

Request Parameters

ParameterTypeRequiredDescription
task_idstringYesTask ID

Example Request

curl --location --request POST '/api/open/evaluation/result?task_id=11ab486e-e761-4317-b441-fb683bc4b387' \
--header 'X-TOKEN-KEY: X-TOKEN-KEY'

Response

ParameterTypeRequiredDescription
evaluationsArrayYesEvaluation results
task_idstringYesTask ID
scorestringYesScore

Example Response

{
    "data": {
        "id": 1,
        "user_id": 1,
        "token": "2b948fd314884f2e9c702bee693e9587",
        "task_id": "445e14ca-26d6-40b3-9b85-b48d576a0287",
        "total_score": 100,
        "total_score_type": "sum",
        "status": "SUCCESS",
        "module_code": null,
        "assignments_type": "General Essay",
        "assignments_desc": "This is an assignment description",
        "assignments_title": "Assignment Title",
        "content": "This is the student's assignment content",
        "evaluation": [
            {
                "item": "Manage",
                "comment": "<b>Strengths</b>: 1. The project demonstrates clear planning and some adjustments. 2. Shows very good time management and resource allocation. <b>Weaknesses</b>: 1. The details of the adjustments are not sufficiently comprehensive and require further elaboration.",
                "score": 0,
                "sub_score": 7,
                "type": "sub_score",
                "is_evaluation": true,
                "evidence": "... (evidence text omitted for brevity) ..."
            },
            // ... (other evaluation items omitted for brevity)
        ],
        "cur_step_name": "Finished",
        "progress": 100,
        "cur_step": 5,
        "total_step": 5,
        "score": 41,
        "position": -1,
        "length": null,
        "create_time": "2024-07-26T09:01:54.000Z",
        "update_time": "2024-07-26T09:01:54.738Z"
    },
    "code": 0,
    "msg": "Success"
}
Last Updated: 3/25/26, 6:55 AM
Contributors: 郭炯韦