Overview
- Category
- Education
- API mode
execute- Processing
- client-side
- Privacy
- no-data-stored
Public descriptor
The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.
GET /api/v1/tools/gpa-calculator
Execute availability
This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.
POST /api/v1/tools/gpa-calculator/execute
Authentication is not issued during the preview. A bearer API key is planned for execution after launch.
Input schema
object object; additional properties are not accepted.
courses· string · required- One course per line: name|letter|credits
scale· string · required-
Choose the grading scale used by the institution or course. Accepted values:
4.0, 4.3, 5.0.
{
"type": "object",
"properties": {
"courses": {
"type": "string",
"description": "One course per line: name|letter|credits"
},
"scale": {
"type": "string",
"enum": [
"4.0",
"4.3",
"5.0"
],
"description": "Choose the grading scale used by the institution or course."
}
},
"required": [
"courses",
"scale"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
gpa· number- Weighted grade point average.
total_credits· number- Credit sum.
{
"type": "object",
"properties": {
"gpa": {
"type": "number",
"description": "Weighted grade point average."
},
"total_credits": {
"type": "number",
"description": "Credit sum."
}
},
"additionalProperties": false
}
Two equally weighted courses
The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.
curl -X POST "https://utilitypages.org/api/v1/tools/gpa-calculator/execute" \
-H "Content-Type: application/json" \
-d '{
"courses": "Math|A|3\nHistory|B+|3",
"scale": "4.0"
}'
{
"ok": true,
"data": {
"slug": "gpa-calculator",
"result": {
"values": {
"gpa": 3.649999999999999911182158029987476766109466552734375,
"total_credits": 6
},
"display": {
"display": "3.65"
},
"warnings": [],
"assumptions": [],
"steps": []
}
},
"meta": [],
"request_id": "req_example_123"
}
Errors
api_not_launched· 503- Returned by the current launch gate for every execute request.
invalid_json· 400- Returned when an enabled execute request does not contain valid JSON.
validation_failed· 422- Returned when a request does not satisfy the input schema.
browser_interaction_required· 422- Returned for browser capability tools instead of inventing a server-side result.
tool_not_found· 404- Returned when a requested descriptor slug does not exist.
execution_failed· 503- Returned when an enabled server-side execution cannot complete.