@talonic/docs 0.21.16 → 0.21.17
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 +1701 -122
- package/dist/index.js +25 -7
- package/dist/index.js.map +1 -1
- package/dist/seo.js +2789 -696
- package/openapi.json +2767 -692
- package/package.json +1 -1
package/dist/content.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/content/helpers.ts
|
|
2
|
-
function deriveBreadcrumbs(
|
|
2
|
+
function deriveBreadcrumbs(sections73, leafId, domain) {
|
|
3
3
|
const domainLabels = {
|
|
4
4
|
api: "API Reference",
|
|
5
5
|
platform: "Platform Guide",
|
|
@@ -10,20 +10,20 @@ function deriveBreadcrumbs(sections70, leafId, domain) {
|
|
|
10
10
|
label: domainLabels[domain] ?? domain,
|
|
11
11
|
slug: domain
|
|
12
12
|
};
|
|
13
|
-
for (const group of
|
|
13
|
+
for (const group of sections73) {
|
|
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 =
|
|
19
|
+
const topLevel = sections73.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(
|
|
26
|
-
const flat =
|
|
25
|
+
function derivePrevNext(sections73, leafId) {
|
|
26
|
+
const flat = sections73.flatMap(
|
|
27
27
|
(s) => s.children ?? [{ id: s.id, label: s.label }]
|
|
28
28
|
);
|
|
29
29
|
const idx = flat.findIndex((c) => c.id === leafId);
|
|
@@ -52,7 +52,9 @@ var API_NAV_SECTIONS = [
|
|
|
52
52
|
] },
|
|
53
53
|
{ id: "ask", label: "Ask", children: [
|
|
54
54
|
{ id: "post-ask", label: "POST /v1/ask" },
|
|
55
|
+
{ id: "ask-scoping", label: "Scope, Models & Access" },
|
|
55
56
|
{ id: "ask-results", label: "Poll & Results" },
|
|
57
|
+
{ id: "ask-streaming", label: "Streaming" },
|
|
56
58
|
{ id: "ask-citations-verification", label: "Citations & Verification" }
|
|
57
59
|
] },
|
|
58
60
|
{ id: "documents", label: "Documents", children: [
|
|
@@ -62,7 +64,9 @@ var API_NAV_SECTIONS = [
|
|
|
62
64
|
{ id: "get-document-lineage", label: "Get Document Lineage" },
|
|
63
65
|
{ id: "delete-document", label: "Delete Document" },
|
|
64
66
|
{ id: "convert-document", label: "Convert to Markdown" },
|
|
65
|
-
{ id: "inject-customer-metadata", label: "Inject Metadata" }
|
|
67
|
+
{ id: "inject-customer-metadata", label: "Inject Metadata" },
|
|
68
|
+
{ id: "get-document-claims", label: "Document Claims" },
|
|
69
|
+
{ id: "upload-session", label: "Browser-Handoff Upload" }
|
|
66
70
|
] },
|
|
67
71
|
{ id: "extractions", label: "Extractions", children: [
|
|
68
72
|
{ id: "list-extractions", label: "List Extractions" },
|
|
@@ -109,7 +113,8 @@ var API_NAV_SECTIONS = [
|
|
|
109
113
|
{ id: "list-webhook-configs", label: "List Configs" },
|
|
110
114
|
{ id: "create-webhook-config", label: "Create Config" },
|
|
111
115
|
{ id: "manage-webhook-config", label: "Manage Config" },
|
|
112
|
-
{ id: "webhook-reference-endpoints", label: "Reference Endpoints" }
|
|
116
|
+
{ id: "webhook-reference-endpoints", label: "Reference Endpoints" },
|
|
117
|
+
{ id: "events-feed", label: "Event Feed" }
|
|
113
118
|
] },
|
|
114
119
|
{ id: "resolutions", label: "Resolutions", children: [
|
|
115
120
|
{ id: "list-resolutions", label: "List Resolutions" },
|
|
@@ -151,7 +156,7 @@ var API_NAV_SECTIONS = [
|
|
|
151
156
|
{ id: "structuring", label: "Structuring", children: [
|
|
152
157
|
{ id: "list-structuring-checks", label: "List Checks" },
|
|
153
158
|
{ id: "create-structuring-check", label: "Create Check" },
|
|
154
|
-
{ id: "get-structuring-check", label: "
|
|
159
|
+
{ id: "get-structuring-check", label: "Update / Delete Check" },
|
|
155
160
|
{ id: "list-structuring-gates", label: "List Gates" },
|
|
156
161
|
{ id: "create-structuring-gate", label: "Create Gate" },
|
|
157
162
|
{ id: "get-structuring-gate", label: "Get / Update / Delete Gate" },
|
|
@@ -185,6 +190,8 @@ var API_NAV_SECTIONS = [
|
|
|
185
190
|
{ id: "agent", label: "Agent", children: [
|
|
186
191
|
{ id: "agent-context", label: "Get Workspace Context" },
|
|
187
192
|
{ id: "agent-tools", label: "List Agent Tools" },
|
|
193
|
+
{ id: "agent-invoke-tool", label: "Invoke a Tool" },
|
|
194
|
+
{ id: "agent-conversations", label: "Conversations" },
|
|
188
195
|
{ id: "agent-query", label: "Agent Query (Legacy)" }
|
|
189
196
|
] },
|
|
190
197
|
{ id: "matching", label: "Matching", children: [
|
|
@@ -306,6 +313,7 @@ var API_NAV_SECTIONS = [
|
|
|
306
313
|
{ id: "billing-settings", label: "Settings" },
|
|
307
314
|
{ id: "billing-topup", label: "Auto Top-Up" },
|
|
308
315
|
{ id: "billing-upgrade-link", label: "Upgrade Link" },
|
|
316
|
+
{ id: "billing-packs", label: "Credit Packs" },
|
|
309
317
|
{ id: "cost-headers", label: "Cost Headers" }
|
|
310
318
|
] },
|
|
311
319
|
{ id: "usage", label: "Usage", children: [
|
|
@@ -316,6 +324,14 @@ var API_NAV_SECTIONS = [
|
|
|
316
324
|
{ id: "get-account", label: "Account Snapshot" },
|
|
317
325
|
{ id: "account-keys", label: "Manage API Keys" }
|
|
318
326
|
] },
|
|
327
|
+
{ id: "ai", label: "AI Policy", children: [
|
|
328
|
+
{ id: "ai-policy-overview", label: "AI Policy Overview" },
|
|
329
|
+
{ id: "get-ai-policy", label: "Read the Policy" },
|
|
330
|
+
{ id: "update-ai-policy", label: "Update the Policy" },
|
|
331
|
+
{ id: "ai-models-operations", label: "Models & Operations" },
|
|
332
|
+
{ id: "explain-ai-route", label: "Explain a Route" },
|
|
333
|
+
{ id: "ai-policy-history", label: "Policy History" }
|
|
334
|
+
] },
|
|
319
335
|
{ id: "nodes", label: "Node Jobs", children: [
|
|
320
336
|
{ id: "node-jobs", label: "Node Jobs" }
|
|
321
337
|
] },
|
|
@@ -491,7 +507,8 @@ var PLATFORM_NAV_SECTIONS = [
|
|
|
491
507
|
{ id: "workspace-settings", label: "Workspace Settings", children: [
|
|
492
508
|
{ id: "shared-dialects", label: "Shared Dialects" },
|
|
493
509
|
{ id: "reference-primitives", label: "Reference Primitives" },
|
|
494
|
-
{ id: "change-review", label: "Change Review" }
|
|
510
|
+
{ id: "change-review", label: "Change Review" },
|
|
511
|
+
{ id: "ai-policy", label: "AI Policy" }
|
|
495
512
|
] },
|
|
496
513
|
{ id: "enterprise-archive", label: "Enterprise Archive", children: [
|
|
497
514
|
{ id: "archive-overview", label: "Archive Overview" },
|
|
@@ -1008,11 +1025,11 @@ var sections = [
|
|
|
1008
1025
|
content: [
|
|
1009
1026
|
{
|
|
1010
1027
|
type: "paragraph",
|
|
1011
|
-
text: "Getting started with Talonic takes three steps: upload documents, compose a **Spec**, and run it as a **Pipeline**. Everything is reachable from the sidebar, which is a flat set of items: **Sources** and **Documents** to ingest, **Explore** to browse the field registry, **Spec** to configure, **Pipelines (formerly Structure)** for pipeline runs, **
|
|
1028
|
+
text: "Getting started with Talonic takes three steps: upload documents, compose a **Spec**, and run it as a **Pipeline**. Everything is reachable from the sidebar, which is a flat set of items: **Sources** and **Documents** to ingest, **Explore** to browse the field registry, **Spec** to configure, **Pipelines (formerly Structure)** for pipeline runs, **Review** to approve, and **Data Products** to deliver. (**Matching** exists as an additional item, but it is gated behind advanced mode, Talonic staff membership, and dev builds, so it does not appear in a normal workspace.) Most users see their first structured output within minutes of uploading."
|
|
1012
1029
|
},
|
|
1013
1030
|
{
|
|
1014
1031
|
type: "paragraph",
|
|
1015
|
-
text: "**Sources** and **Documents** are where documents enter the system: through manual upload, connected cloud storage, email inboxes, or the API. **Spec** (`/specs`) is where you compose a pipeline over a schema, and **Pipelines** (`/pipelines`) is where those pipeline runs appear. **Review** is where held fields are approved, and **Data Products** is where approved data is delivered to downstream systems through configured bindings. For a fast single-document run,
|
|
1032
|
+
text: "**Sources** and **Documents** are where documents enter the system: through manual upload, connected cloud storage, email inboxes, or the API. **Spec** (`/specs`) is where you compose a pipeline over a schema, and **Pipelines** (`/pipelines`) is where those pipeline runs appear. **Review** is where held fields are approved, and **Data Products** is where approved data is delivered to downstream systems through configured bindings. For a fast single-document run, open the **Extract** slide-over with Cmd+J or from the in-page entry points."
|
|
1016
1033
|
},
|
|
1017
1034
|
{
|
|
1018
1035
|
type: "ui-excerpt",
|
|
@@ -4799,7 +4816,7 @@ var sections7 = [
|
|
|
4799
4816
|
},
|
|
4800
4817
|
{
|
|
4801
4818
|
type: "paragraph",
|
|
4802
|
-
text: "Open the **Extract**
|
|
4819
|
+
text: "Open the **Extract** slide-over with Cmd+J or from an in-page entry point, or call `POST /v1/jobs`. Select your template and documents, then click Start. Results appear progressively as each phase completes. The platform supports three extraction modes: **pipeline** (full 4-phase extraction, the default), **simple** (a single AI call, faster but less thorough), and **field registry** (no AI, deterministic strategies only; an admin-only mode for benchmarking registry coverage)."
|
|
4803
4820
|
},
|
|
4804
4821
|
{
|
|
4805
4822
|
type: "paragraph",
|
|
@@ -4882,7 +4899,7 @@ var sections7 = [
|
|
|
4882
4899
|
faq: [
|
|
4883
4900
|
{
|
|
4884
4901
|
question: "How do I create a Job?",
|
|
4885
|
-
answer: "Open the Extract
|
|
4902
|
+
answer: "Open the Extract slide-over with Cmd+J or from an in-page entry point, or call POST /v1/jobs. Select your template and documents, then click Start. Results appear progressively as each pipeline phase completes."
|
|
4886
4903
|
},
|
|
4887
4904
|
{
|
|
4888
4905
|
question: "What does a Job produce?",
|
|
@@ -9328,7 +9345,7 @@ var sections15 = [
|
|
|
9328
9345
|
},
|
|
9329
9346
|
{
|
|
9330
9347
|
type: "paragraph",
|
|
9331
|
-
text: "New members are added via domain matching: company email domains auto-match to your org with **pending** status requiring admin approval. This means anyone who signs up with an email from your company domain is automatically associated with your organization, but cannot access any data until an Admin explicitly approves them. Manage all team members and pending requests from the Team page in the sidebar."
|
|
9348
|
+
text: "New members are added via domain matching: company email domains auto-match to your org with **pending** status requiring admin approval. This means anyone who signs up with an email from your company domain is automatically associated with your organization, but cannot access any data until an Admin explicitly approves them. Manage all team members and pending requests from the Team page in the sidebar user menu."
|
|
9332
9349
|
},
|
|
9333
9350
|
{
|
|
9334
9351
|
type: "paragraph",
|
|
@@ -10308,7 +10325,7 @@ curl -s "https://api.talonic.com/v1/reference-data/b8c9d0e1-\u2026/rows?page=1&l
|
|
|
10308
10325
|
{
|
|
10309
10326
|
type: "callout",
|
|
10310
10327
|
variant: "info",
|
|
10311
|
-
text: "Matching has two modes. **Reconciliation** is the mode the **Matching** nav item opens in the app
|
|
10328
|
+
text: "Matching has two modes. **Reconciliation** is the mode the **Matching** nav item opens in the app; the nav item is gated behind advanced mode, Talonic staff membership, and dev builds, so it does not appear in a normal workspace. It reconciles document values against reference data. The **weighted matching** mode \u2014 the matching-config / run / result workflow documented here \u2014 lives in the public API (`/v1/matching/*`) and an advanced off-nav surface (/assemble/matching)."
|
|
10312
10329
|
},
|
|
10313
10330
|
{
|
|
10314
10331
|
type: "heading",
|
|
@@ -12120,8 +12137,63 @@ curl -X POST "$API_URL/records/fixity-checks/run" \\
|
|
|
12120
12137
|
}
|
|
12121
12138
|
];
|
|
12122
12139
|
|
|
12123
|
-
// src/content/
|
|
12140
|
+
// src/content/platform/ai-policies.ts
|
|
12124
12141
|
var sections20 = [
|
|
12142
|
+
{
|
|
12143
|
+
slug: "ai-policy",
|
|
12144
|
+
parentSlug: "workspace-settings",
|
|
12145
|
+
title: "AI Policy",
|
|
12146
|
+
seoTitle: "AI Policy \u2014 Provider & Model Governance \u2014 Talonic Docs",
|
|
12147
|
+
description: "Govern which AI providers, regions, and models may process your workspace documents. Set mandatory routing constraints that every platform operation obeys.",
|
|
12148
|
+
content: [
|
|
12149
|
+
{ type: "paragraph", text: "Every AI operation the platform performs on a workspace's documents, extraction, classification, resolution, OCR escalation, runs through a routing resolver, and the resolver obeys the workspace's **AI policy**. The policy is the workspace's standing answer to its own compliance questions: which providers may process our data, in which region, with which models excluded, and with which fallbacks. It is set once, versioned on every change, and enforced on every call without a Talonic operator in the loop." },
|
|
12150
|
+
{ type: "paragraph", text: "The policy distinguishes mandatory constraints from preferences. Three fields are **mandatory** and enforced at routing time for every call: the region pin (`eu` or `us`), the provider allowlist, and the model denylist. A deployment outside the pinned region or on a disallowed provider is never a candidate. Everything else, preferred default models, model substitutions, per-operation class overrides, is preference: it steers which compliant candidate is chosen but can never override a mandatory constraint." },
|
|
12151
|
+
{ type: "paragraph", text: 'The model denylist deserves its own mention because an allowlist cannot replace it. A provider allowlist says "this vendor may process our data"; the denylist says "but never with that one model", which is what a regulated customer with a model-level approval process actually needs. Denial only narrows: it removes candidates from every routing path, including every step of every fallback chain, and never adds one.' },
|
|
12152
|
+
{ type: "paragraph", text: "The guarantee underneath all of this is that routing **fails closed**. When a policy leaves an operation with no compliant route, calls for that operation fail; they do not quietly fall through to a provider the policy forbids. To keep that guarantee from becoming a foot-gun, a **satisfiability gate** runs at activation: a policy that would strand a registered operation (one the platform requires a route for) is refused outright, with the stranded operations named, while advisory operations only produce warnings. A workspace can therefore deliberately leave an uncontracted OCR provider unroutable without breaking its extraction pipeline." },
|
|
12153
|
+
{ type: "heading", level: 2, id: "ai-policy-platform-managing", text: "Managing the Policy" },
|
|
12154
|
+
{ type: "paragraph", text: "The policy is managed programmatically through the public API's `/v1/ai` surface with a workspace-scoped API key. The surface is deliberately small and evidence-oriented:" },
|
|
12155
|
+
{ type: "list", items: [
|
|
12156
|
+
"`GET /v1/ai/policy` reads the effective policy, the enforced constraints, and a live satisfiability status.",
|
|
12157
|
+
"`PUT /v1/ai/policy` replaces the policy wholesale; `PATCH /v1/ai/policy` updates part of it. Both default to activating, so the satisfiability gate binds on the write.",
|
|
12158
|
+
"`GET /v1/ai/models` and `GET /v1/ai/operations` list every model, class, and operation with the exact constraint blocking each unreachable route.",
|
|
12159
|
+
"`POST /v1/ai/routes:explain` dry-runs a routing decision through the live production resolver, returning the ordered candidate chain or a fail-closed explanation.",
|
|
12160
|
+
"`GET /v1/ai/policy/history` reads the append-only version trail, each version with its changed fields and recorded change reason."
|
|
12161
|
+
] },
|
|
12162
|
+
{
|
|
12163
|
+
type: "code",
|
|
12164
|
+
title: "cURL: Pin EU residency and deny one model",
|
|
12165
|
+
code: `curl -X PUT "https://api.talonic.com/v1/ai/policy" \\
|
|
12166
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
12167
|
+
-H "Content-Type: application/json" \\
|
|
12168
|
+
-d '{
|
|
12169
|
+
"region_pin": "eu",
|
|
12170
|
+
"allowed_providers": ["bedrock"],
|
|
12171
|
+
"denied_models": ["claude-opus"],
|
|
12172
|
+
"change_reason": "Contractual EU residency"
|
|
12173
|
+
}'`
|
|
12174
|
+
},
|
|
12175
|
+
{ type: "callout", variant: "info", text: "The tenant policy sits on top of the **platform provider floor**, a deployment-level constraint that can only narrow what routing permits. A workspace cannot widen past the floor whatever it submits, and the floor is visible in every policy read as `constraints.platform_provider_floor`, so the enforced boundary is never a matter of trust in documentation." },
|
|
12176
|
+
{ type: "heading", level: 2, id: "ai-policy-platform-boundaries", text: "Boundaries" },
|
|
12177
|
+
{ type: "paragraph", text: "The surface is precise about what it does not do. Only `active` policies are enforced; `draft` and `shadow` versions are stored and versioned without affecting routing. Nothing about the platform's infrastructure crosses the boundary: responses carry providers and regions, which is what a residency commitment is made of, never endpoint hosts, credentials, or wire-level model identifiers. Self-hosted or customer-operated inference endpoints appear only as deployments marked `custom_endpoint: true`; per-tenant endpoint credentials are out of scope by design, since endpoints are declared at deployment level. And every route acts only on the workspace of the authenticated key, so no request shape can read or write another workspace's policy." },
|
|
12178
|
+
{ type: "paragraph", text: "Every policy write is versioned with an actor and a change reason, and the history is append-only: restoring an earlier configuration means submitting it again as a new version, so the audit trail records the rollback as a deliberate act. For teams running change governance, the policy write fits the same discipline as other workspace settings: stage the intended document, let the satisfiability gate verify it against the live operation catalog, then activate." }
|
|
12179
|
+
],
|
|
12180
|
+
related: [
|
|
12181
|
+
{ label: "API Keys", slug: "api-keys" },
|
|
12182
|
+
{ label: "Public API", slug: "public-api" },
|
|
12183
|
+
{ label: "Change Review", slug: "change-review" }
|
|
12184
|
+
],
|
|
12185
|
+
faq: [
|
|
12186
|
+
{ question: "Who can change the AI policy?", answer: "Any holder of a workspace-scoped API key with the write scope, through PUT or PATCH /v1/ai/policy. Master-view keys are rejected because they span every workspace and have no single policy to act on. Every write records the acting key and a change_reason on the stored version." },
|
|
12187
|
+
{ question: "What happens to documents if the policy blocks every route for an operation?", answer: "Calls for that operation fail closed: they error instead of reaching a provider the policy forbids. The satisfiability gate refuses to activate a policy that would strand a registered operation, so this state is reachable only for advisory operations, where it is a legitimate, deliberate configuration." },
|
|
12188
|
+
{ question: "Does the AI policy affect where documents are stored?", answer: "No. The policy governs AI model routing: which providers, regions, and models may process document content during AI operations. Document storage location is a property of the deployment, not of this policy." },
|
|
12189
|
+
{ question: "Can Talonic override our policy?", answer: "The platform provider floor constrains routing at deployment level and only ever narrows what the tenant policy permits; it cannot widen it. Public API writes cannot bypass the satisfiability gate. The enforced constraints, including the floor, are visible in every policy read, so what binds is always inspectable." }
|
|
12190
|
+
],
|
|
12191
|
+
mentions: ["AI policy", "model routing", "data residency", "provider governance", "model denylist", "fail closed", "satisfiability gate", "platform provider floor", "compliance"]
|
|
12192
|
+
}
|
|
12193
|
+
];
|
|
12194
|
+
|
|
12195
|
+
// src/content/api/overview.ts
|
|
12196
|
+
var sections21 = [
|
|
12125
12197
|
{
|
|
12126
12198
|
slug: "introduction",
|
|
12127
12199
|
parentSlug: "overview",
|
|
@@ -12490,7 +12562,7 @@ curl -X POST https://api.talonic.com/v1/extract \\
|
|
|
12490
12562
|
];
|
|
12491
12563
|
|
|
12492
12564
|
// src/content/api/extract.ts
|
|
12493
|
-
var
|
|
12565
|
+
var sections22 = [
|
|
12494
12566
|
{
|
|
12495
12567
|
slug: "post-extract",
|
|
12496
12568
|
parentSlug: "extract",
|
|
@@ -13074,7 +13146,7 @@ curl https://api.talonic.com/v1/documents/c3d4e5f6-a7b8-9012-cdef-123456789012/e
|
|
|
13074
13146
|
];
|
|
13075
13147
|
|
|
13076
13148
|
// src/content/api/documents.ts
|
|
13077
|
-
var
|
|
13149
|
+
var sections23 = [
|
|
13078
13150
|
{
|
|
13079
13151
|
slug: "list-documents",
|
|
13080
13152
|
parentSlug: "documents",
|
|
@@ -13751,11 +13823,190 @@ var sections22 = [
|
|
|
13751
13823
|
{ question: "Which columns get written?", answer: "By default every non-empty column other than the reference column. Pass field_columns with a comma-separated list to inject only a specific subset." }
|
|
13752
13824
|
],
|
|
13753
13825
|
mentions: ["metadata injection", "CSV upload", "document_id", "customer metadata", "bulk"]
|
|
13826
|
+
},
|
|
13827
|
+
{
|
|
13828
|
+
slug: "get-document-claims",
|
|
13829
|
+
parentSlug: "documents",
|
|
13830
|
+
title: "Document Claims",
|
|
13831
|
+
seoTitle: "List Document Provenance Claims via API \u2014 Talonic Docs",
|
|
13832
|
+
description: "Read deterministic provenance claims for a document with GET /v1/documents/:id/claims: atomic subject-predicate-object triples with evidence and confidence.",
|
|
13833
|
+
content: [
|
|
13834
|
+
{ type: "paragraph", text: "`GET /v1/documents/{id}/claims` returns the document's **provenance claims**: atomic `(subject, predicate, object)` triples synthesized deterministically from the document's captured fields and provenance spans. No LLM is involved in the synthesis. Each claim carries the `evidence` quote it was derived from, a `grounded` flag marking whether a source span backs it, and a `confidence` score, so it answers \"where does this value come from\" at the document level in an auditable form." },
|
|
13835
|
+
{ type: "paragraph", text: "Claims are ordered grounded-first, then by descending confidence, so the most defensible statements come first. Pass `grounded=true` to restrict the response to span-backed claims only, which is the right default when feeding claims into a downstream system that must never surface unverifiable statements. The response is a flat `{ data, total }` envelope with no pagination." },
|
|
13836
|
+
{
|
|
13837
|
+
type: "endpoint",
|
|
13838
|
+
method: "GET",
|
|
13839
|
+
path: "/v1/documents/{id}/claims",
|
|
13840
|
+
summary: "List a document's provenance claims.",
|
|
13841
|
+
description: "Requires read scope. Returns { data: [claim], total }. Claims are ordered grounded-first, then by descending confidence.",
|
|
13842
|
+
blocks: [
|
|
13843
|
+
{
|
|
13844
|
+
type: "param-table",
|
|
13845
|
+
title: "Query parameters",
|
|
13846
|
+
params: [
|
|
13847
|
+
{ name: "grounded", type: "boolean", description: "Pass `true` to return only span-backed claims." }
|
|
13848
|
+
]
|
|
13849
|
+
}
|
|
13850
|
+
]
|
|
13851
|
+
},
|
|
13852
|
+
{ type: "heading", level: 2, id: "get-document-claims-response", text: "Response" },
|
|
13853
|
+
{
|
|
13854
|
+
type: "param-table",
|
|
13855
|
+
title: "Response fields",
|
|
13856
|
+
params: [
|
|
13857
|
+
{ name: "data", type: "array", description: "Array of claim objects." },
|
|
13858
|
+
{ name: "data[].subject", type: "string", description: "The entity the claim is about." },
|
|
13859
|
+
{ name: "data[].predicate", type: "string", description: "The relation, typically a field concept such as `has_total_amount`." },
|
|
13860
|
+
{ name: "data[].object", type: "string", description: "The claimed value." },
|
|
13861
|
+
{ name: "data[].qualifier", type: "string | null", description: "Optional qualifier narrowing the claim, for example a period or unit." },
|
|
13862
|
+
{ name: "data[].evidence", type: "string | null", description: "Verbatim quote from the document the claim was derived from." },
|
|
13863
|
+
{ name: "data[].segment_id", type: "string | null", description: "Identifier of the document segment the evidence sits in." },
|
|
13864
|
+
{ name: "data[].grounded", type: "boolean", description: "True when a source span backs the claim." },
|
|
13865
|
+
{ name: "data[].confidence", type: "number", description: "Confidence score between 0 and 1." },
|
|
13866
|
+
{ name: "data[].origin", type: "string", description: "Which synthesis path produced the claim." },
|
|
13867
|
+
{ name: "total", type: "integer", description: "Number of claims returned." }
|
|
13868
|
+
]
|
|
13869
|
+
},
|
|
13870
|
+
{
|
|
13871
|
+
type: "code",
|
|
13872
|
+
language: "bash",
|
|
13873
|
+
title: "curl",
|
|
13874
|
+
code: `curl -s "https://api.talonic.com/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543/claims?grounded=true" \\
|
|
13875
|
+
-H "Authorization: Bearer $TALONIC_API_KEY"`
|
|
13876
|
+
},
|
|
13877
|
+
{
|
|
13878
|
+
type: "code",
|
|
13879
|
+
title: "Response",
|
|
13880
|
+
code: `{
|
|
13881
|
+
"data": [
|
|
13882
|
+
{
|
|
13883
|
+
"subject": "Invoice INV-2024-0042",
|
|
13884
|
+
"predicate": "has_total_amount",
|
|
13885
|
+
"object": "4950.00",
|
|
13886
|
+
"qualifier": "EUR",
|
|
13887
|
+
"evidence": "Total due: EUR 4,950.00",
|
|
13888
|
+
"segment_id": "seg_12",
|
|
13889
|
+
"grounded": true,
|
|
13890
|
+
"confidence": 0.97,
|
|
13891
|
+
"origin": "field_capture"
|
|
13892
|
+
}
|
|
13893
|
+
],
|
|
13894
|
+
"total": 1
|
|
13895
|
+
}`
|
|
13896
|
+
},
|
|
13897
|
+
{ type: "heading", level: 2, id: "get-document-claims-errors", text: "Errors" },
|
|
13898
|
+
{
|
|
13899
|
+
type: "param-table",
|
|
13900
|
+
title: "Error responses",
|
|
13901
|
+
params: [
|
|
13902
|
+
{ name: "401", type: "unauthorized", description: "Missing or invalid API key." },
|
|
13903
|
+
{ name: "404", type: "not_found", description: "Document not found or not owned by your organization." },
|
|
13904
|
+
{ name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
|
|
13905
|
+
]
|
|
13906
|
+
},
|
|
13907
|
+
{ type: "callout", variant: "info", text: "Claims are the document-level provenance read. For field-level span detail, matched spans on the source PDF and cross-document assembly lineage, use `GET /v1/field-reviews/{docId}/{fieldKey}` instead." },
|
|
13908
|
+
{ type: "paragraph", text: "A common pattern is to run compliance or audit tooling over the grounded claims of every processed document: list documents, read each document's claims with `grounded=true`, and store the triples beside the structured output. Because synthesis is deterministic, re-reading a document's claims returns stable results unless the document is re-extracted." }
|
|
13909
|
+
],
|
|
13910
|
+
related: [
|
|
13911
|
+
{ label: "Get Document", slug: "get-document" },
|
|
13912
|
+
{ label: "Get Document Fields", slug: "get-document-fields" },
|
|
13913
|
+
{ label: "Get Document Lineage", slug: "get-document-lineage" }
|
|
13914
|
+
],
|
|
13915
|
+
faq: [
|
|
13916
|
+
{ question: "Are claims generated by an LLM?", answer: "No. Claims are synthesized deterministically from captured fields and provenance spans. The same document state always produces the same claims." },
|
|
13917
|
+
{ question: "What does grounded mean?", answer: "A grounded claim is backed by a provenance span in the source document, with the evidence quote included. Ungrounded claims come from captured fields whose value could not be tied to a specific span." },
|
|
13918
|
+
{ question: "How do claims relate to field-level provenance?", answer: "Claims are the document-level summary. Field-level detail, including matched spans on the source PDF and assembly lineage across documents, lives on GET /v1/field-reviews/{docId}/{fieldKey}." }
|
|
13919
|
+
],
|
|
13920
|
+
mentions: ["provenance claims", "grounded", "evidence quote", "subject predicate object", "audit"]
|
|
13921
|
+
},
|
|
13922
|
+
{
|
|
13923
|
+
slug: "upload-session",
|
|
13924
|
+
parentSlug: "documents",
|
|
13925
|
+
title: "Browser-Handoff Upload",
|
|
13926
|
+
seoTitle: "Browser-Handoff Upload Sessions via API \u2014 Talonic Docs",
|
|
13927
|
+
description: "Create an upload session with POST /v1/documents/upload-session and hand the browser URL to a user. The short-lived token authenticates the file upload.",
|
|
13928
|
+
content: [
|
|
13929
|
+
{ type: "paragraph", text: "The browser-handoff pair uploads a file that lives on the **user's machine, not the caller's**. `POST /v1/documents/upload-session` creates a pending document row plus a short-lived token and returns a browser `upload_url`; the user opens that URL, picks the file, and the browser posts it to `POST /v1/upload/{token}`. The hosted MCP connector uses this flow: the agent never touches the file bytes, it only mints the session and polls the document afterwards." },
|
|
13930
|
+
{ type: "paragraph", text: "**Auth is asymmetric across the pair, and that asymmetry is the design.** The session route requires an OAuth 2.1 bearer token from the connector OAuth flow and rejects `tlnc_` API keys with `401`. The upload route is public: it reads no `Authorization` header at all, because the single-use, short-lived token in the path is the credential. The token expires after 15 minutes by default, and it is claimed atomically, so a second post with the same token gets `404` even when it races the first." },
|
|
13931
|
+
{
|
|
13932
|
+
type: "endpoint",
|
|
13933
|
+
method: "POST",
|
|
13934
|
+
path: "/v1/documents/upload-session",
|
|
13935
|
+
summary: "Create an upload session (OAuth bearer only).",
|
|
13936
|
+
description: "Requires an OAuth 2.1 bearer token; tlnc_ API keys are rejected with 401. Returns the pending document_id, the browser upload_url, and the token expiry.",
|
|
13937
|
+
blocks: [
|
|
13938
|
+
{
|
|
13939
|
+
type: "param-table",
|
|
13940
|
+
title: "Body parameters",
|
|
13941
|
+
params: [
|
|
13942
|
+
{ name: "filename", type: "string", required: true, description: "Filename of the file the user will upload (max 512 characters)." }
|
|
13943
|
+
]
|
|
13944
|
+
}
|
|
13945
|
+
]
|
|
13946
|
+
},
|
|
13947
|
+
{
|
|
13948
|
+
type: "code",
|
|
13949
|
+
title: "Response (session)",
|
|
13950
|
+
code: `{
|
|
13951
|
+
"document_id": "f0e1d2c3-b4a5-9687-8765-432109876543",
|
|
13952
|
+
"upload_url": "https://app.talonic.com/u/1f2e3d4c-5b6a-7980-abcd-ef0123456789",
|
|
13953
|
+
"expires_at": "2026-07-31T12:15:00.000Z"
|
|
13954
|
+
}`
|
|
13955
|
+
},
|
|
13956
|
+
{
|
|
13957
|
+
type: "endpoint",
|
|
13958
|
+
method: "POST",
|
|
13959
|
+
path: "/v1/upload/{token}",
|
|
13960
|
+
summary: "Upload the file against the session token (public).",
|
|
13961
|
+
description: "No Authorization header. Multipart form data with the file in the `file` field, 500 MB default cap. The token is single-use.",
|
|
13962
|
+
blocks: []
|
|
13963
|
+
},
|
|
13964
|
+
{
|
|
13965
|
+
type: "code",
|
|
13966
|
+
language: "bash",
|
|
13967
|
+
title: "Upload (what the browser page does)",
|
|
13968
|
+
code: `curl -s -X POST https://api.talonic.com/v1/upload/1f2e3d4c-5b6a-7980-abcd-ef0123456789 \\
|
|
13969
|
+
-F "file=@invoice-2026-04.pdf"`
|
|
13970
|
+
},
|
|
13971
|
+
{
|
|
13972
|
+
type: "code",
|
|
13973
|
+
title: "Response (upload)",
|
|
13974
|
+
code: `{
|
|
13975
|
+
"document_id": "f0e1d2c3-b4a5-9687-8765-432109876543",
|
|
13976
|
+
"status": "queued",
|
|
13977
|
+
"filename": "invoice-2026-04.pdf"
|
|
13978
|
+
}`
|
|
13979
|
+
},
|
|
13980
|
+
{ type: "callout", variant: "warning", text: "Do not send a `tlnc_` API key to the session route; it returns 401 by design. For server-side uploads where the caller holds the file bytes, use the standard ingestion routes such as `POST /v1/extract` or a source's document upload endpoint instead." },
|
|
13981
|
+
{ type: "heading", level: 2, id: "upload-session-errors", text: "Errors" },
|
|
13982
|
+
{
|
|
13983
|
+
type: "param-table",
|
|
13984
|
+
title: "Error responses",
|
|
13985
|
+
params: [
|
|
13986
|
+
{ name: "400", type: "bad_request", description: "Missing filename on the session route, or no file in the multipart body on the upload route." },
|
|
13987
|
+
{ name: "401", type: "unauthorized", description: "Session route only: missing or invalid OAuth bearer token, or a tlnc_ API key was used." },
|
|
13988
|
+
{ name: "404", type: "not_found", description: "Upload route only: token not found, expired, or already used." },
|
|
13989
|
+
{ name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
|
|
13990
|
+
]
|
|
13991
|
+
},
|
|
13992
|
+
{ type: "paragraph", text: "On a successful upload the document is stored and extraction is enqueued, so the returned `status` is normally `queued`. When the queue is temporarily unavailable the document stays at `uploaded`, and a later `POST /v1/extract` call with the `document_id` still processes it inline. The session's pending document is created for extraction only; once the file arrives, drive it with `POST /v1/extract` like any other document." }
|
|
13993
|
+
],
|
|
13994
|
+
related: [
|
|
13995
|
+
{ label: "List Documents", slug: "list-documents" },
|
|
13996
|
+
{ label: "Get Document", slug: "get-document" },
|
|
13997
|
+
{ label: "Extract Data", slug: "post-extract" }
|
|
13998
|
+
],
|
|
13999
|
+
faq: [
|
|
14000
|
+
{ question: "Why does my tlnc_ API key get 401 on the session route?", answer: "By design. The session route accepts only OAuth 2.1 bearer tokens from the connector OAuth flow. API-key callers that hold the file bytes themselves should upload through the standard ingestion routes instead." },
|
|
14001
|
+
{ question: "How long is an upload token valid?", answer: "Fifteen minutes by default, and it is single-use. The claim is atomic, so once a file has been posted against the token, any further post returns 404." },
|
|
14002
|
+
{ question: "What happens if the user never uploads a file?", answer: "The token expires and an hourly background sweep removes the pending document row. Until the sweep runs, the row can appear in document lists with a pending status; nothing is billed for it." }
|
|
14003
|
+
],
|
|
14004
|
+
mentions: ["browser handoff", "upload session", "upload token", "OAuth bearer", "MCP connector", "multipart upload"]
|
|
13754
14005
|
}
|
|
13755
14006
|
];
|
|
13756
14007
|
|
|
13757
14008
|
// src/content/api/extractions.ts
|
|
13758
|
-
var
|
|
14009
|
+
var sections24 = [
|
|
13759
14010
|
{
|
|
13760
14011
|
slug: "list-extractions",
|
|
13761
14012
|
parentSlug: "extractions",
|
|
@@ -14225,7 +14476,7 @@ curl -s "https://api.talonic.com/v1/extractions/a1b2c3d4-e5f6-7890-abcd-ef123456
|
|
|
14225
14476
|
];
|
|
14226
14477
|
|
|
14227
14478
|
// src/content/api/schemas.ts
|
|
14228
|
-
var
|
|
14479
|
+
var sections25 = [
|
|
14229
14480
|
{
|
|
14230
14481
|
slug: "list-schemas",
|
|
14231
14482
|
parentSlug: "schemas",
|
|
@@ -14592,16 +14843,16 @@ var sections24 = [
|
|
|
14592
14843
|
parentSlug: "schemas",
|
|
14593
14844
|
title: "Update Schema",
|
|
14594
14845
|
seoTitle: "Update an Extraction Schema via API \u2014 Talonic Docs",
|
|
14595
|
-
description: "
|
|
14846
|
+
description: "Update a schema name, description, or field definition with PATCH or PUT /v1/schemas/:id. Field changes replace the full field set; results are unchanged.",
|
|
14596
14847
|
content: [
|
|
14597
|
-
{ type: "paragraph", text: "
|
|
14848
|
+
{ type: "paragraph", text: "`PATCH /v1/schemas/:id` updates a saved **extraction schema**: its name, description, or field definition. `PUT` on the same path delegates to the identical handler, so both methods accept the same body and behave the same way. When you provide a `definition` with `properties` (or a non-empty `fields` array), the schema's existing fields are **replaced** with the new set. Already-completed extractions are not affected: their stored results keep the values extracted when they ran." },
|
|
14598
14849
|
{ type: "callout", variant: "warning", text: "Updating a schema definition changes the fields used for **future** extractions, and a provided `definition.properties` replaces all existing fields rather than merging. Already-completed extractions keep their stored results." },
|
|
14599
14850
|
{
|
|
14600
14851
|
type: "endpoint",
|
|
14601
|
-
method: "
|
|
14852
|
+
method: "PATCH",
|
|
14602
14853
|
path: "/v1/schemas/:id",
|
|
14603
|
-
summary: "
|
|
14604
|
-
description: "If definition.properties is provided, all existing fields are replaced.
|
|
14854
|
+
summary: "Update a schema name, description, and/or field definition.",
|
|
14855
|
+
description: "Partial update: omitted keys are left unchanged. If definition.properties or a non-empty fields array is provided, all existing fields are replaced. Requires write scope.",
|
|
14605
14856
|
blocks: [
|
|
14606
14857
|
{
|
|
14607
14858
|
type: "param-table",
|
|
@@ -14615,6 +14866,14 @@ var sections24 = [
|
|
|
14615
14866
|
}
|
|
14616
14867
|
]
|
|
14617
14868
|
},
|
|
14869
|
+
{
|
|
14870
|
+
type: "endpoint",
|
|
14871
|
+
method: "PUT",
|
|
14872
|
+
path: "/v1/schemas/:id",
|
|
14873
|
+
summary: "Alias for PATCH: same body, same behavior.",
|
|
14874
|
+
description: "PUT delegates to the PATCH handler. Despite the verb, it applies the same partial-update semantics: keys you omit are left unchanged. Requires write scope.",
|
|
14875
|
+
blocks: []
|
|
14876
|
+
},
|
|
14618
14877
|
{
|
|
14619
14878
|
type: "code",
|
|
14620
14879
|
language: "bash",
|
|
@@ -14696,6 +14955,7 @@ var sections24 = [
|
|
|
14696
14955
|
{ name: "401", type: "unauthorized", description: "Missing or invalid API key." },
|
|
14697
14956
|
{ name: "403", type: "insufficient_scope", description: "API key lacks the write scope required for this action." },
|
|
14698
14957
|
{ name: "404", type: "schema_not_found", description: "No schema with this ID exists for your organization." },
|
|
14958
|
+
{ name: "409", type: "validation_error", description: "Schema is managed by a Spec document and is read-only through the public API. Edit it in the Spec editor instead." },
|
|
14699
14959
|
{ name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
|
|
14700
14960
|
]
|
|
14701
14961
|
}
|
|
@@ -14783,7 +15043,7 @@ var sections24 = [
|
|
|
14783
15043
|
];
|
|
14784
15044
|
|
|
14785
15045
|
// src/content/api/jobs.ts
|
|
14786
|
-
var
|
|
15046
|
+
var sections26 = [
|
|
14787
15047
|
{
|
|
14788
15048
|
slug: "list-jobs",
|
|
14789
15049
|
parentSlug: "jobs",
|
|
@@ -15315,7 +15575,7 @@ var sections25 = [
|
|
|
15315
15575
|
];
|
|
15316
15576
|
|
|
15317
15577
|
// src/content/api/sources.ts
|
|
15318
|
-
var
|
|
15578
|
+
var sections27 = [
|
|
15319
15579
|
{
|
|
15320
15580
|
slug: "list-sources",
|
|
15321
15581
|
parentSlug: "sources",
|
|
@@ -15939,7 +16199,7 @@ var sections26 = [
|
|
|
15939
16199
|
];
|
|
15940
16200
|
|
|
15941
16201
|
// src/content/api/filter-search.ts
|
|
15942
|
-
var
|
|
16202
|
+
var sections28 = [
|
|
15943
16203
|
{
|
|
15944
16204
|
slug: "field-autocomplete",
|
|
15945
16205
|
parentSlug: "filter-search",
|
|
@@ -16594,7 +16854,7 @@ var sections27 = [
|
|
|
16594
16854
|
];
|
|
16595
16855
|
|
|
16596
16856
|
// src/content/api/webhooks.ts
|
|
16597
|
-
var
|
|
16857
|
+
var sections29 = [
|
|
16598
16858
|
{
|
|
16599
16859
|
slug: "webhook-events",
|
|
16600
16860
|
parentSlug: "webhooks",
|
|
@@ -17161,11 +17421,95 @@ printf '%s' '{"event":"extraction.complete","delivery_id":"dlv_a1b2c3d4e5f67890"
|
|
|
17161
17421
|
{ question: "Do these endpoints change my webhook configuration?", answer: "No. All four are read-only reference endpoints. To create or modify webhook configurations, use POST /v1/webhooks and PATCH /v1/webhooks/:id." }
|
|
17162
17422
|
],
|
|
17163
17423
|
mentions: ["webhook events", "delivery format", "signature scheme", "retry policy", "runtime discovery"]
|
|
17424
|
+
},
|
|
17425
|
+
{
|
|
17426
|
+
slug: "events-feed",
|
|
17427
|
+
parentSlug: "webhooks",
|
|
17428
|
+
title: "Event Feed",
|
|
17429
|
+
seoTitle: "Tenant Event Feed for Missed Webhooks \u2014 Talonic Docs",
|
|
17430
|
+
description: "Poll GET /v1/events for a newest-first feed of platform events. The feed reads the same rows webhooks fan out from, so you can reconcile missed deliveries.",
|
|
17431
|
+
content: [
|
|
17432
|
+
{ type: "paragraph", text: "`GET /v1/events` is the pull-side counterpart to webhooks: a newest-first, read-only feed of everything that happened in the workspace. Document extractions, run completions and failures, review verdicts, delivery outcomes, and case resolutions all appear as events with their type, payload, and timestamp. Webhooks push these events to your server; the feed lets you pull them on your own schedule." },
|
|
17433
|
+
{ type: "paragraph", text: "The feed reads the **same rows webhooks are fanned out from**, so it is the reconciliation tool for missed deliveries: if your endpoint was down and a webhook exhausted its retries, the event is still in the feed. A consumer that stores the `id` of the last event it processed can page forward with `offset` and `event_type` filters and close any gap. The route is also available at `GET /v1/delivery/events`; both paths serve the same handler." },
|
|
17434
|
+
{
|
|
17435
|
+
type: "endpoint",
|
|
17436
|
+
method: "GET",
|
|
17437
|
+
path: "/v1/events",
|
|
17438
|
+
summary: "List tenant events newest-first.",
|
|
17439
|
+
description: "Requires read scope. Filter with event_type; page with limit (default 50, max 200) and offset. Also served at GET /v1/delivery/events.",
|
|
17440
|
+
blocks: [
|
|
17441
|
+
{
|
|
17442
|
+
type: "param-table",
|
|
17443
|
+
title: "Query parameters",
|
|
17444
|
+
params: [
|
|
17445
|
+
{ name: "event_type", type: "string", description: "Filter by event type, for example `document.extracted` or `run.structuring.completed`." },
|
|
17446
|
+
{ name: "limit", type: "integer", default: "50", description: "Maximum events to return (1 to 200)." },
|
|
17447
|
+
{ name: "offset", type: "integer", default: "0", description: "Number of events to skip." }
|
|
17448
|
+
]
|
|
17449
|
+
}
|
|
17450
|
+
]
|
|
17451
|
+
},
|
|
17452
|
+
{ type: "heading", level: 2, id: "events-feed-response", text: "Response" },
|
|
17453
|
+
{
|
|
17454
|
+
type: "param-table",
|
|
17455
|
+
title: "Response fields",
|
|
17456
|
+
params: [
|
|
17457
|
+
{ name: "data", type: "array", description: "Event objects, newest first." },
|
|
17458
|
+
{ name: "data[].id", type: "string", description: "Event ID (numeric, as a string). Monotonically increasing, so it doubles as a cursor." },
|
|
17459
|
+
{ name: "data[].event_type", type: "string", description: "Event type, for example `document.extracted` or `delivery.item.failed`." },
|
|
17460
|
+
{ name: "data[].payload", type: "object", description: "Event-specific payload, the same object a webhook for this event carries." },
|
|
17461
|
+
{ name: "data[].created_at", type: "string", description: "ISO 8601 timestamp of when the event was recorded." },
|
|
17462
|
+
{ name: "total", type: "integer", description: "Total matching events." },
|
|
17463
|
+
{ name: "limit", type: "integer", description: "Applied page size." },
|
|
17464
|
+
{ name: "offset", type: "integer", description: "Applied offset." }
|
|
17465
|
+
]
|
|
17466
|
+
},
|
|
17467
|
+
{
|
|
17468
|
+
type: "code",
|
|
17469
|
+
language: "bash",
|
|
17470
|
+
title: "curl",
|
|
17471
|
+
code: `curl -s "https://api.talonic.com/v1/events?event_type=document.extracted&limit=20" \\
|
|
17472
|
+
-H "Authorization: Bearer $TALONIC_API_KEY"`
|
|
17473
|
+
},
|
|
17474
|
+
{
|
|
17475
|
+
type: "code",
|
|
17476
|
+
title: "Response",
|
|
17477
|
+
code: `{
|
|
17478
|
+
"data": [
|
|
17479
|
+
{
|
|
17480
|
+
"id": "98771",
|
|
17481
|
+
"event_type": "document.extracted",
|
|
17482
|
+
"payload": {
|
|
17483
|
+
"document_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
17484
|
+
"filename": "invoice-0847.pdf"
|
|
17485
|
+
},
|
|
17486
|
+
"created_at": "2026-07-14T21:06:48.977Z"
|
|
17487
|
+
}
|
|
17488
|
+
],
|
|
17489
|
+
"total": 1280,
|
|
17490
|
+
"limit": 20,
|
|
17491
|
+
"offset": 0
|
|
17492
|
+
}`
|
|
17493
|
+
},
|
|
17494
|
+
{ type: "callout", variant: "info", text: "Webhook event names and feed event types are two vocabularies over the same activity: the feed uses internal signal types such as `document.extracted` and `delivery.item.failed`, while webhook configurations use the public names listed on the Events page. Filter the feed by the types you observe in your own responses." },
|
|
17495
|
+
{ type: "paragraph", text: "A robust integration treats webhooks as the fast path and the feed as the source of truth: process webhooks as they arrive, and run a periodic sweep that pages the feed for anything the webhook path missed. Because event IDs are monotonically increasing, comparing the newest feed ID against the last processed ID tells you immediately whether there is a gap to close." }
|
|
17496
|
+
],
|
|
17497
|
+
related: [
|
|
17498
|
+
{ label: "Events", slug: "webhook-events" },
|
|
17499
|
+
{ label: "Retry Policy", slug: "webhook-retry" },
|
|
17500
|
+
{ label: "Machine-Readable Reference Endpoints", slug: "webhook-reference-endpoints" }
|
|
17501
|
+
],
|
|
17502
|
+
faq: [
|
|
17503
|
+
{ question: "How is the event feed different from webhooks?", answer: "Same events, opposite direction. Webhooks push events to your server as they happen; GET /v1/events lets you pull them newest-first on your own schedule. The feed reads the same underlying rows webhooks fan out from." },
|
|
17504
|
+
{ question: "Can I use the feed to recover events my webhook endpoint missed?", answer: "Yes, that is its main purpose. Events remain in the feed even when every webhook delivery attempt for them failed, so a periodic sweep of the feed closes any gap left by endpoint downtime." },
|
|
17505
|
+
{ question: "Is GET /v1/events different from GET /v1/delivery/events?", answer: "No. /v1/events is a convenience alias at the API root so event consumption does not require knowing about the delivery module. Both paths serve the same handler and return the same rows." }
|
|
17506
|
+
],
|
|
17507
|
+
mentions: ["event feed", "tenant events", "webhook reconciliation", "event_type", "polling"]
|
|
17164
17508
|
}
|
|
17165
17509
|
];
|
|
17166
17510
|
|
|
17167
17511
|
// src/content/api/resolutions.ts
|
|
17168
|
-
var
|
|
17512
|
+
var sections30 = [
|
|
17169
17513
|
{
|
|
17170
17514
|
slug: "list-resolutions",
|
|
17171
17515
|
parentSlug: "resolutions",
|
|
@@ -17706,7 +18050,7 @@ var sections29 = [
|
|
|
17706
18050
|
];
|
|
17707
18051
|
|
|
17708
18052
|
// src/content/api/linking.ts
|
|
17709
|
-
var
|
|
18053
|
+
var sections31 = [
|
|
17710
18054
|
{
|
|
17711
18055
|
slug: "list-link-keys",
|
|
17712
18056
|
parentSlug: "linking",
|
|
@@ -18480,7 +18824,7 @@ var sections30 = [
|
|
|
18480
18824
|
];
|
|
18481
18825
|
|
|
18482
18826
|
// src/content/api/nshot.ts
|
|
18483
|
-
var
|
|
18827
|
+
var sections32 = [
|
|
18484
18828
|
{
|
|
18485
18829
|
slug: "nshot-summary",
|
|
18486
18830
|
parentSlug: "nshot",
|
|
@@ -19015,7 +19359,7 @@ var sections31 = [
|
|
|
19015
19359
|
];
|
|
19016
19360
|
|
|
19017
19361
|
// src/content/api/schema-graph.ts
|
|
19018
|
-
var
|
|
19362
|
+
var sections33 = [
|
|
19019
19363
|
{
|
|
19020
19364
|
slug: "list-schema-graph-classes",
|
|
19021
19365
|
parentSlug: "schema-graph",
|
|
@@ -19845,7 +20189,7 @@ var sections32 = [
|
|
|
19845
20189
|
];
|
|
19846
20190
|
|
|
19847
20191
|
// src/content/api/structuring.ts
|
|
19848
|
-
var
|
|
20192
|
+
var sections34 = [
|
|
19849
20193
|
{
|
|
19850
20194
|
slug: "list-structuring-checks",
|
|
19851
20195
|
parentSlug: "structuring",
|
|
@@ -20043,7 +20387,7 @@ var sections33 = [
|
|
|
20043
20387
|
],
|
|
20044
20388
|
related: [
|
|
20045
20389
|
{ label: "List Checks", slug: "list-structuring-checks" },
|
|
20046
|
-
{ label: "
|
|
20390
|
+
{ label: "Update / Delete Check", slug: "get-structuring-check" },
|
|
20047
20391
|
{ label: "Create a Review Gate", slug: "create-structuring-gate" }
|
|
20048
20392
|
],
|
|
20049
20393
|
faq: [
|
|
@@ -20056,18 +20400,18 @@ var sections33 = [
|
|
|
20056
20400
|
{
|
|
20057
20401
|
slug: "get-structuring-check",
|
|
20058
20402
|
parentSlug: "structuring",
|
|
20059
|
-
title: "
|
|
20060
|
-
seoTitle: "
|
|
20061
|
-
description: "Manage a structuring validation check by UUID:
|
|
20403
|
+
title: "Update / Delete Check",
|
|
20404
|
+
seoTitle: "Update or Delete a Validation Check \u2014 Talonic Docs",
|
|
20405
|
+
description: "Manage a structuring validation check by UUID: PUT applies a partial update, DELETE soft-deletes it while keeping past outcomes intact for audit trails.",
|
|
20062
20406
|
content: [
|
|
20063
|
-
{ type: "paragraph", text: "`/v1/structuring/checks/{id}` manages a single in-pipeline **validation check**. Use **
|
|
20407
|
+
{ type: "paragraph", text: "`/v1/structuring/checks/{id}` manages a single in-pipeline **validation check**. Use **PUT** to modify its name, type, severity, config, sort order, or active status, and **DELETE** to soft-delete it. Soft-deleted checks set `is_active` to `false` and stop running against new results, but their historical check outcomes remain intact. To inspect a check's current configuration, read it from `GET /v1/structuring/checks`; there is no single-check GET route." },
|
|
20064
20408
|
{ type: "callout", variant: "warning", text: "DELETE is a soft-delete. The check is deactivated (`is_active = false`) rather than permanently removed. Existing result check outcomes referencing this check are preserved." },
|
|
20065
20409
|
{
|
|
20066
20410
|
type: "endpoint",
|
|
20067
|
-
method: "
|
|
20411
|
+
method: "PUT",
|
|
20068
20412
|
path: "/v1/structuring/checks/{id}",
|
|
20069
|
-
summary: "
|
|
20070
|
-
description: "Same path supports
|
|
20413
|
+
summary: "Update or delete a structuring check.",
|
|
20414
|
+
description: "Same path supports PUT (partial update: any of name, description, type, severity, config, is_active, sort_order; requires write scope) and DELETE (soft-delete, requires write scope). Reads go through the list route GET /v1/structuring/checks.",
|
|
20071
20415
|
blocks: []
|
|
20072
20416
|
},
|
|
20073
20417
|
{ type: "heading", level: 2, id: "get-structuring-check-response", text: "Response" },
|
|
@@ -20091,7 +20435,7 @@ var sections33 = [
|
|
|
20091
20435
|
},
|
|
20092
20436
|
{
|
|
20093
20437
|
type: "code",
|
|
20094
|
-
title: "Response (
|
|
20438
|
+
title: "Response (PUT)",
|
|
20095
20439
|
code: `{
|
|
20096
20440
|
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
20097
20441
|
"user_schema_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
|
@@ -20727,8 +21071,8 @@ var sections33 = [
|
|
|
20727
21071
|
type: "endpoint",
|
|
20728
21072
|
method: "POST",
|
|
20729
21073
|
path: "/v1/structuring/approvals/{id}/approve",
|
|
20730
|
-
summary: "Approve
|
|
20731
|
-
description: "Requires write scope.
|
|
21074
|
+
summary: "Approve a structuring result.",
|
|
21075
|
+
description: "Requires write scope. Records an approved decision against the given gate and triggers its on_approve action.",
|
|
20732
21076
|
blocks: [
|
|
20733
21077
|
{
|
|
20734
21078
|
type: "param-table",
|
|
@@ -20740,6 +21084,14 @@ var sections33 = [
|
|
|
20740
21084
|
}
|
|
20741
21085
|
]
|
|
20742
21086
|
},
|
|
21087
|
+
{
|
|
21088
|
+
type: "endpoint",
|
|
21089
|
+
method: "POST",
|
|
21090
|
+
path: "/v1/structuring/approvals/{id}/reject",
|
|
21091
|
+
summary: "Reject a structuring result.",
|
|
21092
|
+
description: "Requires write scope. Same body as /approve (gate_id required, notes optional). Records a rejected decision and removes the result from the review queue without triggering delivery.",
|
|
21093
|
+
blocks: []
|
|
21094
|
+
},
|
|
20743
21095
|
{ type: "heading", level: 2, id: "approve-reject-result-response", text: "Response" },
|
|
20744
21096
|
{
|
|
20745
21097
|
type: "param-table",
|
|
@@ -20847,7 +21199,7 @@ var sections33 = [
|
|
|
20847
21199
|
];
|
|
20848
21200
|
|
|
20849
21201
|
// src/content/api/telemetry.ts
|
|
20850
|
-
var
|
|
21202
|
+
var sections35 = [
|
|
20851
21203
|
{
|
|
20852
21204
|
slug: "schema-telemetry-summary",
|
|
20853
21205
|
parentSlug: "telemetry",
|
|
@@ -21240,7 +21592,7 @@ var sections34 = [
|
|
|
21240
21592
|
];
|
|
21241
21593
|
|
|
21242
21594
|
// src/content/api/validation.ts
|
|
21243
|
-
var
|
|
21595
|
+
var sections36 = [
|
|
21244
21596
|
{
|
|
21245
21597
|
slug: "list-ground-truth",
|
|
21246
21598
|
parentSlug: "validation",
|
|
@@ -21773,7 +22125,7 @@ var sections35 = [
|
|
|
21773
22125
|
];
|
|
21774
22126
|
|
|
21775
22127
|
// src/content/api/credits.ts
|
|
21776
|
-
var
|
|
22128
|
+
var sections37 = [
|
|
21777
22129
|
{
|
|
21778
22130
|
slug: "credits-balance",
|
|
21779
22131
|
parentSlug: "credits",
|
|
@@ -22240,7 +22592,7 @@ var sections36 = [
|
|
|
22240
22592
|
];
|
|
22241
22593
|
|
|
22242
22594
|
// src/content/api/agent.ts
|
|
22243
|
-
var
|
|
22595
|
+
var sections38 = [
|
|
22244
22596
|
{
|
|
22245
22597
|
slug: "agent-context",
|
|
22246
22598
|
parentSlug: "agent",
|
|
@@ -22359,9 +22711,9 @@ var sections37 = [
|
|
|
22359
22711
|
seoTitle: "Discover AI Agent Tools and Impact Levels \u2014 Talonic Docs",
|
|
22360
22712
|
description: "List all tools available to the Talonic embedded AI agent with impact levels from read to irreversible. Build permission-aware integrations and confirmation gates.",
|
|
22361
22713
|
content: [
|
|
22362
|
-
{ type: "paragraph", text: "The **agent tools** endpoint returns the agent's **live tool registry**: it is read directly from the same registry the agent loop executes from, so the list can never drift from what actually runs. Each entry carries a stable `name`, a human-readable `description`, an **impact level** that classifies how consequential the operation is,
|
|
22363
|
-
{ type: "paragraph", text: "Call this endpoint at startup to populate your integration's tool registry, or periodically to detect newly added capabilities: because the response reflects the live loop, a newly shipped tool appears here the moment it is deployed, with no docs lag." },
|
|
22364
|
-
{ type: "paragraph", text: "The `totalCount` field gives the total number of tools
|
|
22714
|
+
{ type: "paragraph", text: "The **agent tools** endpoint returns the agent's **live tool registry**: it is read directly from the same registry the agent loop executes from, so the list can never drift from what actually runs. Each entry carries a stable `name`, a human-readable `description`, an **impact level** that classifies how consequential the operation is, a **capability** tag naming the permission the tool requires, a `can_invoke` flag stating whether the calling key can run the tool directly, and the tool's `input_schema`, a JSON Schema describing its arguments. Use it for tool discovery: dynamically generating tool descriptions for external AI agents, auditing available capabilities, or building permission-aware integrations." },
|
|
22715
|
+
{ type: "paragraph", text: "Call this endpoint at startup to populate your integration's tool registry, or periodically to detect newly added capabilities: because the response reflects the live loop, a newly shipped tool appears here the moment it is deployed, with no docs lag. The `input_schema` on each entry is what makes direct invocation programmable: generate argument forms or function-call definitions from it, then run the tool through [`POST /v1/agent/tools/:name/invoke`](agent-invoke-tool)." },
|
|
22716
|
+
{ type: "paragraph", text: "The `totalCount` field gives the total number of registered tools, and `invocable_count` how many of them this key can invoke. The registry lists every tool the in-product agent operates, 61 at present, while an API key runs as the least-privilege viewer role and can invoke only the read subset, currently 32; that asymmetry is exactly why `can_invoke` exists, so the listing is a menu of what you can order and a transparent view of the rest. Each tool's `impact` field follows a four-level severity scale: `read`, `draft_mutation`, `live_mutation`, and `irreversible`. Use these levels to build confirmation gates: for example, auto-approve `read` tools but require user confirmation for `live_mutation` and above. The `capability` field is the finer-grained permission the loop checks against the caller's role before executing (for example `data.read`, `source.ingest`, `review.resolve`, `spec.author`)." },
|
|
22365
22717
|
{ type: "paragraph", text: "Pair this with the **Workspace Context** endpoint to give your external AI agent both situational awareness (context) and available actions (tools). The tool names returned here are stable identifiers that can be referenced in custom orchestration logic or permission policies." },
|
|
22366
22718
|
{ type: "callout", variant: "info", text: "Impact levels follow a severity scale: `read` (no side effects), `draft_mutation` (creates drafts only), `live_mutation` (modifies live data), and `irreversible` (permanent changes like deletion). Use these to implement confirmation gates in your integration." },
|
|
22367
22719
|
{
|
|
@@ -22389,7 +22741,10 @@ var sections37 = [
|
|
|
22389
22741
|
{ name: "tools[].impact", type: "string", description: "Impact level: read, draft_mutation, live_mutation, or irreversible." },
|
|
22390
22742
|
{ name: "tools[].capability", type: "string", description: "The permission the tool requires, checked against the caller's role before execution (e.g. data.read, data.promote, source.ingest, review.resolve, spec.author)." },
|
|
22391
22743
|
{ name: "tools[].description", type: "string", description: "Human-readable description of what the tool does." },
|
|
22392
|
-
{ name: "
|
|
22744
|
+
{ name: "tools[].can_invoke", type: "boolean", description: "Whether the calling key can run this tool via POST /v1/agent/tools/:name/invoke. True for the read subset an API key's viewer role grants." },
|
|
22745
|
+
{ name: "tools[].input_schema", type: "object", description: "JSON Schema for the tool's args, as passed to POST /v1/agent/tools/:name/invoke." },
|
|
22746
|
+
{ name: "totalCount", type: "integer", description: "Total number of registered tools." },
|
|
22747
|
+
{ name: "invocable_count", type: "integer", description: "How many of the listed tools this key can invoke." }
|
|
22393
22748
|
]
|
|
22394
22749
|
},
|
|
22395
22750
|
{
|
|
@@ -22401,16 +22756,21 @@ var sections37 = [
|
|
|
22401
22756
|
"name": "query_data",
|
|
22402
22757
|
"impact": "read",
|
|
22403
22758
|
"capability": "data.read",
|
|
22404
|
-
"description": "Runs a read-only SQL query over the structured cell plane."
|
|
22759
|
+
"description": "Runs a read-only SQL query over the structured cell plane.",
|
|
22760
|
+
"can_invoke": true,
|
|
22761
|
+
"input_schema": { "type": "object", "properties": { "sql": { "type": "string" } } }
|
|
22405
22762
|
},
|
|
22406
22763
|
{
|
|
22407
22764
|
"name": "promote_field",
|
|
22408
22765
|
"impact": "draft_mutation",
|
|
22409
22766
|
"capability": "data.promote",
|
|
22410
|
-
"description": "Makes an already-captured field queryable. No LLM call, reversible."
|
|
22767
|
+
"description": "Makes an already-captured field queryable. No LLM call, reversible.",
|
|
22768
|
+
"can_invoke": false,
|
|
22769
|
+
"input_schema": { "type": "object", "properties": { "field_id": { "type": "string" } } }
|
|
22411
22770
|
}
|
|
22412
22771
|
],
|
|
22413
|
-
"totalCount":
|
|
22772
|
+
"totalCount": 61,
|
|
22773
|
+
"invocable_count": 32
|
|
22414
22774
|
}`
|
|
22415
22775
|
},
|
|
22416
22776
|
{ type: "heading", level: 2, id: "agent-tools-errors", text: "Errors" },
|
|
@@ -22425,16 +22785,18 @@ var sections37 = [
|
|
|
22425
22785
|
],
|
|
22426
22786
|
related: [
|
|
22427
22787
|
{ label: "Get Workspace Context", slug: "agent-context" },
|
|
22788
|
+
{ label: "Invoke a Tool", slug: "agent-invoke-tool" },
|
|
22428
22789
|
{ label: "Ask Your Documents", slug: "post-ask" },
|
|
22429
22790
|
{ label: "Authentication", slug: "authentication" }
|
|
22430
22791
|
],
|
|
22431
22792
|
faq: [
|
|
22432
|
-
{ question: "Can I invoke agent tools directly via the API?", answer: "
|
|
22793
|
+
{ question: "Can I invoke agent tools directly via the API?", answer: "Yes, the ones whose can_invoke is true for your key: POST /v1/agent/tools/:name/invoke runs a single named tool with the arguments you supply, no model in the loop, at no credit cost. Tools whose can_invoke is false require capabilities an API key's viewer role does not grant; those run only inside in-product agent turns." },
|
|
22433
22794
|
{ question: "Is this list ever out of date?", answer: "No. The response is read from the live tool registry the agent loop executes from, so it always matches what actually runs. A newly deployed tool appears immediately." },
|
|
22434
22795
|
{ question: "What impact levels are available?", answer: "Four levels: `read` (safe, no side effects), `draft_mutation` (creates drafts), `live_mutation` (modifies live data), and `irreversible` (permanent changes). Use these to build confirmation gates." },
|
|
22435
|
-
{ question: "How do I use impact levels to gate tool execution?", answer: "Treat the four levels as an escalating approval ladder: auto-approve `read` tools, and require explicit user confirmation for `live_mutation` and `irreversible` tools. Tool names are stable identifiers, so you can reference them in permission policies." }
|
|
22796
|
+
{ question: "How do I use impact levels to gate tool execution?", answer: "Treat the four levels as an escalating approval ladder: auto-approve `read` tools, and require explicit user confirmation for `live_mutation` and `irreversible` tools. Tool names are stable identifiers, so you can reference them in permission policies." },
|
|
22797
|
+
{ question: "Why does the list show tools I cannot invoke?", answer: "The registry is the full surface the in-product agent operates. Listing all of it, with can_invoke marking your reachable subset, lets an integration see precisely what exists, what it can run, and why the rest is out of reach (the capability tag names the missing permission)." }
|
|
22436
22798
|
],
|
|
22437
|
-
mentions: ["agent tools", "capabilities", "impact levels", "tool discovery", "confirmation gates", "live tool registry"]
|
|
22799
|
+
mentions: ["agent tools", "capabilities", "impact levels", "tool discovery", "confirmation gates", "live tool registry", "can_invoke", "input_schema", "invocable_count"]
|
|
22438
22800
|
},
|
|
22439
22801
|
{
|
|
22440
22802
|
slug: "agent-query",
|
|
@@ -22443,7 +22805,7 @@ var sections37 = [
|
|
|
22443
22805
|
seoTitle: "Agent Query Endpoint (Legacy Alias of /v1/ask) \u2014 Talonic Docs",
|
|
22444
22806
|
description: "POST /v1/agent/query is the legacy alias of POST /v1/ask: same read-only agent turn and same flat charge, but a minimal {status, answer} poll response.",
|
|
22445
22807
|
content: [
|
|
22446
|
-
{ type: "paragraph", text: "`POST /v1/agent/query` is the **legacy alias** of [`POST /v1/ask`](post-ask). Both endpoints start exactly the same read-only agent turn over the workspace corpus, and both charge the same flat `agent_ask` unit (100 credits per accepted question, idempotent per turn). The difference is the result surface: the ask endpoints return the full payload with structured citations, the verification verdict, and usage, while the query poll returns a minimal `{status, answer}` body. New integrations should use `/v1/ask`; this alias remains supported for integrations built against the original surface." },
|
|
22808
|
+
{ type: "paragraph", text: "`POST /v1/agent/query` is the **legacy alias** of [`POST /v1/ask`](post-ask). Both endpoints start exactly the same read-only agent turn over the workspace corpus, and both charge the same flat `agent_ask` unit (100 credits per accepted question, idempotent per turn). The difference is the result surface: the ask endpoints return the full payload with structured citations, the verification verdict, and usage, while the query poll returns a minimal `{status, answer}` body. Scoping, conversations, model selection, output formatting, and streaming likewise exist only on the ask surface. New integrations should use `/v1/ask`; this alias remains supported, unchanged, for integrations built against the original surface." },
|
|
22447
22809
|
{ type: "paragraph", text: "The request body carries one field, `query` (up to 20,000 characters), and the submission answers `202 Accepted` with a `turnId`. Poll `GET /v1/agent/query/:id` roughly every 2 seconds until `status` leaves `processing`. Like the ask surface, the alias requires a workspace-scoped key with the `read` scope, runs the turn under the least-privilege viewer role, and is tenant-isolated: a turn started by another workspace reads as 404." },
|
|
22448
22810
|
{
|
|
22449
22811
|
type: "endpoint",
|
|
@@ -22522,11 +22884,252 @@ curl -s https://api.talonic.com/v1/agent/query/$TURN_ID \\
|
|
|
22522
22884
|
{ question: "Can I poll a turn started via /v1/agent/query through /v1/ask/:id?", answer: "The turn id is the same underlying identifier, but treat the two surfaces as separate contracts: poll the surface you submitted on, and migrate the submission to /v1/ask when you want the richer payload." }
|
|
22523
22885
|
],
|
|
22524
22886
|
mentions: ["legacy alias", "agent query", "turnId", "minimal response", "migration to /v1/ask"]
|
|
22887
|
+
},
|
|
22888
|
+
{
|
|
22889
|
+
slug: "agent-invoke-tool",
|
|
22890
|
+
parentSlug: "agent",
|
|
22891
|
+
title: "Invoke a Tool",
|
|
22892
|
+
seoTitle: "Invoke an Agent Tool Directly via API \u2014 Talonic Docs",
|
|
22893
|
+
description: "POST /v1/agent/tools/:name/invoke runs one named agent tool with no model in the loop: scoped, capability-gated, credit-free, with raw output and citations.",
|
|
22894
|
+
content: [
|
|
22895
|
+
{ type: "paragraph", text: "`POST /v1/agent/tools/:name/invoke` runs **one named tool directly, with no model in the loop**: you supply the arguments the agent would otherwise have chosen, and you get the tool's raw output back. This is the seam for building your own agent on top of Talonic: your orchestrator owns the control flow and picks the tools, while Talonic supplies the retrieval planes, the structured cell reads, and the provenance. Where [`POST /v1/ask`](post-ask) is a full turn (plan, retrieve, answer, verify), a tool invocation is a single deterministic step out of that repertoire." },
|
|
22896
|
+
{ type: "paragraph", text: "Discovery and invocation pair up: [`GET /v1/agent/tools`](agent-tools) lists every registered tool with its `input_schema` (a JSON Schema for `args`) and a `can_invoke` flag stating whether your key can run it. The same capability matrix the agent loop applies governs this route, so an API key, which runs as the least-privilege viewer role, can invoke only the read subset. A tool outside that subset answers `403` naming the capability it requires, so the refusal tells you what is missing rather than leaving you to guess across 61 tools." },
|
|
22897
|
+
{ type: "paragraph", text: "The optional `scope` and `on_behalf_of` fields behave exactly as on `POST /v1/ask`: the scope compiles into a SQL predicate that bounds what the tool can read, with the same field set and the same caps, and `on_behalf_of` applies a named workspace user's compartment visibility to the invocation. That symmetry matters when you drive tools yourself, because it means a custom orchestrator inherits the same isolation guarantees a full ask gets. See [Scope, Models & Access](ask-scoping) for the full semantics." },
|
|
22898
|
+
{ type: "callout", variant: "info", text: "Direct tool invocation charges no credits. Every tool an API key can currently reach does no model work, so there is no model call to meter; the route is bounded by its own rate-limit namespace, `agent_tools`, and by the agent's per-tenant in-flight ceiling instead. This is a statement about the invocable set as it stands, not a promise that every future tool will be free: what holds is that a tool reachable through this route without a charge does no model work." },
|
|
22899
|
+
{
|
|
22900
|
+
type: "endpoint",
|
|
22901
|
+
method: "POST",
|
|
22902
|
+
path: "/v1/agent/tools/:name/invoke",
|
|
22903
|
+
summary: "Run one named tool directly with caller-supplied arguments, no model in the loop.",
|
|
22904
|
+
description: "Requires read scope. Governed by the same capability matrix as the agent loop; metered in the agent_tools rate-limit namespace; charges no credits.",
|
|
22905
|
+
blocks: [
|
|
22906
|
+
{
|
|
22907
|
+
type: "param-table",
|
|
22908
|
+
title: "Request body (JSON)",
|
|
22909
|
+
params: [
|
|
22910
|
+
{ name: "args", type: "object", description: "Arguments matching the tool's input_schema from GET /v1/agent/tools. Optional; defaults to {}." },
|
|
22911
|
+
{ name: "scope", type: "object", description: "Restrict the invocation to a slice of the workspace, exactly as on POST /v1/ask. Same fields, same caps, same empty-array semantics." },
|
|
22912
|
+
{ name: "on_behalf_of", type: "uuid", description: "Apply this workspace user's compartment visibility to the invocation. The user must be an active member of the calling workspace." }
|
|
22913
|
+
]
|
|
22914
|
+
}
|
|
22915
|
+
]
|
|
22916
|
+
},
|
|
22917
|
+
{
|
|
22918
|
+
type: "code",
|
|
22919
|
+
title: "curl",
|
|
22920
|
+
language: "bash",
|
|
22921
|
+
code: `curl -s -X POST https://api.talonic.com/v1/agent/tools/query_data/invoke \\
|
|
22922
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
22923
|
+
-H "Content-Type: application/json" \\
|
|
22924
|
+
-d '{
|
|
22925
|
+
"args": { "sql": "SELECT vendor, SUM(amount) FROM cells GROUP BY vendor" },
|
|
22926
|
+
"scope": { "document_type": "Invoice" }
|
|
22927
|
+
}'`
|
|
22928
|
+
},
|
|
22929
|
+
{ type: "heading", level: 2, id: "agent-invoke-tool-response", text: "Response" },
|
|
22930
|
+
{
|
|
22931
|
+
type: "param-table",
|
|
22932
|
+
title: "Response fields",
|
|
22933
|
+
params: [
|
|
22934
|
+
{ name: "tool", type: "string", description: "The invoked tool's name, echoed." },
|
|
22935
|
+
{ name: "ok", type: "boolean", description: "Always true on a 200; a failed tool run answers 422 instead." },
|
|
22936
|
+
{ name: "content", type: "string", description: "The tool's raw output, usually JSON serialized as a string. The shape is tool-specific." },
|
|
22937
|
+
{ name: "cards", type: "array", description: "Generative UI cards the tool produced, when any." },
|
|
22938
|
+
{ name: "artifacts", type: "array", description: "Artifacts the tool produced, when any." },
|
|
22939
|
+
{ name: "citations", type: "array", description: "Structured citations the tool recorded: quote, document_id, kind, reference, filename, app_url. Same shape as on an ask." }
|
|
22940
|
+
]
|
|
22941
|
+
},
|
|
22942
|
+
{
|
|
22943
|
+
type: "code",
|
|
22944
|
+
title: "Response",
|
|
22945
|
+
code: `{
|
|
22946
|
+
"tool": "query_data",
|
|
22947
|
+
"ok": true,
|
|
22948
|
+
"content": "[{\\"vendor\\":\\"Northwind Supplies Ltd\\",\\"sum\\":48200}]",
|
|
22949
|
+
"cards": [],
|
|
22950
|
+
"artifacts": [],
|
|
22951
|
+
"citations": []
|
|
22952
|
+
}`
|
|
22953
|
+
},
|
|
22954
|
+
{ type: "heading", level: 2, id: "agent-invoke-tool-errors", text: "Errors" },
|
|
22955
|
+
{ type: "paragraph", text: "The error contract is deliberately three-way, so an orchestrator can branch without parsing messages. `404` means no tool carries that name: consult `GET /v1/agent/tools` for the live registry. `403` means the tool exists but requires a capability the key's role does not grant; the message names the capability and points at `can_invoke`. `422` means the tool ran and failed on its own terms, with the tool's failure summary as the message; a 200 never carries a failure." },
|
|
22956
|
+
{
|
|
22957
|
+
type: "param-table",
|
|
22958
|
+
title: "Error responses",
|
|
22959
|
+
params: [
|
|
22960
|
+
{ name: "400", type: "validation_error", description: "Invalid scope or on_behalf_of; the message names the offending field." },
|
|
22961
|
+
{ name: "401", type: "unauthorized", description: "Missing or invalid API key." },
|
|
22962
|
+
{ name: "403", type: "insufficient_permissions", description: "The tool requires a capability this key's role does not grant. The message names the capability." },
|
|
22963
|
+
{ name: "404", type: "not_found", description: "No tool with this name is registered." },
|
|
22964
|
+
{ name: "422", type: "validation_error", description: "The tool itself failed; the message is the tool's failure summary." },
|
|
22965
|
+
{ name: "429", type: "rate_limited", description: "Daily agent_tools cap exhausted, or the per-tenant in-flight ceiling reached." }
|
|
22966
|
+
]
|
|
22967
|
+
}
|
|
22968
|
+
],
|
|
22969
|
+
related: [
|
|
22970
|
+
{ label: "List Agent Tools", slug: "agent-tools" },
|
|
22971
|
+
{ label: "Scope, Models & Access", slug: "ask-scoping" },
|
|
22972
|
+
{ label: "Ask Your Documents", slug: "post-ask" },
|
|
22973
|
+
{ label: "Conversations", slug: "agent-conversations" },
|
|
22974
|
+
{ label: "Rate Limits", slug: "rate-limits" }
|
|
22975
|
+
],
|
|
22976
|
+
faq: [
|
|
22977
|
+
{ question: "Does invoking a tool cost credits?", answer: "No. Every tool an API key can currently reach does no model work, so there is nothing to meter; invocations are bounded by the agent_tools rate-limit namespace instead. That is a statement about the currently invocable set, not a forever price: the invariant is that a tool served through this route without a charge runs no model." },
|
|
22978
|
+
{ question: "Which tools can my key invoke?", answer: "The read subset: GET /v1/agent/tools marks each tool with can_invoke for your key and reports invocable_count. An API key runs as the least-privilege viewer role, so tools tagged above data.read are listed for transparency but answer 403 when invoked, naming the capability they need." },
|
|
22979
|
+
{ question: "How do I know what arguments a tool takes?", answer: "Each listing entry carries input_schema, a JSON Schema for the tool's args. Generate your argument forms or function-call definitions from it; args you pass on invoke are validated against the tool's own expectations, and a tool-level failure answers 422 with the tool's summary." },
|
|
22980
|
+
{ question: "Do scope and on_behalf_of work the same as on /v1/ask?", answer: "Yes, identically: scope compiles into a SQL predicate bounding what the tool can read (same fields, same 1,000-document and 100-tag caps, same empty-array-matches-nothing rule), and on_behalf_of applies the named workspace user's compartment visibility to the single invocation." }
|
|
22981
|
+
],
|
|
22982
|
+
mentions: ["direct tool invocation", "no model in the loop", "can_invoke", "input_schema", "capability matrix", "viewer role", "agent_tools namespace", "credit-free", "custom orchestrator"]
|
|
22983
|
+
}
|
|
22984
|
+
];
|
|
22985
|
+
|
|
22986
|
+
// src/content/api/agent-conversations.ts
|
|
22987
|
+
var sections39 = [
|
|
22988
|
+
{
|
|
22989
|
+
slug: "agent-conversations",
|
|
22990
|
+
parentSlug: "agent",
|
|
22991
|
+
title: "Conversations",
|
|
22992
|
+
seoTitle: "Agent Conversations API: Thread, List, Manage \u2014 Talonic Docs",
|
|
22993
|
+
description: "List, read, rename, and delete the conversations your asks thread into: keyset pagination, per-turn history, on_behalf_of partitions, and delete semantics.",
|
|
22994
|
+
content: [
|
|
22995
|
+
{ type: "paragraph", text: "Every ask threads into a **conversation**. Pass `conversation_id` on [`POST /v1/ask`](post-ask) to continue one, and the agent answers with the prior questions and answers in view; omit it and a fresh conversation is created, with its id returned on the 202. The conversation endpoints under `/v1/agent/conversations` are the management surface for those threads: list them, read one with its full turn history, rename it, and delete it. All reads require the `read` scope; rename and delete require `write`." },
|
|
22996
|
+
{ type: "paragraph", text: "Conversations created through the API belong to the workspace's **API principal**, a derived owner that is not a platform user. The isolation cuts both ways: an API key sees the conversations asked through the API and can never list, read, rename, or delete a colleague's in-product agent chats, and in-product users do not see the key's threads in their own history. Within the API space, `on_behalf_of` selects a further per-user **partition**: turns run for a user thread into that user's own partition, so one user's conversation history is never replayed as context into a turn run for someone else, and a continuation across partitions reads as not found rather than silently leaking history." },
|
|
22997
|
+
{ type: "paragraph", text: "The list is ordered by newest activity first and **keyset-paginated**: pass `?limit` (1 to 100, default 30) and continue by passing the previous page's `next_cursor` as `?cursor`, until `next_cursor` comes back null. The cursor is an ISO timestamp, so it stays stable as new conversations arrive while you page. Each row carries the conversation id, its title, how many turns it holds, and its creation and last-activity timestamps." },
|
|
22998
|
+
{
|
|
22999
|
+
type: "endpoint",
|
|
23000
|
+
method: "GET",
|
|
23001
|
+
path: "/v1/agent/conversations",
|
|
23002
|
+
summary: "List conversations, newest activity first, keyset-paginated.",
|
|
23003
|
+
description: "Requires read scope. on_behalf_of lists the partition of conversations run for that workspace user.",
|
|
23004
|
+
blocks: [
|
|
23005
|
+
{
|
|
23006
|
+
type: "param-table",
|
|
23007
|
+
title: "Query parameters",
|
|
23008
|
+
params: [
|
|
23009
|
+
{ name: "limit", type: "integer", description: "Page size, 1 to 100.", default: "30" },
|
|
23010
|
+
{ name: "cursor", type: "iso date-time", description: "The previous page's next_cursor. Omit for the first page." },
|
|
23011
|
+
{ name: "on_behalf_of", type: "uuid", description: "List the conversation partition of this workspace user. Must be an active member of the calling workspace." }
|
|
23012
|
+
]
|
|
23013
|
+
}
|
|
23014
|
+
]
|
|
23015
|
+
},
|
|
23016
|
+
{
|
|
23017
|
+
type: "code",
|
|
23018
|
+
title: "List conversations (bash)",
|
|
23019
|
+
language: "bash",
|
|
23020
|
+
code: `curl -s "https://api.talonic.com/v1/agent/conversations?limit=2" \\
|
|
23021
|
+
-H "Authorization: Bearer $TALONIC_API_KEY"`
|
|
23022
|
+
},
|
|
23023
|
+
{
|
|
23024
|
+
type: "code",
|
|
23025
|
+
title: "Response",
|
|
23026
|
+
code: `{
|
|
23027
|
+
"conversations": [
|
|
23028
|
+
{
|
|
23029
|
+
"conversation_id": "8c4f2a1e-0b6d-4e2f-9a3c-5d7e1f2a3b4c",
|
|
23030
|
+
"title": "Overdue invoices in Q3",
|
|
23031
|
+
"turn_count": 3,
|
|
23032
|
+
"created_at": "2026-07-30T09:12:00.000Z",
|
|
23033
|
+
"last_activity_at": "2026-07-30T09:41:00.000Z"
|
|
23034
|
+
},
|
|
23035
|
+
{
|
|
23036
|
+
"conversation_id": "2b7d9f4a-1c3e-4f5a-8b6d-7e9f0a1b2c3d",
|
|
23037
|
+
"title": "MSA termination clauses",
|
|
23038
|
+
"turn_count": 1,
|
|
23039
|
+
"created_at": "2026-07-29T16:05:00.000Z",
|
|
23040
|
+
"last_activity_at": "2026-07-29T16:05:00.000Z"
|
|
23041
|
+
}
|
|
23042
|
+
],
|
|
23043
|
+
"next_cursor": "2026-07-29T16:05:00.000Z"
|
|
23044
|
+
}`
|
|
23045
|
+
},
|
|
23046
|
+
{ type: "heading", level: 2, id: "agent-conversations-get", text: "Read one conversation" },
|
|
23047
|
+
{ type: "paragraph", text: "`GET /v1/agent/conversations/:id` returns one conversation with its asks in order, oldest first, so the array reads as the transcript. Each turn carries the `ask_id`, the question, its lifecycle status (`processing`, `completed`, or `error`), the answer text once settled (empty until then), and its creation timestamp. For the full completed payload of any turn, with structured citations, verification, and usage, fetch it by id via [`GET /v1/ask/:id`](ask-results): the `ask_id` here is the same identifier." },
|
|
23048
|
+
{
|
|
23049
|
+
type: "endpoint",
|
|
23050
|
+
method: "GET",
|
|
23051
|
+
path: "/v1/agent/conversations/:id",
|
|
23052
|
+
summary: "One conversation with its asks in order, oldest first.",
|
|
23053
|
+
description: "Requires read scope. Tenant-isolated and partition-scoped: another workspace's conversation, or another partition's, reads as 404.",
|
|
23054
|
+
blocks: []
|
|
23055
|
+
},
|
|
23056
|
+
{
|
|
23057
|
+
type: "code",
|
|
23058
|
+
title: "Response",
|
|
23059
|
+
code: `{
|
|
23060
|
+
"conversation_id": "8c4f2a1e-0b6d-4e2f-9a3c-5d7e1f2a3b4c",
|
|
23061
|
+
"title": "Overdue invoices in Q3",
|
|
23062
|
+
"created_at": "2026-07-30T09:12:00.000Z",
|
|
23063
|
+
"turns": [
|
|
23064
|
+
{
|
|
23065
|
+
"ask_id": "7c2f0a4e-9d31-4b8a-b3e6-2f1c5d9a8e07",
|
|
23066
|
+
"question": "Which invoices in this pipeline are overdue?",
|
|
23067
|
+
"status": "completed",
|
|
23068
|
+
"answer": "Two invoices are overdue: INV-1041 by 12 days and INV-1055 by 3 days.",
|
|
23069
|
+
"created_at": "2026-07-30T09:12:00.000Z"
|
|
23070
|
+
},
|
|
23071
|
+
{
|
|
23072
|
+
"ask_id": "1d4e7a2b-8f6c-4a3d-9e5b-0c1f2a3b4c5d",
|
|
23073
|
+
"question": "And only the ones above 5,000 EUR?",
|
|
23074
|
+
"status": "processing",
|
|
23075
|
+
"answer": "",
|
|
23076
|
+
"created_at": "2026-07-30T09:41:00.000Z"
|
|
23077
|
+
}
|
|
23078
|
+
]
|
|
23079
|
+
}`
|
|
23080
|
+
},
|
|
23081
|
+
{ type: "heading", level: 2, id: "agent-conversations-manage", text: "Rename and delete" },
|
|
23082
|
+
{ type: "paragraph", text: 'Both management routes require the `write` scope, so a read-only integration key can consume threads but not alter them. `PATCH /v1/agent/conversations/:id` renames: the body is `{"title": "..."}`, up to 300 characters, trimmed server-side, and the response echoes the conversation id with the new title. `DELETE /v1/agent/conversations/:id` deletes: the conversation disappears from the list and can no longer be continued with `conversation_id`, and the response is `{"conversation_id": "...", "deleted": true}`.' },
|
|
23083
|
+
{ type: "callout", variant: "info", text: "Delete is a soft archive of the thread, not an erasure of the answers. The asks that lived in a deleted conversation stay readable by id via `GET /v1/ask/:id`, because they are the caller's own answer history and integrations may hold ask_ids long after the thread is gone. What delete removes is the thread as a continuable, listable unit." },
|
|
23084
|
+
{
|
|
23085
|
+
type: "code",
|
|
23086
|
+
title: "Rename, then delete",
|
|
23087
|
+
language: "bash",
|
|
23088
|
+
code: `curl -s -X PATCH https://api.talonic.com/v1/agent/conversations/8c4f2a1e-0b6d-4e2f-9a3c-5d7e1f2a3b4c \\
|
|
23089
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
23090
|
+
-H "Content-Type: application/json" \\
|
|
23091
|
+
-d '{"title": "Q3 collections review"}'
|
|
23092
|
+
|
|
23093
|
+
{"conversation_id": "8c4f2a1e-0b6d-4e2f-9a3c-5d7e1f2a3b4c", "title": "Q3 collections review"}
|
|
23094
|
+
|
|
23095
|
+
curl -s -X DELETE https://api.talonic.com/v1/agent/conversations/8c4f2a1e-0b6d-4e2f-9a3c-5d7e1f2a3b4c \\
|
|
23096
|
+
-H "Authorization: Bearer $TALONIC_API_KEY"
|
|
23097
|
+
|
|
23098
|
+
{"conversation_id": "8c4f2a1e-0b6d-4e2f-9a3c-5d7e1f2a3b4c", "deleted": true}`
|
|
23099
|
+
},
|
|
23100
|
+
{ type: "heading", level: 2, id: "agent-conversations-errors", text: "Errors" },
|
|
23101
|
+
{
|
|
23102
|
+
type: "param-table",
|
|
23103
|
+
title: "Error responses",
|
|
23104
|
+
params: [
|
|
23105
|
+
{ name: "400", type: "validation_error", description: "Malformed cursor, an on_behalf_of user who is not an active member of the workspace, or a missing title on rename." },
|
|
23106
|
+
{ name: "401", type: "unauthorized", description: "Missing or invalid API key." },
|
|
23107
|
+
{ name: "403", type: "insufficient_scope", description: "Rename or delete attempted with a key lacking the write scope." },
|
|
23108
|
+
{ name: "404", type: "not_found", description: "No such conversation in this workspace and partition. Cross-tenant and cross-partition ids are indistinguishable from nonexistent ones." },
|
|
23109
|
+
{ name: "429", type: "rate_limited", description: "Too many requests. Retry after the period in the Retry-After header." }
|
|
23110
|
+
]
|
|
23111
|
+
}
|
|
23112
|
+
],
|
|
23113
|
+
related: [
|
|
23114
|
+
{ label: "POST /v1/ask", slug: "post-ask" },
|
|
23115
|
+
{ label: "Poll & Results", slug: "ask-results" },
|
|
23116
|
+
{ label: "Scope, Models & Access", slug: "ask-scoping" },
|
|
23117
|
+
{ label: "Streaming", slug: "ask-streaming" },
|
|
23118
|
+
{ label: "Authentication", slug: "authentication" }
|
|
23119
|
+
],
|
|
23120
|
+
faq: [
|
|
23121
|
+
{ question: "Do I have to create a conversation before asking?", answer: "No. Every ask creates a conversation when none is given, and the 202 returns its conversation_id. Thread the next ask by passing that id back; the conversation endpoints exist for listing and managing threads, not for creating them." },
|
|
23122
|
+
{ question: "Can my API key see in-product agent chats?", answer: "No. API conversations belong to a derived per-workspace API principal, not to any platform user, so a key lists only the threads asked through the API and can never read, rename, or delete a colleague's in-product conversations. The separation also runs the other way: in-product users do not see API threads." },
|
|
23123
|
+
{ question: "What does on_behalf_of do on these endpoints?", answer: "It selects the per-user partition of API conversations: turns run on behalf of a user thread into that user's own space, and list, get, rename, and delete with on_behalf_of operate on that space. Partitions do not mix, so a conversation created for one user reads as 404 under another, which prevents one user's visibility-scoped history from leaking into another's turns." },
|
|
23124
|
+
{ question: "Are the answers gone after I delete a conversation?", answer: "No. Delete removes the thread from the list and ends its continuability, but the asks stay readable by id via GET /v1/ask/:id. Keep ask_ids if your integration needs durable access to individual answers independent of thread lifecycle." },
|
|
23125
|
+
{ question: "How do I page through a long conversation list?", answer: "Keyset pagination: request with ?limit (up to 100), then pass the response's next_cursor as ?cursor for the next page until next_cursor is null. The cursor is a last-activity ISO timestamp, so paging stays consistent while new activity arrives." }
|
|
23126
|
+
],
|
|
23127
|
+
mentions: ["conversations", "threading", "conversation_id", "keyset pagination", "next_cursor", "API principal", "on_behalf_of partitions", "rename", "soft delete", "turn history"]
|
|
22525
23128
|
}
|
|
22526
23129
|
];
|
|
22527
23130
|
|
|
22528
23131
|
// src/content/api/ask.ts
|
|
22529
|
-
var
|
|
23132
|
+
var sections40 = [
|
|
22530
23133
|
{
|
|
22531
23134
|
slug: "post-ask",
|
|
22532
23135
|
parentSlug: "ask",
|
|
@@ -22535,7 +23138,7 @@ var sections38 = [
|
|
|
22535
23138
|
description: "POST /v1/ask asks a natural-language question over every document in your workspace and returns a cited, verified answer. One flat credit per question, no RAG stack.",
|
|
22536
23139
|
content: [
|
|
22537
23140
|
{ type: "paragraph", text: '`POST /v1/ask` is the natural-language front door to your document corpus: send a question, get back an answer grounded in your own documents, with a citation for every load-bearing claim and a verification verdict on the answer as a whole. There is no index to build, no embeddings to manage, and no retrieval pipeline to tune. Every document you ingest with `ingestion_target: "ingest"` (the default on [`POST /v1/run`](run-spec)) is askable, and the question runs over the entire workspace corpus, not a top-k slice of it.' },
|
|
22538
|
-
{ type: "paragraph", text: "
|
|
23141
|
+
{ type: "paragraph", text: "Only one field is required: `question`, up to 20,000 characters. The optional fields narrow, route, shape, or thread the turn: `scope` restricts it to a slice of the workspace as a hard filter, `conversation_id` continues a thread, `model` and `model_class` pick the model, `output_format` shapes the answer, and `on_behalf_of` applies a named user's compartment visibility. All of them are covered in depth in [Scope, Models & Access](ask-scoping). The endpoint answers `202 Accepted` immediately with an `ask_id`, a `poll_url`, a `stream_url`, and the `conversation_id` the turn threads into; the answer itself is produced asynchronously and collected via [`GET /v1/ask/:id`](ask-results) or streamed live via [`GET /v1/ask/:id/stream`](ask-streaming). A turn typically takes 10 to 60 seconds, which is why the surface is async-only by design: a synchronous response would sit inside edge and proxy timeouts. Authentication is a standard `tlnc_` Bearer key with the `read` scope. The key must be workspace-scoped: asks are tenant-isolated end to end." },
|
|
22539
23142
|
{ type: "heading", level: 2, id: "post-ask-why", text: "Why this replaces a RAG stack" },
|
|
22540
23143
|
{ type: "paragraph", text: "A conventional RAG pipeline embeds document chunks, retrieves the top-k nearest ones, and hopes the answer is inside that slice. An ask on Talonic instead runs a **read-only agent turn** over a corpus that was structured at ingestion. The agent retrieves across **three planes at once**: a semantic match against the field registry (the deduplicated graph of every field concept discovered in your documents), a lexical match over the extracted cell values themselves, and semantic plus full-text search over the raw document text through a persistent chunk index. A question about a number, a date, or a counterparty does not depend on the right paragraph landing in a context window: the value was already extracted, typed, and bound to a canonical concept." },
|
|
22541
23144
|
{ type: "paragraph", text: 'On top of retrieval, the agent runs **read-only SQL over the structured cell plane**. Questions RAG is structurally bad at, such as "how many of our contracts auto-renew?" or "what is the total value of invoices from Q2?", become aggregate queries over extracted cells with the denominator taken from real corpus coverage, never estimated from a handful of retrieved chunks. And the corpus improves as it is questioned: when a question exposes a coverage gap, the platform extracts and persists at query time, promoting or mining the concept into the structured plane, so the second time anyone asks, the answer is a plain SQL read. Your corpus gets faster and cheaper to query the more it is used, which is the opposite of a RAG stack.' },
|
|
@@ -22552,7 +23155,13 @@ var sections38 = [
|
|
|
22552
23155
|
type: "param-table",
|
|
22553
23156
|
title: "Request body (JSON)",
|
|
22554
23157
|
params: [
|
|
22555
|
-
{ name: "question", type: "string", required: true, description: "The natural-language question, up to 20,000 characters. Markdown is fine; the agent reads it as plain intent." }
|
|
23158
|
+
{ name: "question", type: "string", required: true, description: "The natural-language question, up to 20,000 characters. Markdown is fine; the agent reads it as plain intent." },
|
|
23159
|
+
{ name: "scope", type: "object", description: "Restrict the turn to a slice of the workspace: document_ids (max 1000), schema_id, pipeline_id, data_product_id, document_type, source_id, tags (max 100), ingested_after, ingested_before. Present fields are ANDed and enforced as a SQL predicate, not a hint. An empty document_ids array matches nothing." },
|
|
23160
|
+
{ name: "conversation_id", type: "uuid", description: "Continue this conversation; the agent answers with the prior turns in view. Absent, a fresh conversation is created and its id returned." },
|
|
23161
|
+
{ name: "model", type: "string", description: "Run the turn on a specific model, e.g. claude-opus. A model the workspace AI policy denies fails loudly; it is never silently substituted." },
|
|
23162
|
+
{ name: "model_class", type: "string", description: "Run the turn on a model class, e.g. complex. Used when model is absent." },
|
|
23163
|
+
{ name: "output_format", type: "object", description: "Shape the final answer: instruction (free-text format instruction, max 4,000 chars), template (a markdown skeleton the answer keeps, max 20,000 chars). Constrains form only, never grounding." },
|
|
23164
|
+
{ name: "on_behalf_of", type: "uuid", description: "Answer as this workspace user would see it, applying that user's compartment and classification visibility. Opt-in per request; the default reads workspace-wide. See Scope, Models & Access." }
|
|
22556
23165
|
]
|
|
22557
23166
|
}
|
|
22558
23167
|
]
|
|
@@ -22572,14 +23181,18 @@ var sections38 = [
|
|
|
22572
23181
|
code: `{
|
|
22573
23182
|
"ask_id": "7c2f0a4e-9d31-4b8a-b3e6-2f1c5d9a8e07",
|
|
22574
23183
|
"status": "processing",
|
|
22575
|
-
"poll_url": "/v1/ask/7c2f0a4e-9d31-4b8a-b3e6-2f1c5d9a8e07"
|
|
23184
|
+
"poll_url": "/v1/ask/7c2f0a4e-9d31-4b8a-b3e6-2f1c5d9a8e07",
|
|
23185
|
+
"stream_url": "/v1/ask/7c2f0a4e-9d31-4b8a-b3e6-2f1c5d9a8e07/stream",
|
|
23186
|
+
"conversation_id": "8c4f2a1e-0b6d-4e2f-9a3c-5d7e1f2a3b4c"
|
|
22576
23187
|
}`
|
|
22577
23188
|
},
|
|
23189
|
+
{ type: "heading", level: 2, id: "post-ask-conversations", text: "Conversations" },
|
|
23190
|
+
{ type: "paragraph", text: 'Every ask belongs to a conversation. Pass `conversation_id` to continue a thread, and the agent answers with the prior questions and answers in view, so follow-ups like "and only the ones above 50,000 EUR?" resolve against the earlier turn. Omit it and the platform creates a fresh conversation, returning its id on the 202 so the very first ask of a session already gives you the handle to thread the next one. Conversations are listed, read, renamed, and deleted through the [Conversations](agent-conversations) endpoints.' },
|
|
22578
23191
|
{ type: "heading", level: 2, id: "post-ask-pricing", text: "Pricing" },
|
|
22579
23192
|
{ type: "paragraph", text: "Each accepted ask charges one flat `agent_ask` credit unit: **100 credits, or 0.10 EUR** (1,000 credits = 1 EUR). The charge is taken when the ask is accepted and is keyed to the turn, so it is idempotent: a network retry of the same submission, or polling the result any number of times, never bills twice. There is no per-token or per-document component; a question over 10 documents and a question over 10,000 cost the same. The completed response reports the charge back in `usage.credits_charged`, and the full catalog is public at [`GET /v1/pricing`](pricing-overview)." },
|
|
22580
23193
|
{ type: "paragraph", text: "When your balance cannot cover one unit, the ask is rejected up front with `402 insufficient_credits` before any work starts. The 402 body follows the platform's agent-actionable credits contract: it names the unit, the shortfall, and a `buy_credits_url`, so an autonomous integration can top up and resubmit without human interpretation." },
|
|
22581
23194
|
{ type: "heading", level: 2, id: "post-ask-rate-limits", text: "Rate limits" },
|
|
22582
|
-
{ type: "paragraph", text: "Ask submissions are metered in their own daily rate-limit namespace, `ask`, separate from extraction and platform reads. Polling `GET /v1/ask/:id` counts against the general read namespace, never against the ask budget, so tight polling loops are free with respect to this cap." },
|
|
23195
|
+
{ type: "paragraph", text: "Ask submissions are metered in their own daily rate-limit namespace, `ask`, separate from extraction and platform reads. Polling `GET /v1/ask/:id` counts against the general read namespace, never against the ask budget, so tight polling loops are free with respect to this cap. Stream connects are metered in the separate `ask_stream` namespace, sized above `ask` to leave room for reconnects, and direct tool invocations in `agent_tools`; both are documented on [Streaming](ask-streaming) and [Invoke a Tool](agent-invoke-tool)." },
|
|
22583
23196
|
{
|
|
22584
23197
|
type: "param-table",
|
|
22585
23198
|
title: "Daily ask caps by plan",
|
|
@@ -22606,8 +23219,11 @@ var sections38 = [
|
|
|
22606
23219
|
}
|
|
22607
23220
|
],
|
|
22608
23221
|
related: [
|
|
23222
|
+
{ label: "Scope, Models & Access", slug: "ask-scoping" },
|
|
22609
23223
|
{ label: "Poll & Results", slug: "ask-results" },
|
|
23224
|
+
{ label: "Streaming", slug: "ask-streaming" },
|
|
22610
23225
|
{ label: "Citations & Verification", slug: "ask-citations-verification" },
|
|
23226
|
+
{ label: "Conversations", slug: "agent-conversations" },
|
|
22611
23227
|
{ label: "Run a Spec (make documents askable)", slug: "run-spec" },
|
|
22612
23228
|
{ label: "Pricing Catalog", slug: "pricing-overview" },
|
|
22613
23229
|
{ label: "Authentication", slug: "authentication" }
|
|
@@ -22615,11 +23231,13 @@ var sections38 = [
|
|
|
22615
23231
|
faq: [
|
|
22616
23232
|
{ question: "How is /v1/ask different from RAG?", answer: "RAG embeds chunks and answers from the top-k retrieved slice. An ask runs a read-only agent turn over a corpus that was structured at ingestion: it retrieves across the field registry, the extracted cell values, and the full document text simultaneously, runs read-only SQL for aggregate questions, and extracts missing concepts at query time so repeat questions become plain structured reads. Every claim is cited to an exact source span and the answer is re-verified against the turn's own evidence." },
|
|
22617
23233
|
{ question: "What does an ask cost?", answer: "One flat agent_ask unit per accepted question: 100 credits, or 0.10 EUR. The charge is idempotent per turn, so retries and polling never double-bill, and there is no per-token or per-document component." },
|
|
22618
|
-
{ question: "Why is there no synchronous mode?", answer: "A turn takes 10 to 60 seconds depending on how much retrieval, SQL, and verification the question needs. That exceeds common edge and proxy timeouts, so the surface is async-only: submit, get 202 with an ask_id,
|
|
23234
|
+
{ question: "Why is there no synchronous mode?", answer: "A turn takes 10 to 60 seconds depending on how much retrieval, SQL, and verification the question needs. That exceeds common edge and proxy timeouts, so the surface is async-only: submit, get 202 with an ask_id, then either poll GET /v1/ask/:id roughly every 2 seconds or hold GET /v1/ask/:id/stream open for server-sent events." },
|
|
23235
|
+
{ question: "Can I restrict a question to specific documents or a pipeline?", answer: "Yes. Pass a scope object on the request: document_ids, schema_id, pipeline_id, data_product_id, document_type, source_id, tags, and ingestion-date bounds. The scope is enforced as a SQL predicate on every retrieval plane, so the model cannot read outside it. Note that an empty document_ids array matches nothing rather than meaning unscoped." },
|
|
23236
|
+
{ question: "How do multi-turn conversations work?", answer: "Every ask threads into a conversation. Pass conversation_id to continue one and the agent sees the prior turns; omit it and a fresh conversation is created, with its id returned on the 202. Conversations are listed and managed via the /v1/agent/conversations endpoints." },
|
|
22619
23237
|
{ question: "Can an ask change anything in my workspace?", answer: "No. The turn runs under a least-privilege read-only role. Mutating tools are denied before execution, so documents, schemas, pipelines, and settings are never modified by a question." },
|
|
22620
23238
|
{ question: "Which documents can the agent see?", answer: 'Every document in the workspace the API key belongs to, and only those. Asks are tenant-isolated: an ask_id from another workspace reads as 404. Documents become askable when ingested with ingestion_target "ingest" (the default on POST /v1/run); markdown-only ingestion ("extract") keeps them out of the askable corpus.' }
|
|
22621
23239
|
],
|
|
22622
|
-
mentions: ["natural-language ask", "RAG replacement", "agent turn", "three-plane retrieval", "field registry", "read-only SQL", "extract-and-persist", "agent_ask credit unit", "rate limits"]
|
|
23240
|
+
mentions: ["natural-language ask", "RAG replacement", "agent turn", "three-plane retrieval", "field registry", "read-only SQL", "extract-and-persist", "agent_ask credit unit", "rate limits", "scope", "conversations", "model selection", "streaming"]
|
|
22623
23241
|
},
|
|
22624
23242
|
{
|
|
22625
23243
|
slug: "ask-results",
|
|
@@ -22628,8 +23246,8 @@ var sections38 = [
|
|
|
22628
23246
|
seoTitle: "Poll an Ask and Read the Answer \u2014 GET /v1/ask/:id \u2014 Talonic Docs",
|
|
22629
23247
|
description: "GET /v1/ask/:id polls a natural-language ask: processing, completed with a cited markdown answer, structured citations, verification verdict, and usage, or error.",
|
|
22630
23248
|
content: [
|
|
22631
|
-
{ type: "paragraph", text: "`GET /v1/ask/:id` polls an ask started with [`POST /v1/ask`](post-ask). Poll roughly every 2 seconds: turns settle in 10 to 60 seconds, so a 2-second interval finds the answer promptly without wasted requests. Polling is metered under the general read namespace, not the `ask` namespace, so a polling loop never consumes your daily ask budget. The endpoint is tenant-isolated: an `ask_id` created by another workspace returns `404`, exactly as if it never existed." },
|
|
22632
|
-
{ type: "paragraph", text: "The response is one of three shapes, discriminated by `status`. While the turn runs you get the minimal `processing` body: `ask_id`, `status`, and `
|
|
23249
|
+
{ type: "paragraph", text: "`GET /v1/ask/:id` polls an ask started with [`POST /v1/ask`](post-ask). Poll roughly every 2 seconds: turns settle in 10 to 60 seconds, so a 2-second interval finds the answer promptly without wasted requests. Polling is metered under the general read namespace, not the `ask` namespace, so a polling loop never consumes your daily ask budget. The endpoint is tenant-isolated: an `ask_id` created by another workspace returns `404`, exactly as if it never existed. If you would rather watch the turn unfold than poll it, [`GET /v1/ask/:id/stream`](ask-streaming) delivers the same turn as server-sent events; the poll contract here is unchanged by streaming and both read the same turn." },
|
|
23250
|
+
{ type: "paragraph", text: "The response is one of three shapes, discriminated by `status`. While the turn runs you get the minimal `processing` body: `ask_id`, `status`, `poll_url`, and `conversation_id`. When the turn settles successfully, `status` is `completed` and the body carries the full result: the answer, the structured citations, any cards and artifacts the turn produced, the tool-call count, the verification verdict, and usage. When the turn fails, `status` is `error` with a stable `error` code and a human-readable `message`." },
|
|
22633
23251
|
{ type: "heading", level: 2, id: "ask-results-endpoint", text: "Endpoint" },
|
|
22634
23252
|
{
|
|
22635
23253
|
type: "endpoint",
|
|
@@ -22669,8 +23287,12 @@ echo "$RESULT" | jq '{status, answer, verdict: .verification.verdict}'`
|
|
|
22669
23287
|
{ name: "ask_id", type: "uuid", description: "The ask id." },
|
|
22670
23288
|
{ name: "status", type: "string", description: "processing, completed, or error." },
|
|
22671
23289
|
{ name: "poll_url", type: "string", description: "Relative URL of this endpoint, echoed for convenience." },
|
|
23290
|
+
{ name: "conversation_id", type: "uuid | null", description: "The conversation the ask threads into. Present on every status, including processing." },
|
|
22672
23291
|
{ name: "answer", type: "string", description: "The answer as markdown. Citations appear inline as markdown links whose targets deep-link into the Talonic app with the source span highlighted." },
|
|
22673
|
-
{ name: "citations", type: "array", description: "The same citations in structured form: quote, document_id, kind, reference, app_url. See Citations & Verification." },
|
|
23292
|
+
{ name: "citations", type: "array", description: "The same citations in structured form: quote, document_id, kind, reference, filename, app_url. See Citations & Verification." },
|
|
23293
|
+
{ name: "cards", type: "array", description: "Generative UI cards the turn produced, when any. Empty for most asks." },
|
|
23294
|
+
{ name: "artifacts", type: "array", description: "Artifacts the turn produced, each {type, id, label, link}. Empty for most asks." },
|
|
23295
|
+
{ name: "tool_calls", type: "integer", description: "How many tool invocations the turn ran: an audit-trail count of the retrieval, SQL, and verification work behind the answer." },
|
|
22674
23296
|
{ name: "verification", type: "object | null", description: "Post-answer verification verdict: verdict (supported / issues / unverifiable), checks_total, checks_unsupported, and an optional correction. null when the turn produced no verdict." },
|
|
22675
23297
|
{ name: "usage.tokens", type: "integer | null", description: "Total LLM tokens the turn consumed, for transparency. Not billed per token." },
|
|
22676
23298
|
{ name: "usage.credits_charged", type: "integer", description: "The flat charge for this ask: 100 credits." }
|
|
@@ -22683,6 +23305,7 @@ echo "$RESULT" | jq '{status, answer, verdict: .verification.verdict}'`
|
|
|
22683
23305
|
"ask_id": "7c2f0a4e-9d31-4b8a-b3e6-2f1c5d9a8e07",
|
|
22684
23306
|
"status": "completed",
|
|
22685
23307
|
"poll_url": "/v1/ask/7c2f0a4e-9d31-4b8a-b3e6-2f1c5d9a8e07",
|
|
23308
|
+
"conversation_id": "8c4f2a1e-0b6d-4e2f-9a3c-5d7e1f2a3b4c",
|
|
22686
23309
|
"answer": "The Acme master services agreement has a total contract value of [EUR 96,000](https://app.talonic.com/documents/1b6f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d?cite=contract_value) over a [24-month term](https://app.talonic.com/documents/1b6f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d?cite=contract_term).",
|
|
22687
23310
|
"citations": [
|
|
22688
23311
|
{
|
|
@@ -22690,6 +23313,7 @@ echo "$RESULT" | jq '{status, answer, verdict: .verification.verdict}'`
|
|
|
22690
23313
|
"document_id": "1b6f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
|
|
22691
23314
|
"kind": "field",
|
|
22692
23315
|
"reference": "contract_value",
|
|
23316
|
+
"filename": "acme-msa-2025.pdf",
|
|
22693
23317
|
"app_url": "https://app.talonic.com/documents/1b6f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d?cite=contract_value"
|
|
22694
23318
|
},
|
|
22695
23319
|
{
|
|
@@ -22697,9 +23321,13 @@ echo "$RESULT" | jq '{status, answer, verdict: .verification.verdict}'`
|
|
|
22697
23321
|
"document_id": "1b6f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
|
|
22698
23322
|
"kind": "field",
|
|
22699
23323
|
"reference": "contract_term",
|
|
23324
|
+
"filename": "acme-msa-2025.pdf",
|
|
22700
23325
|
"app_url": "https://app.talonic.com/documents/1b6f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d?cite=contract_term"
|
|
22701
23326
|
}
|
|
22702
23327
|
],
|
|
23328
|
+
"cards": [],
|
|
23329
|
+
"artifacts": [],
|
|
23330
|
+
"tool_calls": 4,
|
|
22703
23331
|
"verification": {
|
|
22704
23332
|
"verdict": "supported",
|
|
22705
23333
|
"checks_total": 3,
|
|
@@ -22727,8 +23355,12 @@ interface AskResult {
|
|
|
22727
23355
|
ask_id: string;
|
|
22728
23356
|
status: 'processing' | 'completed' | 'error';
|
|
22729
23357
|
poll_url: string;
|
|
23358
|
+
conversation_id: string | null;
|
|
22730
23359
|
answer?: string;
|
|
22731
|
-
citations?: { quote: string; document_id: string; kind: 'field' | 'quote'; reference: string; app_url: string }[];
|
|
23360
|
+
citations?: { quote: string; document_id: string; kind: 'field' | 'quote'; reference: string; filename: string | null; app_url: string }[];
|
|
23361
|
+
cards?: unknown[];
|
|
23362
|
+
artifacts?: { type: string; id: string; label: string; link: string }[];
|
|
23363
|
+
tool_calls?: number;
|
|
22732
23364
|
verification?: { verdict: 'supported' | 'issues' | 'unverifiable'; checks_total: number; checks_unsupported: number; correction?: string } | null;
|
|
22733
23365
|
usage?: { tokens: number | null; credits_charged: number };
|
|
22734
23366
|
error?: string;
|
|
@@ -22767,6 +23399,7 @@ if (result.status === 'completed') {
|
|
|
22767
23399
|
"ask_id": "7c2f0a4e-9d31-4b8a-b3e6-2f1c5d9a8e07",
|
|
22768
23400
|
"status": "error",
|
|
22769
23401
|
"poll_url": "/v1/ask/7c2f0a4e-9d31-4b8a-b3e6-2f1c5d9a8e07",
|
|
23402
|
+
"conversation_id": "8c4f2a1e-0b6d-4e2f-9a3c-5d7e1f2a3b4c",
|
|
22770
23403
|
"error": "ask_failed",
|
|
22771
23404
|
"message": "The agent turn failed. Ask again; the question was not charged twice."
|
|
22772
23405
|
}`
|
|
@@ -22784,7 +23417,9 @@ if (result.status === 'completed') {
|
|
|
22784
23417
|
],
|
|
22785
23418
|
related: [
|
|
22786
23419
|
{ label: "POST /v1/ask", slug: "post-ask" },
|
|
23420
|
+
{ label: "Streaming", slug: "ask-streaming" },
|
|
22787
23421
|
{ label: "Citations & Verification", slug: "ask-citations-verification" },
|
|
23422
|
+
{ label: "Conversations", slug: "agent-conversations" },
|
|
22788
23423
|
{ label: "Rate Limits", slug: "rate-limits" },
|
|
22789
23424
|
{ label: "Credits Balance", slug: "credits-balance" }
|
|
22790
23425
|
],
|
|
@@ -22814,6 +23449,7 @@ if (result.status === 'completed') {
|
|
|
22814
23449
|
{ name: "document_id", type: "uuid", description: "The source document. Resolvable via GET /v1/documents/:id, and its extracted fields via GET /v1/documents/:id/fields." },
|
|
22815
23450
|
{ name: "kind", type: "string", description: "field or quote. field cites a captured field's provenance span; quote cites a verbatim passage of document text." },
|
|
22816
23451
|
{ name: "reference", type: "string", description: "For kind field: the cited field key. For kind quote: the quoted search text." },
|
|
23452
|
+
{ name: "filename", type: "string | null", description: "The source document filename when the agent resolved one, else null." },
|
|
22817
23453
|
{ name: "app_url", type: "string", description: "Absolute deep link into the Talonic app that opens the document with the cited span highlighted." }
|
|
22818
23454
|
]
|
|
22819
23455
|
},
|
|
@@ -22881,11 +23517,234 @@ if (result.status === 'completed') {
|
|
|
22881
23517
|
{ question: "Do citation links work for people outside my Talonic workspace?", answer: "No. The app_url deep links open the document inside the Talonic app and require a signed-in member of the same workspace. For external consumers, resolve the evidence over the API instead: GET /v1/documents/:id and GET /v1/documents/:id/fields with your API key." }
|
|
22882
23518
|
],
|
|
22883
23519
|
mentions: ["citations", "provenance spans", "deep links", "verification verdict", "supported", "issues", "unverifiable", "coverage plane", "evidence-backed absence", "hallucination detection"]
|
|
23520
|
+
},
|
|
23521
|
+
{
|
|
23522
|
+
slug: "ask-scoping",
|
|
23523
|
+
parentSlug: "ask",
|
|
23524
|
+
title: "Scope, Models & Access",
|
|
23525
|
+
seoTitle: "Scope, Models, and Access Control for Asks \u2014 Talonic Docs",
|
|
23526
|
+
description: "Scope an ask to a hard-filtered document slice, pick the model or model class under your AI policy, shape the output, and apply per-user compartment visibility.",
|
|
23527
|
+
content: [
|
|
23528
|
+
{ type: "paragraph", text: "By default an ask runs over the entire workspace corpus. The optional request fields on [`POST /v1/ask`](post-ask) let you narrow what the turn can read (`scope`), choose what model runs it (`model`, `model_class`), shape what comes back (`output_format`), and control whose visibility applies (`on_behalf_of`). Each of these is a contract with precise semantics, and this page is their reference." },
|
|
23529
|
+
{ type: "heading", level: 2, id: "ask-scope-filter", text: "Scope is a hard filter, not a hint" },
|
|
23530
|
+
{ type: "paragraph", text: "The `scope` object restricts the turn to a slice of the workspace, and the restriction is structural: the scope is compiled into a parameterized SQL predicate that is applied to every retrieval plane and every virtual table the agent can query. The registry match, the lexical value match, the document-text search, and every read-only SQL query the model writes all run against the scoped slice, so no query the model composes can widen it. This is what makes scope useful for isolation: a question scoped to one pipeline cannot leak evidence from another, no matter how the model phrases its retrieval." },
|
|
23531
|
+
{ type: "paragraph", text: 'Present fields are ANDed, so a scope narrows monotonically: `{"pipeline_id": "...", "document_type": "Invoice"}` matches only invoices in that pipeline. `document_ids` accepts at most 1,000 ids and `tags` at most 100 entries; requests above the cap are rejected with `400` naming the field, before any work starts. `tags` matches documents carrying any of the listed tags, and the two ingestion-date bounds are inclusive ISO timestamps.' },
|
|
23532
|
+
{ type: "callout", variant: "warning", text: 'An explicit `"document_ids": []` is an active scope that matches nothing. It does NOT mean unscoped. If you build the array dynamically and it comes out empty, the ask will answer from zero documents and honestly report that nothing matched, which reads as a confusing empty answer if you expected the whole corpus. Omit the field entirely to leave the turn unscoped. This strictness is deliberate: it is the same property that guarantees a scope can never silently widen.' },
|
|
23533
|
+
{
|
|
23534
|
+
type: "param-table",
|
|
23535
|
+
title: "Scope fields (all optional, ANDed when present)",
|
|
23536
|
+
params: [
|
|
23537
|
+
{ name: "document_ids", type: "uuid[]", description: "Restrict to these documents. Capped at 1,000 ids. An empty array matches nothing." },
|
|
23538
|
+
{ name: "schema_id", type: "uuid", description: "Restrict to documents processed by a pipeline of this Spec." },
|
|
23539
|
+
{ name: "pipeline_id", type: "uuid", description: "Restrict to documents attached to this pipeline run." },
|
|
23540
|
+
{ name: "data_product_id", type: "uuid", description: "Restrict to the documents behind this data product's pipeline run." },
|
|
23541
|
+
{ name: "document_type", type: "string", description: "Restrict to documents of this classification (a document type name, max 200 chars)." },
|
|
23542
|
+
{ name: "source_id", type: "uuid", description: "Restrict to documents ingested through this source connection." },
|
|
23543
|
+
{ name: "tags", type: "string[]", description: "Restrict to documents carrying ANY of these user tags. Capped at 100 entries." },
|
|
23544
|
+
{ name: "ingested_after", type: "iso date-time", description: "Restrict to documents ingested at or after this timestamp." },
|
|
23545
|
+
{ name: "ingested_before", type: "iso date-time", description: "Restrict to documents ingested at or before this timestamp." }
|
|
23546
|
+
]
|
|
23547
|
+
},
|
|
23548
|
+
{
|
|
23549
|
+
type: "code",
|
|
23550
|
+
title: "A scoped ask",
|
|
23551
|
+
language: "bash",
|
|
23552
|
+
code: `curl -s -X POST https://api.talonic.com/v1/ask \\
|
|
23553
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
23554
|
+
-H "Content-Type: application/json" \\
|
|
23555
|
+
-d '{
|
|
23556
|
+
"question": "Which invoices are missing a purchase order reference?",
|
|
23557
|
+
"scope": {
|
|
23558
|
+
"pipeline_id": "9e107d9d-372b-4c81-90c3-9dfe9f2c4b6a",
|
|
23559
|
+
"document_type": "Invoice",
|
|
23560
|
+
"ingested_after": "2026-07-01T00:00:00Z"
|
|
23561
|
+
}
|
|
23562
|
+
}'`
|
|
23563
|
+
},
|
|
23564
|
+
{ type: "heading", level: 2, id: "ask-model-selection", text: "Model selection" },
|
|
23565
|
+
{ type: "paragraph", text: "Two fields choose the model, and the resolution order is explicit: an explicit `model` wins, then `model_class`, then the workspace AI policy binding for the operation, then the platform default. `model` names a specific model, for example `claude-opus`; `model_class` names a capability class, for example `complex`, and applies only when `model` is absent. An unknown `model_class` is rejected with `400` listing the known classes." },
|
|
23566
|
+
{ type: "paragraph", text: "An explicitly named model is never silently substituted. Model admissibility is decided by the workspace [AI policy](get-ai-policy): if the policy denies the model you named, through a denial list, a provider constraint, or a region pin, the request fails loudly rather than running on something you did not ask for. This is the same fail-loud contract the policy applies platform-wide, and [`GET /v1/ai/models`](ai-models-operations) tells you in advance which models are reachable under the live policy, with the denial reason for each one that is not." },
|
|
23567
|
+
{
|
|
23568
|
+
type: "code",
|
|
23569
|
+
title: "Pinning the model",
|
|
23570
|
+
language: "bash",
|
|
23571
|
+
code: `curl -s -X POST https://api.talonic.com/v1/ask \\
|
|
23572
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
23573
|
+
-H "Content-Type: application/json" \\
|
|
23574
|
+
-d '{"question": "Summarize the indemnification positions across all our MSAs.", "model": "claude-opus"}'`
|
|
23575
|
+
},
|
|
23576
|
+
{ type: "heading", level: 2, id: "ask-output-format", text: "Output format" },
|
|
23577
|
+
{ type: "paragraph", text: "The `output_format` object is a formatting contract for the final answer: `instruction` is a free-text response-format instruction (up to 4,000 characters), and `template` is a markdown skeleton (up to 20,000 characters) whose headings and order the answer keeps. Use it to make answers land directly in your rendering surface: a fixed report layout, a table with named columns, a JSON shape inside a code fence. It constrains the shape of the response only. Grounding, citation, and the refusal to state unsupported claims are not negotiable through it, so a template cannot talk the agent out of citing its sources." },
|
|
23578
|
+
{ type: "heading", level: 2, id: "ask-on-behalf-of", text: "on_behalf_of and compartments" },
|
|
23579
|
+
{ type: "callout", variant: "warning", text: "By default, a workspace API key reads across every compartment and classification in the workspace, including documents that a human viewer in the same workspace could not open. `on_behalf_of` opts a single request into compartment-correct retrieval by naming a user in the calling workspace: the turn then retrieves only what that user may see. This is opt-in per request and controlled by the caller; it is not enforced by the key. If your workspace uses compartments to separate what people may see, an integration that forwards answers to end users should pass `on_behalf_of` on every request, because an ask without it answers with workspace-wide visibility." },
|
|
23580
|
+
{ type: "paragraph", text: "The named user must be an active member of the calling workspace; anything else is rejected with `400` rather than silently falling back to the unscoped default, because falling back would answer a compartment-correct question with a compartment-blind answer. `on_behalf_of` also partitions conversations: turns run for a user thread into that user's own conversation partition, so one user's history is never replayed as context into a turn run for another. The same field, with the same semantics, exists on [`POST /v1/agent/tools/:name/invoke`](agent-invoke-tool) and as a query parameter on the [Conversations](agent-conversations) endpoints." },
|
|
23581
|
+
{
|
|
23582
|
+
type: "code",
|
|
23583
|
+
title: "Compartment-correct ask",
|
|
23584
|
+
language: "bash",
|
|
23585
|
+
code: `curl -s -X POST https://api.talonic.com/v1/ask \\
|
|
23586
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
23587
|
+
-H "Content-Type: application/json" \\
|
|
23588
|
+
-d '{
|
|
23589
|
+
"question": "What did we agree with Globex on data retention?",
|
|
23590
|
+
"on_behalf_of": "5a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5e"
|
|
23591
|
+
}'`
|
|
23592
|
+
}
|
|
23593
|
+
],
|
|
23594
|
+
related: [
|
|
23595
|
+
{ label: "POST /v1/ask", slug: "post-ask" },
|
|
23596
|
+
{ label: "Streaming", slug: "ask-streaming" },
|
|
23597
|
+
{ label: "Read the AI Policy", slug: "get-ai-policy" },
|
|
23598
|
+
{ label: "Models & Operations", slug: "ai-models-operations" },
|
|
23599
|
+
{ label: "Invoke a Tool", slug: "agent-invoke-tool" },
|
|
23600
|
+
{ label: "Conversations", slug: "agent-conversations" }
|
|
23601
|
+
],
|
|
23602
|
+
faq: [
|
|
23603
|
+
{ question: "Is scope enforced or just a retrieval hint?", answer: "Enforced. The scope compiles into a parameterized SQL predicate applied to every retrieval plane and every virtual table the agent can query, so no query the model writes can read outside it. That makes scope suitable for isolation, not just relevance." },
|
|
23604
|
+
{ question: "What does an empty document_ids array do?", answer: 'It matches nothing. An explicit "document_ids": [] is an active scope over zero documents, not a request for the whole workspace. If you build the list dynamically, omit the field when the list is empty and you intend an unscoped ask.' },
|
|
23605
|
+
{ question: "What happens if I request a model my AI policy denies?", answer: "The request fails loudly with an error naming the denial. An explicitly named model is never silently substituted for another. Check GET /v1/ai/models to see which models are reachable under the live policy before pinning one." },
|
|
23606
|
+
{ question: "Does on_behalf_of change what the API key is allowed to do?", answer: "No. It narrows retrieval visibility for that single request to what the named user may see, and it partitions the conversation history per user. The key itself still authenticates the request, and without the field the turn reads workspace-wide, across every compartment. It is a per-request lever controlled by the caller, not a property enforced by the key." },
|
|
23607
|
+
{ question: "Can output_format make the agent skip citations?", answer: "No. The format contract constrains the shape of the answer: headings, ordering, tables, a JSON layout. Grounding, citation, and the refusal to state unsupported claims are outside its reach." }
|
|
23608
|
+
],
|
|
23609
|
+
mentions: ["scope", "hard filter", "SQL predicate", "document_ids cap", "model selection", "model_class", "AI policy", "fail loud", "output format", "on_behalf_of", "compartments", "classification visibility"]
|
|
23610
|
+
},
|
|
23611
|
+
{
|
|
23612
|
+
slug: "ask-streaming",
|
|
23613
|
+
parentSlug: "ask",
|
|
23614
|
+
title: "Streaming",
|
|
23615
|
+
seoTitle: "Stream Ask Answers over Server-Sent Events \u2014 Talonic Docs",
|
|
23616
|
+
description: "GET /v1/ask/:id/stream delivers an agent turn as server-sent events: persisted replay, live frames, keep-alives, terminal close, and a 20-stream workspace cap.",
|
|
23617
|
+
content: [
|
|
23618
|
+
{ type: "paragraph", text: "`GET /v1/ask/:id/stream` streams a turn started with [`POST /v1/ask`](post-ask) as **server-sent events**, so an integration can show the answer forming, surface tool activity as it happens, and render text deltas token by token instead of waiting out the poll interval. Streaming is additive: the turn is started and charged once by the submission, the [poll contract](ask-results) is unchanged, and streaming then polling the same turn (or the reverse) never double charges. Use whichever read model fits each consumer; both observe the same turn." },
|
|
23619
|
+
{ type: "paragraph", text: "The stream opens by replaying every event the turn has already persisted, then follows with live events as the turn produces them, and closes when the turn's `status` reaches `completed`, `failed`, or `awaiting_confirmation`. Because the replay is sourced from the durable turn record, a dropped connection loses nothing: reconnect and the full sequence arrives again from the start. If the turn is already settled when you connect, you get the whole recorded sequence and an immediate close, which makes the stream a valid way to fetch a finished turn's event log." },
|
|
23620
|
+
{ type: "paragraph", text: "A missing or cross-tenant `ask_id` is a real `404` issued before any SSE header is sent, never a `200` stream carrying an error frame, so standard HTTP error handling works before you enter stream parsing. The response is `Content-Type: text/event-stream`; each frame is a `data: {json}` line followed by a blank line, and a `: keep-alive` comment line goes out every 25 seconds so proxies and load balancers see traffic on an idle socket. SSE clients ignore comment lines automatically." },
|
|
23621
|
+
{
|
|
23622
|
+
type: "endpoint",
|
|
23623
|
+
method: "GET",
|
|
23624
|
+
path: "/v1/ask/:id/stream",
|
|
23625
|
+
summary: "Stream a turn as server-sent events: persisted replay first, then live, closing on terminal status.",
|
|
23626
|
+
description: "Requires read scope. Connects are metered in the ask_stream rate-limit namespace; the turn itself was charged at submission.",
|
|
23627
|
+
blocks: [
|
|
23628
|
+
{ type: "param-table", title: "Path parameters", params: [{ name: "id", type: "uuid", required: true, description: "The ask_id returned by POST /v1/ask." }] }
|
|
23629
|
+
]
|
|
23630
|
+
},
|
|
23631
|
+
{ type: "heading", level: 2, id: "ask-streaming-frames", text: "Frame kinds" },
|
|
23632
|
+
{ type: "paragraph", text: "Every frame is a JSON object discriminated by `kind`. The stream carries the answer and the audit trail of the turn; the model's raw reasoning (`thinking.delta`) is deliberately withheld from the public stream, because reasoning text is model-version-dependent and not a contract to build on." },
|
|
23633
|
+
{
|
|
23634
|
+
type: "param-table",
|
|
23635
|
+
title: "Frame kinds",
|
|
23636
|
+
params: [
|
|
23637
|
+
{ name: "status", type: "frame", description: "The turn's lifecycle status changed. A terminal status (completed, failed, awaiting_confirmation) is followed by the stream closing." },
|
|
23638
|
+
{ name: "stage", type: "frame", description: "A loop stage started or completed." },
|
|
23639
|
+
{ name: "text", type: "frame", description: "A block of answer text attributed to a stage." },
|
|
23640
|
+
{ name: "text.delta", type: "frame", description: "An incremental piece of answer text. Concatenate deltas to render the answer as it forms." },
|
|
23641
|
+
{ name: "tool.call", type: "frame", description: "The agent invoked a tool: id, name, impact, title, and the arguments it chose." },
|
|
23642
|
+
{ name: "tool.progress", type: "frame", description: "Progress inside a long-running tool: label, optional done/total counters, optional detail." },
|
|
23643
|
+
{ name: "tool.result", type: "frame", description: "A tool finished: ok flag, a one-line summary, and the duration in milliseconds." },
|
|
23644
|
+
{ name: "confirmation.required", type: "frame", description: "The turn paused for a confirmation it cannot grant itself. The stream closes with status awaiting_confirmation." },
|
|
23645
|
+
{ name: "card", type: "frame", description: "A generative UI card the turn produced." },
|
|
23646
|
+
{ name: "artifact", type: "frame", description: "An artifact the turn produced: type, id, label, link." },
|
|
23647
|
+
{ name: "done", type: "frame", description: "The turn finished composing: a headline summary and the token total." }
|
|
23648
|
+
]
|
|
23649
|
+
},
|
|
23650
|
+
{ type: "callout", variant: "info", text: "A workspace can hold at most 20 concurrent streams; the 21st connect is refused with `429`. The ceiling exists because a held socket is a resource, not a request: close streams you are done with, and fall back to polling for consumers that do not need live frames. Stream connects are metered in their own daily rate-limit namespace, `ask_stream`, sized above the `ask` budget so reconnects never compete with submissions." },
|
|
23651
|
+
{ type: "heading", level: 2, id: "ask-streaming-example", text: "End to end: scope, stream, then read the citations" },
|
|
23652
|
+
{ type: "paragraph", text: "The three surfaces compose. Scope an ask to one pipeline so the answer can only draw on that pipeline's documents, hold the stream to watch the turn work, and when the `status` frame reaches `completed`, fetch the poll payload once for the structured citations and the verification verdict. The stream is for watching; the poll payload is the settled, citable result." },
|
|
23653
|
+
{
|
|
23654
|
+
type: "code",
|
|
23655
|
+
title: "1. Submit a scoped ask",
|
|
23656
|
+
language: "bash",
|
|
23657
|
+
code: `SUBMIT=$(curl -s -X POST https://api.talonic.com/v1/ask \\
|
|
23658
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
23659
|
+
-H "Content-Type: application/json" \\
|
|
23660
|
+
-d '{
|
|
23661
|
+
"question": "Which invoices in this run are overdue, and by how much?",
|
|
23662
|
+
"scope": { "pipeline_id": "9e107d9d-372b-4c81-90c3-9dfe9f2c4b6a" }
|
|
23663
|
+
}')
|
|
23664
|
+
ASK_ID=$(echo "$SUBMIT" | jq -r '.ask_id')`
|
|
23665
|
+
},
|
|
23666
|
+
{
|
|
23667
|
+
type: "code",
|
|
23668
|
+
title: "2. Stream the turn (curl -N disables buffering)",
|
|
23669
|
+
language: "bash",
|
|
23670
|
+
code: `curl -N -s https://api.talonic.com/v1/ask/$ASK_ID/stream \\
|
|
23671
|
+
-H "Authorization: Bearer $TALONIC_API_KEY"
|
|
23672
|
+
|
|
23673
|
+
data: {"kind":"status","status":"running"}
|
|
23674
|
+
|
|
23675
|
+
data: {"kind":"tool.call","id":"t1","name":"query_data","impact":"read","title":"Query overdue invoices","args":{}}
|
|
23676
|
+
|
|
23677
|
+
data: {"kind":"tool.result","id":"t1","name":"query_data","ok":true,"summary":"2 rows","durationMs":412}
|
|
23678
|
+
|
|
23679
|
+
: keep-alive
|
|
23680
|
+
|
|
23681
|
+
data: {"kind":"text.delta","text":"Two invoices are overdue"}
|
|
23682
|
+
|
|
23683
|
+
data: {"kind":"done","headline":"2 overdue invoices found"}
|
|
23684
|
+
|
|
23685
|
+
data: {"kind":"status","status":"completed"}`
|
|
23686
|
+
},
|
|
23687
|
+
{
|
|
23688
|
+
type: "code",
|
|
23689
|
+
title: "3. Read the citations from the poll payload",
|
|
23690
|
+
language: "bash",
|
|
23691
|
+
code: `curl -s https://api.talonic.com/v1/ask/$ASK_ID \\
|
|
23692
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
23693
|
+
| jq '{verdict: .verification.verdict, citations: [.citations[] | {quote, filename, app_url}]}'`
|
|
23694
|
+
},
|
|
23695
|
+
{
|
|
23696
|
+
type: "code",
|
|
23697
|
+
title: "Consuming the stream in TypeScript",
|
|
23698
|
+
language: "typescript",
|
|
23699
|
+
code: `const res = await fetch(\`https://api.talonic.com/v1/ask/\${askId}/stream\`, {
|
|
23700
|
+
headers: { Authorization: \`Bearer \${process.env.TALONIC_API_KEY}\` },
|
|
23701
|
+
});
|
|
23702
|
+
if (res.status === 404) throw new Error('Unknown ask (or another workspace\\'s).');
|
|
23703
|
+
if (res.status === 429) throw new Error('Stream ceiling reached: close a stream or poll instead.');
|
|
23704
|
+
|
|
23705
|
+
const reader = res.body!.getReader();
|
|
23706
|
+
const decoder = new TextDecoder();
|
|
23707
|
+
let buffer = '';
|
|
23708
|
+
let answer = '';
|
|
23709
|
+
|
|
23710
|
+
while (true) {
|
|
23711
|
+
const { done, value } = await reader.read();
|
|
23712
|
+
if (done) break;
|
|
23713
|
+
buffer += decoder.decode(value, { stream: true });
|
|
23714
|
+
const frames = buffer.split('\\n\\n');
|
|
23715
|
+
buffer = frames.pop() ?? '';
|
|
23716
|
+
for (const frame of frames) {
|
|
23717
|
+
if (!frame.startsWith('data: ')) continue; // ": keep-alive" comment lines
|
|
23718
|
+
const event = JSON.parse(frame.slice(6));
|
|
23719
|
+
if (event.kind === 'text.delta') answer += event.text;
|
|
23720
|
+
if (event.kind === 'tool.call') console.log(\`tool: \${event.name}\`);
|
|
23721
|
+
if (event.kind === 'status' && event.status === 'completed') {
|
|
23722
|
+
console.log('final answer:', answer);
|
|
23723
|
+
}
|
|
23724
|
+
}
|
|
23725
|
+
}`
|
|
23726
|
+
}
|
|
23727
|
+
],
|
|
23728
|
+
related: [
|
|
23729
|
+
{ label: "POST /v1/ask", slug: "post-ask" },
|
|
23730
|
+
{ label: "Poll & Results", slug: "ask-results" },
|
|
23731
|
+
{ label: "Scope, Models & Access", slug: "ask-scoping" },
|
|
23732
|
+
{ label: "Citations & Verification", slug: "ask-citations-verification" },
|
|
23733
|
+
{ label: "Rate Limits", slug: "rate-limits" }
|
|
23734
|
+
],
|
|
23735
|
+
faq: [
|
|
23736
|
+
{ question: "Does streaming cost extra or double-charge a turn?", answer: "No. A turn is charged once, at submission, keyed to the turn id. Opening, dropping, and reopening the stream, or streaming and then polling the same turn, never bills again. Stream connects count against the ask_stream rate-limit namespace, which is a request quota, not a credit charge." },
|
|
23737
|
+
{ question: "What happens if my connection drops mid-turn?", answer: "Reconnect to the same URL. The stream always starts by replaying every event the turn has persisted, so the full sequence arrives again from the start and you lose nothing. If the turn settled while you were disconnected, you receive the whole recorded sequence and the stream closes immediately." },
|
|
23738
|
+
{ question: "Why did my stream request return 404 instead of an error frame?", answer: "The turn is resolved before any SSE header is sent, so a missing or cross-tenant ask_id is an honest HTTP 404, never a 200 stream carrying an error frame. Handle it like any other HTTP error, before entering stream parsing." },
|
|
23739
|
+
{ question: "Why is there no thinking.delta frame?", answer: "The public stream carries the answer and the audit trail: status, stages, text, tool calls, cards, and artifacts. The model's raw reasoning is withheld deliberately, because reasoning text is model-version-dependent and can restate prompt content; it is not a contract for third-party integrations to build on." },
|
|
23740
|
+
{ question: "How many streams can I hold at once?", answer: "Twenty concurrently held streams per workspace; the next connect is refused with 429. Close streams you no longer need, and use polling for consumers that do not need live frames, since polling has no concurrency ceiling." }
|
|
23741
|
+
],
|
|
23742
|
+
mentions: ["server-sent events", "SSE", "text/event-stream", "streaming", "replay", "keep-alive", "text.delta", "tool.call frames", "terminal status", "stream ceiling", "ask_stream namespace"]
|
|
22884
23743
|
}
|
|
22885
23744
|
];
|
|
22886
23745
|
|
|
22887
23746
|
// src/content/api/matching.ts
|
|
22888
|
-
var
|
|
23747
|
+
var sections41 = [
|
|
22889
23748
|
{
|
|
22890
23749
|
slug: "list-matching-configs",
|
|
22891
23750
|
parentSlug: "matching",
|
|
@@ -24220,7 +25079,7 @@ var sections39 = [
|
|
|
24220
25079
|
];
|
|
24221
25080
|
|
|
24222
25081
|
// src/content/api/delivery.ts
|
|
24223
|
-
var
|
|
25082
|
+
var sections42 = [
|
|
24224
25083
|
{
|
|
24225
25084
|
slug: "list-delivery-destinations",
|
|
24226
25085
|
parentSlug: "delivery",
|
|
@@ -25221,7 +26080,36 @@ var sections40 = [
|
|
|
25221
26080
|
{ name: "404", type: "not_found", description: "No delivery item with this ID exists for your organization." },
|
|
25222
26081
|
{ name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
|
|
25223
26082
|
]
|
|
25224
|
-
}
|
|
26083
|
+
},
|
|
26084
|
+
{ type: "heading", level: 2, id: "clear-delivery-items", text: "Clearing the delivery log" },
|
|
26085
|
+
{ type: "paragraph", text: 'Two write routes remove history rows. `DELETE /v1/delivery/items/:id` deletes one attempt record; `DELETE /v1/delivery/items` bulk-clears the log, honouring the same `binding_id`, `destination_id`, and `status` filters as the list route, so "clear only failed attempts" or "clear one binding\'s log" work with a single call. With no filters, every row for the organization is removed. Both routes require the write scope and an organization-scoped API key.' },
|
|
26086
|
+
{
|
|
26087
|
+
type: "endpoint",
|
|
26088
|
+
method: "DELETE",
|
|
26089
|
+
path: "/v1/delivery/items",
|
|
26090
|
+
summary: "Bulk-clear the delivery log, optionally filtered.",
|
|
26091
|
+
description: "Requires write scope. Accepts the same binding_id, destination_id, and status query filters as the list route. Returns { deleted: <count> }.",
|
|
26092
|
+
blocks: [
|
|
26093
|
+
{
|
|
26094
|
+
type: "param-table",
|
|
26095
|
+
title: "Query parameters",
|
|
26096
|
+
params: [
|
|
26097
|
+
{ name: "binding_id", type: "string", description: "Only clear attempts for this binding." },
|
|
26098
|
+
{ name: "destination_id", type: "string", description: "Only clear attempts for bindings targeting this destination." },
|
|
26099
|
+
{ name: "status", type: "string", description: "Only clear attempts with this status: `in_flight`, `succeeded`, `failed`." }
|
|
26100
|
+
]
|
|
26101
|
+
}
|
|
26102
|
+
]
|
|
26103
|
+
},
|
|
26104
|
+
{
|
|
26105
|
+
type: "endpoint",
|
|
26106
|
+
method: "DELETE",
|
|
26107
|
+
path: "/v1/delivery/items/:id",
|
|
26108
|
+
summary: "Delete a single delivery attempt record.",
|
|
26109
|
+
description: "Requires write scope. Returns { deleted: true }. 404 when the item does not exist for your organization.",
|
|
26110
|
+
blocks: []
|
|
26111
|
+
},
|
|
26112
|
+
{ type: "callout", variant: "info", text: "Deleting history rows is an admin cleanup, not a replay operation. A dead-letter row that references a deleted item is de-linked and stays in the DLQ, so terminal failures remain visible until you dismiss or replay them there." }
|
|
25225
26113
|
],
|
|
25226
26114
|
related: [
|
|
25227
26115
|
{ label: "Dead Letter Queue", slug: "delivery-dlq" },
|
|
@@ -25230,9 +26118,10 @@ var sections40 = [
|
|
|
25230
26118
|
faq: [
|
|
25231
26119
|
{ question: "What is the idempotency key?", answer: "The idempotency key is a deterministic SHA-256 hash of the binding ID and event ID. It is sent on the wire (as an HTTP header, object metadata, or filename token depending on the connector) so receivers can deduplicate repeated deliveries." },
|
|
25232
26120
|
{ question: "How does replay differ from DLQ replay?", answer: "Item replay re-enqueues a specific (binding, event) pair with a new attempt number. DLQ replay deletes the dead-letter row and re-enqueues with attempt=1. Both preserve the same idempotency key so receivers can deduplicate." },
|
|
25233
|
-
{ question: "How long are delivery request and response bodies kept?", answer: "Bodies are truncated to 10 KB and retained for a configurable period, 30 days by default. After that they are nulled, while metadata (status, HTTP code, duration, error code) is preserved indefinitely." }
|
|
26121
|
+
{ question: "How long are delivery request and response bodies kept?", answer: "Bodies are truncated to 10 KB and retained for a configurable period, 30 days by default. After that they are nulled, while metadata (status, HTTP code, duration, error code) is preserved indefinitely." },
|
|
26122
|
+
{ question: "Does clearing the delivery log remove DLQ rows?", answer: "No. DELETE /v1/delivery/items removes attempt records only. A dead-letter row referencing a deleted item is de-linked rather than removed; manage the DLQ through its own dismiss and replay routes." }
|
|
25234
26123
|
],
|
|
25235
|
-
mentions: ["delivery history", "replay", "attempt log", "idempotency"]
|
|
26124
|
+
mentions: ["delivery history", "replay", "attempt log", "idempotency", "clear delivery log"]
|
|
25236
26125
|
},
|
|
25237
26126
|
{
|
|
25238
26127
|
slug: "delivery-dlq",
|
|
@@ -25369,7 +26258,27 @@ var sections40 = [
|
|
|
25369
26258
|
{ name: "404", type: "not_found", description: "No DLQ item with this ID exists for your organization." },
|
|
25370
26259
|
{ name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
|
|
25371
26260
|
]
|
|
25372
|
-
}
|
|
26261
|
+
},
|
|
26262
|
+
{ type: "heading", level: 2, id: "replay-all-dlq", text: "Bulk replay" },
|
|
26263
|
+
{ type: "paragraph", text: "`POST /v1/delivery/dlq/replay-all` is the bulk form of the per-item replay: every dead-letter row matching the optional `binding_id` and `error_code` filters is deleted and re-enqueued as a fresh attempt-1 delivery, so the full retry ladder restarts for each. With no filters it replays the whole DLQ. Idempotency keys are unchanged across the replay, so receivers that dedupe on `X-Talonic-Idempotency-Key` are safe against duplicates." },
|
|
26264
|
+
{
|
|
26265
|
+
type: "endpoint",
|
|
26266
|
+
method: "POST",
|
|
26267
|
+
path: "/v1/delivery/dlq/replay-all",
|
|
26268
|
+
summary: "Bulk re-enqueue dead-letter rows, optionally filtered.",
|
|
26269
|
+
description: "Requires write scope. Deletes each matching DLQ row and re-enqueues it at attempt 1. Returns { replayed: <count> }.",
|
|
26270
|
+
blocks: [
|
|
26271
|
+
{
|
|
26272
|
+
type: "param-table",
|
|
26273
|
+
title: "Query parameters",
|
|
26274
|
+
params: [
|
|
26275
|
+
{ name: "binding_id", type: "string", description: "Only replay dead-letter rows for this binding." },
|
|
26276
|
+
{ name: "error_code", type: "string", description: "Only replay rows with this error code, for example `connector_5xx` after a destination outage." }
|
|
26277
|
+
]
|
|
26278
|
+
}
|
|
26279
|
+
]
|
|
26280
|
+
},
|
|
26281
|
+
{ type: "callout", variant: "warning", text: "Like the per-item replay, bulk replay deletes each DLQ row before enqueuing its new attempt. A typical recovery flow after a destination outage: filter the DLQ by `error_code=connector_5xx`, fix the destination, then replay-all with the same filter." }
|
|
25373
26282
|
],
|
|
25374
26283
|
related: [
|
|
25375
26284
|
{ label: "Delivery History", slug: "delivery-history" },
|
|
@@ -25378,9 +26287,10 @@ var sections40 = [
|
|
|
25378
26287
|
faq: [
|
|
25379
26288
|
{ question: "When does a delivery end up in the DLQ?", answer: "A delivery enters the dead letter queue after exhausting all retry attempts defined in the binding delivery_policy (default 7 attempts with exponential backoff over ~10 hours)." },
|
|
25380
26289
|
{ question: "What error codes indicate non-retryable failures?", answer: "auth_failed (invalid credentials), ssrf_blocked (destination URL resolves to private network), and payload_too_large (exceeds payload cap) skip the retry ladder and go directly to the DLQ after a single attempt." },
|
|
25381
|
-
{ question: "Can I set up alerts for DLQ entries?", answer: "Yes. Create a binding with signal_filter event_type: delivery.item.failed targeting your alerting webhook. The delivery system emits meta-signals for failed deliveries, with built-in loop prevention to avoid infinite cascades." }
|
|
26290
|
+
{ question: "Can I set up alerts for DLQ entries?", answer: "Yes. Create a binding with signal_filter event_type: delivery.item.failed targeting your alerting webhook. The delivery system emits meta-signals for failed deliveries, with built-in loop prevention to avoid infinite cascades." },
|
|
26291
|
+
{ question: "How do I replay the whole DLQ after fixing a destination?", answer: "Call POST /v1/delivery/dlq/replay-all, optionally filtered by binding_id or error_code. Each matching row is deleted and re-enqueued at attempt 1 with its original idempotency key, so deduping receivers ignore any duplicates." }
|
|
25382
26292
|
],
|
|
25383
|
-
mentions: ["dead letter queue", "DLQ", "failed delivery", "error codes"]
|
|
26293
|
+
mentions: ["dead letter queue", "DLQ", "failed delivery", "error codes", "bulk replay"]
|
|
25384
26294
|
},
|
|
25385
26295
|
{
|
|
25386
26296
|
slug: "delivery-catalog",
|
|
@@ -25660,7 +26570,7 @@ var sections40 = [
|
|
|
25660
26570
|
];
|
|
25661
26571
|
|
|
25662
26572
|
// src/content/api/batches.ts
|
|
25663
|
-
var
|
|
26573
|
+
var sections43 = [
|
|
25664
26574
|
{
|
|
25665
26575
|
slug: "list-batches",
|
|
25666
26576
|
parentSlug: "batches",
|
|
@@ -26096,7 +27006,7 @@ var sections41 = [
|
|
|
26096
27006
|
];
|
|
26097
27007
|
|
|
26098
27008
|
// src/content/api/cases.ts
|
|
26099
|
-
var
|
|
27009
|
+
var sections44 = [
|
|
26100
27010
|
{
|
|
26101
27011
|
slug: "list-cases",
|
|
26102
27012
|
parentSlug: "cases",
|
|
@@ -27001,7 +27911,7 @@ var sections42 = [
|
|
|
27001
27911
|
];
|
|
27002
27912
|
|
|
27003
27913
|
// src/content/api/review.ts
|
|
27004
|
-
var
|
|
27914
|
+
var sections45 = [
|
|
27005
27915
|
{
|
|
27006
27916
|
slug: "list-review-items",
|
|
27007
27917
|
parentSlug: "review",
|
|
@@ -27505,7 +28415,7 @@ var sections43 = [
|
|
|
27505
28415
|
];
|
|
27506
28416
|
|
|
27507
28417
|
// src/content/api/quality.ts
|
|
27508
|
-
var
|
|
28418
|
+
var sections46 = [
|
|
27509
28419
|
{
|
|
27510
28420
|
slug: "list-quality-datasets",
|
|
27511
28421
|
parentSlug: "quality",
|
|
@@ -28251,7 +29161,7 @@ var sections44 = [
|
|
|
28251
29161
|
];
|
|
28252
29162
|
|
|
28253
29163
|
// src/content/api/routing-rules.ts
|
|
28254
|
-
var
|
|
29164
|
+
var sections47 = [
|
|
28255
29165
|
{
|
|
28256
29166
|
slug: "list-routing-rules",
|
|
28257
29167
|
parentSlug: "routing-rules",
|
|
@@ -28681,7 +29591,7 @@ var sections45 = [
|
|
|
28681
29591
|
];
|
|
28682
29592
|
|
|
28683
29593
|
// src/content/api/billing.ts
|
|
28684
|
-
var
|
|
29594
|
+
var sections48 = [
|
|
28685
29595
|
{
|
|
28686
29596
|
slug: "billing-settings",
|
|
28687
29597
|
parentSlug: "billing",
|
|
@@ -29038,7 +29948,7 @@ X-Talonic-Cells-Resolved-AI: 1`
|
|
|
29038
29948
|
title: "Response fields",
|
|
29039
29949
|
params: [
|
|
29040
29950
|
{ name: "url", type: "string", description: "The dashboard deep link to upgrade or add payment." },
|
|
29041
|
-
{ name: "provider", type: "string", description: "The link provider
|
|
29951
|
+
{ name: "provider", type: "string", description: "The link provider: `stripe` (a hosted checkout session for the selected pack), `dashboard` (a deep link into the dashboard billing settings when checkout is unavailable), or `aws_marketplace` (workspaces billed through AWS Marketplace, where capacity changes go through the AWS subscription)." },
|
|
29042
29952
|
{ name: "requires_human", type: "boolean", description: "Always true. A person must complete the upgrade." },
|
|
29043
29953
|
{ name: "message", type: "string", description: "A human-readable instruction the agent can relay verbatim." },
|
|
29044
29954
|
{ name: "links", type: "object", description: "Follow-up resources: self, billing_settings, and credits (the balance endpoint)." }
|
|
@@ -29082,11 +29992,86 @@ X-Talonic-Cells-Resolved-AI: 1`
|
|
|
29082
29992
|
{ question: "What is the difference between the upgrade link and auto top-up?", answer: "Auto top-up (`POST /v1/billing/topup`) adds credits autonomously once a human has pre-authorized it in the billing settings. The upgrade link covers everything that still needs a person: upgrading the plan tier or adding a payment method." }
|
|
29083
29993
|
],
|
|
29084
29994
|
mentions: ["upgrade link", "billing", "payment", "human-in-the-loop", "AI agent", "plan upgrade"]
|
|
29995
|
+
},
|
|
29996
|
+
{
|
|
29997
|
+
slug: "billing-packs",
|
|
29998
|
+
parentSlug: "billing",
|
|
29999
|
+
title: "Credit Packs",
|
|
30000
|
+
seoTitle: "Credit Packs Catalog for Self-Serve Billing \u2014 Talonic Docs",
|
|
30001
|
+
description: "Read the purchasable credit pack catalog with GET /v1/billing/packs: flat EUR pricing at 1,000 credits per euro, from 10 to 1,000 EUR, with Stripe lookup keys.",
|
|
30002
|
+
content: [
|
|
30003
|
+
{ type: "paragraph", text: "`GET /v1/billing/packs` returns the **self-serve credit purchase catalog**: the prepaid packs a workspace can buy. Pricing is flat at 1,000 credits per EUR with no volume bonuses, so the four packs (10, 50, 250, and 1,000 EUR) differ only in size. The catalog is machine-readable so an agent that hits a `402 insufficient_credits` error can present concrete purchase options to its human operator." },
|
|
30004
|
+
{ type: "paragraph", text: "Each pack carries a `key` you pass to `GET /v1/billing/upgrade-link?pack=<key>` to mint a checkout link for exactly that pack, plus the `eur` price, the `credits` granted, and the Stripe `lookupKey` behind the price. The endpoint reads static catalog data: it never charges anything and needs only the read scope." },
|
|
30005
|
+
{
|
|
30006
|
+
type: "endpoint",
|
|
30007
|
+
method: "GET",
|
|
30008
|
+
path: "/v1/billing/packs",
|
|
30009
|
+
summary: "List purchasable credit packs.",
|
|
30010
|
+
description: "Requires read scope. Returns the flat prepaid pack catalog. Buy via the checkout URL from GET /v1/billing/upgrade-link.",
|
|
30011
|
+
blocks: []
|
|
30012
|
+
},
|
|
30013
|
+
{ type: "heading", level: 2, id: "billing-packs-response", text: "Response" },
|
|
30014
|
+
{
|
|
30015
|
+
type: "param-table",
|
|
30016
|
+
title: "Response fields",
|
|
30017
|
+
params: [
|
|
30018
|
+
{ name: "currency", type: "string", description: "Always `EUR`." },
|
|
30019
|
+
{ name: "packs", type: "array", description: "The purchasable packs." },
|
|
30020
|
+
{ name: "packs[].key", type: "string", description: "Pack identifier, passed as `?pack=` on the upgrade-link endpoint: `10`, `50`, `250`, or `1000`." },
|
|
30021
|
+
{ name: "packs[].lookupKey", type: "string", description: "Stripe price lookup key backing the pack." },
|
|
30022
|
+
{ name: "packs[].eur", type: "number", description: "Price in EUR." },
|
|
30023
|
+
{ name: "packs[].credits", type: "integer", description: "Credits granted on purchase (1,000 credits per EUR)." }
|
|
30024
|
+
]
|
|
30025
|
+
},
|
|
30026
|
+
{
|
|
30027
|
+
type: "code",
|
|
30028
|
+
language: "bash",
|
|
30029
|
+
title: "curl",
|
|
30030
|
+
code: `curl -s https://api.talonic.com/v1/billing/packs \\
|
|
30031
|
+
-H "Authorization: Bearer $TALONIC_API_KEY"`
|
|
30032
|
+
},
|
|
30033
|
+
{
|
|
30034
|
+
type: "code",
|
|
30035
|
+
title: "Response",
|
|
30036
|
+
code: `{
|
|
30037
|
+
"currency": "EUR",
|
|
30038
|
+
"packs": [
|
|
30039
|
+
{ "key": "10", "lookupKey": "credits_pack_10", "eur": 10, "credits": 10000 },
|
|
30040
|
+
{ "key": "50", "lookupKey": "credits_pack_50", "eur": 50, "credits": 50000 },
|
|
30041
|
+
{ "key": "250", "lookupKey": "credits_pack_250", "eur": 250, "credits": 250000 },
|
|
30042
|
+
{ "key": "1000", "lookupKey": "credits_pack_1000", "eur": 1000, "credits": 1000000 }
|
|
30043
|
+
]
|
|
30044
|
+
}`
|
|
30045
|
+
},
|
|
30046
|
+
{ type: "callout", variant: "info", text: "The typical agent flow on a 402: read the balance from `GET /v1/credits/balance`, pick a pack from this catalog, fetch `GET /v1/billing/upgrade-link?pack=<key>`, and hand the returned checkout URL to a human. Credits land seconds after the human completes checkout." },
|
|
30047
|
+
{ type: "heading", level: 2, id: "billing-packs-errors", text: "Errors" },
|
|
30048
|
+
{
|
|
30049
|
+
type: "param-table",
|
|
30050
|
+
title: "Error responses",
|
|
30051
|
+
params: [
|
|
30052
|
+
{ name: "401", type: "unauthorized", description: "Missing or invalid API key." },
|
|
30053
|
+
{ name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
|
|
30054
|
+
]
|
|
30055
|
+
},
|
|
30056
|
+
{ type: "paragraph", text: "For spend prediction rather than purchasing, pair the catalog with `GET /v1/pricing`, which lists the per-unit credit cost of each operation. Together they let an agent estimate the cost of a planned workload, check whether the balance covers it, and quantify exactly which pack closes the gap before starting." }
|
|
30057
|
+
],
|
|
30058
|
+
related: [
|
|
30059
|
+
{ label: "Upgrade Link", slug: "billing-upgrade-link" },
|
|
30060
|
+
{ label: "Billing Settings", slug: "billing-settings" },
|
|
30061
|
+
{ label: "Auto Top-Up", slug: "billing-topup" },
|
|
30062
|
+
{ label: "Credits Balance", slug: "credits-balance" }
|
|
30063
|
+
],
|
|
30064
|
+
faq: [
|
|
30065
|
+
{ question: "Does listing the packs charge anything?", answer: "No. The endpoint returns static catalog data and requires only the read scope. Purchases happen through the checkout URL from GET /v1/billing/upgrade-link, completed by a human." },
|
|
30066
|
+
{ question: "Are there volume discounts on larger packs?", answer: "No. Pricing is flat at 1,000 credits per EUR across all four packs. Larger packs are a convenience, not a discount; amounts above the self-serve maximum are handled through sales-assisted invoicing." },
|
|
30067
|
+
{ question: "How do I buy a specific pack?", answer: "Pass the pack key to GET /v1/billing/upgrade-link?pack=<key>. With Stripe configured the response contains a hosted checkout URL for that pack; a human completes the payment and the credits land within seconds via webhook." }
|
|
30068
|
+
],
|
|
30069
|
+
mentions: ["credit packs", "self-serve billing", "EUR pricing", "Stripe checkout", "insufficient_credits"]
|
|
29085
30070
|
}
|
|
29086
30071
|
];
|
|
29087
30072
|
|
|
29088
30073
|
// src/content/api/registry.ts
|
|
29089
|
-
var
|
|
30074
|
+
var sections49 = [
|
|
29090
30075
|
{
|
|
29091
30076
|
slug: "registry-query",
|
|
29092
30077
|
parentSlug: "registry",
|
|
@@ -29096,14 +30081,14 @@ var sections47 = [
|
|
|
29096
30081
|
content: [
|
|
29097
30082
|
{
|
|
29098
30083
|
type: "paragraph",
|
|
29099
|
-
text: "The registry query endpoint searches across **all previously-extracted documents** by field values. No document upload, no re-extraction, no AI calls. Documents ingested days or months ago are queryable immediately: ingest once, query forever. The
|
|
30084
|
+
text: "The registry query endpoint searches across **all previously-extracted documents** by field values. No document upload, no re-extraction, no AI calls. Documents ingested days or months ago are queryable immediately: ingest once, query forever. The endpoint is mounted at two prefixes that serve the same handler: `POST /v1/fields/registry/query` is the canonical path, part of the **Field Registry** surface alongside `GET /v1/fields`, and `POST /v1/registry/query` is a deprecated alias kept for existing integrations. Both mounts are live, equivalent, and share one rate-limit namespace."
|
|
29100
30085
|
},
|
|
29101
30086
|
{
|
|
29102
30087
|
type: "endpoint",
|
|
29103
30088
|
method: "POST",
|
|
29104
|
-
path: "/v1/registry/query",
|
|
30089
|
+
path: "/v1/fields/registry/query",
|
|
29105
30090
|
summary: "Query extracted field values across documents.",
|
|
29106
|
-
description: "Requires read scope. Returns flat rows with one entry per matching document. All `where` conditions are ANDed.",
|
|
30091
|
+
description: "Requires read scope. Returns flat rows with one entry per matching document. All `where` conditions are ANDed. Also served at the deprecated alias POST /v1/registry/query.",
|
|
29107
30092
|
blocks: [
|
|
29108
30093
|
{
|
|
29109
30094
|
type: "param-table",
|
|
@@ -29118,7 +30103,7 @@ var sections47 = [
|
|
|
29118
30103
|
type: "code",
|
|
29119
30104
|
language: "bash",
|
|
29120
30105
|
title: "Request",
|
|
29121
|
-
code: `curl -X POST https://api.talonic.com/v1/registry/query \\
|
|
30106
|
+
code: `curl -X POST https://api.talonic.com/v1/fields/registry/query \\
|
|
29122
30107
|
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
29123
30108
|
-H "Content-Type: application/json" \\
|
|
29124
30109
|
-d '{
|
|
@@ -29217,6 +30202,10 @@ var sections47 = [
|
|
|
29217
30202
|
{
|
|
29218
30203
|
question: "Can I do partial or case-insensitive matching in where conditions?",
|
|
29219
30204
|
answer: 'Yes. Values are matched with case-insensitive SQL ILIKE, so exact matches ignore case by default. Include `%` wildcards in a value (for example `"%energy%"`) to match substrings.'
|
|
30205
|
+
},
|
|
30206
|
+
{
|
|
30207
|
+
question: "Which path should I use, /v1/registry or /v1/fields/registry?",
|
|
30208
|
+
answer: "Both prefixes are live and resolve to the same handler with the same rate limits. `/v1/fields/registry` is the canonical path; `/v1/registry` is a deprecated alias kept so existing integrations keep working. New integrations should use `/v1/fields/registry`."
|
|
29220
30209
|
}
|
|
29221
30210
|
],
|
|
29222
30211
|
mentions: [
|
|
@@ -29241,9 +30230,9 @@ var sections47 = [
|
|
|
29241
30230
|
{
|
|
29242
30231
|
type: "endpoint",
|
|
29243
30232
|
method: "GET",
|
|
29244
|
-
path: "/v1/registry/health",
|
|
30233
|
+
path: "/v1/fields/registry/health",
|
|
29245
30234
|
summary: "Read a health snapshot of the field registry.",
|
|
29246
|
-
description: "Requires read scope. Read-only
|
|
30235
|
+
description: "Requires read scope. Read-only, no lifecycle or cleanup actions. Also served at the deprecated alias GET /v1/registry/health.",
|
|
29247
30236
|
blocks: []
|
|
29248
30237
|
},
|
|
29249
30238
|
{ type: "heading", level: 2, id: "registry-health-response", text: "Response" },
|
|
@@ -29267,7 +30256,7 @@ var sections47 = [
|
|
|
29267
30256
|
type: "code",
|
|
29268
30257
|
title: "curl",
|
|
29269
30258
|
language: "bash",
|
|
29270
|
-
code: `curl -s https://api.talonic.com/v1/registry/health \\
|
|
30259
|
+
code: `curl -s https://api.talonic.com/v1/fields/registry/health \\
|
|
29271
30260
|
-H "Authorization: Bearer $TALONIC_API_KEY"`
|
|
29272
30261
|
},
|
|
29273
30262
|
{
|
|
@@ -29305,7 +30294,7 @@ var sections47 = [
|
|
|
29305
30294
|
];
|
|
29306
30295
|
|
|
29307
30296
|
// src/content/api/customer-ontologies.ts
|
|
29308
|
-
var
|
|
30297
|
+
var sections50 = [
|
|
29309
30298
|
{
|
|
29310
30299
|
slug: "customer-ontologies-overview",
|
|
29311
30300
|
parentSlug: "customer-ontologies",
|
|
@@ -29624,7 +30613,7 @@ var sections48 = [
|
|
|
29624
30613
|
];
|
|
29625
30614
|
|
|
29626
30615
|
// src/content/api/account.ts
|
|
29627
|
-
var
|
|
30616
|
+
var sections51 = [
|
|
29628
30617
|
{
|
|
29629
30618
|
slug: "get-account",
|
|
29630
30619
|
parentSlug: "account",
|
|
@@ -29790,7 +30779,7 @@ var sections49 = [
|
|
|
29790
30779
|
];
|
|
29791
30780
|
|
|
29792
30781
|
// src/content/api/nodes.ts
|
|
29793
|
-
var
|
|
30782
|
+
var sections52 = [
|
|
29794
30783
|
{
|
|
29795
30784
|
slug: "node-jobs",
|
|
29796
30785
|
parentSlug: "nodes",
|
|
@@ -29997,7 +30986,7 @@ var sections50 = [
|
|
|
29997
30986
|
];
|
|
29998
30987
|
|
|
29999
30988
|
// src/content/api/process.ts
|
|
30000
|
-
var
|
|
30989
|
+
var sections53 = [
|
|
30001
30990
|
{
|
|
30002
30991
|
slug: "submit-process",
|
|
30003
30992
|
parentSlug: "process",
|
|
@@ -30245,7 +31234,7 @@ var sections51 = [
|
|
|
30245
31234
|
];
|
|
30246
31235
|
|
|
30247
31236
|
// src/content/api/run.ts
|
|
30248
|
-
var
|
|
31237
|
+
var sections54 = [
|
|
30249
31238
|
{
|
|
30250
31239
|
slug: "run-spec",
|
|
30251
31240
|
parentSlug: "run",
|
|
@@ -30615,7 +31604,7 @@ var sections52 = [
|
|
|
30615
31604
|
];
|
|
30616
31605
|
|
|
30617
31606
|
// src/content/api/reference-data.ts
|
|
30618
|
-
var
|
|
31607
|
+
var sections55 = [
|
|
30619
31608
|
{
|
|
30620
31609
|
slug: "list-reference-data",
|
|
30621
31610
|
parentSlug: "reference-data",
|
|
@@ -31049,7 +32038,7 @@ V003,Initech Ltd,DE,DE987654321`
|
|
|
31049
32038
|
];
|
|
31050
32039
|
|
|
31051
32040
|
// src/content/api/errors-rate-limits.ts
|
|
31052
|
-
var
|
|
32041
|
+
var sections56 = [
|
|
31053
32042
|
{
|
|
31054
32043
|
slug: "error-format",
|
|
31055
32044
|
parentSlug: "errors-rate-limits",
|
|
@@ -31220,7 +32209,7 @@ X-RateLimit-Reset: 2026-04-26T00:00:00.000Z`
|
|
|
31220
32209
|
];
|
|
31221
32210
|
|
|
31222
32211
|
// src/content/api/usage.ts
|
|
31223
|
-
var
|
|
32212
|
+
var sections57 = [
|
|
31224
32213
|
{
|
|
31225
32214
|
slug: "usage-overview",
|
|
31226
32215
|
parentSlug: "usage",
|
|
@@ -31718,7 +32707,7 @@ var sections55 = [
|
|
|
31718
32707
|
];
|
|
31719
32708
|
|
|
31720
32709
|
// src/content/api/pricing.ts
|
|
31721
|
-
var
|
|
32710
|
+
var sections58 = [
|
|
31722
32711
|
{
|
|
31723
32712
|
slug: "pricing-overview",
|
|
31724
32713
|
parentSlug: "pricing",
|
|
@@ -31831,7 +32820,7 @@ console.log(\`Batch: \${batchCredits} credits (\${batchCredits / pricing.cred
|
|
|
31831
32820
|
];
|
|
31832
32821
|
|
|
31833
32822
|
// src/content/api/document-types.ts
|
|
31834
|
-
var
|
|
32823
|
+
var sections59 = [
|
|
31835
32824
|
{
|
|
31836
32825
|
slug: "list-document-types",
|
|
31837
32826
|
parentSlug: "document-types",
|
|
@@ -31997,7 +32986,7 @@ var sections57 = [
|
|
|
31997
32986
|
];
|
|
31998
32987
|
|
|
31999
32988
|
// src/content/api/dialects.ts
|
|
32000
|
-
var
|
|
32989
|
+
var sections60 = [
|
|
32001
32990
|
{
|
|
32002
32991
|
slug: "list-dialects",
|
|
32003
32992
|
parentSlug: "dialects",
|
|
@@ -32545,7 +33534,7 @@ var sections58 = [
|
|
|
32545
33534
|
];
|
|
32546
33535
|
|
|
32547
33536
|
// src/content/api/fields.ts
|
|
32548
|
-
var
|
|
33537
|
+
var sections61 = [
|
|
32549
33538
|
{
|
|
32550
33539
|
slug: "list-fields",
|
|
32551
33540
|
parentSlug: "fields",
|
|
@@ -32994,7 +33983,7 @@ var sections59 = [
|
|
|
32994
33983
|
];
|
|
32995
33984
|
|
|
32996
33985
|
// src/content/api/data-products.ts
|
|
32997
|
-
var
|
|
33986
|
+
var sections62 = [
|
|
32998
33987
|
{
|
|
32999
33988
|
slug: "list-data-products",
|
|
33000
33989
|
parentSlug: "data-products",
|
|
@@ -33649,7 +34638,7 @@ curl -s https://api.talonic.com/v1/data-products/6ecb46fa-24ba-4b5d-93ee-b8b6c6b
|
|
|
33649
34638
|
];
|
|
33650
34639
|
|
|
33651
34640
|
// src/content/api/data-policies.ts
|
|
33652
|
-
var
|
|
34641
|
+
var sections63 = [
|
|
33653
34642
|
{
|
|
33654
34643
|
slug: "list-data-policies",
|
|
33655
34644
|
parentSlug: "data-policies",
|
|
@@ -34454,7 +35443,7 @@ var sections61 = [
|
|
|
34454
35443
|
];
|
|
34455
35444
|
|
|
34456
35445
|
// src/content/api/record-sets.ts
|
|
34457
|
-
var
|
|
35446
|
+
var sections64 = [
|
|
34458
35447
|
{
|
|
34459
35448
|
slug: "list-record-sets",
|
|
34460
35449
|
parentSlug: "record-sets",
|
|
@@ -34974,7 +35963,7 @@ var sections62 = [
|
|
|
34974
35963
|
];
|
|
34975
35964
|
|
|
34976
35965
|
// src/content/api/pipelines.ts
|
|
34977
|
-
var
|
|
35966
|
+
var sections65 = [
|
|
34978
35967
|
{
|
|
34979
35968
|
slug: "run-pipeline",
|
|
34980
35969
|
parentSlug: "pipelines",
|
|
@@ -35771,7 +36760,7 @@ var sections63 = [
|
|
|
35771
36760
|
];
|
|
35772
36761
|
|
|
35773
36762
|
// src/content/api/field-reviews.ts
|
|
35774
|
-
var
|
|
36763
|
+
var sections66 = [
|
|
35775
36764
|
{
|
|
35776
36765
|
slug: "list-field-reviews",
|
|
35777
36766
|
parentSlug: "field-reviews",
|
|
@@ -36651,7 +37640,7 @@ dec_uuid_1,a1b2c3d4-e5f6-7890-abcd-ef1234567890,lease_oct.pdf,total_amount,gate,
|
|
|
36651
37640
|
];
|
|
36652
37641
|
|
|
36653
37642
|
// src/content/api/spec-config.ts
|
|
36654
|
-
var
|
|
37643
|
+
var sections67 = [
|
|
36655
37644
|
{
|
|
36656
37645
|
slug: "get-spec-rail",
|
|
36657
37646
|
parentSlug: "spec-config",
|
|
@@ -37663,7 +38652,7 @@ var sections65 = [
|
|
|
37663
38652
|
];
|
|
37664
38653
|
|
|
37665
38654
|
// src/content/api/reconciliation.ts
|
|
37666
|
-
var
|
|
38655
|
+
var sections68 = [
|
|
37667
38656
|
{
|
|
37668
38657
|
slug: "analyze-reconciliation",
|
|
37669
38658
|
parentSlug: "reconciliation",
|
|
@@ -38254,7 +39243,7 @@ var sections66 = [
|
|
|
38254
39243
|
];
|
|
38255
39244
|
|
|
38256
39245
|
// src/content/api/matching-packages.ts
|
|
38257
|
-
var
|
|
39246
|
+
var sections69 = [
|
|
38258
39247
|
{
|
|
38259
39248
|
slug: "create-matching-package-config",
|
|
38260
39249
|
parentSlug: "matching-packages",
|
|
@@ -38932,6 +39921,593 @@ var sections67 = [
|
|
|
38932
39921
|
}
|
|
38933
39922
|
];
|
|
38934
39923
|
|
|
39924
|
+
// src/content/api/ai-policies.ts
|
|
39925
|
+
var sections70 = [
|
|
39926
|
+
{
|
|
39927
|
+
slug: "ai-policy-overview",
|
|
39928
|
+
parentSlug: "ai",
|
|
39929
|
+
title: "AI Policy Overview",
|
|
39930
|
+
seoTitle: "AI Policy API \u2014 Tenant Model Routing Rules \u2014 Talonic Docs",
|
|
39931
|
+
description: "Control which AI providers, regions, and models may process your documents. Read, write, and verify the tenant AI policy through the /v1/ai API surface.",
|
|
39932
|
+
content: [
|
|
39933
|
+
{ type: "paragraph", text: "The AI Policy API puts the answer to \"which models may touch our data\" under the customer's own control. Every AI call the platform makes on a workspace's behalf passes through a routing resolver, and the resolver is governed by the workspace's AI policy: which providers are permitted, which region deployments must live in, and which individual models are denied outright. The `/v1/ai` surface reads that policy, writes it, and proves what it does, all against the live resolver rather than against documentation that can drift." },
|
|
39934
|
+
{ type: "paragraph", text: "The policy separates **mandatory constraints** from **preferences**. `region_pin`, `allowed_providers`, and `denied_models` are hard constraints, enforced at routing time for every call: a deployment outside the pinned region or on a disallowed provider is never a candidate, whatever else the request asks for. Everything else in the policy (default models, substitutions, class overrides, attempt ceilings) is preference: it steers which compliant candidate is chosen but never overrides a mandatory constraint." },
|
|
39935
|
+
{ type: "paragraph", text: '`denied_models` exists because a provider allowlist cannot express "this vendor, but not that one model". A regulated customer often needs exactly that: the provider relationship is approved, one specific model is not. Denial is narrowing only. It removes candidates and never adds one, and it applies to explicitly requested models and to every step of every fallback chain alike, so a denied model cannot re-enter through a substitution or a chain walk.' },
|
|
39936
|
+
{ type: "paragraph", text: "The guarantee the whole feature rests on is that routing **fails closed**. If the policy leaves an operation with no compliant route, the call for that operation fails; it does not silently reach a provider the policy forbids. The satisfiability gate makes this safe to rely on: activating a policy that would strand a registered operation is refused with a 400 that names the stranded operations, so a workspace cannot accidentally activate its way into a broken state. Operations listed in `advisory_warnings` warn but do not block activation." },
|
|
39937
|
+
{ type: "heading", level: 2, id: "ai-policy-classes-operations", text: "Model Classes and Operations" },
|
|
39938
|
+
{ type: "paragraph", text: 'Routing is organized in two layers. An **operation** (for example `extraction` or `classification`) maps to a **model class**, and a class is an ordered chain of models with declared fallback behaviour: `chain` walks the chain until a compliant candidate answers, `primary_only` refuses to substitute. Overriding a class or remapping an operation onto a different class is how a customer says "use this model for this task". The mandatory constraints still apply on top: an override can never route to a model the policy denies or a provider it disallows.' },
|
|
39939
|
+
{ type: "paragraph", text: "Beneath the tenant policy sits the **platform provider floor**, a deployment-level constraint that intersects with the policy and can only narrow it. A workspace cannot widen past the floor, whatever it submits; `constraints.platform_provider_floor` in the policy read shows exactly what the floor is. Self-hosted or customer-operated inference endpoints appear in the catalog as deployments with `custom_endpoint: true`. Deliberately, no endpoint host and no credential detail is ever returned by any route on this surface, and per-tenant endpoint credentials are out of scope by design: endpoints are declared at deployment level." },
|
|
39940
|
+
{ type: "callout", variant: "info", text: "All `/v1/ai` routes require a **workspace-scoped** API key. The workspace is taken from the authenticated key and from nowhere else; no route accepts a customer identifier, so there is no request shape that reads or writes another workspace's policy. A master-view key is rejected with 400 `workspace_scope_required`." },
|
|
39941
|
+
{ type: "heading", level: 2, id: "ai-policy-worked-example", text: "Worked Example: Pinning EU Residency and Denying One Model" },
|
|
39942
|
+
{ type: "paragraph", text: "A customer wants a contractual guarantee: EU region only, one provider, and one specific model excluded even though its provider is allowed. First, dry-run the current state to see what extraction would route to today, pinning the model that is about to be denied." },
|
|
39943
|
+
{
|
|
39944
|
+
type: "code",
|
|
39945
|
+
title: "cURL: 1. Dry-run the model you intend to deny",
|
|
39946
|
+
code: `curl -X POST "https://api.talonic.com/v1/ai/routes:explain" \\
|
|
39947
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
39948
|
+
-H "Content-Type: application/json" \\
|
|
39949
|
+
-d '{"operation_type": "extraction", "model": "claude-opus"}'`
|
|
39950
|
+
},
|
|
39951
|
+
{ type: "paragraph", text: "Then write the policy. `PUT` replaces it wholesale and defaults to activating, so the satisfiability gate binds at this moment: if the combination of region pin, provider allowlist, and denial would strand a registered operation, the write is refused with `policy_unsatisfiable` and nothing is stored. The refusal is the verification; a policy that activates is a policy every gating operation can still route under." },
|
|
39952
|
+
{
|
|
39953
|
+
type: "code",
|
|
39954
|
+
title: "cURL: 2. Activate the residency policy",
|
|
39955
|
+
code: `curl -X PUT "https://api.talonic.com/v1/ai/policy" \\
|
|
39956
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
39957
|
+
-H "Content-Type: application/json" \\
|
|
39958
|
+
-d '{
|
|
39959
|
+
"region_pin": "eu",
|
|
39960
|
+
"allowed_providers": ["bedrock"],
|
|
39961
|
+
"denied_models": ["claude-opus"],
|
|
39962
|
+
"change_reason": "Contractual EU residency"
|
|
39963
|
+
}'`
|
|
39964
|
+
},
|
|
39965
|
+
{ type: "paragraph", text: "Finally, prove the result. Re-run the same dry-run: the denied model now appears under `rejected` with reason `model_denied`, and the candidate chain contains only EU deployments of the allowed provider. Then read `GET /v1/ai/models` for the full picture: every model in the catalog annotated as reachable or not, with the constraint that stopped it. That response, not a policy document, is the evidence of which models can touch the workspace's data." },
|
|
39966
|
+
{
|
|
39967
|
+
type: "code",
|
|
39968
|
+
title: "cURL: 3. Verify the route, then read the catalog",
|
|
39969
|
+
code: `curl -X POST "https://api.talonic.com/v1/ai/routes:explain" \\
|
|
39970
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
39971
|
+
-H "Content-Type: application/json" \\
|
|
39972
|
+
-d '{"operation_type": "extraction"}'
|
|
39973
|
+
|
|
39974
|
+
curl "https://api.talonic.com/v1/ai/models" \\
|
|
39975
|
+
-H "Authorization: Bearer $TALONIC_API_KEY"`
|
|
39976
|
+
},
|
|
39977
|
+
{ type: "callout", variant: "warning", text: 'Only `active` policies are enforced at runtime. A policy saved with `status: "draft"` or `"shadow"` is stored and versioned but does not affect routing, and the resolver keeps answering from the currently active policy (or the platform default when none is active). Submitting a residency constraint and forgetting to activate it means it does not bind.' }
|
|
39978
|
+
],
|
|
39979
|
+
related: [
|
|
39980
|
+
{ label: "Read the Policy", slug: "get-ai-policy" },
|
|
39981
|
+
{ label: "Update the Policy", slug: "update-ai-policy" },
|
|
39982
|
+
{ label: "Explain a Route", slug: "explain-ai-route" },
|
|
39983
|
+
{ label: "Models & Operations", slug: "ai-models-operations" },
|
|
39984
|
+
{ label: "Authentication", slug: "authentication" }
|
|
39985
|
+
],
|
|
39986
|
+
faq: [
|
|
39987
|
+
{ question: "What happens when my policy leaves an operation with no compliant route?", answer: "The call for that operation fails closed: it errors rather than silently reaching a provider the policy forbids. The satisfiability gate prevents most of these states from being activated at all, and operations that are advisory rather than registered can be left unroutable deliberately, for example excluding OCR providers a contract does not cover." },
|
|
39988
|
+
{ question: "Why do I need denied_models when I already have allowed_providers?", answer: `A provider allowlist cannot express "this vendor, but not that one model". denied_models removes individual models from every routing path, including fallback chains and substitutions, while the rest of the provider's catalog stays available. It only ever narrows the candidate set; it can never add a route.` },
|
|
39989
|
+
{ question: "Can I widen my policy beyond what the platform deployment allows?", answer: "No. The platform provider floor is a deployment-level constraint that intersects with the tenant policy and can only narrow it. Whatever a workspace submits, routing never reaches a provider outside the floor. The floor is visible as constraints.platform_provider_floor in the policy read, so there is no hidden constraint to guess at." },
|
|
39990
|
+
{ question: "Does the policy API expose custom endpoint hosts or credentials?", answer: "No, deliberately. Self-hosted or customer-operated inference endpoints appear only as { provider, region, custom_endpoint: true }. Endpoint hosts, credentials, and credential aliases never cross this API boundary, and per-tenant endpoint credentials are out of scope by design: endpoints are declared at deployment level." }
|
|
39991
|
+
],
|
|
39992
|
+
mentions: ["AI policy", "model routing", "data residency", "region pin", "provider allowlist", "model denylist", "fail closed", "EU residency", "compliance"]
|
|
39993
|
+
},
|
|
39994
|
+
{
|
|
39995
|
+
slug: "get-ai-policy",
|
|
39996
|
+
parentSlug: "ai",
|
|
39997
|
+
title: "Read the Policy",
|
|
39998
|
+
seoTitle: "GET /v1/ai/policy \u2014 Effective AI Policy \u2014 Talonic Docs",
|
|
39999
|
+
description: "Read the effective tenant AI policy: mandatory routing constraints, the per-operation class map, resolved defaults, and live satisfiability status in one call.",
|
|
40000
|
+
content: [
|
|
40001
|
+
{ type: "paragraph", text: "`GET /v1/ai/policy` returns the caller's own policy as it is enforced right now: the stored policy document, the mandatory constraints derived from it, the per-operation class map, and a live satisfiability status. It is the single read that answers a compliance review's first three questions at once: what did we configure, what is actually being enforced, and does the configuration currently leave every operation with a route." },
|
|
40002
|
+
{ type: "paragraph", text: "The distinction between `policy` and `constraints` matters. `policy` is the stored document, exactly what was written, including preference fields like `default_models` and `model_substitutions`. `constraints` is the enforced view: the workspace's mandatory constraints folded together with the platform provider floor. When the two disagree, `constraints` is what routing obeys, and `constraints.platform_provider_floor` shows the deployment-level bound the workspace cannot widen past." },
|
|
40003
|
+
{ type: "paragraph", text: "`inherited: true` means the workspace has stored no policy of its own and runs on the platform default. The `operation_classes` map shows, for every operation type, the class it resolves to, where that mapping came from (`builtin`, `platform`, or `org`), and whether the workspace overrode it. The `status` block is evaluated live: `satisfiable` reports whether every registered operation currently has a compliant route, `unroutable_operations` names the ones that do not, and `advisory_warnings` names operations that are unroutable but only warn." },
|
|
40004
|
+
{
|
|
40005
|
+
type: "endpoint",
|
|
40006
|
+
method: "GET",
|
|
40007
|
+
path: "/v1/ai/policy",
|
|
40008
|
+
summary: "Get the effective AI policy.",
|
|
40009
|
+
description: "Requires the read scope and a workspace-scoped API key. Takes no parameters; the workspace is taken from the authenticated key and from nowhere else.",
|
|
40010
|
+
blocks: [
|
|
40011
|
+
{
|
|
40012
|
+
type: "param-table",
|
|
40013
|
+
title: "Response fields",
|
|
40014
|
+
params: [
|
|
40015
|
+
{ name: "policy", type: "object", description: "The stored policy document: version, status, region_pin, allowed_providers, denied_models, model_substitutions, default_models, max_attempts, model_classes, operation_classes, features. Unset fields are null." },
|
|
40016
|
+
{ name: "inherited", type: "boolean", description: "True when the workspace has no stored policy and runs on the platform default." },
|
|
40017
|
+
{ name: "constraints", type: "object", description: "The enforced mandatory constraints: region_pin, allowed_providers, denied_models, and platform_provider_floor (the deployment-level bound the tenant policy can only narrow, never widen)." },
|
|
40018
|
+
{ name: "operation_classes", type: "object", description: "Per operation type: { class, source, overridden }. source is builtin, platform, or org; overridden is true when the workspace remapped the operation." },
|
|
40019
|
+
{ name: "status.satisfiable", type: "boolean", description: "Whether every registered operation currently has a compliant route under this policy." },
|
|
40020
|
+
{ name: "status.unroutable_operations", type: "string[]", description: "Registered operations with no compliant route. Non-empty only when satisfiable is false." },
|
|
40021
|
+
{ name: "status.advisory_warnings", type: "string[]", description: "Advisory operations with no compliant route. These warn but never block activation." }
|
|
40022
|
+
]
|
|
40023
|
+
}
|
|
40024
|
+
]
|
|
40025
|
+
},
|
|
40026
|
+
{
|
|
40027
|
+
type: "code",
|
|
40028
|
+
title: "cURL: Read the policy",
|
|
40029
|
+
code: `curl "https://api.talonic.com/v1/ai/policy" \\
|
|
40030
|
+
-H "Authorization: Bearer $TALONIC_API_KEY"`
|
|
40031
|
+
},
|
|
40032
|
+
{
|
|
40033
|
+
type: "code",
|
|
40034
|
+
title: "Response: Effective policy",
|
|
40035
|
+
code: `{
|
|
40036
|
+
"policy": {
|
|
40037
|
+
"version": 4,
|
|
40038
|
+
"status": "active",
|
|
40039
|
+
"region_pin": "eu",
|
|
40040
|
+
"allowed_providers": ["bedrock"],
|
|
40041
|
+
"denied_models": ["claude-opus"],
|
|
40042
|
+
"model_substitutions": null,
|
|
40043
|
+
"default_models": null,
|
|
40044
|
+
"max_attempts": null,
|
|
40045
|
+
"model_classes": null,
|
|
40046
|
+
"operation_classes": { "extraction": "complex" },
|
|
40047
|
+
"features": null
|
|
40048
|
+
},
|
|
40049
|
+
"inherited": false,
|
|
40050
|
+
"constraints": {
|
|
40051
|
+
"region_pin": "eu",
|
|
40052
|
+
"allowed_providers": ["bedrock"],
|
|
40053
|
+
"denied_models": ["claude-opus"],
|
|
40054
|
+
"platform_provider_floor": ["bedrock"]
|
|
40055
|
+
},
|
|
40056
|
+
"operation_classes": {
|
|
40057
|
+
"extraction": { "class": "complex", "source": "org", "overridden": true }
|
|
40058
|
+
},
|
|
40059
|
+
"status": {
|
|
40060
|
+
"satisfiable": true,
|
|
40061
|
+
"unroutable_operations": [],
|
|
40062
|
+
"advisory_warnings": ["document_ocr"]
|
|
40063
|
+
}
|
|
40064
|
+
}`
|
|
40065
|
+
},
|
|
40066
|
+
{ type: "callout", variant: "info", text: "Every successful write (`PUT` or `PATCH`) echoes this exact body after a `saved` field, so a writer never needs a follow-up read to learn what the policy became. The `status` block in the write response is the post-write satisfiability, evaluated against what was actually stored." },
|
|
40067
|
+
{ type: "paragraph", text: "A non-empty `advisory_warnings` is informational, not an error state. In the example above, the EU pin on one provider leaves `document_ocr` without a compliant route; because OCR is advisory rather than registered, the policy still activates, and OCR calls in that workspace fail closed until the policy widens. This is a legitimate configuration for a customer whose contract covers extraction but not a third-party OCR provider." }
|
|
40068
|
+
],
|
|
40069
|
+
related: [
|
|
40070
|
+
{ label: "AI Policy Overview", slug: "ai-policy-overview" },
|
|
40071
|
+
{ label: "Update the Policy", slug: "update-ai-policy" },
|
|
40072
|
+
{ label: "Policy History", slug: "ai-policy-history" },
|
|
40073
|
+
{ label: "Models & Operations", slug: "ai-models-operations" }
|
|
40074
|
+
],
|
|
40075
|
+
faq: [
|
|
40076
|
+
{ question: "What does inherited: true mean?", answer: "The workspace has never stored a policy of its own and runs on the platform default. The constraints and operation_classes in the response still describe what is enforced; they are simply derived from the default rather than from a workspace-stored document. The first successful write flips inherited to false." },
|
|
40077
|
+
{ question: "Why do policy and constraints both list region_pin and denied_models?", answer: "policy is the stored document as written; constraints is the enforced view after intersecting with the platform provider floor. Routing obeys constraints. Reading both side by side shows whether the platform floor narrowed anything beyond what the workspace itself configured." },
|
|
40078
|
+
{ question: "Why is my key rejected with workspace_scope_required?", answer: "Every /v1/ai route acts on exactly one workspace, taken from the authenticated key. A master-view key spans every workspace, so it has no single policy to read and no workspace to write, and is rejected with 400 workspace_scope_required rather than defaulted to one." }
|
|
40079
|
+
],
|
|
40080
|
+
mentions: ["AI policy", "effective policy", "constraints", "platform provider floor", "satisfiability", "operation classes", "inherited policy"]
|
|
40081
|
+
},
|
|
40082
|
+
{
|
|
40083
|
+
slug: "update-ai-policy",
|
|
40084
|
+
parentSlug: "ai",
|
|
40085
|
+
title: "Update the Policy",
|
|
40086
|
+
seoTitle: "Update AI Policy \u2014 PUT & PATCH /v1/ai/policy \u2014 Talonic Docs",
|
|
40087
|
+
description: "Replace or partially update the tenant AI policy. PUT clears omitted fields, PATCH preserves them, and the satisfiability gate refuses activations that strand operations.",
|
|
40088
|
+
content: [
|
|
40089
|
+
{ type: "paragraph", text: "Two write routes share one body shape and one guarantee. `PUT /v1/ai/policy` replaces the policy wholesale: every field is optional in the body, but an omitted field is **cleared**, which makes PUT the right route when the policy is generated from the customer's own source of truth and the submitted document should be the whole truth. `PATCH /v1/ai/policy` updates partially: omitted fields keep their current value, and inside the override maps omitted keys survive too." },
|
|
40090
|
+
{ type: "paragraph", text: 'The PATCH merge rule extends into the maps. `model_substitutions`, `default_models`, `model_classes`, `operation_classes`, and `features` are override maps; a PATCH that sends `{"operation_classes": {"extraction": "complex"}}` changes only the `extraction` entry and leaves every other override in place. Sending `null` as a map value removes that single override and restores the platform default for it. On PUT there is nothing to merge: the submitted maps replace the stored ones entirely, and an omitted map clears all of its overrides.' },
|
|
40091
|
+
{ type: "paragraph", text: "Both routes default to activating. `status` falls back to `active` on PUT (and to the policy's current status on PATCH), and activation runs the **satisfiability gate**: a policy that would leave a registered operation with no compliant route is refused with 400 `policy_unsatisfiable`, the response names the stranded operations, and nothing is stored. `draft` and `shadow` are stored without taking effect; only `active` policies are enforced at routing time. `change_reason` (up to 200 characters) is recorded on the stored version and surfaces in the audit trail, so a residency change stays attributable to an intent, not just to a key." },
|
|
40092
|
+
{ type: "callout", variant: "warning", text: "Naming asymmetry, by design: top-level request fields are snake_case (`region_pin`, `denied_models`, `model_classes`), but values INSIDE `model_classes` use camelCase (`chain`, `requiredCapabilities`, `fallback`), and `features` keys are camelCase too (`dataCapture`, `markdownExtraction`, `assetVision`, `assetAnnotation`, `classificationEscalation`, `richSummary`, `documentClassification`). Those inner shapes pass straight to the shared policy validator, which one validator both the public API and the admin console use. A snake_case key inside `model_classes` or `features` is rejected as invalid, not silently ignored." },
|
|
40093
|
+
{
|
|
40094
|
+
type: "endpoint",
|
|
40095
|
+
method: "PUT",
|
|
40096
|
+
path: "/v1/ai/policy",
|
|
40097
|
+
summary: "Replace the policy wholesale. Omitted fields are cleared.",
|
|
40098
|
+
description: "Requires the write scope. Defaults to status: active, so the satisfiability gate binds on the write.",
|
|
40099
|
+
blocks: [
|
|
40100
|
+
{
|
|
40101
|
+
type: "param-table",
|
|
40102
|
+
title: "Body fields (all optional)",
|
|
40103
|
+
params: [
|
|
40104
|
+
{ name: "region_pin", type: "string | null", description: "Hard residency constraint: us or eu. A deployment in any other region is rejected, including globally-routed ones, so residency is never approximated." },
|
|
40105
|
+
{ name: "allowed_providers", type: "string[] | null", description: "Providers permitted to process this workspace's data: anthropic, bedrock, foundry, openai, azure-openai, google, mistral, local. Null means every provider the platform permits." },
|
|
40106
|
+
{ name: "denied_models", type: "string[] | null", description: "Models this workspace may never be routed to, whatever else permits them. Each entry must exist in the model catalog." },
|
|
40107
|
+
{ name: "model_substitutions", type: "object", description: 'Remap one model onto another wherever the first would be chosen, for example {"claude-opus": "claude-sonnet"}. The substitute is still subject to every mandatory constraint.' },
|
|
40108
|
+
{ name: "default_models", type: "object", description: "Preferred model per speed tier where no class governs the call. Keys are fast, default, powerful." },
|
|
40109
|
+
{ name: "max_attempts", type: "integer", description: "Ceiling on provider attempts for one logical call. 1 to 8." },
|
|
40110
|
+
{ name: "model_classes", type: "object", description: "Named model lineage overrides. Values are camelCase: { description, chain: [{ model, deployments: [{ provider, region }] }], requiredCapabilities, fallback }. fallback is chain or primary_only." },
|
|
40111
|
+
{ name: "operation_classes", type: "object", description: 'Per-operation class overrides keyed by operation type, for example {"extraction": "standard"}.' },
|
|
40112
|
+
{ name: "features", type: "object", description: "Feature toggles with camelCase keys mapped to booleans. Absent toggles stay on." },
|
|
40113
|
+
{ name: "status", type: "string", description: "draft, shadow, or active. Only active is enforced at runtime.", default: "active" },
|
|
40114
|
+
{ name: "change_reason", type: "string", description: "Why this change is being made, up to 200 characters. Recorded on the stored version." }
|
|
40115
|
+
]
|
|
40116
|
+
}
|
|
40117
|
+
]
|
|
40118
|
+
},
|
|
40119
|
+
{
|
|
40120
|
+
type: "endpoint",
|
|
40121
|
+
method: "PATCH",
|
|
40122
|
+
path: "/v1/ai/policy",
|
|
40123
|
+
summary: "Update part of the policy. Omitted fields and omitted map keys survive.",
|
|
40124
|
+
description: "Requires the write scope. Same body fields as PUT; a null map value removes that single override. status defaults to the policy's current status.",
|
|
40125
|
+
blocks: []
|
|
40126
|
+
},
|
|
40127
|
+
{
|
|
40128
|
+
type: "code",
|
|
40129
|
+
title: "cURL: PATCH one override away, deny one model",
|
|
40130
|
+
code: `curl -X PATCH "https://api.talonic.com/v1/ai/policy" \\
|
|
40131
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
40132
|
+
-H "Content-Type: application/json" \\
|
|
40133
|
+
-d '{
|
|
40134
|
+
"denied_models": ["claude-opus"],
|
|
40135
|
+
"operation_classes": { "extraction": null },
|
|
40136
|
+
"change_reason": "Deny one model, drop the extraction class override"
|
|
40137
|
+
}'`
|
|
40138
|
+
},
|
|
40139
|
+
{
|
|
40140
|
+
type: "code",
|
|
40141
|
+
title: "Response: Saved version plus the effective view",
|
|
40142
|
+
code: `{
|
|
40143
|
+
"saved": { "version": 7, "status": "active" },
|
|
40144
|
+
"policy": { "version": 7, "status": "active", "region_pin": "eu", "...": "..." },
|
|
40145
|
+
"inherited": false,
|
|
40146
|
+
"constraints": {
|
|
40147
|
+
"region_pin": "eu",
|
|
40148
|
+
"allowed_providers": ["bedrock"],
|
|
40149
|
+
"denied_models": ["claude-opus"],
|
|
40150
|
+
"platform_provider_floor": ["bedrock"]
|
|
40151
|
+
},
|
|
40152
|
+
"operation_classes": {
|
|
40153
|
+
"extraction": { "class": "standard", "source": "builtin", "overridden": false }
|
|
40154
|
+
},
|
|
40155
|
+
"status": {
|
|
40156
|
+
"satisfiable": true,
|
|
40157
|
+
"unroutable_operations": [],
|
|
40158
|
+
"advisory_warnings": ["document_ocr"]
|
|
40159
|
+
}
|
|
40160
|
+
}`
|
|
40161
|
+
},
|
|
40162
|
+
{ type: "heading", level: 2, id: "update-ai-policy-errors", text: "Write Errors" },
|
|
40163
|
+
{ type: "paragraph", text: "A refused write stores nothing; the current policy stays exactly as it was. `policy_unsatisfiable` means activation would strand registered operations, and the response lists them in `unroutable_operations` alongside `advisory_warnings`, so the fix (widen the providers, the region pin, or the denials) can be targeted rather than guessed. `invalid_policy` means the shape is wrong or a referenced model or class does not exist in the catalog. `workspace_scope_required` means the key is not scoped to a single workspace." },
|
|
40164
|
+
{
|
|
40165
|
+
type: "code",
|
|
40166
|
+
title: "Response: 400 policy_unsatisfiable",
|
|
40167
|
+
code: `{
|
|
40168
|
+
"error": "policy_unsatisfiable",
|
|
40169
|
+
"message": "This policy leaves 2 operations with no compliant route: extraction, classification. Widen the allowed providers, the region pin, or the denied models, then submit again.",
|
|
40170
|
+
"unroutable_operations": ["extraction", "classification"],
|
|
40171
|
+
"advisory_warnings": ["document_ocr"]
|
|
40172
|
+
}`
|
|
40173
|
+
}
|
|
40174
|
+
],
|
|
40175
|
+
related: [
|
|
40176
|
+
{ label: "AI Policy Overview", slug: "ai-policy-overview" },
|
|
40177
|
+
{ label: "Read the Policy", slug: "get-ai-policy" },
|
|
40178
|
+
{ label: "Explain a Route", slug: "explain-ai-route" },
|
|
40179
|
+
{ label: "Policy History", slug: "ai-policy-history" },
|
|
40180
|
+
{ label: "Error Format", slug: "error-format" }
|
|
40181
|
+
],
|
|
40182
|
+
faq: [
|
|
40183
|
+
{ question: "When should I use PUT and when PATCH?", answer: "Use PUT when the submitted document should be the whole policy, for example when it is generated from your own compliance source of truth: omitted fields are cleared, so nothing stale survives. Use PATCH to change one field or one override while keeping everything else, including override-map keys you did not resend." },
|
|
40184
|
+
{ question: "How do I remove a single override without touching the rest?", answer: 'PATCH with null as the map value, for example {"operation_classes": {"extraction": null}}. That removes only the extraction override and restores the platform default for it; every other override in the map survives. On PUT the same effect comes from omitting the key from the submitted map.' },
|
|
40185
|
+
{ question: "Why was my write refused with policy_unsatisfiable?", answer: "Activating the submitted policy would leave at least one registered operation with no compliant route, and the platform refuses to store a policy that would make the workspace's next document fail. The response names the stranded operations. Widen the allowed providers, the region pin, or the denied models, or save as draft while iterating." },
|
|
40186
|
+
{ question: "Why are some keys camelCase inside an otherwise snake_case body?", answer: "Values inside model_classes (chain, requiredCapabilities, fallback) and the keys of features pass straight through to the shared policy validator, the same one the admin console uses, so one validator defines what a legal policy is. The top-level wire fields are snake_case like the rest of the public API; the inner shapes keep the validator's casing." }
|
|
40187
|
+
],
|
|
40188
|
+
mentions: ["PUT policy", "PATCH policy", "satisfiability gate", "policy_unsatisfiable", "invalid_policy", "change_reason", "draft shadow active", "override maps"]
|
|
40189
|
+
},
|
|
40190
|
+
{
|
|
40191
|
+
slug: "ai-models-operations",
|
|
40192
|
+
parentSlug: "ai",
|
|
40193
|
+
title: "Models & Operations",
|
|
40194
|
+
seoTitle: "AI Models & Operations Catalog \u2014 /v1/ai \u2014 Talonic Docs",
|
|
40195
|
+
description: "List every model, model class, and operation with live reachability under your AI policy: provider, region, gating, and the exact constraint blocking each route.",
|
|
40196
|
+
content: [
|
|
40197
|
+
{ type: "paragraph", text: 'Two read-only catalogs answer "what exists and what can we reach". `GET /v1/ai/models` returns every model and model class the platform knows, annotated per deployment with provider, region, and whether this workspace can reach it under the live policy; when it cannot, `reason` names the constraint that stopped it. `GET /v1/ai/operations` returns every operation type the platform runs, the class each resolves to for this workspace, whether the workspace overrode it, and whether it currently has a route.' },
|
|
40198
|
+
{ type: "paragraph", text: 'The `reason` vocabulary is shared across both catalogs and the route explainer: `allowed` (reachable), `model_denied` (removed by `denied_models`), `provider_floor` (excluded by the platform deployment floor), `provider_not_allowed` (excluded by `allowed_providers`), and `region_not_permitted` (excluded by `region_pin`). Because each entry carries the specific constraint, an unreachable model is diagnosable in one read: the answer to "why can we not use this model" is in the row, not in a support ticket.' },
|
|
40199
|
+
{ type: "paragraph", text: "Classes carry a `source`: `builtin` (defined by the platform), `platform` (defined at deployment level), or `org` (overridden by this workspace). A class is reachable when its chain still contains at least one reachable step under the current constraints. Deployments with `custom_endpoint: true` are self-hosted or customer-operated inference endpoints; they participate in reachability like any other deployment, and no host or credential detail is returned for them, by design." },
|
|
40200
|
+
{
|
|
40201
|
+
type: "endpoint",
|
|
40202
|
+
method: "GET",
|
|
40203
|
+
path: "/v1/ai/models",
|
|
40204
|
+
summary: "Every model and class, annotated with reachability under the live policy.",
|
|
40205
|
+
description: "Requires the read scope and a workspace-scoped key. Takes no parameters.",
|
|
40206
|
+
blocks: [
|
|
40207
|
+
{
|
|
40208
|
+
type: "param-table",
|
|
40209
|
+
title: "Response fields",
|
|
40210
|
+
params: [
|
|
40211
|
+
{ name: "models[]", type: "array", description: "Per model: model, tier, capabilities, reachable, reason, and deployments[] each carrying provider, region, custom_endpoint, reachable, reason." },
|
|
40212
|
+
{ name: "classes[]", type: "array", description: "Per class: name, description, source (builtin | platform | org), required_capabilities, fallback (chain | primary_only), chain[] with per-step reachability, and an overall reachable flag." },
|
|
40213
|
+
{ name: "constraints", type: "object", description: "The enforced constraints the annotations were computed against, including platform_provider_floor." },
|
|
40214
|
+
{ name: "counts", type: "object", description: "total models known and how many are reachable for this workspace." }
|
|
40215
|
+
]
|
|
40216
|
+
}
|
|
40217
|
+
]
|
|
40218
|
+
},
|
|
40219
|
+
{
|
|
40220
|
+
type: "code",
|
|
40221
|
+
title: "Response: Model catalog (excerpt)",
|
|
40222
|
+
code: `{
|
|
40223
|
+
"models": [
|
|
40224
|
+
{
|
|
40225
|
+
"model": "claude-sonnet",
|
|
40226
|
+
"tier": "default",
|
|
40227
|
+
"capabilities": ["generate", "tool_use"],
|
|
40228
|
+
"reachable": true,
|
|
40229
|
+
"reason": "allowed",
|
|
40230
|
+
"deployments": [
|
|
40231
|
+
{ "provider": "bedrock", "region": "eu", "custom_endpoint": false, "reachable": true, "reason": "allowed" }
|
|
40232
|
+
]
|
|
40233
|
+
}
|
|
40234
|
+
],
|
|
40235
|
+
"classes": [
|
|
40236
|
+
{
|
|
40237
|
+
"name": "standard",
|
|
40238
|
+
"description": "General-purpose extraction lineage",
|
|
40239
|
+
"source": "builtin",
|
|
40240
|
+
"required_capabilities": [],
|
|
40241
|
+
"fallback": "chain",
|
|
40242
|
+
"chain": [
|
|
40243
|
+
{ "model": "claude-sonnet", "reachable": true, "reason": "allowed" }
|
|
40244
|
+
],
|
|
40245
|
+
"reachable": true
|
|
40246
|
+
}
|
|
40247
|
+
],
|
|
40248
|
+
"constraints": {
|
|
40249
|
+
"region_pin": "eu",
|
|
40250
|
+
"allowed_providers": ["bedrock"],
|
|
40251
|
+
"denied_models": ["claude-opus"],
|
|
40252
|
+
"platform_provider_floor": ["bedrock"]
|
|
40253
|
+
},
|
|
40254
|
+
"counts": { "total": 18, "reachable": 9 }
|
|
40255
|
+
}`
|
|
40256
|
+
},
|
|
40257
|
+
{
|
|
40258
|
+
type: "endpoint",
|
|
40259
|
+
method: "GET",
|
|
40260
|
+
path: "/v1/ai/operations",
|
|
40261
|
+
summary: "The operation catalog: class, override state, gating, routability.",
|
|
40262
|
+
description: "Requires the read scope and a workspace-scoped key. Takes no parameters.",
|
|
40263
|
+
blocks: [
|
|
40264
|
+
{
|
|
40265
|
+
type: "param-table",
|
|
40266
|
+
title: "Response fields",
|
|
40267
|
+
params: [
|
|
40268
|
+
{ name: "operations[].operation_type", type: "string", description: "The operation, for example extraction or document_ocr. Sorted alphabetically." },
|
|
40269
|
+
{ name: "operations[].class", type: "string", description: "The model class this operation resolves to for this workspace." },
|
|
40270
|
+
{ name: "operations[].source", type: "string", description: "Where the mapping came from: builtin, platform, or org." },
|
|
40271
|
+
{ name: "operations[].overridden", type: "boolean", description: "True when the workspace remapped this operation (source is org)." },
|
|
40272
|
+
{ name: "operations[].gating", type: "string", description: "registered (blocks policy activation when unroutable), advisory (warns only), or none (not swept; routable is null)." },
|
|
40273
|
+
{ name: "operations[].routable", type: "boolean | null", description: "Whether a compliant route currently exists. Null for gating: none, since those operations are not probed." },
|
|
40274
|
+
{ name: "operations[].reason", type: "string", description: "Present only when routable is false: why no route exists, for example no_compliant_route." },
|
|
40275
|
+
{ name: "counts", type: "object", description: "total, overridden, registered, advisory." }
|
|
40276
|
+
]
|
|
40277
|
+
}
|
|
40278
|
+
]
|
|
40279
|
+
},
|
|
40280
|
+
{
|
|
40281
|
+
type: "code",
|
|
40282
|
+
title: "Response: Operation catalog (excerpt)",
|
|
40283
|
+
code: `{
|
|
40284
|
+
"operations": [
|
|
40285
|
+
{
|
|
40286
|
+
"operation_type": "document_ocr",
|
|
40287
|
+
"class": "ocr",
|
|
40288
|
+
"source": "builtin",
|
|
40289
|
+
"overridden": false,
|
|
40290
|
+
"gating": "advisory",
|
|
40291
|
+
"routable": false,
|
|
40292
|
+
"reason": "no_compliant_route"
|
|
40293
|
+
},
|
|
40294
|
+
{
|
|
40295
|
+
"operation_type": "extraction",
|
|
40296
|
+
"class": "standard",
|
|
40297
|
+
"source": "builtin",
|
|
40298
|
+
"overridden": false,
|
|
40299
|
+
"gating": "registered",
|
|
40300
|
+
"routable": true
|
|
40301
|
+
}
|
|
40302
|
+
],
|
|
40303
|
+
"counts": { "total": 60, "overridden": 1, "registered": 8, "advisory": 1 }
|
|
40304
|
+
}`
|
|
40305
|
+
},
|
|
40306
|
+
{ type: "callout", variant: "info", text: "The `gating` field explains the satisfiability gate's behaviour operation by operation. A `registered` operation losing its route blocks activation; an `advisory` one only produces a warning in `advisory_warnings`; a `none` operation is not swept at all, so its `routable` is null rather than a claim about a check that never ran." },
|
|
40307
|
+
{ type: "paragraph", text: "Read these two catalogs together when designing a policy change. The operations list shows which operations are registered and would therefore block an activation; the models list shows which candidates each constraint removes. A planned constraint that turns every chain step of a registered operation's class unreachable is exactly the change the satisfiability gate will refuse." }
|
|
40308
|
+
],
|
|
40309
|
+
related: [
|
|
40310
|
+
{ label: "AI Policy Overview", slug: "ai-policy-overview" },
|
|
40311
|
+
{ label: "Read the Policy", slug: "get-ai-policy" },
|
|
40312
|
+
{ label: "Explain a Route", slug: "explain-ai-route" },
|
|
40313
|
+
{ label: "Update the Policy", slug: "update-ai-policy" }
|
|
40314
|
+
],
|
|
40315
|
+
faq: [
|
|
40316
|
+
{ question: "What do the reason codes mean?", answer: "allowed means the model or deployment is reachable. model_denied means denied_models removed it. provider_not_allowed means allowed_providers excluded its provider. region_not_permitted means the region pin excluded its region. provider_floor means the platform deployment floor excluded it before the tenant policy was even considered." },
|
|
40317
|
+
{ question: "Why does routable show null for some operations?", answer: "Operations with gating: none are not swept by the satisfiability probe, so the API reports null rather than implying a check that never ran. Only registered and advisory operations are probed; registered ones gate activation and advisory ones warn." },
|
|
40318
|
+
{ question: "What is a custom endpoint in the deployments list?", answer: "A self-hosted or customer-operated inference endpoint, declared at deployment level and marked custom_endpoint: true. It participates in routing and reachability like any other deployment. No endpoint host and no credential detail is ever returned through this API, and per-tenant endpoint credentials are out of scope by design." }
|
|
40319
|
+
],
|
|
40320
|
+
mentions: ["model catalog", "model classes", "operation catalog", "reachability", "reason codes", "gating", "custom endpoints", "fallback chain"]
|
|
40321
|
+
},
|
|
40322
|
+
{
|
|
40323
|
+
slug: "explain-ai-route",
|
|
40324
|
+
parentSlug: "ai",
|
|
40325
|
+
title: "Explain a Route",
|
|
40326
|
+
seoTitle: "POST /v1/ai/routes:explain \u2014 Route Dry Run \u2014 Talonic Docs",
|
|
40327
|
+
description: "Dry-run a routing decision through the live resolver: get the ordered candidate chain an operation would use, or a fail-closed explanation, without spending a model call.",
|
|
40328
|
+
content: [
|
|
40329
|
+
{ type: "paragraph", text: '`POST /v1/ai/routes:explain` answers "what would this operation route to right now" without spending a model call. The question runs through the same resolver that serves live traffic, so the answer is evidence rather than a forecast: the ordered candidate chain that would serve the operation, and every candidate the policy discarded, each with the constraint that discarded it. For a compliance review, the `rejected` list is often the more valuable half, because it shows the policy actively removing what it is supposed to remove.' },
|
|
40330
|
+
{ type: "paragraph", text: "The request names an `operation_type` and may pin a `model` or a `class`. Unpinned, the resolver uses the operation's effective class and walks its chain. Pinning a model asks \"could we be routed to this model for this operation\", which is the direct way to verify a denial: a denied model appears under `rejected` with reason `model_denied` no matter what else would have permitted it. `fallback_scope` in the response reports how far fallback may reach for this plan, for example `class_chain` when the class's whole chain is in play." },
|
|
40331
|
+
{ type: "paragraph", text: "When the policy permits no route, the response is still a success (the endpoint returns **201** on every answered question) with `routable: false`, a `reason` code, and a plain-language `message`. This is deliberate: a policy that permits no route is a valid configuration whose consequence is that the live call fails closed. The dry run reports that consequence honestly instead of dressing it up as a client error." },
|
|
40332
|
+
{
|
|
40333
|
+
type: "endpoint",
|
|
40334
|
+
method: "POST",
|
|
40335
|
+
path: "/v1/ai/routes:explain",
|
|
40336
|
+
summary: "Dry-run a routing decision through the live resolver.",
|
|
40337
|
+
description: "Requires the read scope and a workspace-scoped key. Returns 201 with the plan, or with a fail-closed explanation when nothing is routable.",
|
|
40338
|
+
blocks: [
|
|
40339
|
+
{
|
|
40340
|
+
type: "param-table",
|
|
40341
|
+
title: "Body fields",
|
|
40342
|
+
params: [
|
|
40343
|
+
{ name: "operation_type", type: "string", required: true, description: "The operation to route, for example extraction or classification." },
|
|
40344
|
+
{ name: "model", type: "string", description: "Optional. Pin a specific logical model instead of letting the operation's class choose." },
|
|
40345
|
+
{ name: "class", type: "string", description: "Optional. Pin a specific model class instead of the operation's mapped one." }
|
|
40346
|
+
]
|
|
40347
|
+
}
|
|
40348
|
+
]
|
|
40349
|
+
},
|
|
40350
|
+
{
|
|
40351
|
+
type: "code",
|
|
40352
|
+
title: "cURL: Explain the extraction route",
|
|
40353
|
+
code: `curl -X POST "https://api.talonic.com/v1/ai/routes:explain" \\
|
|
40354
|
+
-H "Authorization: Bearer $TALONIC_API_KEY" \\
|
|
40355
|
+
-H "Content-Type: application/json" \\
|
|
40356
|
+
-d '{"operation_type": "extraction", "model": "claude-sonnet", "class": "standard"}'`
|
|
40357
|
+
},
|
|
40358
|
+
{
|
|
40359
|
+
type: "code",
|
|
40360
|
+
title: "Response: 201 Routable plan",
|
|
40361
|
+
code: `{
|
|
40362
|
+
"operation_type": "extraction",
|
|
40363
|
+
"routable": true,
|
|
40364
|
+
"class": "standard",
|
|
40365
|
+
"fallback_scope": "class_chain",
|
|
40366
|
+
"candidates": [
|
|
40367
|
+
{ "model": "claude-sonnet", "provider": "bedrock", "region": "eu", "custom_endpoint": false }
|
|
40368
|
+
],
|
|
40369
|
+
"rejected": [
|
|
40370
|
+
{ "model": "gpt-balanced", "provider": "openai", "region": "global", "reason": "provider_not_allowed" }
|
|
40371
|
+
]
|
|
40372
|
+
}`
|
|
40373
|
+
},
|
|
40374
|
+
{
|
|
40375
|
+
type: "code",
|
|
40376
|
+
title: "Response: 201 Fail-closed explanation",
|
|
40377
|
+
code: `{
|
|
40378
|
+
"operation_type": "document_ocr",
|
|
40379
|
+
"routable": false,
|
|
40380
|
+
"reason": "no_compliant_route",
|
|
40381
|
+
"message": "No route satisfies this workspace policy for this operation, so the call fails closed rather than reaching a provider the policy does not permit.",
|
|
40382
|
+
"candidates": [],
|
|
40383
|
+
"rejected": [
|
|
40384
|
+
{ "model": "mistral-ocr", "provider": "mistral", "region": "global", "reason": "provider_not_allowed" }
|
|
40385
|
+
]
|
|
40386
|
+
}`
|
|
40387
|
+
},
|
|
40388
|
+
{ type: "callout", variant: "info", text: "The explainer evaluates the policy that is live right now, which for routing purposes is the active one. Use it immediately after activating a change to confirm the change did what was intended, and periodically as standing evidence: the response is produced by the production resolver, so it cannot drift from what production does." },
|
|
40389
|
+
{ type: "paragraph", text: "`candidates` is ordered: the first entry is what a live call would try first, and later entries are the fallback order under the reported `fallback_scope`. Every candidate carries only `model`, `provider`, `region`, and `custom_endpoint`; wire-level model identifiers, endpoint hosts, and credentials never appear. That projection is the same one every route on this surface applies, so nothing about the platform's infrastructure crosses the API boundary through a dry run either." }
|
|
40390
|
+
],
|
|
40391
|
+
related: [
|
|
40392
|
+
{ label: "AI Policy Overview", slug: "ai-policy-overview" },
|
|
40393
|
+
{ label: "Models & Operations", slug: "ai-models-operations" },
|
|
40394
|
+
{ label: "Update the Policy", slug: "update-ai-policy" },
|
|
40395
|
+
{ label: "Read the Policy", slug: "get-ai-policy" }
|
|
40396
|
+
],
|
|
40397
|
+
faq: [
|
|
40398
|
+
{ question: "Does routes:explain cost a model call or credits?", answer: "No. It is a dry run through the routing resolver only; no provider is contacted and no model call is made. It is safe to call as often as verification requires, subject to normal API rate limits." },
|
|
40399
|
+
{ question: "Why does an unroutable operation return 201 instead of an error?", answer: 'Because the question was answered. A policy that permits no route is a valid configuration, and its consequence, the call failing closed, is reported as routable: false with a reason and a plain-language message. A 4xx is reserved for malformed requests, not for policies whose honest answer is "nothing routes".' },
|
|
40400
|
+
{ question: "Is the answer guaranteed to match live routing?", answer: "The plan is computed by the same resolver that serves live traffic, against the same live policy and catalog, so it is evidence of what would happen at that moment. A subsequent policy change, catalog change, or platform floor change changes the answer; re-run the explainer after any of those to refresh the evidence." }
|
|
40401
|
+
],
|
|
40402
|
+
mentions: ["routes:explain", "route dry run", "candidate chain", "rejected candidates", "fallback scope", "fail closed", "no_compliant_route", "routing evidence"]
|
|
40403
|
+
},
|
|
40404
|
+
{
|
|
40405
|
+
slug: "ai-policy-history",
|
|
40406
|
+
parentSlug: "ai",
|
|
40407
|
+
title: "Policy History",
|
|
40408
|
+
seoTitle: "AI Policy History API \u2014 Version Trail \u2014 Talonic Docs",
|
|
40409
|
+
description: "Read the version history of your tenant AI policy: every stored version newest first, its lifecycle status, and exactly which fields each version changed.",
|
|
40410
|
+
content: [
|
|
40411
|
+
{ type: "paragraph", text: '`GET /v1/ai/policy/history` returns the version history of the caller\'s own policy, newest first. Each entry carries the version number, the lifecycle status it was saved under, a `changed` array naming the fields that differ from the previous version, and the full stored policy document for that version. Together with `change_reason` recorded at write time, this is the audit trail for "who allowed what, and when": every residency change, every denial, every override is a version.' },
|
|
40412
|
+
{ type: "paragraph", text: "The `changed` array is computed against the immediately preceding version, so scanning the list top to bottom reads as a change log without diffing the documents yourself. The first stored version reports its set fields as changed relative to nothing. Versions saved as `draft` or `shadow` appear in the history like any other; the `status` on each entry shows which versions ever bound and which were staged without taking effect." },
|
|
40413
|
+
{ type: "paragraph", text: 'Only versions this workspace stored appear. A workspace that has always run on the inherited platform default has no versions of its own and reads as an empty list with `total: 0`, which is the honest answer to "what have we changed": nothing. The platform default itself is not a version of the workspace\'s policy and is not replayed into its history.' },
|
|
40414
|
+
{
|
|
40415
|
+
type: "endpoint",
|
|
40416
|
+
method: "GET",
|
|
40417
|
+
path: "/v1/ai/policy/history",
|
|
40418
|
+
summary: "Version history of the caller's own policy, newest first.",
|
|
40419
|
+
description: "Requires the read scope and a workspace-scoped key.",
|
|
40420
|
+
blocks: [
|
|
40421
|
+
{
|
|
40422
|
+
type: "param-table",
|
|
40423
|
+
title: "Query parameters",
|
|
40424
|
+
params: [
|
|
40425
|
+
{ name: "limit", type: "integer", description: "Maximum number of versions to return, 1 to 200. Values above 200 are clamped; invalid values fall back to the default.", default: "50" }
|
|
40426
|
+
]
|
|
40427
|
+
},
|
|
40428
|
+
{
|
|
40429
|
+
type: "param-table",
|
|
40430
|
+
title: "Response fields",
|
|
40431
|
+
params: [
|
|
40432
|
+
{ name: "versions[].version", type: "integer", description: "Monotonic version number of the stored policy." },
|
|
40433
|
+
{ name: "versions[].status", type: "string", description: "The lifecycle status this version was saved under: draft, shadow, or active." },
|
|
40434
|
+
{ name: "versions[].changed", type: "string[]", description: "Field names that differ from the immediately preceding version." },
|
|
40435
|
+
{ name: "versions[].policy", type: "object", description: "The full stored policy document for this version, in the same shape as the policy field of GET /v1/ai/policy." },
|
|
40436
|
+
{ name: "total", type: "integer", description: "Total number of stored versions, independent of limit." },
|
|
40437
|
+
{ name: "limit", type: "integer", description: "The page size applied to this response." }
|
|
40438
|
+
]
|
|
40439
|
+
}
|
|
40440
|
+
]
|
|
40441
|
+
},
|
|
40442
|
+
{
|
|
40443
|
+
type: "code",
|
|
40444
|
+
title: "cURL: Read the last 50 versions",
|
|
40445
|
+
code: `curl "https://api.talonic.com/v1/ai/policy/history?limit=50" \\
|
|
40446
|
+
-H "Authorization: Bearer $TALONIC_API_KEY"`
|
|
40447
|
+
},
|
|
40448
|
+
{
|
|
40449
|
+
type: "code",
|
|
40450
|
+
title: "Response: Version history",
|
|
40451
|
+
code: `{
|
|
40452
|
+
"versions": [
|
|
40453
|
+
{
|
|
40454
|
+
"version": 2,
|
|
40455
|
+
"status": "active",
|
|
40456
|
+
"changed": ["region_pin", "denied_models"],
|
|
40457
|
+
"policy": {
|
|
40458
|
+
"version": 2,
|
|
40459
|
+
"status": "active",
|
|
40460
|
+
"region_pin": "eu",
|
|
40461
|
+
"allowed_providers": ["bedrock"],
|
|
40462
|
+
"denied_models": ["claude-opus"],
|
|
40463
|
+
"model_substitutions": null,
|
|
40464
|
+
"default_models": null,
|
|
40465
|
+
"max_attempts": null,
|
|
40466
|
+
"model_classes": null,
|
|
40467
|
+
"operation_classes": null,
|
|
40468
|
+
"features": null
|
|
40469
|
+
}
|
|
40470
|
+
},
|
|
40471
|
+
{
|
|
40472
|
+
"version": 1,
|
|
40473
|
+
"status": "active",
|
|
40474
|
+
"changed": ["allowed_providers"],
|
|
40475
|
+
"policy": {
|
|
40476
|
+
"version": 1,
|
|
40477
|
+
"status": "active",
|
|
40478
|
+
"region_pin": null,
|
|
40479
|
+
"allowed_providers": ["bedrock"],
|
|
40480
|
+
"denied_models": null,
|
|
40481
|
+
"model_substitutions": null,
|
|
40482
|
+
"default_models": null,
|
|
40483
|
+
"max_attempts": null,
|
|
40484
|
+
"model_classes": null,
|
|
40485
|
+
"operation_classes": null,
|
|
40486
|
+
"features": null
|
|
40487
|
+
}
|
|
40488
|
+
}
|
|
40489
|
+
],
|
|
40490
|
+
"total": 2,
|
|
40491
|
+
"limit": 50
|
|
40492
|
+
}`
|
|
40493
|
+
},
|
|
40494
|
+
{ type: "callout", variant: "info", text: "Writes made through this API record the API key as the actor together with the submitted `change_reason`, so a version in the history stays attributable to an intent, not only to a credential. Supplying a meaningful `change_reason` on every write is what makes this history useful in an audit two years later." },
|
|
40495
|
+
{ type: "paragraph", text: "The history is a read of what was stored, not a rollback mechanism. To restore an earlier configuration, read the `policy` document of the version to restore and submit it via `PUT /v1/ai/policy`; the restoration becomes a new version with its own `changed` set and its own `change_reason`, which keeps the trail append-only and honest." }
|
|
40496
|
+
],
|
|
40497
|
+
related: [
|
|
40498
|
+
{ label: "AI Policy Overview", slug: "ai-policy-overview" },
|
|
40499
|
+
{ label: "Read the Policy", slug: "get-ai-policy" },
|
|
40500
|
+
{ label: "Update the Policy", slug: "update-ai-policy" }
|
|
40501
|
+
],
|
|
40502
|
+
faq: [
|
|
40503
|
+
{ question: "Why is my history empty?", answer: "The workspace has never stored a policy of its own and runs on the inherited platform default. Only workspace-stored versions appear; the platform default is not a version of your policy. The first write creates version 1 and the history starts there." },
|
|
40504
|
+
{ question: "Can I roll back to an earlier version?", answer: "Not directly; the history is append-only. Read the policy document of the version you want to restore and submit it with PUT /v1/ai/policy. The restoration is stored as a new version with its own changed fields and change_reason, so the audit trail records the rollback as the deliberate act it was." },
|
|
40505
|
+
{ question: "Do draft and shadow versions appear in the history?", answer: "Yes. Every stored version appears regardless of lifecycle status, and each entry's status field shows whether that version was active (enforced), shadow, or draft (stored without taking effect). This is what lets an auditor distinguish what was staged from what actually bound." }
|
|
40506
|
+
],
|
|
40507
|
+
mentions: ["policy history", "version history", "audit trail", "changed fields", "change_reason", "policy versions", "rollback"]
|
|
40508
|
+
}
|
|
40509
|
+
];
|
|
40510
|
+
|
|
38935
40511
|
// src/content/sdk/sections.json
|
|
38936
40512
|
var sections_default = [
|
|
38937
40513
|
{
|
|
@@ -39200,7 +40776,7 @@ talonic --help` }
|
|
|
39200
40776
|
];
|
|
39201
40777
|
|
|
39202
40778
|
// src/content/sdk/index.ts
|
|
39203
|
-
var
|
|
40779
|
+
var sections71 = sections_default;
|
|
39204
40780
|
|
|
39205
40781
|
// src/content/mcp/sections.json
|
|
39206
40782
|
var sections_default2 = [
|
|
@@ -41695,7 +43271,7 @@ var sections_default2 = [
|
|
|
41695
43271
|
];
|
|
41696
43272
|
|
|
41697
43273
|
// src/content/mcp/index.ts
|
|
41698
|
-
var
|
|
43274
|
+
var sections72 = sections_default2;
|
|
41699
43275
|
|
|
41700
43276
|
// src/content/index.ts
|
|
41701
43277
|
var ALL_PLATFORM_RAW = [
|
|
@@ -41717,10 +43293,10 @@ var ALL_PLATFORM_RAW = [
|
|
|
41717
43293
|
...sections16,
|
|
41718
43294
|
...sections17,
|
|
41719
43295
|
...sections18,
|
|
41720
|
-
...sections19
|
|
43296
|
+
...sections19,
|
|
43297
|
+
...sections20
|
|
41721
43298
|
];
|
|
41722
43299
|
var ALL_API_RAW = [
|
|
41723
|
-
...sections20,
|
|
41724
43300
|
...sections21,
|
|
41725
43301
|
...sections22,
|
|
41726
43302
|
...sections23,
|
|
@@ -41754,8 +43330,8 @@ var ALL_API_RAW = [
|
|
|
41754
43330
|
...sections51,
|
|
41755
43331
|
...sections52,
|
|
41756
43332
|
...sections53,
|
|
43333
|
+
...sections54,
|
|
41757
43334
|
...sections55,
|
|
41758
|
-
...sections56,
|
|
41759
43335
|
...sections57,
|
|
41760
43336
|
...sections58,
|
|
41761
43337
|
...sections59,
|
|
@@ -41767,10 +43343,13 @@ var ALL_API_RAW = [
|
|
|
41767
43343
|
...sections65,
|
|
41768
43344
|
...sections66,
|
|
41769
43345
|
...sections67,
|
|
41770
|
-
...
|
|
43346
|
+
...sections68,
|
|
43347
|
+
...sections69,
|
|
43348
|
+
...sections70,
|
|
43349
|
+
...sections56
|
|
41771
43350
|
];
|
|
41772
|
-
var ALL_SDK_RAW = [...
|
|
41773
|
-
var ALL_MCP_RAW = [...
|
|
43351
|
+
var ALL_SDK_RAW = [...sections71];
|
|
43352
|
+
var ALL_MCP_RAW = [...sections72];
|
|
41774
43353
|
function enrich(raw, navSections, domain) {
|
|
41775
43354
|
return raw.map((r) => {
|
|
41776
43355
|
const { prev, next } = derivePrevNext(navSections, r.slug);
|