Integrate graph2table in your application
Automate your data extraction workflows and build powerful custom tools with our simple and robust API.
Our API provides direct access to our state-of-the-art AI plot digitization engine. By integrating it, you can programmatically send graph images and receive structured JSON data in return, perfect for research pipelines, data analysis applications, and automated reporting systems.
API keys
Create and manage your API keys from the API keys page in your account. Each key is shown once at creation, so copy it somewhere safe.
Python example
Every request costs 10 credits. You can optionally send custom_instructions for per-upload guidance.
import requests
# Load an example graph image
image_url = 'https://graph2table.com/static/img/line_chart_example.png'
image_file = requests.get(image_url, stream=True).content
# Prepare the request
api_url = 'https://graph2table.com/api/v1/convert'
files = {'file': ('example.png', image_file, 'image/png')}
data = {
'custom_instructions': 'Extract only the red data series', # optional
}
headers = {'Authorization': 'Bearer YOUR_API_KEY'}
# Complete the request
api_response = requests.post(api_url, headers=headers, files=files, data=data, timeout=180)Errors
Requests that fail return a JSON body of the form {"error": "..."} alongside the status code below.
| Status | Message |
|---|---|
| 400 | No file part in the request. Ensure you are sending a multipart/form-data request with a "file" field. |
| 401 | Authorization header is missing |
| 401 | Invalid Authorization header format. Must be "Bearer <token>" |
| 401 | Invalid API key |
| 402 | Insufficient credits. Please purchase a credit pack to use the API. |
| 422 | Invalid file type. Please upload PNG, JPG or WebP files |
| 422 | File size exceeds 10MB limit |
| 422 | Custom instructions must be 500 characters or fewer. |
| 429 | A conversion is already in progress. Please try again shortly. |
| 500 | An internal server error occurred during conversion. |
If the AI cannot read the uploaded image (for example it is not a graph, or the plot is too unclear to extract), the request also returns 422 with a message explaining what went wrong, so you can surface it to your users.