Chart2CSV turns chart images into CSV-style data for analysts and operators who need a quick extraction path from visual reports.
Status: Alpha. Verify extracted values against the source chart before using them.
Docs · Quick start · API request
Illustrative CSV format (not measured output):
label,value
Q1,42
Q2,57# In one terminal, set MISTRAL_API_KEY in the environment and start the local API:
python -m uvicorn api.main:app --reload
# In another terminal:
curl -X POST "http://127.0.0.1:8000/v1/extract" \
-F "file=@chart.png"Chart2CSV/
├── api/ # FastAPI REST API
│ └── main.py # API endpoints
├── chart2csv/ # Core Python package
│ ├── core/ # Extraction logic
│ │ ├── llm_extraction.py # Mistral-backed extraction
│ │ ├── pipeline.py # CV pipeline (fallback)
│ │ └── ocr.py # OCR for axis labels
│ └── cli/ # Command-line interface
├── deploy/ # Deployment scripts
│ ├── deploy.sh # Server deployment
│ └── nginx.conf # Nginx config
├── scripts/ # Development utilities
├── Dockerfile # Container build
├── docker-compose.yml # Container orchestration
├── requirements.txt # Python dependencies
└── setup.py # Package installation
| Feature | Description |
|---|---|
| 🧠 Mistral extraction | Vision-model extraction path |
| ⚡ Automatic extraction | Reads supported charts without manual point selection |
| 📊 Multi-Chart | Line, scatter, bar charts |
| 🔧 Manual Mode | Calibration endpoint for edge cases |
| 🌐 REST API | FastAPI endpoints for extraction workflows |
Powered by Mistral AI
| Endpoint | Description |
|---|---|
POST /v1/extract |
LLM extraction (default) |
POST /v1/extract/calibrated |
Manual calibration |
GET /docs |
Swagger UI |
GET /health |
Health check |
The browser demo sends the selected chart image and user-provided API key directly to Mistral. It stores the API key in that browser's localStorage until the field or site data is cleared.
The local API uses MISTRAL_API_KEY for its default LLM-backed extraction path. The CLI uses the local CV/Tesseract path unless --use-mistral is supplied. Mistral-backed modes transmit image data to Mistral.
pip install -e .| Variable | Description |
|---|---|
MISTRAL_API_KEY |
Mistral AI API key (required for Mistral-backed extraction) |
AGPL-3.0. Copyright (c) 2025 KikuAI OÜ