The Attempts API is the core ingestion endpoint for the Innova platform.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vruizz22/innova-backend-serverless/llms.txt
Use this file to discover all available pages before exploring further.
POST /attempts accepts a student’s answer along with intermediate work steps, runs them synchronously through the rule engine, applies a Bayesian Knowledge Tracing (BKT) mastery update for the matched topic, and enqueues a telemetry event to the SQS FIFO stream. When the rule engine cannot classify an error, the attempt is also forwarded to the async LLM classifier — poll GET /attempts/:id/status for the final result.
POST /attempts
Requires a valid JWT in the
Authorization: Bearer header. Pass an optional
x-trace-id header to correlate this attempt with your own observability
pipeline; a UUID is generated automatically when omitted.errorTagCode is UNCLASSIFIED in the response the attempt has also been forwarded to the LLM classifier — use GET /attempts/:id/status to poll for the upgraded tag.
POST /attempts
Request body
The student’s profile UUID.
Curriculum topic code that the exercise belongs to (e.g.
T-SUB-BORROW). Used to route the rule engine and to look up the BKT parameters for the mastery update.UUID of the
Exercise record. Optional — ad-hoc scans submitted without a guide context may omit this.UUID of the course. Optional, but required for BKT mastery to be scoped correctly when a student is enrolled in multiple courses.
Ordered array of intermediate work steps the student wrote.
The correct numeric answer to the exercise (e.g.
27). Used by the rule engine to determine correctness.The numeric answer the student submitted (e.g.
33).The minuend operand (e.g.
53). Optional — improves subtraction-specific rule matching when provided.The subtrahend operand (e.g.
26). Optional — improves subtraction-specific rule matching when provided.Response 201
UUID of the newly created attempt record.
true when the student’s answer equals expectedAnswer.The matched error tag code from the catalog (e.g.
BORROW_OMITTED, CORRECT, or UNCLASSIFIED).RULE when the rule engine produced the tag; LLM when the attempt was forwarded to the async LLM worker (only set to LLM on UNCLASSIFIED attempts — the tag will be upgraded after async processing).Classifier confidence score between
0 and 1.Example
POST /attempts/solve-adhoc
Create aPENDING attempt for an ad-hoc scan that has no guide context. Use this when the student scanned an exercise whose expected answer cannot be derived client-side (e.g. symbolic algebra). The attempt is enqueued for the adhoc_solver worker, which runs full-mode solution generation and writes the classification back to the attempt row. Poll GET /attempts/:id/status for the result.
POST /attempts/solve-adhoc
Request body
The student’s profile UUID.
LaTeX string of the problem statement as extracted from the OCR scan.
The student’s final answer, which may be symbolic (e.g.
x=2).Ordered array of LaTeX strings for each intermediate step the student wrote. Optional but improves classification accuracy.
Course UUID for mastery context. Optional.
Grade level between
1 and 12. Defaults to 7 when not provided.Response 201
UUID of the created attempt. Use this to poll
GET /attempts/:id/status.POST /attempts/ocr-extract
Extract math steps from a handwritten image using the platform’s OCR pipeline. Accepts amultipart/form-data upload and returns structured exercise data you can feed directly into POST /attempts or POST /attempts/solve-adhoc.
POST /attempts/ocr-extract
Request
Content-Type:multipart/form-data
The handwritten image file (JPEG or PNG).
Response 201
Array of extracted exercises. A single image may contain more than one exercise.
Example
GET /attempts/:id/status
Poll the live classification status of an attempt. Intended for use afterPOST /attempts when the response contains errorTagCode: "UNCLASSIFIED", or after POST /attempts/solve-adhoc while the adhoc worker processes the problem.
GET /attempts/:id/status
Path parameters
The attempt UUID returned by the submit endpoint.
Response 200
The attempt UUID.
PENDING while the async worker is processing; CLASSIFIED once a final error tag has been written.Whether the student’s answer was correct.
The final classified error tag code.
null while still PENDING.Human-readable error tag name.
null while still PENDING.RULE or LLM — which classifier produced the final tag.Confidence score.
null while PENDING.GET /attempts/:id/detail
Full attempt detail including all work steps and presigned photo URLs. Use this for the student drilldown view or to render the lightbox of scanned work. GET/attempts/:id/detail
Path parameters
The attempt UUID.
Response 200
The attempt UUID.
PENDING or CLASSIFIED.Whether the attempt was correct.
Classified error tag code.
Classified error tag display name.
RULE or LLM.Classifier confidence.
Ordered array of the student’s work steps.
Present when the attempt originated from a guide submission scan.
POST /attempts/:id/report
Field-report the correct error tag for an attempt (teacher feedback loop, v8 C4). Submitting a report does not overwrite the original classification — it creates a separateAttemptErrorReport record used to improve the classifier. Students and teachers may both call this endpoint.
POST /attempts/:id/report
Path parameters
The attempt UUID.
Request body
The correct error tag code from the catalog (e.g.
SUB_BORROW_NO_REGROUP). Must match an existing error tag.Optional free-text note from the reporter (max 500 characters).
Response 201
The attempt UUID.
Always
true on success.