@talonic/docs 0.11.0 → 0.12.0

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.
Files changed (3) hide show
  1. package/dist/seo.js +239 -34
  2. package/openapi.json +239 -34
  3. package/package.json +1 -1
package/dist/seo.js CHANGED
@@ -4,7 +4,7 @@ var openapi_default = {
4
4
  info: {
5
5
  title: "Talonic API",
6
6
  version: "1.0.0",
7
- description: 'Structure any document into schema-validated data.\n\nThe Talonic API lets you extract structured data from documents (PDFs, images,\nDOCX, CSV, plain text), manage reusable extraction schemas, track async jobs,\nand organise documents through sources.\n\n## Authentication\n\nAll requests require a Bearer token in the `Authorization` header.\nAPI keys are prefixed with `tlnc_` and scoped per customer.\n\n```\nAuthorization: Bearer tlnc_live_abc123...\n```\n\n## Async Extraction Pattern\n\nSmall documents (\u22645 pages) are processed synchronously and return a `200`\nwith the extracted data immediately. Larger documents return a `202 Accepted`\nwith a `poll_url` \u2014 poll `GET /v1/documents/{id}` until `status` transitions\nto `completed`, then fetch results via `GET /v1/documents/{id}/extractions`.\n\nYou can force async processing by passing `options: {"async": true}` on\nany extraction request. Combine with webhooks for a fully event-driven flow:\nconfigure a webhook destination under Delivery and listen for the\n`extraction.complete` event.\n\n**Job status lifecycle:** `pending` \u2192 `processing` \u2192 `complete` | `failed`\n\n## Rate Limits\n\nRequests are metered per calendar day (UTC). Limits depend on your plan tier:\n\n| Tier | Extract | Platform | Ingest |\n|------------|---------|----------|--------|\n| Free | 50/day | 500/day | 50/day |\n| Pro | 2,000 | 10,000 | 2,000 |\n| Enterprise | Unlimited | Unlimited | Unlimited |\n\nEvery response includes rate-limit headers:\n- `X-RateLimit-Limit` \u2014 daily cap for the namespace\n- `X-RateLimit-Remaining` \u2014 requests left today\n- `X-RateLimit-Reset` \u2014 ISO 8601 timestamp when the window resets (midnight UTC)\n\n## Pagination\n\nList endpoints use cursor-based pagination. Pass `limit` (1\u2013100, default 20),\n`cursor` (opaque token from `pagination.next_cursor`), and `order` (`asc` or `desc`, default `desc`).\n\n## Errors\n\nAll errors return a JSON body with `error` (machine-readable code) and `message`\n(human-readable explanation). Additional fields vary by error type.\n\n| Code | Error | Description |\n|------|--------------------|------------------------------------------|\n| 400 | validation_error | Request body is malformed or invalid |\n| 401 | unauthorized | Missing or invalid API key |\n| 403 | insufficient_scope | API key lacks the required scope |\n| 404 | not_found | Resource does not exist |\n| 409 | conflict | Resource state conflict |\n| 413 | payload_too_large | File exceeds 500 MB limit |\n| 422 | extraction_failed | Document could not be processed |\n| 429 | rate_limit_exceeded| Daily rate limit reached |\n| 500 | internal_error | Unexpected server error (retryable) |\n',
7
+ description: 'Structure any document into schema-validated data.\n\nThe Talonic API lets you extract structured data from documents (PDFs, images,\nDOCX, CSV, plain text), manage reusable extraction schemas, track async jobs,\nand organise documents through sources.\n\n## Authentication\n\nAll requests require a Bearer token in the `Authorization` header.\nAPI keys are prefixed with `tlnc_` and scoped per customer.\n\n```\nAuthorization: Bearer tlnc_live_abc123...\n```\n\n## Async Extraction Pattern\n\nSmall documents (\u22645 pages) are processed synchronously and return a `200`\nwith the extracted data immediately. Larger documents return a `202 Accepted`\nwith a `poll_url` \u2014 poll `GET /v1/documents/{id}` until `status` transitions\nto `completed`, then fetch results via `GET /v1/documents/{id}/extractions`.\n\nYou can force async processing by passing `options: {"async": true}` on\nany extraction request. Combine with webhooks for a fully event-driven flow:\nconfigure a webhook destination under Delivery and listen for the\n`extraction.complete` event.\n\n**Job status lifecycle:** `pending` \u2192 `processing` \u2192 `complete` | `failed`\n\n## Rate Limits\n\nRequests are metered per calendar day (UTC). Limits depend on your plan tier:\n\n| Tier | Extract | Platform | Ingest |\n|------------|---------|----------|--------|\n| Free | 50/day | 500/day | 50/day |\n| Pro | 2,000 | 10,000 | 2,000 |\n| Enterprise | Unlimited | Unlimited | Unlimited |\n\nEvery response includes rate-limit headers:\n- `X-RateLimit-Limit` \u2014 daily cap for the namespace\n- `X-RateLimit-Remaining` \u2014 requests left today\n- `X-RateLimit-Reset` \u2014 ISO 8601 timestamp when the window resets (midnight UTC)\n\n## Pagination\n\nList endpoints use cursor-based pagination. Pass `limit` (1\u2013100, default 20),\n`cursor` (opaque token from `pagination.next_cursor`), and `order` (`asc` or `desc`, default `desc`).\n\n## Errors\n\nAll errors return a JSON body with `error` (machine-readable code) and `message`\n(human-readable explanation). Additional fields vary by error type.\n\n| Code | Error | Description |\n|------|--------------------|------------------------------------------|\n| 400 | validation_error | Request body is malformed or invalid |\n| 401 | unauthorized | Missing or invalid API key |\n| 403 | insufficient_scope | API key lacks the required scope |\n| 404 | not_found | Resource does not exist |\n| 409 | conflict | Resource state conflict |\n| 413 | payload_too_large | File exceeds 500 MB limit |\n| 422 | extraction_failed | Document could not be processed |\n| 429 | rate_limit_exceeded| Daily rate limit reached |\n| 500 | internal_error | Unexpected server error (retryable) |\n\nEvery error response follows this envelope:\n\n```json\n{\n "statusCode": 400,\n "code": "VALIDATION_ERROR",\n "error": "Bad Request",\n "message": "name is required.",\n "retryable": false,\n "timestamp": "2026-04-25T14:30:00.000Z",\n "path": "/v1/schemas"\n}\n```\n\nThe `code` field is one of: `VALIDATION_ERROR`, `AUTH_REQUIRED`, `TOKEN_EXPIRED`,\n`INSUFFICIENT_PERMISSIONS`, `RESOURCE_NOT_FOUND`, `QUOTA_EXCEEDED`,\n`INSUFFICIENT_CREDITS`, `LLM_RATE_LIMITED`, `LLM_TIMEOUT`, `LLM_UNAVAILABLE`,\n`OCR_FAILED`, `EXTRACTION_FAILED`, `EXTRACTION_TIMEOUT`, `FILE_TOO_LARGE`,\n`DUPLICATE_RESOURCE`, `DATASPACE_RUN_FAILED`, `INTERNAL_ERROR`.\n\n## Async Extraction Lifecycle\n\nEnd-to-end async flow:\n\n**Step 1 \u2014 Submit extraction with `async: true`:**\n```\nPOST /v1/extract\nContent-Type: multipart/form-data\nAuthorization: Bearer tlnc_live_abc123\n\nfile=@contract.pdf\noptions={"async": true}\n```\nResponse `202 Accepted`:\n```json\n{\n "request_id": "req_x7y8z9a0",\n "status": "processing",\n "document": { "id": "f0e1d2c3-..." },\n "poll_url": "/v1/documents/f0e1d2c3-..."\n}\n```\n\n**Step 2 \u2014 Poll for completion:**\n```\nGET /v1/documents/f0e1d2c3-...\n```\nResponse `200` (when done): `"status": "completed"`\n\n**Step 3 \u2014 Retrieve results:**\n```\nGET /v1/documents/f0e1d2c3-.../extractions\n```\n\n**Alternative \u2014 Webhooks:** Configure a delivery destination and binding\nto receive `document.extracted` events via POST callback. See the\nDelivery tag for setup details.\n\n**Job status state machine:**\n`pending` \u2192 `queued` \u2192 `processing` \u2192 `complete` | `failed`\n\nCancelled jobs transition directly to `failed` from `pending` or `processing`.\n\n## Operational Details\n\n**Uptime SLA:**\n- Free: best effort\n- Pro: 99.5%\n- Enterprise: 99.9% (custom SLA available)\n\n**Timeouts:** Synchronous extractions time out after 120 seconds. For\ndocuments that may take longer, use `async: true`. Async jobs have no\ntimeout \u2014 they run to completion or failure.\n\n**Payload limits:**\n- File upload (extract, ingest): 500 MB\n- JSON request bodies (schemas, jobs): 1 MB\n- PATCH corrections: 1 MB\n\n**Idempotency keys:** Pass an `Idempotency-Key` header on POST requests.\nKeys are valid for 24 hours. A duplicate request returns the cached\nresponse with `cached: true` in the body. Keys are scoped per API key.\n',
8
8
  contact: {
9
9
  name: "Talonic Support",
10
10
  email: "support@talonic.ai",
@@ -68,7 +68,7 @@ var openapi_default = {
68
68
  },
69
69
  {
70
70
  name: "Delivery",
71
- description: "Outbound delivery. Configure destinations (seven live connectors: webhook, sftp,\ns3, azure_blob, google_drive, onedrive, google_sheets), create bindings that join\nsignal filters to deliverable types + destinations + serializers, and inspect the\nhistory/DLQ/events log. Every delivery is at-least-once with an idempotency key\non the wire.\n"
71
+ description: 'Outbound delivery. Configure destinations (webhook, sftp, s3, azure_blob,\ngoogle_drive, onedrive, google_sheets), create bindings that join signal\nfilters to deliverable types + serializers, and inspect delivery history.\n\n## Webhook Delivery Contract\n\n**Payload envelope:**\n```json\n{\n "event": {\n "event_type": "document.extracted",\n "event_id": "42",\n "binding_id": "uuid",\n "idempotency_key": "a1b2c3...32-char-hex",\n "attempt": 1,\n "delivered_at": "2026-04-25T14:30:00.000Z"\n },\n "payload": { "...serialized data..." }\n}\n```\n\n**Headers:** `X-Talonic-Event`, `X-Talonic-Delivery`, `X-Talonic-Signature`,\n`X-Talonic-Attempt`, `X-Talonic-Idempotency-Key`.\n\n**Signature verification (HMAC-SHA256):**\n```\nX-Talonic-Signature: t=1714060200000,v1=abc123...\nsigned = HMAC-SHA256(signing_secret, "${timestamp}.${body}")\n```\n\n**Event types:** `document.extracted`, `document.extraction_failed`,\n`run.dataspace.completed`, `run.dataspace.failed`,\n`result.dataspace.completed`, `result.approved`, `result.rejected`,\n`delivery.item.completed`, `delivery.item.failed` (17 total).\n\n**Retry policy:** Up to 7 attempts with exponential backoff:\n0s \u2192 30s \u2192 2m \u2192 8m \u2192 30m \u2192 2h \u2192 8h (~10.5h total).\nHTTP 429 and 5xx are retryable. HTTP 4xx (except 408) goes to DLQ immediately.\n\n**Dead-letter queue:** Failed deliveries land in the DLQ. Replay via\n`POST /v1/delivery/dlq/{id}/replay` which re-enqueues with attempt=1\nand the same idempotency key.\n'
72
72
  },
73
73
  {
74
74
  name: "Filter",
@@ -143,6 +143,61 @@ var openapi_default = {
143
143
  description: "Workspace context snapshot and tool discovery for the embedded AI agent."
144
144
  }
145
145
  ],
146
+ "x-tagGroups": [
147
+ {
148
+ name: "Getting Started",
149
+ tags: [
150
+ "Extract"
151
+ ]
152
+ },
153
+ {
154
+ name: "Core Resources",
155
+ tags: [
156
+ "Documents",
157
+ "Extractions",
158
+ "Schemas",
159
+ "Jobs"
160
+ ]
161
+ },
162
+ {
163
+ name: "Data Pipeline",
164
+ tags: [
165
+ "Sources",
166
+ "Batches",
167
+ "Routing",
168
+ "Delivery",
169
+ "Filter",
170
+ "Review"
171
+ ]
172
+ },
173
+ {
174
+ name: "Intelligence",
175
+ tags: [
176
+ "Matching",
177
+ "Cases",
178
+ "Linking",
179
+ "Fields",
180
+ "Reference Data",
181
+ "Dialects",
182
+ "Document Types",
183
+ "Schema Graph",
184
+ "N-Shot",
185
+ "Resolutions"
186
+ ]
187
+ },
188
+ {
189
+ name: "Platform",
190
+ tags: [
191
+ "Usage",
192
+ "Credits",
193
+ "Quality",
194
+ "Telemetry",
195
+ "Validation",
196
+ "Structuring",
197
+ "Agent"
198
+ ]
199
+ }
200
+ ],
146
201
  paths: {
147
202
  "/v1/extract": {
148
203
  post: {
@@ -1057,6 +1112,45 @@ var openapi_default = {
1057
1112
  "application/json": {
1058
1113
  schema: {
1059
1114
  $ref: "#/components/schemas/ExtractionResponse"
1115
+ },
1116
+ example: {
1117
+ id: "d1a2b3c4-5678-9abc-def0-1234567890ab",
1118
+ status: "complete",
1119
+ document: {
1120
+ id: "f0e1d2c3-b4a5-9687-8765-432109876543",
1121
+ filename: "invoice-042.pdf",
1122
+ pages: 3,
1123
+ type_detected: "Invoice"
1124
+ },
1125
+ data: {
1126
+ vendor_name: "Acme Corporation Ltd.",
1127
+ total_amount: 1275.5,
1128
+ invoice_number: "INV-2024-0042"
1129
+ },
1130
+ confidence: {
1131
+ overall: 0.96,
1132
+ fields: {
1133
+ vendor_name: 1,
1134
+ total_amount: 1,
1135
+ invoice_number: 0.99
1136
+ }
1137
+ },
1138
+ locked_fields: [
1139
+ "vendor_name",
1140
+ "total_amount"
1141
+ ],
1142
+ processing: {
1143
+ duration_ms: 3420,
1144
+ pages_processed: 3,
1145
+ region: "eu-west"
1146
+ },
1147
+ created_at: "2026-04-25T14:30:00.000Z",
1148
+ links: {
1149
+ self: "/v1/extractions/d1a2b3c4-5678-9abc-def0-1234567890ab",
1150
+ data: "/v1/extractions/d1a2b3c4-5678-9abc-def0-1234567890ab/data",
1151
+ document: "/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543",
1152
+ dashboard: "https://app.talonic.com/extractions/d1a2b3c4-5678-9abc-def0-1234567890ab"
1153
+ }
1060
1154
  }
1061
1155
  }
1062
1156
  }
@@ -1592,6 +1686,34 @@ var openapi_default = {
1592
1686
  "application/json": {
1593
1687
  schema: {
1594
1688
  $ref: "#/components/schemas/JobResponse"
1689
+ },
1690
+ example: {
1691
+ id: "c3d4e5f6-a7b8-9012-cdef-123456789012",
1692
+ name: "Q1 Invoice Processing",
1693
+ status: "processing",
1694
+ progress: 45,
1695
+ estimated_seconds_remaining: null,
1696
+ schema: {
1697
+ id: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
1698
+ name: "Invoice Schema"
1699
+ },
1700
+ document_count: 150,
1701
+ completed_documents: 67,
1702
+ grid_stats: {
1703
+ total_cells: 8850,
1704
+ filled: 6200,
1705
+ empty: 2650,
1706
+ fill_rate: 0.7
1707
+ },
1708
+ current_phase: "phase_2_execute",
1709
+ created_at: "2026-04-25T14:30:00.000Z",
1710
+ started_at: "2026-04-25T14:30:05.000Z",
1711
+ completed_at: null,
1712
+ links: {
1713
+ self: "/v1/jobs/c3d4e5f6-a7b8-9012-cdef-123456789012",
1714
+ cancel: "/v1/jobs/c3d4e5f6-a7b8-9012-cdef-123456789012/cancel",
1715
+ dashboard: "https://app.talonic.com/jobs/c3d4e5f6-a7b8-9012-cdef-123456789012"
1716
+ }
1595
1717
  }
1596
1718
  }
1597
1719
  }
@@ -1744,6 +1866,10 @@ var openapi_default = {
1744
1866
  "application/json": {
1745
1867
  schema: {
1746
1868
  $ref: "#/components/schemas/SourceCreateRequest"
1869
+ },
1870
+ example: {
1871
+ name: "Invoice Pipeline",
1872
+ default_schema_id: "b2c3d4e5-f6a7-8901-bcde-f12345678901"
1747
1873
  }
1748
1874
  }
1749
1875
  }
@@ -1769,6 +1895,24 @@ var openapi_default = {
1769
1895
  }
1770
1896
  }
1771
1897
  ]
1898
+ },
1899
+ example: {
1900
+ id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
1901
+ name: "Invoice Pipeline",
1902
+ type: "api",
1903
+ status: "active",
1904
+ document_count: 0,
1905
+ default_schema: {
1906
+ id: "b2c3d4e5-f6a7-8901-bcde-f12345678901"
1907
+ },
1908
+ endpoint: "/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890/documents",
1909
+ api_key: "tlnc_live_src_k8m2n4p6q9r1s3t5",
1910
+ created_at: "2026-04-25T14:30:00.000Z",
1911
+ links: {
1912
+ self: "/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
1913
+ documents: "/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890/documents",
1914
+ dashboard: "https://app.talonic.com/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
1915
+ }
1772
1916
  }
1773
1917
  }
1774
1918
  }
@@ -10543,8 +10687,13 @@ var openapi_default = {
10543
10687
  $ref: "#/components/schemas/ErrorResponse"
10544
10688
  },
10545
10689
  example: {
10546
- error: "validation_error",
10547
- message: "name is required."
10690
+ statusCode: 400,
10691
+ code: "VALIDATION_ERROR",
10692
+ error: "Bad Request",
10693
+ message: "name is required.",
10694
+ retryable: false,
10695
+ timestamp: "2026-04-25T14:30:00.000Z",
10696
+ path: "/v1/schemas"
10548
10697
  }
10549
10698
  }
10550
10699
  }
@@ -10557,8 +10706,13 @@ var openapi_default = {
10557
10706
  $ref: "#/components/schemas/ErrorResponse"
10558
10707
  },
10559
10708
  example: {
10560
- error: "unauthorized",
10561
- message: "Invalid or missing API key."
10709
+ statusCode: 401,
10710
+ code: "AUTH_REQUIRED",
10711
+ error: "Unauthorized",
10712
+ message: "Invalid or missing API key.",
10713
+ retryable: false,
10714
+ timestamp: "2026-04-25T14:30:00.000Z",
10715
+ path: "/v1/extract"
10562
10716
  }
10563
10717
  }
10564
10718
  }
@@ -10571,8 +10725,13 @@ var openapi_default = {
10571
10725
  $ref: "#/components/schemas/ErrorResponse"
10572
10726
  },
10573
10727
  example: {
10574
- error: "insufficient_scope",
10575
- message: "This key does not have the 'write' scope."
10728
+ statusCode: 403,
10729
+ code: "INSUFFICIENT_PERMISSIONS",
10730
+ error: "Forbidden",
10731
+ message: "This key does not have the 'write' scope.",
10732
+ retryable: false,
10733
+ timestamp: "2026-04-25T14:30:00.000Z",
10734
+ path: "/v1/schemas"
10576
10735
  }
10577
10736
  }
10578
10737
  }
@@ -10585,8 +10744,13 @@ var openapi_default = {
10585
10744
  $ref: "#/components/schemas/ErrorResponse"
10586
10745
  },
10587
10746
  example: {
10588
- error: "not_found",
10589
- message: "Document 'abc-123' not found."
10747
+ statusCode: 404,
10748
+ code: "RESOURCE_NOT_FOUND",
10749
+ error: "Not Found",
10750
+ message: "Document 'f0e1d2c3-b4a5-9687-8765-432109876543' not found.",
10751
+ retryable: false,
10752
+ timestamp: "2026-04-25T14:30:00.000Z",
10753
+ path: "/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543"
10590
10754
  }
10591
10755
  }
10592
10756
  }
@@ -10599,8 +10763,13 @@ var openapi_default = {
10599
10763
  $ref: "#/components/schemas/ErrorResponse"
10600
10764
  },
10601
10765
  example: {
10602
- error: "conflict",
10603
- message: "Job is already completed. Cannot cancel."
10766
+ statusCode: 409,
10767
+ code: "VALIDATION_ERROR",
10768
+ error: "Conflict",
10769
+ message: "Job is already completed. Cannot cancel.",
10770
+ retryable: false,
10771
+ timestamp: "2026-04-25T14:30:00.000Z",
10772
+ path: "/v1/jobs/c3d4e5f6-a7b8-9012-cdef-123456789012/cancel"
10604
10773
  }
10605
10774
  }
10606
10775
  }
@@ -10613,8 +10782,13 @@ var openapi_default = {
10613
10782
  $ref: "#/components/schemas/ErrorResponse"
10614
10783
  },
10615
10784
  example: {
10616
- error: "payload_too_large",
10617
- message: "File exceeds the 500 MB limit."
10785
+ statusCode: 413,
10786
+ code: "FILE_TOO_LARGE",
10787
+ error: "Payload Too Large",
10788
+ message: "File exceeds the 500 MB limit.",
10789
+ retryable: false,
10790
+ timestamp: "2026-04-25T14:30:00.000Z",
10791
+ path: "/v1/extract"
10618
10792
  }
10619
10793
  }
10620
10794
  }
@@ -10627,9 +10801,13 @@ var openapi_default = {
10627
10801
  $ref: "#/components/schemas/ErrorResponse"
10628
10802
  },
10629
10803
  example: {
10630
- error: "extraction_failed",
10804
+ statusCode: 422,
10805
+ code: "EXTRACTION_FAILED",
10806
+ error: "Unprocessable Entity",
10631
10807
  message: "Unable to extract fields from the provided document.",
10632
- request_id: "req_abc123",
10808
+ retryable: false,
10809
+ timestamp: "2026-04-25T14:30:00.000Z",
10810
+ path: "/v1/extract",
10633
10811
  links: {
10634
10812
  dashboard: "https://app.talonic.com/documents/abc-123"
10635
10813
  }
@@ -10656,11 +10834,13 @@ var openapi_default = {
10656
10834
  $ref: "#/components/schemas/ErrorResponse"
10657
10835
  },
10658
10836
  example: {
10659
- error: "rate_limit_exceeded",
10837
+ statusCode: 429,
10838
+ code: "QUOTA_EXCEEDED",
10839
+ error: "Too Many Requests",
10660
10840
  message: "Daily extract request limit (50) reached. Resets at midnight UTC.",
10661
- limit: 50,
10662
- used: 50,
10663
- reset_at: "2026-04-05T00:00:00.000Z"
10841
+ retryable: true,
10842
+ timestamp: "2026-04-25T23:45:00.000Z",
10843
+ path: "/v1/extract"
10664
10844
  }
10665
10845
  }
10666
10846
  }
@@ -10673,9 +10853,13 @@ var openapi_default = {
10673
10853
  $ref: "#/components/schemas/ErrorResponse"
10674
10854
  },
10675
10855
  example: {
10676
- error: "internal_error",
10856
+ statusCode: 500,
10857
+ code: "INTERNAL_ERROR",
10858
+ error: "Internal Server Error",
10677
10859
  message: "An unexpected error occurred. Please try again or contact support.",
10678
- request_id: "req_xyz789"
10860
+ retryable: true,
10861
+ timestamp: "2026-04-25T14:30:00.000Z",
10862
+ path: "/v1/extract"
10679
10863
  }
10680
10864
  }
10681
10865
  }
@@ -10685,29 +10869,50 @@ var openapi_default = {
10685
10869
  ErrorResponse: {
10686
10870
  type: "object",
10687
10871
  required: [
10872
+ "statusCode",
10873
+ "code",
10688
10874
  "error",
10689
- "message"
10875
+ "message",
10876
+ "retryable",
10877
+ "timestamp",
10878
+ "path"
10690
10879
  ],
10691
10880
  properties: {
10881
+ statusCode: {
10882
+ type: "integer",
10883
+ description: "HTTP status code.",
10884
+ example: 400
10885
+ },
10886
+ code: {
10887
+ type: "string",
10888
+ description: "Machine-readable error discriminant. One of: VALIDATION_ERROR,\nAUTH_REQUIRED, TOKEN_EXPIRED, INSUFFICIENT_PERMISSIONS,\nRESOURCE_NOT_FOUND, QUOTA_EXCEEDED, INSUFFICIENT_CREDITS,\nLLM_RATE_LIMITED, LLM_TIMEOUT, LLM_UNAVAILABLE, OCR_FAILED,\nEXTRACTION_FAILED, EXTRACTION_TIMEOUT, FILE_TOO_LARGE,\nDUPLICATE_RESOURCE, DATASPACE_RUN_FAILED, INTERNAL_ERROR.\n",
10889
+ example: "VALIDATION_ERROR"
10890
+ },
10692
10891
  error: {
10693
10892
  type: "string",
10694
- description: "Machine-readable error code."
10893
+ description: "HTTP status name.",
10894
+ example: "Bad Request"
10695
10895
  },
10696
10896
  message: {
10697
10897
  type: "string",
10698
- example: "Re-extraction started.",
10699
- description: "Human-readable error description."
10898
+ description: "Human-readable error description.",
10899
+ example: "name is required."
10700
10900
  },
10701
- request_id: {
10901
+ retryable: {
10902
+ type: "boolean",
10903
+ description: "Whether the client should retry the request.",
10904
+ example: false
10905
+ },
10906
+ timestamp: {
10702
10907
  type: "string",
10703
- description: "Request ID for support reference."
10908
+ format: "date-time",
10909
+ description: "ISO 8601 timestamp when the error occurred.",
10910
+ example: "2026-04-25T14:30:00.000Z"
10704
10911
  },
10705
- links: {
10706
- type: "object",
10707
- additionalProperties: {
10708
- type: "string"
10709
- },
10710
- description: "Related resource links."
10912
+ path: {
10913
+ type: "string",
10914
+ description: "Request path that failed.",
10915
+ example: "/v1/schemas"
10711
10916
  }
10712
10917
  }
10713
10918
  },
package/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Talonic API",
5
5
  "version": "1.0.0",
6
- "description": "Structure any document into schema-validated data.\n\nThe Talonic API lets you extract structured data from documents (PDFs, images,\nDOCX, CSV, plain text), manage reusable extraction schemas, track async jobs,\nand organise documents through sources.\n\n## Authentication\n\nAll requests require a Bearer token in the `Authorization` header.\nAPI keys are prefixed with `tlnc_` and scoped per customer.\n\n```\nAuthorization: Bearer tlnc_live_abc123...\n```\n\n## Async Extraction Pattern\n\nSmall documents (≤5 pages) are processed synchronously and return a `200`\nwith the extracted data immediately. Larger documents return a `202 Accepted`\nwith a `poll_url` — poll `GET /v1/documents/{id}` until `status` transitions\nto `completed`, then fetch results via `GET /v1/documents/{id}/extractions`.\n\nYou can force async processing by passing `options: {\"async\": true}` on\nany extraction request. Combine with webhooks for a fully event-driven flow:\nconfigure a webhook destination under Delivery and listen for the\n`extraction.complete` event.\n\n**Job status lifecycle:** `pending` → `processing` → `complete` | `failed`\n\n## Rate Limits\n\nRequests are metered per calendar day (UTC). Limits depend on your plan tier:\n\n| Tier | Extract | Platform | Ingest |\n|------------|---------|----------|--------|\n| Free | 50/day | 500/day | 50/day |\n| Pro | 2,000 | 10,000 | 2,000 |\n| Enterprise | Unlimited | Unlimited | Unlimited |\n\nEvery response includes rate-limit headers:\n- `X-RateLimit-Limit` — daily cap for the namespace\n- `X-RateLimit-Remaining` — requests left today\n- `X-RateLimit-Reset` — ISO 8601 timestamp when the window resets (midnight UTC)\n\n## Pagination\n\nList endpoints use cursor-based pagination. Pass `limit` (1–100, default 20),\n`cursor` (opaque token from `pagination.next_cursor`), and `order` (`asc` or `desc`, default `desc`).\n\n## Errors\n\nAll errors return a JSON body with `error` (machine-readable code) and `message`\n(human-readable explanation). Additional fields vary by error type.\n\n| Code | Error | Description |\n|------|--------------------|------------------------------------------|\n| 400 | validation_error | Request body is malformed or invalid |\n| 401 | unauthorized | Missing or invalid API key |\n| 403 | insufficient_scope | API key lacks the required scope |\n| 404 | not_found | Resource does not exist |\n| 409 | conflict | Resource state conflict |\n| 413 | payload_too_large | File exceeds 500 MB limit |\n| 422 | extraction_failed | Document could not be processed |\n| 429 | rate_limit_exceeded| Daily rate limit reached |\n| 500 | internal_error | Unexpected server error (retryable) |\n",
6
+ "description": "Structure any document into schema-validated data.\n\nThe Talonic API lets you extract structured data from documents (PDFs, images,\nDOCX, CSV, plain text), manage reusable extraction schemas, track async jobs,\nand organise documents through sources.\n\n## Authentication\n\nAll requests require a Bearer token in the `Authorization` header.\nAPI keys are prefixed with `tlnc_` and scoped per customer.\n\n```\nAuthorization: Bearer tlnc_live_abc123...\n```\n\n## Async Extraction Pattern\n\nSmall documents (≤5 pages) are processed synchronously and return a `200`\nwith the extracted data immediately. Larger documents return a `202 Accepted`\nwith a `poll_url` — poll `GET /v1/documents/{id}` until `status` transitions\nto `completed`, then fetch results via `GET /v1/documents/{id}/extractions`.\n\nYou can force async processing by passing `options: {\"async\": true}` on\nany extraction request. Combine with webhooks for a fully event-driven flow:\nconfigure a webhook destination under Delivery and listen for the\n`extraction.complete` event.\n\n**Job status lifecycle:** `pending` → `processing` → `complete` | `failed`\n\n## Rate Limits\n\nRequests are metered per calendar day (UTC). Limits depend on your plan tier:\n\n| Tier | Extract | Platform | Ingest |\n|------------|---------|----------|--------|\n| Free | 50/day | 500/day | 50/day |\n| Pro | 2,000 | 10,000 | 2,000 |\n| Enterprise | Unlimited | Unlimited | Unlimited |\n\nEvery response includes rate-limit headers:\n- `X-RateLimit-Limit` — daily cap for the namespace\n- `X-RateLimit-Remaining` — requests left today\n- `X-RateLimit-Reset` — ISO 8601 timestamp when the window resets (midnight UTC)\n\n## Pagination\n\nList endpoints use cursor-based pagination. Pass `limit` (1–100, default 20),\n`cursor` (opaque token from `pagination.next_cursor`), and `order` (`asc` or `desc`, default `desc`).\n\n## Errors\n\nAll errors return a JSON body with `error` (machine-readable code) and `message`\n(human-readable explanation). Additional fields vary by error type.\n\n| Code | Error | Description |\n|------|--------------------|------------------------------------------|\n| 400 | validation_error | Request body is malformed or invalid |\n| 401 | unauthorized | Missing or invalid API key |\n| 403 | insufficient_scope | API key lacks the required scope |\n| 404 | not_found | Resource does not exist |\n| 409 | conflict | Resource state conflict |\n| 413 | payload_too_large | File exceeds 500 MB limit |\n| 422 | extraction_failed | Document could not be processed |\n| 429 | rate_limit_exceeded| Daily rate limit reached |\n| 500 | internal_error | Unexpected server error (retryable) |\n\nEvery error response follows this envelope:\n\n```json\n{\n \"statusCode\": 400,\n \"code\": \"VALIDATION_ERROR\",\n \"error\": \"Bad Request\",\n \"message\": \"name is required.\",\n \"retryable\": false,\n \"timestamp\": \"2026-04-25T14:30:00.000Z\",\n \"path\": \"/v1/schemas\"\n}\n```\n\nThe `code` field is one of: `VALIDATION_ERROR`, `AUTH_REQUIRED`, `TOKEN_EXPIRED`,\n`INSUFFICIENT_PERMISSIONS`, `RESOURCE_NOT_FOUND`, `QUOTA_EXCEEDED`,\n`INSUFFICIENT_CREDITS`, `LLM_RATE_LIMITED`, `LLM_TIMEOUT`, `LLM_UNAVAILABLE`,\n`OCR_FAILED`, `EXTRACTION_FAILED`, `EXTRACTION_TIMEOUT`, `FILE_TOO_LARGE`,\n`DUPLICATE_RESOURCE`, `DATASPACE_RUN_FAILED`, `INTERNAL_ERROR`.\n\n## Async Extraction Lifecycle\n\nEnd-to-end async flow:\n\n**Step 1 — Submit extraction with `async: true`:**\n```\nPOST /v1/extract\nContent-Type: multipart/form-data\nAuthorization: Bearer tlnc_live_abc123\n\nfile=@contract.pdf\noptions={\"async\": true}\n```\nResponse `202 Accepted`:\n```json\n{\n \"request_id\": \"req_x7y8z9a0\",\n \"status\": \"processing\",\n \"document\": { \"id\": \"f0e1d2c3-...\" },\n \"poll_url\": \"/v1/documents/f0e1d2c3-...\"\n}\n```\n\n**Step 2 — Poll for completion:**\n```\nGET /v1/documents/f0e1d2c3-...\n```\nResponse `200` (when done): `\"status\": \"completed\"`\n\n**Step 3 — Retrieve results:**\n```\nGET /v1/documents/f0e1d2c3-.../extractions\n```\n\n**Alternative — Webhooks:** Configure a delivery destination and binding\nto receive `document.extracted` events via POST callback. See the\nDelivery tag for setup details.\n\n**Job status state machine:**\n`pending` → `queued` → `processing` → `complete` | `failed`\n\nCancelled jobs transition directly to `failed` from `pending` or `processing`.\n\n## Operational Details\n\n**Uptime SLA:**\n- Free: best effort\n- Pro: 99.5%\n- Enterprise: 99.9% (custom SLA available)\n\n**Timeouts:** Synchronous extractions time out after 120 seconds. For\ndocuments that may take longer, use `async: true`. Async jobs have no\ntimeout — they run to completion or failure.\n\n**Payload limits:**\n- File upload (extract, ingest): 500 MB\n- JSON request bodies (schemas, jobs): 1 MB\n- PATCH corrections: 1 MB\n\n**Idempotency keys:** Pass an `Idempotency-Key` header on POST requests.\nKeys are valid for 24 hours. A duplicate request returns the cached\nresponse with `cached: true` in the body. Keys are scoped per API key.\n",
7
7
  "contact": {
8
8
  "name": "Talonic Support",
9
9
  "email": "support@talonic.ai",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  {
69
69
  "name": "Delivery",
70
- "description": "Outbound delivery. Configure destinations (seven live connectors: webhook, sftp,\ns3, azure_blob, google_drive, onedrive, google_sheets), create bindings that join\nsignal filters to deliverable types + destinations + serializers, and inspect the\nhistory/DLQ/events log. Every delivery is at-least-once with an idempotency key\non the wire.\n"
70
+ "description": "Outbound delivery. Configure destinations (webhook, sftp, s3, azure_blob,\ngoogle_drive, onedrive, google_sheets), create bindings that join signal\nfilters to deliverable types + serializers, and inspect delivery history.\n\n## Webhook Delivery Contract\n\n**Payload envelope:**\n```json\n{\n \"event\": {\n \"event_type\": \"document.extracted\",\n \"event_id\": \"42\",\n \"binding_id\": \"uuid\",\n \"idempotency_key\": \"a1b2c3...32-char-hex\",\n \"attempt\": 1,\n \"delivered_at\": \"2026-04-25T14:30:00.000Z\"\n },\n \"payload\": { \"...serialized data...\" }\n}\n```\n\n**Headers:** `X-Talonic-Event`, `X-Talonic-Delivery`, `X-Talonic-Signature`,\n`X-Talonic-Attempt`, `X-Talonic-Idempotency-Key`.\n\n**Signature verification (HMAC-SHA256):**\n```\nX-Talonic-Signature: t=1714060200000,v1=abc123...\nsigned = HMAC-SHA256(signing_secret, \"${timestamp}.${body}\")\n```\n\n**Event types:** `document.extracted`, `document.extraction_failed`,\n`run.dataspace.completed`, `run.dataspace.failed`,\n`result.dataspace.completed`, `result.approved`, `result.rejected`,\n`delivery.item.completed`, `delivery.item.failed` (17 total).\n\n**Retry policy:** Up to 7 attempts with exponential backoff:\n0s → 30s → 2m → 8m → 30m → 2h → 8h (~10.5h total).\nHTTP 429 and 5xx are retryable. HTTP 4xx (except 408) goes to DLQ immediately.\n\n**Dead-letter queue:** Failed deliveries land in the DLQ. Replay via\n`POST /v1/delivery/dlq/{id}/replay` which re-enqueues with attempt=1\nand the same idempotency key.\n"
71
71
  },
72
72
  {
73
73
  "name": "Filter",
@@ -142,6 +142,61 @@
142
142
  "description": "Workspace context snapshot and tool discovery for the embedded AI agent."
143
143
  }
144
144
  ],
145
+ "x-tagGroups": [
146
+ {
147
+ "name": "Getting Started",
148
+ "tags": [
149
+ "Extract"
150
+ ]
151
+ },
152
+ {
153
+ "name": "Core Resources",
154
+ "tags": [
155
+ "Documents",
156
+ "Extractions",
157
+ "Schemas",
158
+ "Jobs"
159
+ ]
160
+ },
161
+ {
162
+ "name": "Data Pipeline",
163
+ "tags": [
164
+ "Sources",
165
+ "Batches",
166
+ "Routing",
167
+ "Delivery",
168
+ "Filter",
169
+ "Review"
170
+ ]
171
+ },
172
+ {
173
+ "name": "Intelligence",
174
+ "tags": [
175
+ "Matching",
176
+ "Cases",
177
+ "Linking",
178
+ "Fields",
179
+ "Reference Data",
180
+ "Dialects",
181
+ "Document Types",
182
+ "Schema Graph",
183
+ "N-Shot",
184
+ "Resolutions"
185
+ ]
186
+ },
187
+ {
188
+ "name": "Platform",
189
+ "tags": [
190
+ "Usage",
191
+ "Credits",
192
+ "Quality",
193
+ "Telemetry",
194
+ "Validation",
195
+ "Structuring",
196
+ "Agent"
197
+ ]
198
+ }
199
+ ],
145
200
  "paths": {
146
201
  "/v1/extract": {
147
202
  "post": {
@@ -1052,6 +1107,45 @@
1052
1107
  "application/json": {
1053
1108
  "schema": {
1054
1109
  "$ref": "#/components/schemas/ExtractionResponse"
1110
+ },
1111
+ "example": {
1112
+ "id": "d1a2b3c4-5678-9abc-def0-1234567890ab",
1113
+ "status": "complete",
1114
+ "document": {
1115
+ "id": "f0e1d2c3-b4a5-9687-8765-432109876543",
1116
+ "filename": "invoice-042.pdf",
1117
+ "pages": 3,
1118
+ "type_detected": "Invoice"
1119
+ },
1120
+ "data": {
1121
+ "vendor_name": "Acme Corporation Ltd.",
1122
+ "total_amount": 1275.5,
1123
+ "invoice_number": "INV-2024-0042"
1124
+ },
1125
+ "confidence": {
1126
+ "overall": 0.96,
1127
+ "fields": {
1128
+ "vendor_name": 1,
1129
+ "total_amount": 1,
1130
+ "invoice_number": 0.99
1131
+ }
1132
+ },
1133
+ "locked_fields": [
1134
+ "vendor_name",
1135
+ "total_amount"
1136
+ ],
1137
+ "processing": {
1138
+ "duration_ms": 3420,
1139
+ "pages_processed": 3,
1140
+ "region": "eu-west"
1141
+ },
1142
+ "created_at": "2026-04-25T14:30:00.000Z",
1143
+ "links": {
1144
+ "self": "/v1/extractions/d1a2b3c4-5678-9abc-def0-1234567890ab",
1145
+ "data": "/v1/extractions/d1a2b3c4-5678-9abc-def0-1234567890ab/data",
1146
+ "document": "/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543",
1147
+ "dashboard": "https://app.talonic.com/extractions/d1a2b3c4-5678-9abc-def0-1234567890ab"
1148
+ }
1055
1149
  }
1056
1150
  }
1057
1151
  }
@@ -1573,6 +1667,34 @@
1573
1667
  "application/json": {
1574
1668
  "schema": {
1575
1669
  "$ref": "#/components/schemas/JobResponse"
1670
+ },
1671
+ "example": {
1672
+ "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
1673
+ "name": "Q1 Invoice Processing",
1674
+ "status": "processing",
1675
+ "progress": 45,
1676
+ "estimated_seconds_remaining": null,
1677
+ "schema": {
1678
+ "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
1679
+ "name": "Invoice Schema"
1680
+ },
1681
+ "document_count": 150,
1682
+ "completed_documents": 67,
1683
+ "grid_stats": {
1684
+ "total_cells": 8850,
1685
+ "filled": 6200,
1686
+ "empty": 2650,
1687
+ "fill_rate": 0.7
1688
+ },
1689
+ "current_phase": "phase_2_execute",
1690
+ "created_at": "2026-04-25T14:30:00.000Z",
1691
+ "started_at": "2026-04-25T14:30:05.000Z",
1692
+ "completed_at": null,
1693
+ "links": {
1694
+ "self": "/v1/jobs/c3d4e5f6-a7b8-9012-cdef-123456789012",
1695
+ "cancel": "/v1/jobs/c3d4e5f6-a7b8-9012-cdef-123456789012/cancel",
1696
+ "dashboard": "https://app.talonic.com/jobs/c3d4e5f6-a7b8-9012-cdef-123456789012"
1697
+ }
1576
1698
  }
1577
1699
  }
1578
1700
  }
@@ -1725,6 +1847,10 @@
1725
1847
  "application/json": {
1726
1848
  "schema": {
1727
1849
  "$ref": "#/components/schemas/SourceCreateRequest"
1850
+ },
1851
+ "example": {
1852
+ "name": "Invoice Pipeline",
1853
+ "default_schema_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
1728
1854
  }
1729
1855
  }
1730
1856
  }
@@ -1750,6 +1876,24 @@
1750
1876
  }
1751
1877
  }
1752
1878
  ]
1879
+ },
1880
+ "example": {
1881
+ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
1882
+ "name": "Invoice Pipeline",
1883
+ "type": "api",
1884
+ "status": "active",
1885
+ "document_count": 0,
1886
+ "default_schema": {
1887
+ "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
1888
+ },
1889
+ "endpoint": "/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890/documents",
1890
+ "api_key": "tlnc_live_src_k8m2n4p6q9r1s3t5",
1891
+ "created_at": "2026-04-25T14:30:00.000Z",
1892
+ "links": {
1893
+ "self": "/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
1894
+ "documents": "/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890/documents",
1895
+ "dashboard": "https://app.talonic.com/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
1896
+ }
1753
1897
  }
1754
1898
  }
1755
1899
  }
@@ -10524,8 +10668,13 @@
10524
10668
  "$ref": "#/components/schemas/ErrorResponse"
10525
10669
  },
10526
10670
  "example": {
10527
- "error": "validation_error",
10528
- "message": "name is required."
10671
+ "statusCode": 400,
10672
+ "code": "VALIDATION_ERROR",
10673
+ "error": "Bad Request",
10674
+ "message": "name is required.",
10675
+ "retryable": false,
10676
+ "timestamp": "2026-04-25T14:30:00.000Z",
10677
+ "path": "/v1/schemas"
10529
10678
  }
10530
10679
  }
10531
10680
  }
@@ -10538,8 +10687,13 @@
10538
10687
  "$ref": "#/components/schemas/ErrorResponse"
10539
10688
  },
10540
10689
  "example": {
10541
- "error": "unauthorized",
10542
- "message": "Invalid or missing API key."
10690
+ "statusCode": 401,
10691
+ "code": "AUTH_REQUIRED",
10692
+ "error": "Unauthorized",
10693
+ "message": "Invalid or missing API key.",
10694
+ "retryable": false,
10695
+ "timestamp": "2026-04-25T14:30:00.000Z",
10696
+ "path": "/v1/extract"
10543
10697
  }
10544
10698
  }
10545
10699
  }
@@ -10552,8 +10706,13 @@
10552
10706
  "$ref": "#/components/schemas/ErrorResponse"
10553
10707
  },
10554
10708
  "example": {
10555
- "error": "insufficient_scope",
10556
- "message": "This key does not have the 'write' scope."
10709
+ "statusCode": 403,
10710
+ "code": "INSUFFICIENT_PERMISSIONS",
10711
+ "error": "Forbidden",
10712
+ "message": "This key does not have the 'write' scope.",
10713
+ "retryable": false,
10714
+ "timestamp": "2026-04-25T14:30:00.000Z",
10715
+ "path": "/v1/schemas"
10557
10716
  }
10558
10717
  }
10559
10718
  }
@@ -10566,8 +10725,13 @@
10566
10725
  "$ref": "#/components/schemas/ErrorResponse"
10567
10726
  },
10568
10727
  "example": {
10569
- "error": "not_found",
10570
- "message": "Document 'abc-123' not found."
10728
+ "statusCode": 404,
10729
+ "code": "RESOURCE_NOT_FOUND",
10730
+ "error": "Not Found",
10731
+ "message": "Document 'f0e1d2c3-b4a5-9687-8765-432109876543' not found.",
10732
+ "retryable": false,
10733
+ "timestamp": "2026-04-25T14:30:00.000Z",
10734
+ "path": "/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543"
10571
10735
  }
10572
10736
  }
10573
10737
  }
@@ -10580,8 +10744,13 @@
10580
10744
  "$ref": "#/components/schemas/ErrorResponse"
10581
10745
  },
10582
10746
  "example": {
10583
- "error": "conflict",
10584
- "message": "Job is already completed. Cannot cancel."
10747
+ "statusCode": 409,
10748
+ "code": "VALIDATION_ERROR",
10749
+ "error": "Conflict",
10750
+ "message": "Job is already completed. Cannot cancel.",
10751
+ "retryable": false,
10752
+ "timestamp": "2026-04-25T14:30:00.000Z",
10753
+ "path": "/v1/jobs/c3d4e5f6-a7b8-9012-cdef-123456789012/cancel"
10585
10754
  }
10586
10755
  }
10587
10756
  }
@@ -10594,8 +10763,13 @@
10594
10763
  "$ref": "#/components/schemas/ErrorResponse"
10595
10764
  },
10596
10765
  "example": {
10597
- "error": "payload_too_large",
10598
- "message": "File exceeds the 500 MB limit."
10766
+ "statusCode": 413,
10767
+ "code": "FILE_TOO_LARGE",
10768
+ "error": "Payload Too Large",
10769
+ "message": "File exceeds the 500 MB limit.",
10770
+ "retryable": false,
10771
+ "timestamp": "2026-04-25T14:30:00.000Z",
10772
+ "path": "/v1/extract"
10599
10773
  }
10600
10774
  }
10601
10775
  }
@@ -10608,9 +10782,13 @@
10608
10782
  "$ref": "#/components/schemas/ErrorResponse"
10609
10783
  },
10610
10784
  "example": {
10611
- "error": "extraction_failed",
10785
+ "statusCode": 422,
10786
+ "code": "EXTRACTION_FAILED",
10787
+ "error": "Unprocessable Entity",
10612
10788
  "message": "Unable to extract fields from the provided document.",
10613
- "request_id": "req_abc123",
10789
+ "retryable": false,
10790
+ "timestamp": "2026-04-25T14:30:00.000Z",
10791
+ "path": "/v1/extract",
10614
10792
  "links": {
10615
10793
  "dashboard": "https://app.talonic.com/documents/abc-123"
10616
10794
  }
@@ -10637,11 +10815,13 @@
10637
10815
  "$ref": "#/components/schemas/ErrorResponse"
10638
10816
  },
10639
10817
  "example": {
10640
- "error": "rate_limit_exceeded",
10818
+ "statusCode": 429,
10819
+ "code": "QUOTA_EXCEEDED",
10820
+ "error": "Too Many Requests",
10641
10821
  "message": "Daily extract request limit (50) reached. Resets at midnight UTC.",
10642
- "limit": 50,
10643
- "used": 50,
10644
- "reset_at": "2026-04-05T00:00:00.000Z"
10822
+ "retryable": true,
10823
+ "timestamp": "2026-04-25T23:45:00.000Z",
10824
+ "path": "/v1/extract"
10645
10825
  }
10646
10826
  }
10647
10827
  }
@@ -10654,9 +10834,13 @@
10654
10834
  "$ref": "#/components/schemas/ErrorResponse"
10655
10835
  },
10656
10836
  "example": {
10657
- "error": "internal_error",
10837
+ "statusCode": 500,
10838
+ "code": "INTERNAL_ERROR",
10839
+ "error": "Internal Server Error",
10658
10840
  "message": "An unexpected error occurred. Please try again or contact support.",
10659
- "request_id": "req_xyz789"
10841
+ "retryable": true,
10842
+ "timestamp": "2026-04-25T14:30:00.000Z",
10843
+ "path": "/v1/extract"
10660
10844
  }
10661
10845
  }
10662
10846
  }
@@ -10666,29 +10850,50 @@
10666
10850
  "ErrorResponse": {
10667
10851
  "type": "object",
10668
10852
  "required": [
10853
+ "statusCode",
10854
+ "code",
10669
10855
  "error",
10670
- "message"
10856
+ "message",
10857
+ "retryable",
10858
+ "timestamp",
10859
+ "path"
10671
10860
  ],
10672
10861
  "properties": {
10862
+ "statusCode": {
10863
+ "type": "integer",
10864
+ "description": "HTTP status code.",
10865
+ "example": 400
10866
+ },
10867
+ "code": {
10868
+ "type": "string",
10869
+ "description": "Machine-readable error discriminant. One of: VALIDATION_ERROR,\nAUTH_REQUIRED, TOKEN_EXPIRED, INSUFFICIENT_PERMISSIONS,\nRESOURCE_NOT_FOUND, QUOTA_EXCEEDED, INSUFFICIENT_CREDITS,\nLLM_RATE_LIMITED, LLM_TIMEOUT, LLM_UNAVAILABLE, OCR_FAILED,\nEXTRACTION_FAILED, EXTRACTION_TIMEOUT, FILE_TOO_LARGE,\nDUPLICATE_RESOURCE, DATASPACE_RUN_FAILED, INTERNAL_ERROR.\n",
10870
+ "example": "VALIDATION_ERROR"
10871
+ },
10673
10872
  "error": {
10674
10873
  "type": "string",
10675
- "description": "Machine-readable error code."
10874
+ "description": "HTTP status name.",
10875
+ "example": "Bad Request"
10676
10876
  },
10677
10877
  "message": {
10678
10878
  "type": "string",
10679
- "example": "Re-extraction started.",
10680
- "description": "Human-readable error description."
10879
+ "description": "Human-readable error description.",
10880
+ "example": "name is required."
10681
10881
  },
10682
- "request_id": {
10882
+ "retryable": {
10883
+ "type": "boolean",
10884
+ "description": "Whether the client should retry the request.",
10885
+ "example": false
10886
+ },
10887
+ "timestamp": {
10683
10888
  "type": "string",
10684
- "description": "Request ID for support reference."
10889
+ "format": "date-time",
10890
+ "description": "ISO 8601 timestamp when the error occurred.",
10891
+ "example": "2026-04-25T14:30:00.000Z"
10685
10892
  },
10686
- "links": {
10687
- "type": "object",
10688
- "additionalProperties": {
10689
- "type": "string"
10690
- },
10691
- "description": "Related resource links."
10893
+ "path": {
10894
+ "type": "string",
10895
+ "description": "Request path that failed.",
10896
+ "example": "/v1/schemas"
10692
10897
  }
10693
10898
  }
10694
10899
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talonic/docs",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Talonic documentation components — API Reference & Platform Guide",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,