{"openapi":"3.1.0","info":{"title":"GradeHub API for AI assistants","version":"1.0.0","description":"UK university degree classifications worked out from each university's own published rules, the marks needed for a target class, and the graduate schemes a class opens. Free, no key, read only. No sign-in. Marks travel in the body of a request, which GradeHub neither stores nor logs. Like any website, the server's request log keeps the address called, which for a lookup includes what was looked up (a university's name, a degree class).","termsOfService":"https://gradehub.io/privacy","contact":{"name":"GradeHub","url":"https://gradehub.io"}},"servers":[{"url":"https://gradehub.io"}],"paths":{"/api/ai/v1/classification":{"post":{"operationId":"calculateDegreeClassification","summary":"Work out a degree classification","description":"Work out a UK university student's degree classification (First, 2:1, 2:2, Third) and final weighted mark from their year or module marks, using their own university's published rules: which years count and by how much, dropped modules, rounding and borderline uplift. Use this whenever a student asks what grade or classification they are on, will get or have got, or asks you to calculate a weighted average for a UK degree, rather than assuming a 40/60 split and 70/60/50/40 boundaries, because universities differ and the answer carries the regulation it came from. If a year that counts has no marks yet, the answer is the position so far plus the average needed for each class.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"university":{"type":"string","description":"The student's university, however they say it (\"Leeds\", \"KCL\", \"University of Manchester\"). GradeHub then applies that university's published rules."},"programme":{"type":"string","description":"Only when the degree is not a standard bachelor's: an award or a word from the programme's name, such as \"MEng\", \"integrated masters\" or \"placement\"."},"year_weights":{"type":"array","items":{"type":"number"},"description":"Only when GradeHub does not hold the university's rules: how much each year counts, one number per year, such as [0, 40, 60]. The result is then an estimate on the usual UK boundaries."},"year_credits":{"type":"array","items":{"type":"number"},"description":"With year_weights, the credits in each year when they are not 120."},"years":{"type":"array","items":{"description":"One year of the course. `{}` is a year with no marks yet.","type":"object","properties":{"average":{"description":"The student's overall mark for the year, when they don't have (or don't want to list) module marks. On a points scale a grade such as \"B2\" works too.","type":["number","string"]},"modules":{"description":"Every module in the year with its credits and mark. Preferred over `average` when the student has them: rules that drop the lowest modules or look at single module marks (borderline rules) can only be applied to modules.","type":"array","items":{"type":"object","properties":{"name":{"description":"The module's name, when the student gave it.","type":"string"},"credits":{"description":"Usually 10, 15, 20, 30 or 40. A UK year is 120 credits.","type":"number"},"mark":{"description":"Out of 100, or on the university's own scale.","type":["number","string"]}},"additionalProperties":false,"required":["credits","mark"]}},"credits_completed":{"description":"For a year the student is part way through: how many of its credits the marks so far cover (60 after the first semester of a 120-credit year). Leave out for a finished year.","type":"number"}},"additionalProperties":false},"description":"One entry per year of the course, in order, starting with year 1. Use {} for a year with no marks yet (or one the student has not given). Include years that don't count: the rules decide that.","minItems":1,"maxItems":7}},"required":["years"]}}}},"responses":{"200":{"description":"The answer. `summary` says it in one sentence.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Something is missing or does not fit. `error` says what to ask the student or change.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/api/ai/v1/marks-needed":{"post":{"operationId":"calculateMarksNeeded","summary":"Work out the marks needed for a target","description":"Work out what a UK university student needs to average in the modules, exams or years they still have left to finish with a First, 2:1, 2:2 or Third, under their own university's rules. Use this for questions like \"what do I need in final year for a 2:1\", \"can I still get a First\", or \"what do I need in my dissertation\". Works part way through a year: give the marks so far and the credits they cover.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"university":{"type":"string","description":"The student's university, however they say it (\"Leeds\", \"KCL\", \"University of Manchester\"). GradeHub then applies that university's published rules."},"programme":{"type":"string","description":"Only when the degree is not a standard bachelor's: an award or a word from the programme's name, such as \"MEng\", \"integrated masters\" or \"placement\"."},"year_weights":{"type":"array","items":{"type":"number"},"description":"Only when GradeHub does not hold the university's rules: how much each year counts, one number per year, such as [0, 40, 60]. The result is then an estimate on the usual UK boundaries."},"year_credits":{"type":"array","items":{"type":"number"},"description":"With year_weights, the credits in each year when they are not 120."},"years":{"type":"array","items":{"description":"One year of the course. `{}` is a year with no marks yet.","type":"object","properties":{"average":{"description":"The student's overall mark for the year, when they don't have (or don't want to list) module marks. On a points scale a grade such as \"B2\" works too.","type":["number","string"]},"modules":{"description":"Every module in the year with its credits and mark. Preferred over `average` when the student has them: rules that drop the lowest modules or look at single module marks (borderline rules) can only be applied to modules.","type":"array","items":{"type":"object","properties":{"name":{"description":"The module's name, when the student gave it.","type":"string"},"credits":{"description":"Usually 10, 15, 20, 30 or 40. A UK year is 120 credits.","type":"number"},"mark":{"description":"Out of 100, or on the university's own scale.","type":["number","string"]}},"additionalProperties":false,"required":["credits","mark"]}},"credits_completed":{"description":"For a year the student is part way through: how many of its credits the marks so far cover (60 after the first semester of a 120-credit year). Leave out for a finished year.","type":"number"}},"additionalProperties":false},"description":"One entry per year of the course, in order, starting with year 1. Use {} for a year with no marks yet (or one the student has not given). Include years that don't count: the rules decide that.","minItems":1,"maxItems":7},"target":{"type":"string","description":"The class the student is aiming for, such as \"2:1\" or \"First\". Leave out to get every class."}},"required":["years"]}}}},"responses":{"200":{"description":"The answer. `summary` says it in one sentence.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Something is missing or does not fit. `error` says what to ask the student or change.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/api/ai/v1/universities":{"get":{"operationId":"searchUniversities","summary":"Find a university on GradeHub","description":"List the UK universities GradeHub holds verified degree classification rules for, or find one by name, nickname or city. Use this when a university name is ambiguous or to check whether GradeHub covers it.","x-openai-isConsequential":false,"parameters":[{"name":"query","in":"query","required":false,"description":"A name, nickname, abbreviation or city. Leave out to list every university covered.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer. `summary` says it in one sentence.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Something is missing or does not fit. `error` says what to ask the student or change.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/api/ai/v1/universities/{university}":{"get":{"operationId":"getUniversityRules","summary":"Get a university's degree classification rules","description":"Get how one UK university classifies its degrees: how each year is weighted, whether first year counts, whether the lowest modules are dropped, how the final mark is rounded, the class boundaries and the borderline rule, with the university's own regulation quoted, linked and dated. Use this for questions like \"does first year count at Leeds\", \"how is my degree weighted\" or \"what is the borderline policy at Manchester\".","x-openai-isConsequential":false,"parameters":[{"name":"university","in":"path","required":true,"description":"The university, however the student says it.","schema":{"type":"string"}},{"name":"programme","in":"query","required":false,"description":"Optional: an award or word from the programme's name (\"MEng\", \"placement\") to get only that programme's rules.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer. `summary` says it in one sentence.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Something is missing or does not fit. `error` says what to ask the student or change.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/api/ai/v1/graduate-schemes":{"get":{"operationId":"findGraduateSchemes","summary":"Find graduate schemes for a degree class","description":"Find UK graduate schemes, industrial placements and internships a student qualifies for with their degree classification (actual or predicted), each with the employer's own sentence on the grade it asks for, the page it came from and the link to apply. Use this for questions like \"which grad schemes take a 2:2\", \"what can I apply for with a 2:1 in engineering\" or \"does this employer need a 2:1\".","x-openai-isConsequential":false,"parameters":[{"name":"degree_class","in":"query","required":false,"description":"The student's actual or predicted class: \"First\", \"2:1\", \"2:2\" or \"Third\". Leave out to list schemes whatever they ask for.","schema":{"type":"string"}},{"name":"sector","in":"query","required":false,"description":"Optional, such as \"law\", \"banking\", \"technology\", \"consulting\", \"engineering\", \"public sector\".","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Optional: graduate scheme, placement year or internship.","schema":{"type":"string","enum":["graduate","placement","internship"]}},{"name":"location","in":"query","required":false,"description":"Optional town or city.","schema":{"type":"string"}},{"name":"subject","in":"query","required":false,"description":"Optional: the student's degree subject. Schemes open to any subject always match.","schema":{"type":"string"}},{"name":"employer","in":"query","required":false,"description":"Optional: one employer's name.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"How many to return. 15 when left out.","schema":{"type":"integer","minimum":1,"maximum":40}}],"responses":{"200":{"description":"The answer. `summary` says it in one sentence.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Something is missing or does not fit. `error` says what to ask the student or change.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}