Developer Documentation
API & Mathematical Reference
Technical specifications, coordinate system formulas, and programmatic integration guides.
POST
https://api.aigraphreader.com/v1/digitizeProgrammatically submit a graph image or SVG URL to extract calibrated data vectors.
Example Request (cURL)
curl -X POST https://api.aigraphreader.com/v1/digitize \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@figure_1_experiment.png" \
-F "graph_type=xy_cartesian" \
-F "x_range=[0, 100]" \
-F "y_range=[0, 500]" \
-F "scale_x=linear" \
-F "scale_y=log10"Response JSON Schema
{
"status": "success",
"data": {
"series": [
{
"name": "Series 1",
"points": [
{"x": 10.2, "y": 142.5},
{"x": 20.5, "y": 230.1},
{"x": 30.1, "y": 385.0}
],
"metrics": {
"mean_x": 20.26,
"max_y": 385.0,
"confidence_score": 0.994
}
}
]
}
}Coordinate Mapping Mathematics
1. Linear Cartesian Transform
For calibrated pixel coordinates $(p_x, p_y)$ within bounding box $[x_0, y_0, x_1, y_1]$:
X = X_min + ((p_x - x_0) / (x_1 - x_0)) * (X_max - X_min)2. Logarithmic Axis Mapping
For log10 scaled axes spanning multiple orders of magnitude:
Y = 10^( log10(Y_min) + ((p_y - y_0) / (y_1 - y_0)) * (log10(Y_max) - log10(Y_min)) )3. Ternary Barycentric Coordinates
For three-component systems with vertices $V_A, V_B, V_C$ satisfying $A + B + C = 100\%$:
(A, B, C) = solve_barycentric(p_x, p_y, V_A, V_B, V_C)