Skip to main content

Chart Extraction

What it does

Chart Extraction (slug chart-to-data) reads the data points of the charts on a PDF page into a table of values, with the traced curves drawn over the page and re-plotted so you can check them. It also lists the nodes and connections of diagrams. Every stored result carries an integrity seal. It is for engineering, research and finance teams whose numbers live only in charts.

Add the app first. Chart Extraction is a standard app (slug chart-to-data). A workspace owner adds it in Apps: choose Create an App, then Add a standard app, then Add on its tile (or POST /v1/apps with slug chart-to-data). Until it is added, its /v1 routes answer 404 and its agent tools do not appear. A switched-off app still answers reads and settings, but calls that start work answer 409; switch it on from the card menu in Apps or with POST /v1/apps/{id}/enable.

What you give it

  • PDFs in your workspace.
  • Optionally, prepared inputs per page (printed ticks, scales, the curves you expect), stored by the file's SHA-256 so the same file uploaded twice shares them.

What you get

  • A chart finder per PDF: each chart and diagram with its page and position.
  • Per run, one record per chart with its values, the chart and coverage, plus printed_tick_validation that says whether the axes were checked against the printed tick labels.
  • An integrity of VERIFIED, FAILED or UNSEALED per record. Values are withheld from a record that is not verified.

Run it in the app

  1. Open Apps → Chart Extraction and pick a PDF; Talonic scans it for charts.
  2. Open a page with charts and run it.
  3. Compare the traced curves with the page, then use the values.

Run it with the API

Routes: GET /v1/chart-to-data/pdfs, GET /v1/chart-to-data/pdfs/{documentId}/charts (queues a scan the first time), POST/GET /v1/chart-to-data/inputs, POST /v1/chart-to-data/runs (body document_id, page_number), GET /v1/chart-to-data/runs and GET /v1/chart-to-data/runs/{id}. Scans and runs are queued: poll until status is done.

Find the charts, queue a run, read it
curl "https://api.talonic.com/v1/chart-to-data/pdfs/$DOCUMENT_ID/charts" \
  -H "Authorization: Bearer $TALONIC_API_KEY"

curl -X POST "https://api.talonic.com/v1/chart-to-data/runs" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"document_id": "'$DOCUMENT_ID'", "page_number": 4}'

curl "https://api.talonic.com/v1/chart-to-data/runs/$RUN_ID" \
  -H "Authorization: Bearer $TALONIC_API_KEY"
Node: use only verified values
const headers = { Authorization: `Bearer ${process.env.TALONIC_API_KEY}` };
let run;
do {
  await new Promise((r) => setTimeout(r, 5000));
  run = await fetch('https://api.talonic.com/v1/chart-to-data/runs/' + process.env.RUN_ID, { headers }).then((r) => r.json());
} while (run.status !== 'done' && run.status !== 'failed');
const usable = (run.results || []).filter((rec) => rec.integrity === 'VERIFIED' && !rec.withheld_reason);
console.log(usable.map((rec) => rec.values));

Full reference: Chart Extraction API.

Run it with an agent

There is no agent tool for Chart Extraction yet. An agent that can make HTTP calls can use the routes above with an API key.

Limits and costs

The run list returns at most 200 runs. Inputs are append-only: a new version makes earlier finished runs stale, and a changed file needs new inputs. Treat a field that is absent and one that is null alike. Work an app does for you draws on the same credit balance as the rest of the platform; no separate per-app price is published. See Billing, credits and usage and rate limits.

Errors

Status codes

ParameterTypeDescription
401authMissing or invalid API key. Send `Authorization: Bearer $TALONIC_API_KEY`.
403authThe key lacks the scope (`read` for reads, `write` for writes), or the person behind it is below member for a write.
404not foundThe workspace has not added the app (the message names slug `chart-to-data`), or the id does not exist in this workspace. Add the app, then retry.
409conflictThe app is switched off, so it starts no work. Switch it on in Apps or with `POST /v1/apps/{id}/enable`.
error_codefailed runProblems with the page itself appear as a failed run, not as an HTTP error: for example `INPUTS_MISSING` or `PAGE_OUT_OF_RANGE`. Store inputs or pick another page, then queue again.

Next

Frequently asked questions

When can I trust a record's values?+
When its integrity is VERIFIED and it has no withheld_reason. Talonic already removes the values from a record that fails, but re-read rather than rely on a cached copy.
Why are inputs tied to the file and not the document?+
So the same PDF uploaded twice shares its inputs and runs, and a changed file never reuses inputs that were prepared for different bytes.
Does the seal prove who made a record?+
No. It shows the record is intact and belongs to its run and inputs. It is not a signature.