File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,4 +38,67 @@ Open the integrated terminal to run commands in the container.
3838` $ flask run ` will start the flask development server and send requests to the flask application.
3939
4040## Running Unit Tests
41- Run pytest in the top-level project directory to start unit tests.
41+ Run pytest in the top-level project directory to start unit tests.
42+
43+ ## Public API
44+
45+ ### Solve Image
46+
47+ ** URI** : ` /solve-image `
48+
49+ ** Method** : POST
50+
51+ ** Request Body** :
52+
53+ {
54+ "b64_img": (str) "BASE64ENCODEDIMAGE"
55+ }
56+
57+ ** Response Body** :
58+
59+ {
60+ "confidence": (number) CONFIDENCE_VALUE_FROM_MATHPIX,
61+ "input_detected": (str) "LATEX_STRING_OF_INPUT_DETECTED_FROM_MATHPIX",
62+ "solved": (str) "LATEX_STRING_OF_CAS_SOLUTION_TO_PROBLEM"
63+ }
64+
65+ ### Solve Latex
66+
67+ ** URI** : ` /solve-latex `
68+
69+ ** Method** : POST
70+
71+ ** Request Body** :
72+
73+ {
74+ "latex": (str) "LATEX_TO_BE_SOLVED"
75+ }
76+
77+ ** Response Body** :
78+
79+ {
80+ "solved": (str) "LATEX_STRING_OF_CAS_SOLUTION_TO_PROBLEM"
81+ }
82+
83+ ### Mathpix OCR
84+
85+ ** URI** : ` /mathpix-ocr `
86+
87+ ** Method** : POST
88+
89+ ** Request Body** :
90+
91+ {
92+ "b64_img":(str)"BASEBASE64ENCODEDIMAGE"
93+ }
94+
95+ ** Response Body** :
96+
97+ {
98+ "confidence":(number) CONFIDENCE_VALUE_FROM_MATPHIX,
99+ "confidence_rate":(number) CONFIDENCE_RATE_FROM_MATHPIX,
100+ "latex_styled":(str) "LATEX_STRING_OF_INPUT_DETECTED_FROM_MATHPIX",
101+ "request_id":(str) Doesn't mean anything to us,
102+ "text":(str) Doesnt mean much as we are using latex
103+ }
104+
You can’t perform that action at this time.
0 commit comments