@talonic/docs 0.21.3 → 0.21.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/content.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/content/helpers.ts
2
- function deriveBreadcrumbs(sections67, leafId, domain) {
2
+ function deriveBreadcrumbs(sections68, leafId, domain) {
3
3
  const domainLabels = {
4
4
  api: "API Reference",
5
5
  platform: "Platform Guide",
@@ -10,20 +10,20 @@ function deriveBreadcrumbs(sections67, leafId, domain) {
10
10
  label: domainLabels[domain] ?? domain,
11
11
  slug: domain
12
12
  };
13
- for (const group of sections67) {
13
+ for (const group of sections68) {
14
14
  const child = group.children?.find((c) => c.id === leafId);
15
15
  if (child) {
16
16
  return [root, { label: group.label, slug: group.id }, { label: child.label, slug: child.id }];
17
17
  }
18
18
  }
19
- const topLevel = sections67.find((s) => s.id === leafId);
19
+ const topLevel = sections68.find((s) => s.id === leafId);
20
20
  if (topLevel) {
21
21
  return [root, { label: topLevel.label, slug: topLevel.id }];
22
22
  }
23
23
  return [root];
24
24
  }
25
- function derivePrevNext(sections67, leafId) {
26
- const flat = sections67.flatMap(
25
+ function derivePrevNext(sections68, leafId) {
26
+ const flat = sections68.flatMap(
27
27
  (s) => s.children ?? [{ id: s.id, label: s.label }]
28
28
  );
29
29
  const idx = flat.findIndex((c) => c.id === leafId);
@@ -329,6 +329,10 @@ var API_NAV_SECTIONS = [
329
329
  { id: "error-codes", label: "Error Codes" },
330
330
  { id: "rate-limits", label: "Rate Limits" }
331
331
  ] },
332
+ { id: "run", label: "Run", children: [
333
+ { id: "run-spec", label: "Run a Spec" },
334
+ { id: "poll-spec-run", label: "Poll a Run" }
335
+ ] },
332
336
  { id: "pipelines", label: "Pipelines", children: [
333
337
  { id: "run-pipeline", label: "Run Pipeline" },
334
338
  { id: "list-pipelines", label: "List Pipelines" },
@@ -28787,8 +28791,195 @@ var sections49 = [
28787
28791
  }
28788
28792
  ];
28789
28793
 
28790
- // src/content/api/reference-data.ts
28794
+ // src/content/api/run.ts
28791
28795
  var sections50 = [
28796
+ {
28797
+ slug: "run-spec",
28798
+ parentSlug: "run",
28799
+ title: "Run a Spec",
28800
+ seoTitle: "Run a Spec Pipeline in One Call \u2014 POST /v1/run \u2014 Talonic Docs",
28801
+ description: "Upload documents and run a Spec pipeline in a single call with POST /v1/run: mixed file and URL inputs, optional batch_id and metadata tagging, 202 with a poll URL.",
28802
+ content: [
28803
+ { type: "paragraph", text: 'The **Run** endpoint, `POST /v1/run`, is the one-call front door for Spec pipelines: send one or more documents together with a `spec_id`, and the platform ingests every input, waits for OCR, compiles the Spec\'s saved rail into a pipeline, and starts it \u2014 extraction, resolution, validation, and delivery exactly as composed in the Spec editor. It replaces the two-step "upload documents, then `POST /v1/pipelines`" flow for integrations that push files as they arrive.' },
28804
+ { type: "paragraph", text: "Inputs are flexible: attach up to 20 `files` as multipart parts, pass remote `file_urls` for documents the platform should download, or mix both in one call. At least one input is required. The endpoint always answers `202 Accepted` immediately with a `run_id` and a `poll_url` \u2014 ingestion and the pipeline run continue asynchronously, so the caller never blocks on OCR or LLM work." },
28805
+ { type: "paragraph", text: "Two optional tagging fields ride along and are stamped on **every document** the call ingests: `batch_id`, an opaque grouping key for correlating the run with an external job or batch, and `metadata`, a flat key-value object for anything else the caller wants to carry through. Both are echoed back by `GET /v1/run/:id`, and both surface on the ingested documents (`batch_id` / `metadata` on the document reads)." },
28806
+ { type: "callout", variant: "info", text: "Unlike POST /v1/process, this endpoint does not deduplicate submissions \u2014 every call starts a fresh run. Byte-identical documents are still content-deduplicated at the ingestion layer (the run reads the canonical document's data)." },
28807
+ {
28808
+ type: "endpoint",
28809
+ method: "POST",
28810
+ path: "/v1/run",
28811
+ summary: "Ingest documents and run a Spec's pipeline in one call.",
28812
+ description: "Requires write scope. Multipart upload. Always returns 202; poll or subscribe to webhooks for the result.",
28813
+ blocks: [
28814
+ {
28815
+ type: "param-table",
28816
+ title: "Multipart form fields",
28817
+ params: [
28818
+ { name: "spec_id", type: "uuid", required: true, description: "The Spec whose saved rail runs. Find it in the Spec editor URL or via GET /v1/schemas." },
28819
+ { name: "files", type: "file[]", description: "Zero or more document files (max 20 per call; per-file size capped by your tier). At least one of files / file_urls is required." },
28820
+ { name: "file_urls", type: "string[]", description: "Zero or more remote document URLs the platform downloads (SSRF-guarded)." },
28821
+ { name: "name", type: "string", description: "Optional display name for the run (max 200 chars)." },
28822
+ { name: "batch_id", type: "string", description: "Optional opaque grouping key (max 200 chars), stamped on every ingested document and echoed by GET /v1/run/:id." },
28823
+ { name: "metadata", type: "string", description: "Optional JSON string of a FLAT object { key: string | number | boolean | null }. Nested objects/arrays are rejected 400. Limits: \u226450 keys, key \u2264128 chars, string value \u22641024 chars. Persisted on the run and stamped on every ingested document." }
28824
+ ]
28825
+ }
28826
+ ]
28827
+ },
28828
+ {
28829
+ type: "code",
28830
+ title: "curl",
28831
+ language: "bash",
28832
+ code: `curl -s -X POST https://api.talonic.com/v1/run \\
28833
+ -H "Authorization: Bearer tlnc_your_api_key" \\
28834
+ -F "spec_id=1fc7807e-e1aa-4504-b796-5709986e78ed" \\
28835
+ -F "batch_id=ERP-2026-07-14-001" \\
28836
+ -F 'metadata={"source_system":"sap","priority":1}' \\
28837
+ -F "files=@invoice-0847.pdf" \\
28838
+ -F "file_urls=https://example.com/contracts/msa-2026.pdf"`
28839
+ },
28840
+ { type: "heading", level: 2, id: "run-spec-response", text: "Response" },
28841
+ {
28842
+ type: "param-table",
28843
+ title: "Response fields (202)",
28844
+ params: [
28845
+ { name: "run_id", type: "uuid", description: "The run request id \u2014 the polling handle." },
28846
+ { name: "spec_id", type: "uuid", description: "The Spec being run." },
28847
+ { name: "status", type: "string", description: "Always processing on acceptance." },
28848
+ { name: "input_count", type: "integer", description: "Total inputs accepted (files + file_urls)." },
28849
+ { name: "poll_url", type: "string", description: "Relative URL to poll: /v1/run/:id." }
28850
+ ]
28851
+ },
28852
+ {
28853
+ type: "code",
28854
+ title: "Response (202)",
28855
+ code: `{
28856
+ "run_id": "a8716d18-978d-4d19-8ca5-8b3784ca857c",
28857
+ "spec_id": "1fc7807e-e1aa-4504-b796-5709986e78ed",
28858
+ "status": "processing",
28859
+ "input_count": 2,
28860
+ "poll_url": "/v1/run/a8716d18-978d-4d19-8ca5-8b3784ca857c"
28861
+ }`
28862
+ },
28863
+ { type: "callout", variant: "info", text: "For push-style consumption, subscribe to the run.completed / run.failed webhooks (POST /v1/webhooks), or configure a delivery binding on the document.structured signal to receive each document's structured fields as its own webhook payload the moment it finishes." },
28864
+ { type: "heading", level: 2, id: "run-spec-errors", text: "Errors" },
28865
+ {
28866
+ type: "param-table",
28867
+ title: "Error responses",
28868
+ params: [
28869
+ { name: "400", type: "missing_spec_id / no_input / invalid_metadata", description: "spec_id absent or malformed, no file or file_url supplied, or metadata is not a valid flat JSON object." },
28870
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
28871
+ { name: "402", type: "insufficient_credits", description: "Credit balance too low for the ingest work \u2014 no documents are ingested and no run is created." },
28872
+ { name: "413", type: "file_too_large", description: "A file exceeds your tier's per-file size cap." },
28873
+ { name: "429", type: "rate_limit_exceeded", description: "Daily submission quota for the run namespace exhausted." }
28874
+ ]
28875
+ }
28876
+ ],
28877
+ related: [
28878
+ { label: "Poll a Run", slug: "poll-spec-run" },
28879
+ { label: "Run a Pipeline (documents already uploaded)", slug: "run-pipeline" },
28880
+ { label: "Webhook Events", slug: "webhook-events" },
28881
+ { label: "Credits & Usage", slug: "credits-usage" }
28882
+ ],
28883
+ faq: [
28884
+ { question: "How is /v1/run different from /v1/pipelines?", answer: "POST /v1/pipelines runs a Spec over documents that already exist on the platform; POST /v1/run ingests the documents AND runs the Spec in the same call. Use /v1/run when your integration pushes files as they arrive, and /v1/pipelines when documents were uploaded earlier (e.g. via connectors or /v1/sources)." },
28885
+ { question: "How do I get the results?", answer: "Three ways: poll GET /v1/run/:id until status reaches completed; subscribe to the run.completed webhook for a push notification; or configure a delivery binding on the document.structured signal to receive each document's structured fields as a payload at your destination the moment that document finishes." },
28886
+ { question: "What are batch_id and metadata for?", answer: "They are caller-owned tags. batch_id is an opaque grouping key (your ERP job number, import batch, ticket id); metadata is a flat key-value object for anything else. Both are stamped on every document the call ingests and echoed back when polling the run, so you can correlate platform output with your own systems without a lookup table." },
28887
+ { question: "Does polling count against my rate limit?", answer: "Polling GET /v1/run/:id is metered under the general read namespace, not the run submission namespace \u2014 frequent polling never burns your daily submission quota." },
28888
+ { question: "What happens if I run out of credits?", answer: "The call is rejected up front with 402 insufficient_credits before any document is ingested \u2014 no partial run is created. Top up and resubmit the same call." }
28889
+ ],
28890
+ mentions: ["spec", "pipeline run", "one-call ingest", "batch_id", "client metadata", "multipart upload", "file_urls", "webhook"]
28891
+ },
28892
+ {
28893
+ slug: "poll-spec-run",
28894
+ parentSlug: "run",
28895
+ title: "Poll a Run",
28896
+ seoTitle: "Poll a Spec Run \u2014 GET /v1/run/:id \u2014 Talonic Docs",
28897
+ description: "Poll a /v1/run request by id: run status folded with live pipeline progress, per-document completion counts, and the echoed batch_id and metadata tags.",
28898
+ content: [
28899
+ { type: "paragraph", text: "The **Poll a Run** endpoint, `GET /v1/run/:id`, reads a `/v1/run` request by the `run_id` returned on submission. The response folds the request row together with the compiled pipeline's live progress: while ingestion and OCR are still running the status is `processing` (no pipeline exists yet), it moves to `running` once the Spec's pipeline starts, and ends at `completed` or `failed`." },
28900
+ { type: "paragraph", text: "Once the pipeline exists, `pipeline_id` is set and a `progress` object reports per-document counts \u2014 how many documents finished, and how many errored. A run reports `failed` only when **every** document errored (no usable output); a run where some documents succeeded and some errored completes with the error count visible in `progress.error_documents`." },
28901
+ { type: "callout", variant: "info", text: "Poll this endpoint, not the pipeline: the run request is the stable public handle, and its status is folded live at read time. The same terminal states also fire the run.completed / run.failed webhooks, so poll or subscribe \u2014 whichever fits your integration." },
28902
+ {
28903
+ type: "endpoint",
28904
+ method: "GET",
28905
+ path: "/v1/run/:id",
28906
+ summary: "Poll a /v1/run request.",
28907
+ description: "Requires read scope. Metered under the general read namespace, so polling never consumes submission quota.",
28908
+ blocks: [
28909
+ { type: "param-table", title: "Path parameters", params: [{ name: "id", type: "uuid", required: true, description: "The run_id returned by POST /v1/run." }] }
28910
+ ]
28911
+ },
28912
+ {
28913
+ type: "code",
28914
+ title: "curl",
28915
+ language: "bash",
28916
+ code: `curl -s https://api.talonic.com/v1/run/a8716d18-978d-4d19-8ca5-8b3784ca857c \\
28917
+ -H "Authorization: Bearer tlnc_your_api_key"`
28918
+ },
28919
+ { type: "heading", level: 2, id: "poll-spec-run-response", text: "Response" },
28920
+ {
28921
+ type: "param-table",
28922
+ title: "Response fields",
28923
+ params: [
28924
+ { name: "run_id", type: "uuid", description: "The run request id." },
28925
+ { name: "spec_id", type: "uuid", description: "The Spec being run." },
28926
+ { name: "status", type: "string", description: "processing, running, completed, or failed." },
28927
+ { name: "pipeline_id", type: "uuid | null", description: "The compiled pipeline, once it exists." },
28928
+ { name: "input_count", type: "integer", description: "Total inputs accepted at submission." },
28929
+ { name: "batch_id", type: "string | null", description: "The caller grouping key supplied on submission, echoed back." },
28930
+ { name: "metadata", type: "object | null", description: "The validated flat metadata object supplied on submission, echoed back." },
28931
+ { name: "error_message", type: "string | null", description: "Populated when the run failed before a pipeline existed (e.g. every input failed OCR)." },
28932
+ { name: "progress", type: "object | null", description: "Present once the pipeline has started: total_documents, completed_documents, error_documents." },
28933
+ { name: "created_at", type: "string", description: "ISO 8601 submission timestamp." },
28934
+ { name: "updated_at", type: "string", description: "ISO 8601 last-transition timestamp." }
28935
+ ]
28936
+ },
28937
+ {
28938
+ type: "code",
28939
+ title: "Response (completed)",
28940
+ code: `{
28941
+ "run_id": "a8716d18-978d-4d19-8ca5-8b3784ca857c",
28942
+ "spec_id": "1fc7807e-e1aa-4504-b796-5709986e78ed",
28943
+ "status": "completed",
28944
+ "pipeline_id": "1a0c681d-ea20-4bb4-8892-01a6d7f834da",
28945
+ "input_count": 1,
28946
+ "batch_id": "ERP-2026-07-14-001",
28947
+ "metadata": { "source_system": "sap", "priority": 1 },
28948
+ "progress": {
28949
+ "total_documents": 1,
28950
+ "completed_documents": 1,
28951
+ "error_documents": 0
28952
+ },
28953
+ "created_at": "2026-07-14T21:04:11.312Z",
28954
+ "updated_at": "2026-07-14T21:06:48.977Z"
28955
+ }`
28956
+ },
28957
+ { type: "heading", level: 2, id: "poll-spec-run-errors", text: "Errors" },
28958
+ {
28959
+ type: "param-table",
28960
+ title: "Error responses",
28961
+ params: [
28962
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
28963
+ { name: "404", type: "not_found", description: "No run with this id exists for your organization." }
28964
+ ]
28965
+ }
28966
+ ],
28967
+ related: [
28968
+ { label: "Run a Spec", slug: "run-spec" },
28969
+ { label: "Webhook Events", slug: "webhook-events" },
28970
+ { label: "Pipeline Progress", slug: "get-pipeline-progress" }
28971
+ ],
28972
+ faq: [
28973
+ { question: "What do the four statuses mean?", answer: "processing = ingestion/OCR still running, no pipeline yet; running = the Spec's pipeline is executing; completed = the run finished with usable output; failed = no usable output (every document errored, or ingestion itself failed \u2014 see error_message)." },
28974
+ { question: "When does a run count as failed?", answer: "Only when every document errored. A partially successful run \u2014 some documents completed, some errored \u2014 reports completed, with the error count in progress.error_documents, and the failing documents visible on the pipeline." },
28975
+ { question: "Where is the structured output?", answer: "Per document, at your delivery destinations: configure a binding on the document.structured signal (pipeline.capture deliverable) and each document's structured fields are pushed as a payload when it finishes. Alternatively read the pipeline's data product or record set via pipeline_id." }
28976
+ ],
28977
+ mentions: ["run status", "polling", "pipeline progress", "batch_id", "metadata echo", "run.completed webhook"]
28978
+ }
28979
+ ];
28980
+
28981
+ // src/content/api/reference-data.ts
28982
+ var sections51 = [
28792
28983
  {
28793
28984
  slug: "list-reference-data",
28794
28985
  parentSlug: "reference-data",
@@ -29222,7 +29413,7 @@ V003,Initech Ltd,DE,DE987654321`
29222
29413
  ];
29223
29414
 
29224
29415
  // src/content/api/errors-rate-limits.ts
29225
- var sections51 = [
29416
+ var sections52 = [
29226
29417
  {
29227
29418
  slug: "error-format",
29228
29419
  parentSlug: "errors-rate-limits",
@@ -29393,7 +29584,7 @@ X-RateLimit-Reset: 2026-04-26T00:00:00.000Z`
29393
29584
  ];
29394
29585
 
29395
29586
  // src/content/api/usage.ts
29396
- var sections52 = [
29587
+ var sections53 = [
29397
29588
  {
29398
29589
  slug: "usage-overview",
29399
29590
  parentSlug: "usage",
@@ -29667,7 +29858,7 @@ var sections52 = [
29667
29858
  ];
29668
29859
 
29669
29860
  // src/content/api/pricing.ts
29670
- var sections53 = [
29861
+ var sections54 = [
29671
29862
  {
29672
29863
  slug: "pricing-overview",
29673
29864
  parentSlug: "pricing",
@@ -29780,7 +29971,7 @@ console.log(\`Batch: \${batchCredits} credits (\${batchCredits / pricing.cred
29780
29971
  ];
29781
29972
 
29782
29973
  // src/content/api/document-types.ts
29783
- var sections54 = [
29974
+ var sections55 = [
29784
29975
  {
29785
29976
  slug: "list-document-types",
29786
29977
  parentSlug: "document-types",
@@ -29946,7 +30137,7 @@ var sections54 = [
29946
30137
  ];
29947
30138
 
29948
30139
  // src/content/api/dialects.ts
29949
- var sections55 = [
30140
+ var sections56 = [
29950
30141
  {
29951
30142
  slug: "list-dialects",
29952
30143
  parentSlug: "dialects",
@@ -30494,7 +30685,7 @@ var sections55 = [
30494
30685
  ];
30495
30686
 
30496
30687
  // src/content/api/fields.ts
30497
- var sections56 = [
30688
+ var sections57 = [
30498
30689
  {
30499
30690
  slug: "list-fields",
30500
30691
  parentSlug: "fields",
@@ -30943,7 +31134,7 @@ var sections56 = [
30943
31134
  ];
30944
31135
 
30945
31136
  // src/content/api/data-products.ts
30946
- var sections57 = [
31137
+ var sections58 = [
30947
31138
  {
30948
31139
  slug: "list-data-products",
30949
31140
  parentSlug: "data-products",
@@ -31598,7 +31789,7 @@ curl -s https://api.talonic.com/v1/data-products/6ecb46fa-24ba-4b5d-93ee-b8b6c6b
31598
31789
  ];
31599
31790
 
31600
31791
  // src/content/api/data-policies.ts
31601
- var sections58 = [
31792
+ var sections59 = [
31602
31793
  {
31603
31794
  slug: "list-data-policies",
31604
31795
  parentSlug: "data-policies",
@@ -32403,7 +32594,7 @@ var sections58 = [
32403
32594
  ];
32404
32595
 
32405
32596
  // src/content/api/record-sets.ts
32406
- var sections59 = [
32597
+ var sections60 = [
32407
32598
  {
32408
32599
  slug: "list-record-sets",
32409
32600
  parentSlug: "record-sets",
@@ -32923,7 +33114,7 @@ var sections59 = [
32923
33114
  ];
32924
33115
 
32925
33116
  // src/content/api/pipelines.ts
32926
- var sections60 = [
33117
+ var sections61 = [
32927
33118
  {
32928
33119
  slug: "run-pipeline",
32929
33120
  parentSlug: "pipelines",
@@ -33549,7 +33740,7 @@ var sections60 = [
33549
33740
  ];
33550
33741
 
33551
33742
  // src/content/api/field-reviews.ts
33552
- var sections61 = [
33743
+ var sections62 = [
33553
33744
  {
33554
33745
  slug: "list-field-reviews",
33555
33746
  parentSlug: "field-reviews",
@@ -34429,7 +34620,7 @@ dec_uuid_1,a1b2c3d4-e5f6-7890-abcd-ef1234567890,lease_oct.pdf,total_amount,gate,
34429
34620
  ];
34430
34621
 
34431
34622
  // src/content/api/spec-config.ts
34432
- var sections62 = [
34623
+ var sections63 = [
34433
34624
  {
34434
34625
  slug: "get-spec-rail",
34435
34626
  parentSlug: "spec-config",
@@ -35441,7 +35632,7 @@ var sections62 = [
35441
35632
  ];
35442
35633
 
35443
35634
  // src/content/api/reconciliation.ts
35444
- var sections63 = [
35635
+ var sections64 = [
35445
35636
  {
35446
35637
  slug: "analyze-reconciliation",
35447
35638
  parentSlug: "reconciliation",
@@ -36032,7 +36223,7 @@ var sections63 = [
36032
36223
  ];
36033
36224
 
36034
36225
  // src/content/api/matching-packages.ts
36035
- var sections64 = [
36226
+ var sections65 = [
36036
36227
  {
36037
36228
  slug: "create-matching-package-config",
36038
36229
  parentSlug: "matching-packages",
@@ -36978,7 +37169,7 @@ talonic --help` }
36978
37169
  ];
36979
37170
 
36980
37171
  // src/content/sdk/index.ts
36981
- var sections65 = sections_default;
37172
+ var sections66 = sections_default;
36982
37173
 
36983
37174
  // src/content/mcp/sections.json
36984
37175
  var sections_default2 = [
@@ -39473,7 +39664,7 @@ var sections_default2 = [
39473
39664
  ];
39474
39665
 
39475
39666
  // src/content/mcp/index.ts
39476
- var sections66 = sections_default2;
39667
+ var sections67 = sections_default2;
39477
39668
 
39478
39669
  // src/content/index.ts
39479
39670
  var ALL_PLATFORM_RAW = [
@@ -39529,7 +39720,7 @@ var ALL_API_RAW = [
39529
39720
  ...sections48,
39530
39721
  ...sections49,
39531
39722
  ...sections50,
39532
- ...sections52,
39723
+ ...sections51,
39533
39724
  ...sections53,
39534
39725
  ...sections54,
39535
39726
  ...sections55,
@@ -39542,10 +39733,11 @@ var ALL_API_RAW = [
39542
39733
  ...sections62,
39543
39734
  ...sections63,
39544
39735
  ...sections64,
39545
- ...sections51
39736
+ ...sections65,
39737
+ ...sections52
39546
39738
  ];
39547
- var ALL_SDK_RAW = [...sections65];
39548
- var ALL_MCP_RAW = [...sections66];
39739
+ var ALL_SDK_RAW = [...sections66];
39740
+ var ALL_MCP_RAW = [...sections67];
39549
39741
  function enrich(raw, navSections, domain) {
39550
39742
  return raw.map((r) => {
39551
39743
  const { prev, next } = derivePrevNext(navSections, r.slug);
package/dist/index.js CHANGED
@@ -531,6 +531,14 @@ var NAV_SECTIONS = [
531
531
  { id: "cancel-job", label: "Cancel Job" }
532
532
  ]
533
533
  },
534
+ {
535
+ id: "run",
536
+ label: "Run",
537
+ children: [
538
+ { id: "post-run", label: "POST /v1/run" },
539
+ { id: "get-run-request", label: "Poll a Run" }
540
+ ]
541
+ },
534
542
  {
535
543
  id: "sources",
536
544
  label: "Sources",
@@ -1914,6 +1922,122 @@ function ApiReference({ LinkComponent }) {
1914
1922
  }` })
1915
1923
  }
1916
1924
  ) }),
1925
+ /* @__PURE__ */ jsx5(SectionHeading, { id: "run", children: "Run" }),
1926
+ /* @__PURE__ */ jsxs5("p", { className: "text-[15px] text-void-text-secondary leading-relaxed mb-6", children: [
1927
+ "The one-call front door for Spec pipelines: send documents together with a",
1928
+ " ",
1929
+ /* @__PURE__ */ jsx5("code", { children: "spec_id" }),
1930
+ ` and the platform ingests every input, waits for OCR, compiles the Spec's saved rail into a pipeline, and starts it \u2014 extraction, resolution, validation, and delivery exactly as composed in the Spec editor. Replaces the two-step "upload documents, then `,
1931
+ /* @__PURE__ */ jsx5("code", { children: "POST /v1/pipelines" }),
1932
+ '" flow for integrations that push files as they arrive.'
1933
+ ] }),
1934
+ /* @__PURE__ */ jsx5("div", { id: "post-run", className: "scroll-mt-6", children: /* @__PURE__ */ jsxs5(
1935
+ EndpointBlock,
1936
+ {
1937
+ method: "POST",
1938
+ path: "/v1/run",
1939
+ summary: "Ingest documents and run a Spec's pipeline in one call.",
1940
+ children: [
1941
+ /* @__PURE__ */ jsx5(
1942
+ ParamTable,
1943
+ {
1944
+ title: "Multipart form fields",
1945
+ params: [
1946
+ { name: "spec_id", type: "uuid", required: true, description: "The Spec whose saved rail runs." },
1947
+ { name: "files", type: "file[]", description: "Zero or more document files (max 20 per call; per-file size capped by your tier). At least one of files / file_urls is required." },
1948
+ { name: "file_urls", type: "string[]", description: "Zero or more remote document URLs the platform downloads." },
1949
+ { name: "name", type: "string", description: "Optional display name for the run (max 200 chars)." },
1950
+ { name: "batch_id", type: "string", description: "Optional opaque grouping key (max 200 chars), stamped on every ingested document and echoed when polling." },
1951
+ { name: "metadata", type: "string", description: "Optional JSON string of a FLAT object { key: string | number | boolean | null }. Nested objects/arrays rejected 400. Limits: \u226450 keys, key \u2264128 chars, string value \u22641024 chars. Stamped on every ingested document." }
1952
+ ]
1953
+ }
1954
+ ),
1955
+ /* @__PURE__ */ jsx5(CodeBlock, { title: "curl", language: "bash", children: `curl -s -X POST https://api.talonic.com/v1/run \\
1956
+ -H "Authorization: Bearer tlnc_your_api_key" \\
1957
+ -F "spec_id=1fc7807e-e1aa-4504-b796-5709986e78ed" \\
1958
+ -F "batch_id=ERP-2026-07-14-001" \\
1959
+ -F 'metadata={"source_system":"sap","priority":1}' \\
1960
+ -F "files=@invoice-0847.pdf"` }),
1961
+ /* @__PURE__ */ jsx5(CodeBlock, { title: "Response (202)", children: `{
1962
+ "run_id": "a8716d18-978d-4d19-8ca5-8b3784ca857c",
1963
+ "spec_id": "1fc7807e-e1aa-4504-b796-5709986e78ed",
1964
+ "status": "processing",
1965
+ "input_count": 1,
1966
+ "poll_url": "/v1/run/a8716d18-978d-4d19-8ca5-8b3784ca857c"
1967
+ }` }),
1968
+ /* @__PURE__ */ jsx5(
1969
+ ParamTable,
1970
+ {
1971
+ title: "Errors",
1972
+ params: [
1973
+ { name: "400", type: "error", description: "Missing spec_id, no input provided, or metadata is not a valid flat JSON object." },
1974
+ { name: "402", type: "error", description: "Insufficient credits \u2014 rejected before any document is ingested." },
1975
+ { name: "413", type: "error", description: "A file exceeds your tier's per-file size cap." },
1976
+ { name: "429", type: "error", description: "Daily submission quota for the run namespace exhausted." }
1977
+ ]
1978
+ }
1979
+ )
1980
+ ]
1981
+ }
1982
+ ) }),
1983
+ /* @__PURE__ */ jsxs5(Callout, { children: [
1984
+ "Results are push- or pull-consumable: subscribe to the ",
1985
+ /* @__PURE__ */ jsx5("code", { children: "run.completed" }),
1986
+ " /",
1987
+ " ",
1988
+ /* @__PURE__ */ jsx5("code", { children: "run.failed" }),
1989
+ " webhooks, configure a delivery binding on the",
1990
+ " ",
1991
+ /* @__PURE__ */ jsx5("code", { children: "document.structured" }),
1992
+ " signal to receive each document's structured fields as its own payload the moment it finishes, or poll the endpoint below. Unlike",
1993
+ " ",
1994
+ /* @__PURE__ */ jsx5("code", { children: "POST /v1/process" }),
1995
+ ", every call starts a fresh run (no submission dedup)."
1996
+ ] }),
1997
+ /* @__PURE__ */ jsx5("div", { id: "get-run-request", className: "scroll-mt-6", children: /* @__PURE__ */ jsxs5(
1998
+ EndpointBlock,
1999
+ {
2000
+ method: "GET",
2001
+ path: "/v1/run/:id",
2002
+ summary: "Poll a /v1/run request \u2014 row status folded with live pipeline progress.",
2003
+ children: [
2004
+ /* @__PURE__ */ jsx5(
2005
+ ParamTable,
2006
+ {
2007
+ title: "Response fields",
2008
+ params: [
2009
+ { name: "status", type: "string", description: "processing (ingest/OCR, no pipeline yet) \u2192 running \u2192 completed | failed. failed means NO usable output \u2014 every document errored." },
2010
+ { name: "pipeline_id", type: "uuid | null", description: "The compiled pipeline, once it exists." },
2011
+ { name: "batch_id", type: "string | null", description: "The grouping key supplied on submission, echoed back." },
2012
+ { name: "metadata", type: "object | null", description: "The flat metadata object supplied on submission, echoed back." },
2013
+ { name: "progress", type: "object | null", description: "Once the pipeline started: total_documents, completed_documents, error_documents." }
2014
+ ]
2015
+ }
2016
+ ),
2017
+ /* @__PURE__ */ jsx5(CodeBlock, { title: "Response (completed)", children: `{
2018
+ "run_id": "a8716d18-978d-4d19-8ca5-8b3784ca857c",
2019
+ "spec_id": "1fc7807e-e1aa-4504-b796-5709986e78ed",
2020
+ "status": "completed",
2021
+ "pipeline_id": "1a0c681d-ea20-4bb4-8892-01a6d7f834da",
2022
+ "input_count": 1,
2023
+ "batch_id": "ERP-2026-07-14-001",
2024
+ "metadata": { "source_system": "sap", "priority": 1 },
2025
+ "progress": {
2026
+ "total_documents": 1,
2027
+ "completed_documents": 1,
2028
+ "error_documents": 0
2029
+ },
2030
+ "created_at": "2026-07-14T21:04:11.312Z",
2031
+ "updated_at": "2026-07-14T21:06:48.977Z"
2032
+ }` })
2033
+ ]
2034
+ }
2035
+ ) }),
2036
+ /* @__PURE__ */ jsxs5(Callout, { children: [
2037
+ "Polling is metered under the general read namespace, not the ",
2038
+ /* @__PURE__ */ jsx5("code", { children: "run" }),
2039
+ " submission namespace \u2014 frequent polling never burns your daily submission quota."
2040
+ ] }),
1917
2041
  /* @__PURE__ */ jsx5(SectionHeading, { id: "sources", children: "Inputs" }),
1918
2042
  /* @__PURE__ */ jsx5("p", { className: "text-[15px] text-void-text-secondary leading-relaxed mb-6", children: "Inputs group documents by origin. Each input source has its own API key for programmatic document ingestion." }),
1919
2043
  /* @__PURE__ */ jsx5("div", { id: "list-sources", className: "scroll-mt-6", children: /* @__PURE__ */ jsx5(
@@ -7042,6 +7166,10 @@ var API_NAV_SECTIONS = [
7042
7166
  { id: "error-codes", label: "Error Codes" },
7043
7167
  { id: "rate-limits", label: "Rate Limits" }
7044
7168
  ] },
7169
+ { id: "run", label: "Run", children: [
7170
+ { id: "run-spec", label: "Run a Spec" },
7171
+ { id: "poll-spec-run", label: "Poll a Run" }
7172
+ ] },
7045
7173
  { id: "pipelines", label: "Pipelines", children: [
7046
7174
  { id: "run-pipeline", label: "Run Pipeline" },
7047
7175
  { id: "list-pipelines", label: "List Pipelines" },