Graph Understanding

Understand hand-drawn and printed graphs. Currently, we support scatter plots and line charts (lines and parabolas).

Get started with Solvio's Graph Understanding API easily by downloading the Postman Collection attached below. To learn more about Postman Collections click here.

Graph Understanding

POST https://developer.trysolvio.ai/api/graph/understanding

Headers

NameTypeDescription

Authentication

string

Pass your token in format Bearer <Token> Check out Authentication for more

Request Body

NameTypeDescription

src

string

Image encoded in base64 format. data:image/png;base64,iVBO..

handDrawn

boolean

Graph is hand drawn or not

grid

boolean

Whether graph contains grid

blank

boolean

Whether graph is blank or not

ocr

string

Should OCR be done for labels, coordinates. Default true

plotType

string

scatterPlot or linePlot

leastCount

number

Default 1

scaleY

number

Scale of Image in Y direction. Default 1

scaleX

number

Scale of Image in X direction. Default 1

function

string

LINE or PARABOLAX or PARABOLAY

{
  "error": {
    "id": "string",
    "description": "string"
  },
  "imagePath": "string",
  "graphCharacteristics": {
    "blank": false,
    "grid": false,
    "title": "",
    "xLabel": "",
    "yLabel": "",
    "scaleX": 1,
    "scaleY": 1,
    "handDrawn": false,
    "plotType": "string"
  },
  "functionCharacteristics": {
    "function": "string",
    "xIntersection": false,
    "yIntersection": false,
    "quadrants": [],
    "equation": {
      "ascii" : "",
      "latex" : ""
    },
    "points": [],
    "coordinates": [],
    "parameters": {}
  }
}

Code Samples

const headers = {
    'content-type': 'application/json',
    // Paste your token here
    'authorization': 'Bearer eyJhbGciOiJSUzI1...'
}

const body = {
    src: "data:image/png;base64,iVBOR...",
//  Add other parameters if needed
//  scaleX : 0.5,
//  plotType: 'linePlot' 
}

fetch("https://developer.trysolvio.ai/api/graph/understanding", {
    method: 'POST',
    headers,
    body: JSON.stringify(body)
}).then(res => {
    return res.json()
}).then(data => {
    console.log(data);
})

If you have a feature request, please write to us at hello@trysolvio.ai.

Last updated