Skip to main content

Prepared Inputs

Store the next version of prepared inputs for one PDF page, bound to the file by SHA-256, and list stored inputs by file hash and page without their payloads.

POST /v1/chart-to-data/inputs stores the next version of the inputs for a file page. The body names the file by source_sha256 (64 lowercase hex characters) and the page by page_number (1 or greater), and carries two objects: parameters, the request document with source and selected_page and the page's charts and frames, and prepared, the prepared inputs. prepared.deliveryMetadata is required and must be an object; curveExpectations, printedTicks and companionScales are optional, and the raw evidence files travel as text.

The store checks that the request is about the file and page it is stored under. parameters.source.sha256 must equal source_sha256, and parameters.selected_page.page_number must equal page_number; a difference, or a prepared.deliveryMetadata that is not an object, is refused with 422. Printed-tick evidence the engine cannot use for a requested chart is refused with 400 and the engine's own code in details.engine_code together with the chart_key. A request that fails body validation also answers 400.

Inputs are append-only. A store inserts version max + 1 for the (workspace, file hash, page) and never updates an earlier version, so a run that was queued against an earlier version stays reproducible. A newer version makes earlier done runs stale with the reason INPUTS_NEWER, which asks for another run without invalidating the earlier result. The raw hash-pinned evidence files (curve expectations, printed-tick observations and bindings, companion specs) are stored as the exact text sent, because the engine hashes the exact string: send them as produced and never re-serialise or pretty-print them.

POST/v1/chart-to-data/inputs

Body fields

source_sha256*stringSHA-256 of the PDF as 64 lowercase hex characters. Must equal parameters.source.sha256.
page_number*integer1 or greater. Must equal parameters.selected_page.page_number.
parameters*objectThe request document: source and selected_page with the page's charts and frames.
prepared*objectPrepared inputs: deliveryMetadata (required object), curveExpectations, printedTicks, companionScales, and the raw evidence files as text.

Response fields

iduuidThe stored inputs row.
source_sha256, page_numberstring, integerThe file page the inputs are bound to.
versionintegerGrows by one per store for the same file page.
created_atstring (date-time)When the version was stored.

cURL: Store inputs for page 4

curl -X POST "https://api.talonic.com/v1/chart-to-data/inputs" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d @inputs-page-4.json

Response: 201 Stored version

{
  "id": "2f7c9a41-8b06-4d3e-a915-60c8e1d4b7a3",
  "source_sha256": "9f2b6c0d4e8a1735b9c2d6f0a4e8b1c5372d9f0a6e4b8c2d1f5a7936e0b4c8d2",
  "page_number": 4,
  "version": 3,
  "created_at": "2026-10-21T08:47:19.000Z"
}
GET/v1/chart-to-data/inputs

Query parameters

source_sha256stringSHA-256 of the file, 64 lowercase hex characters.
page_numberinteger1 or greater.

Response fields (data[])

iduuidThe stored inputs row.
source_sha256, page_number, versionstring, integer, integerThe file page and the version.
created_bystring | nullWho stored the version.
created_atstring (date-time)When it was stored.

cURL: List the versions for one page

curl "https://api.talonic.com/v1/chart-to-data/inputs?source_sha256=$SHA256&page_number=4" \
  -H "Authorization: Bearer $TALONIC_API_KEY"
The inputs payloads are not returned by the list. A run exposes the version it used as inputs_version and inputs_digest on GET /v1/chart-to-data/runs/{id}, which is how a result is tied to the exact inputs behind it.

Frequently asked questions

Can I change stored inputs?+
No. Inputs are append-only. To change them, store again: the store creates the next version for the same file page. Runs queued earlier keep the version they were bound to, and an earlier done run becomes stale with the reason INPUTS_NEWER.
Why did the store answer 422?+
Either parameters.source.sha256 differs from source_sha256, parameters.selected_page.page_number differs from page_number, or prepared.deliveryMetadata is not an object. The stored key and the request document must describe the same file page.
What does a 400 with details.engine_code mean?+
The printed-tick evidence you supplied has no usable record for a requested chart, judged with the engine's own record lookup. The code names the reason and the chart_key names the chart. Store printedTicks as null to have the run report the result as NOT_VERIFIED instead.