Skip to main content

talonic_run_spec

Run a Spec — the customer's configured pipeline — over a set of documents in one call. Provide exactly one of document_ids (documents already in the workspace) or file_urls (public https files, max 20 — Talonic ingests them first). The call returns a RunEnvelope that normalizes two different backends (/v1/pipelines for document_ids, /v1/run for file_urls) into one shape, so the agent never has to know which route ran — only which id to poll with: poll talonic_get_run with pipeline_id when run_kind is pipeline, or with run_id when it is run. Running a Spec consumes credits.

Documents not yet in the workspace: talonic_request_upload → poll talonic_get_document → talonic_run_spec with document_ids. Remote public files: file_urls (max 20).

When to use

  • The user wants to run their configured pipeline (a Spec) over documents.
  • You need to process files through a Spec and produce its structured rows.
  • You already have a spec_id from talonic_list_specs and either workspace documents or public file URLs.

When not to use

  • One-off extraction with an ad-hoc schema — use talonic_extract.
  • Checking progress on a run already started — use talonic_get_run.
  • Reading a completed run's rows — use talonic_get_run_results.

Parameters

ParameterTypeDescription
spec_id *stringSpec UUID (from `talonic_list_specs`).
document_idsstring[]Workspace document ids (1–500). Mutually exclusive with `file_urls`.
file_urlsstring[]Public https file URLs (1–20). Mutually exclusive with `document_ids`.
namestringDisplay name for the run.
pipeline_modestring`new` (default) or `append` to the Spec's existing pipeline.
batch_idstringCaller grouping key. Only applies to the `file_urls` path.
metadataobjectFlat caller tags stamped on every ingested document. Only applies to the `file_urls` path.

Response shape

Fields

ParameterTypeDescription
run_kindstring`pipeline` (document_ids route) or `run` (file_urls route).
run_idstring|nullRun id when `run_kind` is `run`; null otherwise.
pipeline_idstring|nullPipeline id when `run_kind` is `pipeline`; null otherwise.
spec_idstringThe Spec that ran.
spec_namestring|nullThe Spec's display name, when the backend returned one; null otherwise.
statusstring`processing`, `completed` or `failed`, normalized across both backends.
raw_statusstring|nullThe backend's own status string, unnormalized.
input_countnumberNumber of documents or URLs submitted.
enqueued_documentsnumber|nullDocuments enqueued for processing on the `document_ids` route; absent on the `file_urls` route.
appendedbooleanWhether this run appended to the Spec's existing pipeline (`pipeline_mode: 'append'`); present on the `document_ids` route only.
documents[]arrayPer-document detail, present on the `file_urls` route.
messagestring|nullInformational message from the API, e.g. 'Pipeline created and queued for processing.'; null when not provided.
linksobjectFollow-up URLs, e.g. a poll link.

Frequently asked questions

Does this cost credits?+
Yes — ingestion/OCR and extraction meter credits per document exactly as a run started in the app does; validation and delivery stages are free. Check `talonic_get_pricing` and `talonic_get_balance` before a large batch.