Run a Spec pipeline
talonic_run_specRun a configured Spec pipeline on workspace documents or public file URLs to extract structured rows in one call.
Instructions
Run a Spec — the customer's configured pipeline — over documents, in one call. Two inputs: document_ids (documents already in the workspace; for a new file, first talonic_request_upload → poll talonic_get_document until completed) OR file_urls (public https files, max 20; Talonic ingests them first). Consumes credits.
USE WHEN: the user wants to 'run the invoice pipeline on these documents', process files through their Spec, or produce the Spec's structured rows.
NOT FOR: one-off extraction with an ad-hoc schema (talonic_extract), or checking progress (talonic_get_run) / reading rows (talonic_get_run_results).
ARGS: spec_id (talonic_list_specs); exactly one of document_ids[] (1–500) or file_urls[] (1–20, https); optional name, pipeline_mode (new default | append to the Spec's existing pipeline); batch_id and flat metadata only with file_urls.
RETURNS: RunEnvelope { run_kind ('pipeline'|'run'), run_id, pipeline_id, spec_id, status ('processing'|'completed'|'failed'), raw_status, input_count, documents?, message?, links }. Then poll talonic_get_run with the pipeline_id when run_kind is 'pipeline', or with the run_id when it is 'run', every 5–10 s until status is completed/failed, then talonic_get_run_results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Display name for the run. | |
| spec_id | Yes | Spec UUID (talonic_list_specs). | |
| batch_id | No | Caller grouping key (file_urls path only). | |
| metadata | No | Flat caller tags stamped on every ingested document (file_urls path only). | |
| file_urls | No | Public https file URLs (1–20). Mutually exclusive with document_ids. | |
| document_ids | No | Workspace document ids (1–500). Mutually exclusive with file_urls. | |
| pipeline_mode | No | `new` (default) or `append` to the Spec's existing pipeline. |