from anyformat.sdk import Clientclient = Client(api_key="YOUR_API_KEY")workflow_id = "0686bb97-8c30-70f0-8000-97669e000eb8"# A measured run, scored against the dataset's ground truth.optimization = client.start_optimization( workflow_id, "extraction", max_rounds=3, idempotency_key="optimize-invoices-2026-07-05")# A one-shot run, which needs no ground truth.one_shot = client.start_optimization( workflow_id, "extraction_oneshot", user_context="The total includes VAT.")print(optimization.id, optimization.status)
import { Anyformat } from '@anyformat/sdk';const af = new Anyformat({ apiKey: 'YOUR_API_KEY' });const workflowId = '0686bb97-8c30-70f0-8000-97669e000eb8';// A measured run, scored against the dataset's ground truth.const optimization = await af.startOptimization(workflowId, { kind: 'extraction', maxRounds: 3, idempotencyKey: 'optimize-invoices-2026-07-05',});// A one-shot run, which needs no ground truth.const oneShot = await af.startOptimization(workflowId, { kind: 'extraction_oneshot', userContext: 'The total includes VAT.',});console.log(optimization.id, optimization.status);
from anyformat.sdk import Clientclient = Client(api_key="YOUR_API_KEY")workflow_id = "0686bb97-8c30-70f0-8000-97669e000eb8"# A measured run, scored against the dataset's ground truth.optimization = client.start_optimization( workflow_id, "extraction", max_rounds=3, idempotency_key="optimize-invoices-2026-07-05")# A one-shot run, which needs no ground truth.one_shot = client.start_optimization( workflow_id, "extraction_oneshot", user_context="The total includes VAT.")print(optimization.id, optimization.status)
import { Anyformat } from '@anyformat/sdk';const af = new Anyformat({ apiKey: 'YOUR_API_KEY' });const workflowId = '0686bb97-8c30-70f0-8000-97669e000eb8';// A measured run, scored against the dataset's ground truth.const optimization = await af.startOptimization(workflowId, { kind: 'extraction', maxRounds: 3, idempotencyKey: 'optimize-invoices-2026-07-05',});// A one-shot run, which needs no ground truth.const oneShot = await af.startOptimization(workflowId, { kind: 'extraction_oneshot', userContext: 'The total includes VAT.',});console.log(optimization.id, optimization.status);
Rate limit tier: submission, 60 requests/min. See Rate limits.Starts an optimization: a run that rewrites a workflow’s field descriptions to extract more accurately. The call is async and fire-and-forget. It returns 202 at once with the new optimization. Poll it with GET …/optimizations/{optimization_id}/ until status is done or failed.The body is discriminated on kind:
kind
What it does
Body fields
Needs
extraction
A measured run. It scores the current version against the dataset’s ground truth, then tries rewrites and keeps only those that raise accuracy.
max_rounds, 1 to 10, default 3
Ground truth in the dataset, else 422 GT_INVALID
extraction_oneshot
One unmeasured round. It reflects once on the dataset’s existing extractions and your hint, then applies its suggestion without checking it.
user_context, up to 4000 characters
A dataset extraction or a user_context, else 422 ONESHOT_SIGNALS_MISSING
A one-shot run reports no accuracy: baseline_accuracy and best_accuracy stay null. Pick it when the dataset has no ground truth yet, or when you want a quick suggestion to review.
A workflow runs one optimization at a time, of either kind. A start while another runs returns 409 OPTIMIZATION_ALREADY_RUNNING. List the workflow’s optimizations to find the running one. A run whose worker stopped for more than 100 minutes is reported failed and no longer blocks.
A measured run is billed like evals, one extraction per dataset document for the baseline and for every round. A one-shot run is billed one flat charge when it finishes done, even when it changes nothing, and nothing when it fails. For either kind, an organization with no credit gets 402 INSUFFICIENT_CREDIT and nothing starts.While a measured run evaluates a round, that round’s candidate is the workflow’s latest version, so a document run on the workflow at that moment uses it. The run ends by saving the best descriptions as the latest version. See How credits work.
Without an Idempotency-Key, every call starts a new optimization. Supplying the header replays instead: a retry with the same key and body returns the original optimization, with the status it had at the first call, and starts no second run. Reusing the key with another body returns 422 IDEMPOTENCY_KEY_REUSED. See Idempotency.
from anyformat.sdk import Clientclient = Client(api_key="YOUR_API_KEY")workflow_id = "0686bb97-8c30-70f0-8000-97669e000eb8"# A measured run, scored against the dataset's ground truth.optimization = client.start_optimization( workflow_id, "extraction", max_rounds=3, idempotency_key="optimize-invoices-2026-07-05")# A one-shot run, which needs no ground truth.one_shot = client.start_optimization( workflow_id, "extraction_oneshot", user_context="The total includes VAT.")print(optimization.id, optimization.status)
import { Anyformat } from '@anyformat/sdk';const af = new Anyformat({ apiKey: 'YOUR_API_KEY' });const workflowId = '0686bb97-8c30-70f0-8000-97669e000eb8';// A measured run, scored against the dataset's ground truth.const optimization = await af.startOptimization(workflowId, { kind: 'extraction', maxRounds: 3, idempotencyKey: 'optimize-invoices-2026-07-05',});// A one-shot run, which needs no ground truth.const oneShot = await af.startOptimization(workflowId, { kind: 'extraction_oneshot', userContext: 'The total includes VAT.',});console.log(optimization.id, optimization.status);
Optional caller-supplied key (Stripe convention). Retrying with the same key returns the original optimization instead of starting (and billing) a second one.
When the run reached done or failed (ISO 8601); null while it runs.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"anyformat","colors":{"primary":"#0066FF","light":"#4D94FF","dark":"#0052CC"},"logo":{"light":"https://mintcdn.com/anyformat/v2HRpcqi657iKMPg/logo/Logo-horizontal.png?fit=max\u0026auto=format\u0026n=v2HRpcqi657iKMPg\u0026q=85\u0026s=7fe1cfff76171b16c27aea272156c95c","dark":"https://mintcdn.com/anyformat/G2lOO-2_Ah2kKl9r/logo/Logo-horizontal-dark.png?fit=max\u0026auto=format\u0026n=G2lOO-2_Ah2kKl9r\u0026q=85\u0026s=db00e6c8dcdc8eca2d4bd35df66713c6"},"favicon":"https://mintcdn.com/anyformat/v2HRpcqi657iKMPg/logo/anyformat-favicon.png?fit=max\u0026auto=format\u0026n=v2HRpcqi657iKMPg\u0026q=85\u0026s=3ed16699b7a1308a1d2fe9e9181abffd","api":{"openapi":"https://api.anyformat.ai/schema/?format=json"},"navbar":{"links":[{"icon":"envelope","href":"mailto:support@anyformat.ai","label":"Support"}],"primary":{"type":"button","label":"anyformat app","href":"https://app.anyformat.ai"}},"footer":{"socials":{"website":"https://www.anyformat.ai","linkedin":"https://linkedin.com/company/anyformat"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"anyformat","hasAudioNarration":false,"actualSubdomain":"anyformat","customDomains":["docs.anyformat.ai"],"gitSource":{"type":"github","owner":"anyformat-ai","repo":"anyformat-monorepo","deployBranch":"main","contentDirectory":"anyformat/docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae9ae8d5a00c3a5615c6c09","collectionId":"02fbd42e-7090-45a9-ae9a-2c967cb3f51e","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae9ae8d5a00c3a5615c6c09"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae9c512847e2d921305883b","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"API Reference","count":84},{"language":"default","tag":"Guide","count":47},{"language":"default","tag":"Changelog","count":30},{"language":"default","tag":"API v2 (retired)","count":27},{"language":"default","tag":"Examples","count":19},{"language":"default","tag":"Workflows","count":16},{"language":"default","tag":"Nodes","count":14},{"language":"default","tag":"Evals","count":9},{"language":"default","tag":"v2 Workflows","count":9},{"language":"default","tag":"SDKs and tools","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@keyframes af-tape{to{transform:translateX(-50%)}}.af-landing{--af-fg:#18181b;--af-muted:#71717a;--af-card:#fafafa;--af-bd:#e4e4e7;--af-blue:#0a5cf0;--af-hl:rgba(10, 92, 240, 0.16);--af-paper-shadow:0 1px 2px rgba(24, 24, 27, 0.04), 0 12px 32px rgba(24, 24, 27, 0.08);max-width:1200px;margin:0 auto;padding:24px 32px 14px;color:var(--af-fg);font-family:\"Inter\",ui-sans-serif,system-ui,sans-serif}.dark .af-landing{--af-fg:#ececee;--af-muted:#9a9aa3;--af-card:#141417;--af-bd:#26262b;--af-blue:#6ea8ff;--af-paper-shadow:0 1px 2px rgba(0, 0, 0, 0.3), 0 24px 48px rgba(0, 0, 0, 0.45)}.af-title{margin:0 0 10px;font-size:38px;line-height:44px;font-weight:600;letter-spacing:-.02em;color:var(--af-fg)}.af-lede,.af-sub{margin:0 0 20px;max-width:720px;font-size:16.5px;line-height:25px;color:var(--af-muted)}.af-lede{margin:16px 0 0;max-width:860px;font-size:15px;line-height:23px}.af-lede a,.af-links a{color:var(--af-fg);text-decoration:underline;text-decoration-color:var(--af-bd);text-underline-offset:4px;font-weight:500}.af-featured a:hover,.af-lede a:hover,.af-links a:hover{text-decoration-color:var(--af-blue)}.af-links{display:flex;flex-wrap:wrap;gap:32px}.af-links a{font-size:15px;text-underline-offset:5px}.af-hero-scroll{container-type:inline-size;width:100%;overflow-x:auto}.af-hero{position:relative;width:100em;height:40em;font-size:max(1cqw,7px)}.af-paper{z-index:1;position:absolute;left:0;top:0;width:31.67em;height:40em;box-sizing:border-box;padding:2.33em;overflow:hidden;background:#fff;color:#18181b;border:1px solid #e4e4e7;border-radius:.33em;box-shadow:var(--af-paper-shadow);display:flex;flex-direction:column;gap:2em;font-size:1em;line-height:1.33}.af-paper-title{font-size:1.5em;line-height:1.33;font-weight:700;letter-spacing:.06em}.af-paper-block{display:flex;flex-direction:column}.af-paper-cols{display:grid;grid-template-columns:1fr 1fr;gap:1.33em}.af-paper-muted{color:#71717a}.af-row{display:grid;grid-template-columns:minmax(0,1fr) 2.67em 5.33em 5.67em;gap:.67em;height:2em;align-items:center;border-bottom:1px solid #f4f4f5;white-space:nowrap}.af-row>div:first-child{overflow:hidden;text-overflow:ellipsis}.af-row-head{color:#71717a;font-weight:500;border-bottom-color:#e4e4e7}.af-num{text-align:right}.af-bold{font-weight:600}.af-totals{margin-top:auto;display:flex;flex-direction:column;align-items:flex-end}.af-hl{border-radius:.25em;padding:0 .17em;background:0 0;box-shadow:0 0 0 1px rgba(10,92,240,.28)}.af-hl,.af-region{position:relative}.af-region::before{content:\"\";position:absolute;inset:-.75em -.6em -.4em;border:1px solid var(--af-blue);border-radius:.25em;opacity:calc(.26 + var(--af-box-o, 0)*.34)}.af-region::after{content:attr(data-box);position:absolute;left:.5em;top:-.75em;transform:translateY(-50%);font-family:\"Inconsolata\",ui-monospace,Menlo,Consolas,monospace;font-size:.83em;line-height:1;letter-spacing:.02em;white-space:nowrap;color:#fff;background:var(--af-blue);border-radius:.25em;padding:.17em .33em;opacity:var(--af-box-o, 0)}.af-bbox{color:var(--af-muted)}.af-card,.af-tabs{box-sizing:border-box}.af-card{z-index:1;position:absolute;left:40em;top:0;width:60em;height:40em;overflow:hidden;background:var(--af-card);border:1px solid var(--af-bd);border-radius:1em;color:var(--af-fg)}.af-tabs{height:3.33em;padding:0 2em;border-bottom:1px solid var(--af-bd);display:flex;align-items:stretch;gap:2em}.af-tab,.af-tabs-right{display:flex;align-items:center;color:var(--af-muted)}.af-tab{font-size:1.08em;font-weight:500;border-bottom:2px solid transparent;box-sizing:border-box}.af-tabs-right{flex:1;justify-content:flex-end;gap:1.5em;font-size:1em}.af-pane,.af-tabs-right .af-lang-on{color:var(--af-fg)}.af-pane{position:absolute;left:0;top:3.08em;width:55.38em;box-sizing:border-box;padding:1.54em 1.85em;margin:0;font-family:\"Inconsolata\",ui-monospace,Menlo,Consolas,monospace;font-size:1.08em;line-height:1.54;white-space:pre;background:0 0;border:0;opacity:0}.af-pane-code{opacity:1}.af-tab-define{color:var(--af-fg);border-bottom-color:var(--af-blue)}.af-pane .af-k,.af-pane-json,.af-pane-run,.af-val{color:var(--af-muted)}.af-pane .af-s{color:var(--af-blue)}.af-pane-json .af-key,.af-pane-run .af-m{color:var(--af-fg)}.af-val{font-weight:600}.af-cursor{display:inline-block;width:.5em;height:1em;background:var(--af-fg);vertical-align:-.15em;opacity:0}.af-wires{position:absolute;left:0;top:0;width:100em;height:40em;z-index:2;pointer-events:none}.af-wire{stroke:var(--af-blue);stroke-opacity:.85;stroke-width:1.25;fill:none;stroke-dasharray:700;stroke-dashoffset:700}.af-dot{fill:var(--af-blue);opacity:0}.af-gallery{--af-g-fg:#18181b;--af-g-muted:#71717a;--af-g-bg:#ffffff;--af-g-panel:#fafafa;--af-g-bd:#e4e4e7;--af-g-blue:#0a5cf0;--af-g-soft:rgba(10, 92, 240, 0.1);--af-g-hl:rgba(10, 92, 240, 0.18);--af-g-paper:#ffffff;--af-g-paper-bd:#e4e4e7;--af-g-ink:#ccd1da;--af-g-tint-a:#e8effc;--af-g-tint-b:#eeeef1;--af-g-tint-c:#e9f0ec;--af-g-lift:0 1px 2px rgba(24, 24, 27, 0.05), 0 10px 26px rgba(24, 24, 27, 0.07);margin:24px 0 8px}.dark .af-gallery{--af-g-fg:#ececee;--af-g-muted:#9a9aa3;--af-g-bg:#0c0c0e;--af-g-panel:#141417;--af-g-bd:#26262b;--af-g-blue:#6ea8ff;--af-g-soft:rgba(110, 168, 255, 0.12);--af-g-hl:rgba(110, 168, 255, 0.22);--af-g-lift:0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.5);--af-g-tint-a:#131a28;--af-g-tint-b:#17171a;--af-g-tint-c:#131a17}.af-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px}.af-chip{display:inline-flex;align-items:center;gap:7px;font:inherit;font-size:13px;font-weight:500;border:1px solid var(--af-g-bd);border-radius:999px;padding:6px 13px;background:var(--af-g-bg);color:var(--af-g-muted);cursor:pointer;transition:color .15s ease,border-color .15s ease}.af-chip::before{content:\"\";width:9px;height:9px;border-radius:50%;border:1.5px solid var(--af-g-bd)}.af-chip:hover{color:var(--af-g-fg)}.af-chip:focus-visible{outline:2px solid var(--af-g-blue);outline-offset:2px}.af-chip[aria-pressed=true]{color:var(--af-g-fg);border-color:var(--af-g-blue)}.af-chip[aria-pressed=true]::before{background:var(--af-g-blue);border-color:var(--af-g-blue)}.af-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(224px,1fr));gap:16px}.af-ex{display:flex;flex-direction:column;overflow:hidden;text-decoration:none;color:inherit;background:var(--af-g-bg);border:1px solid var(--af-g-bd);border-radius:12px;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.af-ex[hidden]{display:none}.af-ex:hover{transform:translateY(-3px);box-shadow:var(--af-g-lift);border-color:var(--af-g-blue)}.af-ex:focus-visible{outline:2px solid var(--af-g-blue);outline-offset:2px}.af-ex-body{display:flex;flex-direction:column;gap:7px;flex:1;padding:14px 15px 15px}.af-ex-title{font-size:15px;font-weight:600;line-height:1.3;letter-spacing:-.01em;color:var(--af-g-fg)}.af-ex-note{font-size:12.5px;line-height:1.45;color:var(--af-g-muted)}.af-ex-nodes{display:flex;flex-wrap:wrap;gap:5px;margin-top:auto;padding-top:8px}.af-nd{font-family:\"Inconsolata\",ui-monospace,Menlo,Consolas,monospace;font-size:11px;font-weight:600;letter-spacing:.04em;color:var(--af-g-muted);background:var(--af-g-panel);border:1px solid var(--af-g-bd);border-radius:4px;padding:1px 5px}.af-nd-hot{color:var(--af-g-blue);border-color:var(--af-g-blue);background:var(--af-g-soft)}.af-art{position:relative;height:118px;overflow:hidden;border-bottom:1px solid var(--af-g-bd);background:var(--af-g-tint-b)}.af-art-a{background:var(--af-g-tint-a)}.af-art-c{background:var(--af-g-tint-c)}.af-art>span{position:absolute;display:block;box-sizing:border-box;background:var(--af-g-paper);border:1px solid var(--af-g-paper-bd);border-radius:2px;box-shadow:0 2px 8px rgba(24,24,27,.1)}.af-art>span::after,.af-art>span::before{content:\"\";position:absolute;left:8px;height:3px;border-radius:2px;background:var(--af-g-ink)}.af-art>span::before{top:13px;right:8px}.af-art>span::after{top:24px;right:24px}.af-art-stack span{width:74px;height:94px;left:50%;top:16px;margin-left:-37px}.af-art-stack span:nth-child(1){transform:rotate(-9deg) translateX(-24px)}.af-art-stack span:nth-child(2){transform:rotate(-3deg) translateX(-8px)}.af-art-stack span:nth-child(3){transform:rotate(3deg) translateX(9px)}.af-art-stack span:nth-child(4){transform:rotate(10deg) translateX(25px)}.af-art-stack span:nth-child(3)::after{background:var(--af-g-hl);height:6px}.af-art-doc span:nth-child(1){width:90px;height:104px;left:50%;margin-left:-111px;top:8px}.af-art-doc span:nth-child(1)::before{top:12px;right:30px}.af-art-doc span:nth-child(1)::after{top:26px;right:10px;box-shadow:0 12px 0 var(--af-g-ink),0 24px 0 var(--af-g-ink)}.af-art-doc span:nth-child(2){width:58px;height:2px;left:50%;margin-left:-19px;top:58px;border:0;border-radius:0;background:var(--af-g-blue);opacity:.5;box-shadow:none}.af-art-doc span:nth-child(2)::after,.af-art-doc span:nth-child(2)::before{display:none}.af-art-doc span:nth-child(3){width:74px;height:24px;left:50%;margin-left:37px;top:47px;border-color:var(--af-g-blue);background:var(--af-g-bg)}.af-art-doc span:nth-child(3)::before{top:9px;left:8px;right:46px;background:var(--af-g-blue)}.af-art-doc span:nth-child(3)::after{top:9px;left:34px;right:8px;background:var(--af-g-hl)}.af-art-table span{width:118px;height:100px;left:50%;top:10px;margin-left:-59px}.af-art-table span::before{top:12px;right:62px;height:5px}.af-art-table span::after{top:28px;right:10px;box-shadow:0 11px 0 var(--af-g-ink),0 22px 0 var(--af-g-hl),0 33px 0 var(--af-g-ink),0 44px 0 var(--af-g-ink)}.af-art-receipt span{width:72px;height:106px;left:50%;top:8px;margin-left:-36px;border:0;border-radius:0;transform:rotate(-2deg);clip-path:polygon(0 0,100% 0,100% 92%,87.5% 100%,75% 92%,62.5% 100%,50% 92%,37.5% 100%,25% 92%,12.5% 100%,0 92%)}.af-art-receipt span::before{top:14px;left:14px;right:14px;height:5px}.af-art-receipt span::after{top:30px;left:10px;right:26px;box-shadow:0 12px 0 var(--af-g-ink),0 24px 0 var(--af-g-ink),0 40px 0 var(--af-g-hl)}.af-art-mail span:nth-child(1){width:122px;height:84px;left:50%;top:17px;margin-left:-61px}.af-art-mail span:nth-child(1)::before{display:none}.af-art-mail span:nth-child(1)::after{top:46px;left:14px;right:14px;box-shadow:0 11px 0 var(--af-g-ink),0 22px 0 var(--af-g-hl)}.af-art-mail span:nth-child(2){width:84px;height:84px;left:50%;top:-25px;margin-left:-42px;border-radius:0;transform:rotate(45deg);border-color:var(--af-g-paper-bd);box-shadow:none}.af-art-mail span:nth-child(2)::after,.af-art-mail span:nth-child(2)::before{display:none}.af-art-check span:nth-child(1){width:96px;height:104px;left:50%;margin-left:-83px;top:8px}.af-art-check span:nth-child(1)::before{top:12px;right:36px}.af-art-check span:nth-child(1)::after{top:28px;right:10px;background:var(--af-g-hl);height:6px;box-shadow:0 14px 0 var(--af-g-ink),0 28px 0 var(--af-g-hl),0 42px 0 var(--af-g-ink)}.af-art-check span:nth-child(2){width:44px;height:22px;left:50%;margin-left:39px;top:48px;border-color:var(--af-g-blue);background:var(--af-g-soft)}.af-art-check span:nth-child(2)::before{top:9px;left:9px;right:9px;background:var(--af-g-blue)}.af-art-check span:nth-child(2)::after{display:none}.af-art-route span:nth-child(1){width:72px;height:92px;left:50%;margin-left:-98px;top:14px}.af-art-route span:nth-child(1)::before{top:12px;right:26px}.af-art-route span:nth-child(1)::after{top:24px;right:10px;box-shadow:0 12px 0 var(--af-g-ink)}.af-art-route span:nth-child(2),.af-art-route span:nth-child(3){width:66px;height:26px;left:50%;margin-left:32px;border-color:var(--af-g-blue);background:var(--af-g-bg)}.af-art-route span:nth-child(2){top:20px}.af-art-route span:nth-child(3){top:68px}.af-art-route span:nth-child(2)::before,.af-art-route span:nth-child(3)::before{top:11px;left:9px;right:30px;background:var(--af-g-blue)}.af-art-route span:nth-child(2)::after,.af-art-route span:nth-child(3)::after{top:11px;left:42px;right:9px;background:var(--af-g-hl)}.af-art-route::after,.af-art-route::before{content:\"\";position:absolute;left:50%;margin-left:-20px;width:52px;height:26px;border-color:var(--af-g-blue);border-style:solid;opacity:.5}.af-art-route::before{top:33px;border-width:1px 1px 0 0;border-radius:0 8px 0 0}.af-art-route::after{top:59px;border-width:0 1px 1px 0;border-radius:0 0 8px 0}.af-art-tiers{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;align-items:end;padding:18px 16px}.af-art-tiers span{position:relative;left:auto;top:auto;width:auto;margin:0;overflow:hidden}.af-art-tiers span:nth-child(1){height:36%}.af-art-tiers span:nth-child(2){height:58%}.af-art-tiers span:nth-child(3){height:78%}.af-art-tiers span:nth-child(4){height:100%;border-color:var(--af-g-blue);box-shadow:0 0 0 2px var(--af-g-soft)}.af-art-tiers span::before{top:7px;left:5px;right:5px}.af-art-tiers span::after{top:15px;left:5px;right:5px;box-shadow:0 8px 0 var(--af-g-ink),0 16px 0 var(--af-g-ink),0 24px 0 var(--af-g-ink)}.af-art-tiers span:nth-child(4)::after{background:var(--af-g-hl);box-shadow:0 8px 0 var(--af-g-hl),0 16px 0 var(--af-g-hl),0 24px 0 var(--af-g-hl)}.af-art-chart{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;align-items:end;padding:22px 18px 18px}.af-art-chart span{position:relative;left:auto;top:auto;width:auto;margin:0;border-radius:2px 2px 0 0}.af-art-chart span::after,.af-art-chart span::before{display:none}.af-art-chart span:nth-child(1){height:52%}.af-art-chart span:nth-child(2){height:68%}.af-art-chart span:nth-child(3){height:61%}.af-art-chart span:nth-child(4){height:80%}.af-art-chart span:nth-child(5){height:74%}.af-art-chart span:nth-child(6){height:88%}.af-art-chart span:nth-child(7){height:96%;border-color:var(--af-g-blue);background:var(--af-g-soft)}.af-art-chart::after{content:\"\";position:absolute;left:0;right:0;top:38%;border-top:1px dashed var(--af-g-blue);opacity:.55}.af-art-md::after,.af-art-term{font-family:\"Inconsolata\",ui-monospace,Menlo,Consolas,monospace}.af-art-term{padding:14px 15px;background:#101014;border-bottom-color:#26262b;font-size:11.5px;line-height:1.75;color:#9a9aa3}.af-art-term div{display:block;font-weight:400}.af-art-term .af-term-key{font-style:normal;color:#6ea8ff}.af-art-term .af-term-cursor{display:inline-block;width:6px;height:11px;background:#ececee;text-decoration:none;vertical-align:-1px}.af-art-md span{width:128px;height:96px;left:50%;top:12px;margin-left:-64px}.af-art-md span::before{top:14px;left:12px;right:74px;height:6px;background:var(--af-g-hl)}.af-art-md span::after{top:32px;left:12px;right:12px;box-shadow:0 10px 0 var(--af-g-ink),0 20px 0 var(--af-g-ink),0 30px 0 var(--af-g-ink),0 40px 0 var(--af-g-ink)}.af-art-md::after{content:\"# ## |\";position:absolute;right:14px;bottom:10px;font-size:12px;font-weight:600;color:var(--af-g-blue);opacity:.7}@media (prefers-reduced-motion:reduce){.af-ex{transition:none}.af-ex:hover{transform:none}}.af-doors{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:22px 0 0}.af-door{display:flex;flex-direction:column;gap:4px;padding:13px 14px 14px;border:1px solid var(--af-bd);border-radius:12px;text-decoration:none;color:var(--af-fg);transition:border-color .18s ease,transform .18s ease}.af-door:hover{border-color:var(--af-blue);transform:translateY(-2px)}.af-door:focus-visible{outline:2px solid var(--af-blue);outline-offset:2px}.af-door-title{font-size:15px;font-weight:600;letter-spacing:-.01em}.af-door-title::after{content:\" ↗\";color:var(--af-muted);font-weight:400}.af-door-note{font-size:12.5px;line-height:1.45;color:var(--af-muted)}.af-featured{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:16px 0 0}.af-featured h2{margin:0;font-size:19px;line-height:1.2;font-weight:600;letter-spacing:-.02em;color:var(--af-fg)}.af-featured a{font-size:14px;font-weight:500;color:var(--af-fg);text-decoration:underline;text-decoration-color:var(--af-bd);text-underline-offset:5px}.af-grid-4{grid-template-columns:repeat(4,1fr)}@media (max-width:900px){.af-doors,.af-grid-4{grid-template-columns:repeat(2,1fr)}}@media (prefers-reduced-motion:reduce){.af-door{transition:none}.af-door:hover{transform:none}}.af-payoff{display:grid;grid-template-columns:1fr 34px 1fr;align-items:stretch;gap:0;margin:20px 0 16px;font-family:\"Inter\",ui-sans-serif,system-ui,sans-serif;--af-p-fg:#18181b;--af-p-muted:#71717a;--af-p-bd:#e4e4e7;--af-p-bg:#ffffff;--af-p-blue:#0a5cf0;--af-p-hl:rgba(10, 92, 240, 0.16)}.dark .af-payoff{--af-p-fg:#ececee;--af-p-muted:#9a9aa3;--af-p-bd:#26262b;--af-p-bg:#0f0f12;--af-p-blue:#6ea8ff;--af-p-hl:rgba(110, 168, 255, 0.22)}.af-payoff-pane{min-width:0;padding:14px 16px 16px;background:var(--af-p-bg);border:1px solid var(--af-p-bd);border-radius:10px}.af-cost span b,.af-payoff-cap{font-weight:600;text-transform:uppercase}.af-payoff-cap,.af-payoff-line{font-family:\"Inconsolata\",ui-monospace,Menlo,Consolas,monospace;color:var(--af-p-muted)}.af-payoff-cap{font-size:11px;letter-spacing:.12em;margin-bottom:10px}.af-payoff-line{font-size:12.5px;line-height:1.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.af-payoff-line b{color:var(--af-p-fg);font-weight:600}.af-payoff-line .af-mark{background:var(--af-p-hl);color:inherit;border-radius:3px;padding:0 3px}.af-payoff-line .af-cite{font-style:normal;color:var(--af-p-blue);font-weight:600}.af-payoff-arrow{display:flex;align-items:center;justify-content:center;color:var(--af-p-blue);font-size:15px}.af-cost{display:flex;flex-wrap:wrap;gap:8px 28px;margin:0 0 24px;padding:12px 16px;border:1px solid var(--af-p-bd, #e4e4e7);border-radius:10px;font-family:\"Inconsolata\",ui-monospace,Menlo,Consolas,monospace;font-size:12.5px;color:#71717a}.dark .af-cost{border-color:#26262b;color:#9a9aa3}.af-cost span b{display:inline-block;margin-right:8px;letter-spacing:.1em;font-size:10.5px;color:#a1a1aa}.dark .af-cost span b{color:#6f6f78}.af-cost strong{color:#18181b;font-weight:600}.dark .af-cost strong{color:#ececee}@media (max-width:700px){.af-payoff{grid-template-columns:1fr;gap:10px}.af-payoff-arrow{transform:rotate(90deg);height:20px}}.af-payoff-line .af-payoff-key{display:inline-block;min-width:9.5em}.af-gallery-strip .af-art{height:118px;zoom:.53}.af-gallery-strip .af-ex-body{padding:10px 13px 12px;gap:4px}.af-gallery-strip .af-ex-title{font-size:14px}.af-gallery-strip .af-ex-note{font-size:12px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.af-art-lookup{display:grid;grid-template-columns:88px 30px 62px;grid-template-rows:repeat(3,auto);align-content:center;justify-content:center;gap:9px 0}.af-art-lookup>span{position:relative;left:auto;top:auto;margin:0;height:15px}.af-art-lookup>span::before{top:5px;left:6px;right:6px;height:4px}.af-art-lookup>span::after{display:none}.af-art-lookup>span:nth-child(1){grid-area:1/1}.af-art-lookup>span:nth-child(2){grid-area:2/1;width:72px}.af-art-lookup>span:nth-child(3){grid-area:3/1}.af-art-lookup>span:nth-child(4){grid-area:2/3;height:24px;border-color:var(--af-g-blue);background:var(--af-g-soft)}.af-art-lookup>span:nth-child(4)::before{top:10px;background:var(--af-g-blue)}.af-art-lookup::after{content:\"\";position:absolute;left:50%;top:50%;width:26px;height:1.5px;margin:-1px 0 0 -13px;background:var(--af-g-blue);opacity:.6}.af-art-tabs{display:flex;flex-direction:column;justify-content:center;gap:7px;padding:0 26px}.af-art-tabs>span{position:relative;left:auto;top:auto;margin:0;height:15px;border-radius:3px 9px 9px 3px}.af-art-tabs>span::before{top:5px;left:8px;right:14px;height:4px}.af-art-form>span::after,.af-art-form>span::before,.af-art-tabs>span::after{display:none}.af-art-tabs>span:nth-child(2){width:86%}.af-art-tabs>span:nth-child(3){width:100%;border-color:var(--af-g-blue);background:var(--af-g-soft)}.af-art-tabs>span:nth-child(3)::before{background:var(--af-g-blue)}.af-art-tabs>span:nth-child(4){width:92%}.af-art-tabs>span:nth-child(5){width:78%}.af-art-form{display:flex;flex-direction:column;justify-content:center;gap:9px;padding:0 30px}.af-art-form>span{position:relative;left:auto;top:auto;margin:0;height:14px;box-shadow:none;border-color:#dcdee3}.af-art-form>span:nth-child(-n+2){background:var(--af-g-hl);border-color:transparent}.af-art-form>span:nth-child(2){width:68%}.af-art-form>span:nth-child(4){width:74%}.af-flow{--af-f-fg:#18181b;--af-f-muted:#71717a;--af-f-bd:#e4e4e7;--af-f-bg:#ffffff;--af-f-blue:#0a5cf0;--af-f-soft:rgba(10, 92, 240, 0.08);margin:20px 0 24px;font-family:\"Inter\",ui-sans-serif,system-ui,sans-serif}.dark .af-flow{--af-f-fg:#ececee;--af-f-muted:#9a9aa3;--af-f-bd:#26262b;--af-f-bg:#0f0f12;--af-f-blue:#6ea8ff;--af-f-soft:rgba(110, 168, 255, 0.14)}.af-flow-row{display:flex;flex-wrap:wrap;align-items:center}.af-node{display:inline-flex;align-items:baseline;gap:6px;box-sizing:border-box;padding:7px 14px;border:1px solid var(--af-f-bd);border-radius:8px;background:var(--af-f-bg);color:var(--af-f-fg);font-size:13.5px;line-height:1.3;font-weight:600;letter-spacing:-.01em;white-space:nowrap;text-decoration:none;transition:border-color .15s ease,color .15s ease}a.af-node:hover{border-color:var(--af-f-blue);color:var(--af-f-blue)}a.af-node:focus-visible{outline:2px solid var(--af-f-blue);outline-offset:2px}.af-node-on{border-color:var(--af-f-blue);color:var(--af-f-blue);background:var(--af-f-soft)}.af-node span,.af-node-opt{font-weight:500;color:var(--af-f-muted)}.af-node-opt{border-style:dashed}.af-node span{font-family:\"Inconsolata\",ui-monospace,Menlo,Consolas,monospace;font-size:12px}.af-node-on span{color:var(--af-f-blue)}.af-link{position:relative;flex:0 0 34px;height:1px;background:var(--af-f-bd)}.af-fork-out .af-node::before,.af-link::after{content:\"\";position:absolute;border:3.5px solid transparent;border-left-color:var(--af-f-bd);border-right:0}.af-link::after{right:0;top:-3.5px}.af-flow-fork{display:grid;grid-template-columns:max-content 46px max-content;justify-content:start;align-items:center}.af-fork-in{display:flex;align-items:center}.af-fork-out{display:flex;flex-direction:column;align-items:flex-start;gap:14px}.af-fork-elbow{align-self:stretch}.af-fork-elbow::after,.af-fork-elbow::before{content:\"\";position:absolute;left:0;right:9px;border-color:var(--af-f-bd);border-style:solid}.af-fork-elbow::before{top:25%;bottom:50%;border-width:1px 1px 0 0;border-radius:0 9px 0 0}.af-fork-elbow::after{top:50%;bottom:25%;border-width:0 1px 1px 0;border-radius:0 0 9px 0}.af-fork-elbow,.af-fork-out .af-node{position:relative}.af-fork-out .af-node::before{left:-9px;top:50%;margin-top:-3.5px}.af-flow-note{margin-top:10px;font-size:12.5px;line-height:1.5;color:var(--af-f-muted)}@media (max-width:640px){.af-flow-fork{grid-template-columns:1fr;row-gap:12px}.af-fork-elbow,.af-fork-out .af-node::before{display:none}.af-fork-out{padding-left:18px;border-left:1px solid var(--af-f-bd)}.af-link{flex-basis:22px}}.af-tape{position:relative;overflow:hidden;height:27px;margin:0 0 22px;border-top:1px solid var(--af-bd);border-bottom:1px solid var(--af-bd);-webkit-mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent);mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent)}.af-tape-run{display:flex;width:max-content;height:100%;align-items:center;gap:38px;font-family:\"Inconsolata\",ui-monospace,Menlo,Consolas,monospace;font-size:12px;white-space:nowrap;color:var(--af-muted);animation:af-tape 64s linear infinite}.af-tape-run span{display:inline-flex;gap:7px}.af-tape-run b{font-weight:500;color:var(--af-blue)}@media (prefers-reduced-motion:reduce){.af-tape-run{animation:none}.af-tape{-webkit-mask-image:linear-gradient(90deg,#000 78%,transparent);mask-image:linear-gradient(90deg,#000 78%,transparent)}}"}],"page":{"pagePath":"api-reference-v3/optimizations/start","slug":"/api-reference-v3/optimizations/start","pageMetadata":{"title":"Start Optimization","description":"Start an optimization of a workflow's field descriptions, measured or one-shot","openapi":"POST /v3/workflows/{workflow_id}/optimizations/","href":"/api-reference-v3/optimizations/start"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Start an optimization of a workflow’s field descriptions, measured or one-shot\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Heading,Table}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:_jsxs(_components.em,{children:[`Rate limit tier: `,_jsx(_components.strong,{children:`submission`}),`, 60 requests/min. See `,_jsx(_components.a,{href:`/api-reference-v3/introduction#rate-limits`,children:`Rate limits`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`Starts an `,_jsx(_components.a,{href:`/guides/health/optimizer`,children:`optimization`}),`: a run that rewrites a workflow’s `,_jsx(_components.strong,{children:`field descriptions`}),` to extract more accurately. The call is `,_jsx(_components.strong,{children:`async and fire-and-forget`}),`. It returns `,_jsx(_components.code,{children:`202`}),` at once with the new optimization. Poll it with `,_jsx(_components.a,{href:`/api-reference-v3/optimizations/get`,children:_jsx(_components.code,{children:`GET …/optimizations/{optimization_id}/`})}),` until `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`done`}),` or `,_jsx(_components.code,{children:`failed`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The body is discriminated on `,_jsx(_components.code,{children:`kind`}),`:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`kind`})}),_jsx(_components.th,{children:`What it does`}),_jsx(_components.th,{children:`Body fields`}),_jsx(_components.th,{children:`Needs`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`extraction`})}),_jsxs(_components.td,{children:[`A `,_jsx(_components.strong,{children:`measured`}),` run. It scores the current version against the dataset’s ground truth, then tries rewrites and keeps only those that raise accuracy.`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`max_rounds`}),`, 1 to 10, default 3`]}),_jsxs(_components.td,{children:[`Ground truth in the dataset, else `,_jsx(_components.code,{children:`422 GT_INVALID`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`extraction_oneshot`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`One unmeasured round.`}),` It reflects once on the dataset’s existing extractions and your hint, then applies its suggestion without checking it.`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`user_context`}),`, up to 4000 characters`]}),_jsxs(_components.td,{children:[`A dataset extraction or a `,_jsx(_components.code,{children:`user_context`}),`, else `,_jsx(_components.code,{children:`422 ONESHOT_SIGNALS_MISSING`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A one-shot run reports no accuracy: `,_jsx(_components.code,{children:`baseline_accuracy`}),` and `,_jsx(_components.code,{children:`best_accuracy`}),` stay `,_jsx(_components.code,{children:`null`}),`. Pick it when the dataset has no ground truth yet, or when you want a quick suggestion to review.`]}),`\n`,_jsx(Heading,{level:`2`,id:`one-optimization-at-a-time`,children:`One optimization at a time`}),`\n`,_jsxs(_components.p,{children:[`A workflow runs `,_jsx(_components.strong,{children:`one optimization at a time, of either kind`}),`. A start while another runs returns `,_jsx(_components.code,{children:`409 OPTIMIZATION_ALREADY_RUNNING`}),`. `,_jsx(_components.a,{href:`/api-reference-v3/optimizations/list`,children:`List the workflow’s optimizations`}),` to find the running one. A run whose worker stopped for more than 100 minutes is reported `,_jsx(_components.code,{children:`failed`}),` and no longer blocks.`]}),`\n`,_jsx(Heading,{level:`2`,id:`credits`,children:`Credits`}),`\n`,_jsxs(_components.p,{children:[`A measured run is billed like evals, one extraction per dataset document for the baseline and for every round. A one-shot run is billed one flat charge when it finishes `,_jsx(_components.code,{children:`done`}),`, even when it changes nothing, and nothing when it fails. For either kind, an organization with no credit gets `,_jsx(_components.code,{children:`402 INSUFFICIENT_CREDIT`}),` and nothing starts.`]}),`\n`,_jsxs(_components.p,{children:[`While a measured run evaluates a round, that round’s candidate is the workflow’s latest version, so a document run on the workflow at that moment uses it. The run ends by saving the best descriptions as the latest version. See `,_jsx(_components.a,{href:`/concepts/how-credits-work`,children:`How credits work`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`idempotency`,children:`Idempotency`}),`\n`,_jsxs(_components.p,{children:[`Without an `,_jsx(_components.code,{children:`Idempotency-Key`}),`, `,_jsx(_components.strong,{children:`every call starts a new optimization`}),`. Supplying the header `,_jsx(_components.strong,{children:`replays`}),` instead: a retry with the same key and body returns the `,_jsx(_components.strong,{children:`original`}),` optimization, with the `,_jsx(_components.code,{children:`status`}),` it had at the first call, and starts no second run. Reusing the key with another body returns `,_jsx(_components.code,{children:`422 IDEMPOTENCY_KEY_REUSED`}),`. See `,_jsx(_components.a,{href:`/api-reference-v3/introduction#idempotency`,children:`Idempotency`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Start Optimization","description":"Start an optimization of a workflow's field descriptions, measured or one-shot","openapi":"POST /v3/workflows/{workflow_id}/optimizations/","href":"/api-reference-v3/optimizations/start"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,RequestExample,ResponseExample,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:_jsxs(_components.em,{children:[`Rate limit tier: `,_jsx(_components.strong,{children:`submission`}),`, 60 requests/min. See `,_jsx(_components.a,{href:`/api-reference-v3/introduction#rate-limits`,children:`Rate limits`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`Starts an `,_jsx(_components.a,{href:`/guides/health/optimizer`,children:`optimization`}),`: a run that rewrites a workflow’s `,_jsx(_components.strong,{children:`field descriptions`}),` to extract more accurately. The call is `,_jsx(_components.strong,{children:`async and fire-and-forget`}),`. It returns `,_jsx(_components.code,{children:`202`}),` at once with the new optimization. Poll it with `,_jsx(_components.a,{href:`/api-reference-v3/optimizations/get`,children:_jsx(_components.code,{children:`GET …/optimizations/{optimization_id}/`})}),` until `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`done`}),` or `,_jsx(_components.code,{children:`failed`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The body is discriminated on `,_jsx(_components.code,{children:`kind`}),`:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`kind`})}),_jsx(_components.th,{children:`What it does`}),_jsx(_components.th,{children:`Body fields`}),_jsx(_components.th,{children:`Needs`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`extraction`})}),_jsxs(_components.td,{children:[`A `,_jsx(_components.strong,{children:`measured`}),` run. It scores the current version against the dataset’s ground truth, then tries rewrites and keeps only those that raise accuracy.`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`max_rounds`}),`, 1 to 10, default 3`]}),_jsxs(_components.td,{children:[`Ground truth in the dataset, else `,_jsx(_components.code,{children:`422 GT_INVALID`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`extraction_oneshot`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`One unmeasured round.`}),` It reflects once on the dataset’s existing extractions and your hint, then applies its suggestion without checking it.`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`user_context`}),`, up to 4000 characters`]}),_jsxs(_components.td,{children:[`A dataset extraction or a `,_jsx(_components.code,{children:`user_context`}),`, else `,_jsx(_components.code,{children:`422 ONESHOT_SIGNALS_MISSING`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A one-shot run reports no accuracy: `,_jsx(_components.code,{children:`baseline_accuracy`}),` and `,_jsx(_components.code,{children:`best_accuracy`}),` stay `,_jsx(_components.code,{children:`null`}),`. Pick it when the dataset has no ground truth yet, or when you want a quick suggestion to review.`]}),`\n`,_jsx(Heading,{level:`2`,id:`one-optimization-at-a-time`,children:`One optimization at a time`}),`\n`,_jsxs(_components.p,{children:[`A workflow runs `,_jsx(_components.strong,{children:`one optimization at a time, of either kind`}),`. A start while another runs returns `,_jsx(_components.code,{children:`409 OPTIMIZATION_ALREADY_RUNNING`}),`. `,_jsx(_components.a,{href:`/api-reference-v3/optimizations/list`,children:`List the workflow’s optimizations`}),` to find the running one. A run whose worker stopped for more than 100 minutes is reported `,_jsx(_components.code,{children:`failed`}),` and no longer blocks.`]}),`\n`,_jsx(Heading,{level:`2`,id:`credits`,children:`Credits`}),`\n`,_jsxs(_components.p,{children:[`A measured run is billed like evals, one extraction per dataset document for the baseline and for every round. A one-shot run is billed one flat charge when it finishes `,_jsx(_components.code,{children:`done`}),`, even when it changes nothing, and nothing when it fails. For either kind, an organization with no credit gets `,_jsx(_components.code,{children:`402 INSUFFICIENT_CREDIT`}),` and nothing starts.`]}),`\n`,_jsxs(_components.p,{children:[`While a measured run evaluates a round, that round’s candidate is the workflow’s latest version, so a document run on the workflow at that moment uses it. The run ends by saving the best descriptions as the latest version. See `,_jsx(_components.a,{href:`/concepts/how-credits-work`,children:`How credits work`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`idempotency`,children:`Idempotency`}),`\n`,_jsxs(_components.p,{children:[`Without an `,_jsx(_components.code,{children:`Idempotency-Key`}),`, `,_jsx(_components.strong,{children:`every call starts a new optimization`}),`. Supplying the header `,_jsx(_components.strong,{children:`replays`}),` instead: a retry with the same key and body returns the `,_jsx(_components.strong,{children:`original`}),` optimization, with the `,_jsx(_components.code,{children:`status`}),` it had at the first call, and starts no second run. Reusing the key with another body returns `,_jsx(_components.code,{children:`422 IDEMPOTENCY_KEY_REUSED`}),`. See `,_jsx(_components.a,{href:`/api-reference-v3/introduction#idempotency`,children:`Idempotency`}),`.`]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`curl`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.anyformat.ai/v3/workflows/0686bb97-8c30-70f0-8000-97669e000eb8/optimizations/'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Idempotency-Key: optimize-invoices-2026-07-05'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"kind\": \"extraction\", \"max_rounds\": 3}'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python (SDK)`,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` anyformat.sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`workflow_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"0686bb97-8c30-70f0-8000-97669e000eb8\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# A measured run, scored against the dataset's ground truth.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`optimization `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.start_optimization(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` workflow_id, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"extraction\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`max_rounds`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`idempotency_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"optimize-invoices-2026-07-05\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# A one-shot run, which needs no ground truth.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`one_shot `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.start_optimization(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` workflow_id, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"extraction_oneshot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`user_context`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The total includes VAT.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(optimization.id, optimization.status)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`19`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Anyformat`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@anyformat/sdk'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` af`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Anyformat`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` workflowId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '0686bb97-8c30-70f0-8000-97669e000eb8'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// A measured run, scored against the dataset's ground truth.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` optimization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` af`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`startOptimization`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`workflowId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` kind:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'extraction'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRounds:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` idempotencyKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'optimize-invoices-2026-07-05'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// A one-shot run, which needs no ground truth.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` oneShot`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` af`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`startOptimization`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`workflowId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` kind:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'extraction_oneshot'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` userContext:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'The total includes VAT.'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`optimization`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`optimization`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`Response (202 Accepted)`,numberOfLines:`26`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`26`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"069dcc2c-e14c-7606-8000-2ee4fb17b4f9\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"workflow_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0686bb97-8c30-70f0-8000-97669e000eb8\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"kind\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"extraction\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"evaluating\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"max_rounds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"baseline_accuracy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"best_accuracy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"result_version_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rounds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"round_no\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abcdef1234\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"matched\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mismatched\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accuracy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accepted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"note\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-07-05T10:00:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"per_field\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-07-05T10:00:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finished_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Start Optimization","description":"Start an optimization of a workflow's field descriptions, measured or one-shot","openapi":"POST /v3/workflows/{workflow_id}/optimizations/","href":"/api-reference-v3/optimizations/start"}}}},"mdxExtracts":{"tableOfContents":[{"title":"One optimization at a time","slug":"one-optimization-at-a-time","depth":2,"children":[]},{"title":"Credits","slug":"credits","depth":2,"children":[]},{"title":"Idempotency","slug":"idempotency","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"curl","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'https://api.anyformat.ai/v3/workflows/0686bb97-8c30-70f0-8000-97669e000eb8/optimizations/'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Authorization: Bearer YOUR_API_KEY'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Idempotency-Key: optimize-invoices-2026-07-05'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Content-Type: application/json'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\"kind\": \"extraction\", \"max_rounds\": 3}'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python (SDK)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> anyformat.sdk \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> Client\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">client \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> Client(\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">api_key\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"YOUR_API_KEY\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">workflow_id \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"0686bb97-8c30-70f0-8000-97669e000eb8\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># A measured run, scored against the dataset's ground truth.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">optimization \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> client.start_optimization(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> workflow_id, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"extraction\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">max_rounds\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">3\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">idempotency_key\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"optimize-invoices-2026-07-05\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># A one-shot run, which needs no ground truth.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">one_shot \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> client.start_optimization(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> workflow_id, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"extraction_oneshot\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">user_context\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"The total includes VAT.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(optimization.id, optimization.status)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"TypeScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"typescript\">\u003ccode language=\"typescript\" numberOfLines=\"19\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">Anyformat\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '@anyformat/sdk'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> af\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> new\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> Anyformat\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({ \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">apiKey:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'YOUR_API_KEY'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> });\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> workflowId\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '0686bb97-8c30-70f0-8000-97669e000eb8'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// A measured run, scored against the dataset's ground truth.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> optimization\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> af\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">startOptimization\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">workflowId\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> kind:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'extraction'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> maxRounds:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 3\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> idempotencyKey:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'optimize-invoices-2026-07-05'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// A one-shot run, which needs no ground truth.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> oneShot\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> af\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">startOptimization\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">workflowId\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> kind:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'extraction_oneshot'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> userContext:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'The total includes VAT.'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">optimization\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">id\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">optimization\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">status\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"Response (202 Accepted)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"26\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"069dcc2c-e14c-7606-8000-2ee4fb17b4f9\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"workflow_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0686bb97-8c30-70f0-8000-97669e000eb8\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"kind\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"extraction\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"evaluating\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"max_rounds\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">3\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"baseline_accuracy\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"best_accuracy\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"result_version_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"rounds\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"round_no\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"version_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"abcdef1234\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"matched\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"mismatched\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"accuracy\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0.0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"accepted\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"note\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-07-05T10:00:00Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"per_field\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: []\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-07-05T10:00:00Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"finished_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":["/_mintlify/custom/anyformat/a4950a6f3e3d96f1/landing.js","/_mintlify/custom/anyformat/ca91ef822a1ffa46/examples-gallery.js","/_mintlify/custom/anyformat/cca54c450f4f4609/code-tabs.js"],"openApiReferenceData":{"operation":{"tags":["optimizations"],"summary":"Start an optimization","description":"Start an optimization of a workflow's field descriptions, measured or one-shot","operationId":"v3_start_optimization","security":["c143140c-637c-47d9-ac85-4fd2fae95abb"],"parameters":["1ec3ad7f-86ee-41e7-8698-2d7757d1906b","bda49e38-8d9b-4919-b79e-362339f33c0a"],"requestBody":"8e140087-4964-411b-bf17-66a03973061a","responses":{"202":"d1ca041d-bf49-4215-b4cb-4407e344123a","400":"0dc8fee5-6ec9-4fc1-a373-263661715086","401":"c3a080d3-0d37-4de9-8fb2-23f2b6f758d2","402":"11823001-9174-4a41-ba28-eb6c99a3e208","403":"bde2f4ed-c1e7-4f1d-8833-e11962124820","404":"52257071-3985-4f00-9842-023d8069395d","409":"41d9760c-e531-4fd0-993d-d9be5c8d1dfd","422":"5c04b4f0-1e7c-4bd3-b7d5-c886614008e8","429":"fb9bd5b2-7be4-4bae-a9ad-b3989dedb6c1","500":"8dae8f98-77ba-4e03-8d8e-c746a1b05b85","502":"f1e12c0e-e99f-41f6-8021-9a221da81c1c","503":"94252b75-97f5-4107-9659-5fab1a3b1d52","504":"25426174-2432-44b7-8dd5-8d5e53c3ed94"},"method":"post","type":"path","servers":["c6c6f20c-e5eb-44d2-89ae-cb8ad0796d42"],"path":"/v3/workflows/{workflow_id}/optimizations/","baseUrlOptions":["https://api.anyformat.ai"],"title":"Start an optimization","codeSamples":[],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"5","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -X"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" POST"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'https://api.anyformat.ai/v3/workflows/0686bb97-8c30-70f0-8000-97669e000eb8/optimizations/'"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'Authorization: Bearer YOUR_API_KEY'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'Idempotency-Key: optimize-invoices-2026-07-05'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'Content-Type: application/json'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -d"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '{\"kind\": \"extraction\", \"max_rounds\": 3}'"}}]}},"\n"]}}}},"filename":"curl"},{"dropdown":false,"language":"python","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"python","children":{"type":"code","key":null,"ref":null,"props":{"language":"python","numberOfLines":"16","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"from"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" anyformat.sdk "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" Client"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"client "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" Client("}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"api_key"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"YOUR_API_KEY\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"workflow_id "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"0686bb97-8c30-70f0-8000-97669e000eb8\""}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"# A measured run, scored against the dataset's ground truth."}}}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"optimization "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" client.start_optimization("}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" workflow_id, "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"extraction\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"max_rounds"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"3"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"idempotency_key"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"optimize-invoices-2026-07-05\""}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"# A one-shot run, which needs no ground truth."}}}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"one_shot "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" client.start_optimization("}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" workflow_id, "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"extraction_oneshot\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"user_context"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"The total includes VAT.\""}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#DCDCAA"},"children":"print"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"(optimization.id, optimization.status)"}}]}},"\n"]}}}},"filename":"Python (SDK)"},{"dropdown":false,"language":"typescript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"typescript","children":{"type":"code","key":null,"ref":null,"props":{"language":"typescript","numberOfLines":"19","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"Anyformat"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" } "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"from"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '@anyformat/sdk'"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":";"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" af"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":" new"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":" Anyformat"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"({ "}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"apiKey:"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'YOUR_API_KEY'"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" });"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" workflowId"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '0686bb97-8c30-70f0-8000-97669e000eb8'"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":";"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"// A measured run, scored against the dataset's ground truth."}}}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" optimization"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":" await"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" af"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"startOptimization"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"workflowId"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", {"}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" kind:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'extraction'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" maxRounds:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":" 3"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" idempotencyKey:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'optimize-invoices-2026-07-05'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"});"}}}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"// A one-shot run, which needs no ground truth."}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" oneShot"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":" await"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" af"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"startOptimization"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"workflowId"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", {"}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" kind:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'extraction_oneshot'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" userContext:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'The total includes VAT.'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"});"}}}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"console"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"log"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"optimization"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"id"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"optimization"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"status"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":");"}}]}},"\n"]}}}},"filename":"TypeScript"}],"requestExampleType":"mdx","responseExamples":[{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"26","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"069dcc2c-e14c-7606-8000-2ee4fb17b4f9\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"workflow_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0686bb97-8c30-70f0-8000-97669e000eb8\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"kind\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"extraction\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"status\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"evaluating\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"max_rounds\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"3"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"baseline_accuracy\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"best_accuracy\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"result_version_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"error\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"rounds\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": ["}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"round_no\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"version_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"abcdef1234\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"matched\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"mismatched\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"accuracy\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"0.0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"accepted\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"note\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"created_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"2026-07-05T10:00:00Z\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"per_field\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": []"}}]}},"\n",{"type":"span","key":"42","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"44","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" ],"}}}},"\n",{"type":"span","key":"46","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"created_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"2026-07-05T10:00:00Z\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"48","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"finished_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}}]}},"\n",{"type":"span","key":"50","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"Response (202 Accepted)"}],"responseExampleType":"mdx"},"dependencies":{"parameters":{"1ec3ad7f-86ee-41e7-8698-2d7757d1906b":{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"bda49e38-8d9b-4919-b79e-362339f33c0a":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"oneOf":[{"type":"string","title":"Idempotency-Key","description":"Optional caller-supplied key (Stripe convention). Retrying with the same key returns the original optimization instead of starting (and billing) a second one.","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"Idempotency-Key","description":"Optional caller-supplied key (Stripe convention). Retrying with the same key returns the original optimization instead of starting (and billing) a second one.","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"},"description":"Optional caller-supplied key (Stripe convention). Retrying with the same key returns the original optimization instead of starting (and billing) a second one."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"ExtractionOptimizationRequest","description":"Body for `POST /v3/workflows/{workflow_id}/optimizations/`, discriminated on `kind`.","required":["kind"],"properties":{"kind":{"type":"string","const":"extraction","title":"Kind","description":"A measured run: every round is scored against the dataset's ground truth.","isRequired":true,"uniqueKey":"oneOf.0.kind","typeLabel":"string"},"max_rounds":{"type":"integer","maximum":10,"minimum":1,"title":"Max Rounds","description":"Most rounds the run may try. It stops earlier when rounds stop improving accuracy.","default":3,"uniqueKey":"oneOf.0.max_rounds","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"oneOf.0","typeLabel":"ExtractionOptimizationRequest · object"},{"type":"object","title":"OneshotOptimizationRequest","description":"Body for `POST /v3/workflows/{workflow_id}/optimizations/`, discriminated on `kind`.","required":["kind"],"properties":{"kind":{"type":"string","const":"extraction_oneshot","title":"Kind","description":"A single unmeasured round that needs no ground truth.","isRequired":true,"uniqueKey":"oneOf.1.kind","typeLabel":"string"},"user_context":{"type":"string","maxLength":4000,"title":"User Context","description":"Free text on what the extraction gets wrong. Required when the dataset holds no extraction to learn from.","default":"","uniqueKey":"oneOf.1.user_context","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"oneOf.1","typeLabel":"OneshotOptimizationRequest · object"}],"uniqueKey":"","typeLabel":"ExtractionOptimizationRequest · object | OneshotOptimizationRequest · object"},"examples":{"Example":{"title":"Example","value":{"kind":"extraction","max_rounds":3}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d1ca041d-bf49-4215-b4cb-4407e344123a":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the optimization (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"],"isRequired":true,"uniqueKey":"id","typeLabel":"string"},"workflow_id":{"type":"string","title":"Workflow Id","description":"The optimized workflow (hyphenated UUID).","isRequired":true,"uniqueKey":"workflow_id","typeLabel":"string"},"kind":{"type":"string","enum":["extraction","extraction_oneshot"],"title":"OptimizationKind","isRequired":true,"uniqueKey":"kind","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["evaluating","proposing","done","failed"],"title":"OptimizationStatus","description":"Lifecycle of a run. Non-terminal: `evaluating`, `proposing`. Terminal: `done`, `failed`.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"max_rounds":{"type":"integer","title":"Max Rounds","description":"Most rounds the run may try.","isRequired":true,"uniqueKey":"max_rounds","typeLabel":"integer"},"rounds":{"items":{"properties":{"round_no":{"type":"integer","title":"Round No","description":"0 is the baseline; rounds that propose a change count from 1.","isRequired":true,"uniqueKey":"rounds.items.[INDEX].round_no","typeLabel":"integer"},"matched":{"type":"integer","title":"Matched","description":"Values that matched ground truth.","isRequired":true,"uniqueKey":"rounds.items.[INDEX].matched","typeLabel":"integer"},"mismatched":{"type":"integer","title":"Mismatched","description":"Values that did not match ground truth.","isRequired":true,"uniqueKey":"rounds.items.[INDEX].mismatched","typeLabel":"integer"},"accuracy":{"type":"number","title":"Accuracy","description":"Round accuracy in [0, 1].","isRequired":true,"uniqueKey":"rounds.items.[INDEX].accuracy","typeLabel":"number"},"accepted":{"type":"boolean","title":"Accepted","description":"Whether the round's change was kept.","isRequired":true,"uniqueKey":"rounds.items.[INDEX].accepted","typeLabel":"boolean"},"per_field":{"items":{"properties":{"persistent_id":{"type":"string","title":"Persistent Id","description":"The field's `persistent_id` in the workflow schema.","isRequired":true,"uniqueKey":"rounds.items.[INDEX].per_field.items.[INDEX].persistent_id","typeLabel":"string"},"matched":{"type":"integer","title":"Matched","description":"Values of this field that matched ground truth.","isRequired":true,"uniqueKey":"rounds.items.[INDEX].per_field.items.[INDEX].matched","typeLabel":"integer"},"mismatched":{"type":"integer","title":"Mismatched","description":"Values of this field that did not match ground truth.","isRequired":true,"uniqueKey":"rounds.items.[INDEX].per_field.items.[INDEX].mismatched","typeLabel":"integer"},"accuracy":{"type":"number","title":"Accuracy","description":"`matched / (matched + mismatched)`, 0 when nothing was graded.","isRequired":true,"uniqueKey":"rounds.items.[INDEX].per_field.items.[INDEX].accuracy","typeLabel":"number"},"name":{"oneOf":[{"type":"string","title":"Name","description":"The field's name in the round's version.","uniqueKey":"rounds.items.[INDEX].per_field.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","description":"The field's name in the round's version.","uniqueKey":"rounds.items.[INDEX].per_field.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"uniqueKey":"rounds.items.[INDEX].per_field.items.[INDEX].name","typeLabel":"string | null"}},"type":"object","required":["persistent_id","matched","mismatched","accuracy"],"title":"OptimizationFieldScoreV3","uniqueKey":"rounds.items.[INDEX].per_field.items.[INDEX]","typeLabel":"OptimizationFieldScoreV3 · object"},"type":"array","title":"Per Field","description":"Scores per field. Empty on a list item: read the optimization by id for them.","isRequired":true,"uniqueKey":"rounds.items.[INDEX].per_field","typeLabel":"OptimizationFieldScoreV3 · object[]"},"version_id":{"oneOf":[{"type":"string","title":"Version Id","description":"Workflow version the round scored; `null` before it is minted.","uniqueKey":"rounds.items.[INDEX].version_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Version Id","description":"Workflow version the round scored; `null` before it is minted.","uniqueKey":"rounds.items.[INDEX].version_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"rounds.items.[INDEX].version_id","typeLabel":"string | null"},"note":{"oneOf":[{"type":"string","title":"Note","description":"Why the round was kept or dropped.","uniqueKey":"rounds.items.[INDEX].note.oneOf.0","typeLabel":"string"},{"type":"null","title":"Note","description":"Why the round was kept or dropped.","uniqueKey":"rounds.items.[INDEX].note.oneOf.1","typeLabel":"null"}],"uniqueKey":"rounds.items.[INDEX].note","typeLabel":"string | null"},"created_at":{"oneOf":[{"type":"string","title":"Created At","description":"When the round was recorded (ISO 8601).","format":"date-time","uniqueKey":"rounds.items.[INDEX].created_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Created At","description":"When the round was recorded (ISO 8601).","uniqueKey":"rounds.items.[INDEX].created_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"rounds.items.[INDEX].created_at","typeLabel":"string\u003cdate-time> | null"}},"type":"object","required":["round_no","matched","mismatched","accuracy","accepted","per_field"],"title":"OptimizationRoundV3","uniqueKey":"rounds.items.[INDEX]","typeLabel":"OptimizationRoundV3 · object"},"type":"array","title":"Rounds","isRequired":true,"uniqueKey":"rounds","typeLabel":"OptimizationRoundV3 · object[]"},"baseline_accuracy":{"oneOf":[{"type":"number","title":"Baseline Accuracy","description":"Accuracy before any change; `null` until scored and on a one-shot run.","uniqueKey":"baseline_accuracy.oneOf.0","typeLabel":"number"},{"type":"null","title":"Baseline Accuracy","description":"Accuracy before any change; `null` until scored and on a one-shot run.","uniqueKey":"baseline_accuracy.oneOf.1","typeLabel":"null"}],"uniqueKey":"baseline_accuracy","typeLabel":"number | null"},"best_accuracy":{"oneOf":[{"type":"number","title":"Best Accuracy","description":"Best accuracy any round reached; `null` until scored and on a one-shot run.","uniqueKey":"best_accuracy.oneOf.0","typeLabel":"number"},{"type":"null","title":"Best Accuracy","description":"Best accuracy any round reached; `null` until scored and on a one-shot run.","uniqueKey":"best_accuracy.oneOf.1","typeLabel":"null"}],"uniqueKey":"best_accuracy","typeLabel":"number | null"},"result_version_id":{"oneOf":[{"type":"string","title":"Result Version Id","description":"The workflow version that holds the optimized descriptions; `null` until a round is kept.","uniqueKey":"result_version_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Result Version Id","description":"The workflow version that holds the optimized descriptions; `null` until a round is kept.","uniqueKey":"result_version_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"result_version_id","typeLabel":"string | null"},"error":{"oneOf":[{"type":"string","title":"Error","description":"Why the run failed; `null` unless `status` is `failed`.","uniqueKey":"error.oneOf.0","typeLabel":"string"},{"type":"null","title":"Error","description":"Why the run failed; `null` unless `status` is `failed`.","uniqueKey":"error.oneOf.1","typeLabel":"null"}],"uniqueKey":"error","typeLabel":"string | null"},"created_at":{"oneOf":[{"type":"string","title":"Created At","description":"When the run started (ISO 8601).","format":"date-time","uniqueKey":"created_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Created At","description":"When the run started (ISO 8601).","uniqueKey":"created_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"created_at","typeLabel":"string\u003cdate-time> | null"},"finished_at":{"oneOf":[{"type":"string","title":"Finished At","description":"When the run reached `done` or `failed` (ISO 8601); `null` while it runs.","format":"date-time","uniqueKey":"finished_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Finished At","description":"When the run reached `done` or `failed` (ISO 8601); `null` while it runs.","uniqueKey":"finished_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"finished_at","typeLabel":"string\u003cdate-time> | null"}},"type":"object","required":["id","workflow_id","kind","status","max_rounds","rounds"],"title":"OptimizationV3","description":"One optimization run.","uniqueKey":"","typeLabel":"OptimizationV3 · object"},"examples":{"Example":{"title":"Example","value":{"id":"069dcc2c-e14c-7606-8000-2ee4fb17b4f9","workflow_id":"\u003cstring>","kind":"extraction","status":"evaluating","max_rounds":123,"rounds":[{"round_no":123,"matched":123,"mismatched":123,"accuracy":123,"accepted":true,"per_field":[{"persistent_id":"\u003cstring>","matched":123,"mismatched":123,"accuracy":123,"name":"\u003cstring>"}],"version_id":"\u003cstring>","note":"\u003cstring>","created_at":"2023-11-07T05:31:56Z"}],"baseline_accuracy":123,"best_accuracy":123,"result_version_id":"\u003cstring>","error":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","finished_at":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"headers":{"Idempotent-Replayed":{"description":"`true` when this response replays an earlier request sent with the same `Idempotency-Key`; absent on a first request.","schema":{"type":"string","enum":["true"]}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"exampleType":"generated"},"0dc8fee5-6ec9-4fc1-a373-263661715086":{"description":"`OPERATOR_DEPRECATED` — This workflow version uses a deprecated operator and cannot run.\n`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"VALIDATION_ERROR":{"title":"VALIDATION_ERROR","value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"OPERATOR_DEPRECATED":{"title":"OPERATOR_DEPRECATED","value":{"error":"This workflow version uses a deprecated operator and cannot run.","detail":"This workflow version uses a deprecated operator and cannot run.","error_code":"OPERATOR_DEPRECATED","retryable":false,"request_id":"req_abc123","recovery":"Replace the operator on the nodes in `params.node_ids`, save a new version, and run again."}}},"exampleType":"examples"}},"exampleType":"examples"},"c3a080d3-0d37-4de9-8fb2-23f2b6f758d2":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"INVALID_API_KEY":{"title":"INVALID_API_KEY","value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"title":"MISSING_API_KEY","value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer \u003ckey>` header."}}},"exampleType":"examples"}},"exampleType":"examples"},"11823001-9174-4a41-ba28-eb6c99a3e208":{"description":"`INSUFFICIENT_CREDIT` — The organization has no extraction credit left.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"INSUFFICIENT_CREDIT":{"title":"INSUFFICIENT_CREDIT","value":{"error":"The organization has no extraction credit left.","detail":"The organization has no extraction credit left.","error_code":"INSUFFICIENT_CREDIT","retryable":false,"request_id":"req_abc123","recovery":"Top up the organization's credit or upgrade its plan, then run again."}}},"exampleType":"examples"}},"exampleType":"examples"},"bde2f4ed-c1e7-4f1d-8833-e11962124820":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"ACCESS_DENIED":{"title":"ACCESS_DENIED","value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"title":"insufficient_api_key_scope","value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}},"exampleType":"examples"}},"exampleType":"examples"},"52257071-3985-4f00-9842-023d8069395d":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"NOT_FOUND":{"title":"NOT_FOUND","value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}},"exampleType":"examples"}},"exampleType":"examples"},"41d9760c-e531-4fd0-993d-d9be5c8d1dfd":{"description":"`OPTIMIZATION_ALREADY_RUNNING` — An optimization is already running for this workflow.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"OPTIMIZATION_ALREADY_RUNNING":{"title":"OPTIMIZATION_ALREADY_RUNNING","value":{"error":"An optimization is already running for this workflow.","detail":"An optimization is already running for this workflow.","error_code":"OPTIMIZATION_ALREADY_RUNNING","retryable":true,"request_id":"req_abc123","recovery":"Wait for the running optimization to finish, then start a new one; list the workflow's optimizations to see it."}}},"exampleType":"examples"}},"exampleType":"examples"},"5c04b4f0-1e7c-4bd3-b7d5-c886614008e8":{"description":"`GT_INVALID` — The ground truth is not valid.\n`ONESHOT_SIGNALS_MISSING` — The one-shot optimization has nothing to learn from.\n`EXTRACT_NODE_UNRESOLVED` — The request does not say which extract node to use.\n`IDEMPOTENCY_KEY_REUSED` — The idempotency key was already used with a different request.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"GT_INVALID":{"title":"GT_INVALID","value":{"error":"The ground truth is not valid.","detail":"The ground truth is not valid.","error_code":"GT_INVALID","retryable":false,"request_id":"req_abc123","recovery":"Correct the ground truth against `detail` so it matches the workflow's fields, and upload it again."}},"ONESHOT_SIGNALS_MISSING":{"title":"ONESHOT_SIGNALS_MISSING","value":{"error":"The one-shot optimization has nothing to learn from.","detail":"The one-shot optimization has nothing to learn from.","error_code":"ONESHOT_SIGNALS_MISSING","retryable":false,"request_id":"req_abc123","recovery":"Run documents through the workflow's dataset first, or send a `user_context` that describes what the extraction gets wrong, then start it again."}},"EXTRACT_NODE_UNRESOLVED":{"title":"EXTRACT_NODE_UNRESOLVED","value":{"error":"The request does not say which extract node to use.","detail":"The request does not say which extract node to use.","error_code":"EXTRACT_NODE_UNRESOLVED","retryable":false,"request_id":"req_abc123","recovery":"Name in the request the extract node the ground truth belongs to."}},"IDEMPOTENCY_KEY_REUSED":{"title":"IDEMPOTENCY_KEY_REUSED","value":{"error":"The idempotency key was already used with a different request.","detail":"The idempotency key was already used with a different request.","error_code":"IDEMPOTENCY_KEY_REUSED","retryable":false,"request_id":"req_abc123","recovery":"Resend the original request unchanged to get its result, or read the resource it created from `params.resource_id`; use a new `Idempotency-Key` only for a genuinely new request."}}},"exampleType":"examples"}},"exampleType":"examples"},"fb9bd5b2-7be4-4bae-a9ad-b3989dedb6c1":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"RATE_LIMITED":{"title":"RATE_LIMITED","value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}},"exampleType":"examples"}},"exampleType":"examples"},"8dae8f98-77ba-4e03-8d8e-c746a1b05b85":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"INTERNAL_ERROR":{"title":"INTERNAL_ERROR","value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}},"exampleType":"examples"}},"exampleType":"examples"},"f1e12c0e-e99f-41f6-8021-9a221da81c1c":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"INTERNAL_ERROR":{"title":"INTERNAL_ERROR","value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}},"exampleType":"examples"}},"exampleType":"examples"},"94252b75-97f5-4107-9659-5fab1a3b1d52":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"SERVICE_UNAVAILABLE":{"title":"SERVICE_UNAVAILABLE","value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}},"exampleType":"examples"}},"exampleType":"examples"},"25426174-2432-44b7-8dd5-8d5e53c3ed94":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"],"isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx).","isRequired":true,"uniqueKey":"retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlates this response with server logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`).","uniqueKey":"detail","typeLabel":"any"},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none.","uniqueKey":"params","typeLabel":"object"},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`.","uniqueKey":"doc_url","typeLabel":"string\u003curi>"},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value.","uniqueKey":"recovery","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"GATEWAY_TIMEOUT":{"title":"GATEWAY_TIMEOUT","value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"c143140c-637c-47d9-ac85-4fd2fae95abb":{"ApiKeyAuth":{"type":"http","description":"API key issued from app.anyformat.ai/api-key. Send as `Authorization: Bearer \u003ckey>`.","scheme":"bearer","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"c6c6f20c-e5eb-44d2-89ae-cb8ad0796d42":{"url":"https://api.anyformat.ai","description":"API server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","description":"API key issued from app.anyformat.ai/api-key. Send as `Authorization: Bearer \u003ckey>`.","scheme":"bearer","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key issued from app.anyformat.ai/api-key. Send as `Authorization: Bearer \u003ckey>`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKeyAuth","name":"Authorization"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"https://api.anyformat.ai/schema/?format=json"},"subdomain":"anyformat","siteName":"anyformat","title":"Start Optimization - anyformat","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-03T09:51:19.201Z","originalFileLocation":"api-reference-v3/optimizations/start.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Start an optimization of a workflow\u0026#x27;s field descriptions, measured or one-shot\">\u003cmeta data-mint-head name=\"application-name\" content=\"anyformat\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/anyformat/NnPr2dkczBT_mIdW/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/anyformat/NnPr2dkczBT_mIdW/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/anyformat/NnPr2dkczBT_mIdW/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/anyformat/NnPr2dkczBT_mIdW/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/anyformat/NnPr2dkczBT_mIdW/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/anyformat/NnPr2dkczBT_mIdW/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/anyformat/NnPr2dkczBT_mIdW/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/anyformat/NnPr2dkczBT_mIdW/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/anyformat/NnPr2dkczBT_mIdW/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Start Optimization - anyformat\">\u003cmeta data-mint-head property=\"og:description\" content=\"Start an optimization of a workflow\u0026#x27;s field descriptions, measured or one-shot\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"anyformat\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.anyformat.ai/api-reference-v3/optimizations/start\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://anyformat.mintlify.app/_mintlify/api/og/v2?division=Optimizations\u0026amp;title=Start+Optimization\u0026amp;description=Start+an+optimization+of+a+workflow%27s+field+descriptions%2C+measured+or+one-shot\u0026amp;theme=c205e40eb07780aa729c7f0b\u0026amp;signature=e14a97c6331ef2a124609464363596407ba6705670825800a7dedddc107777fc\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Start Optimization - anyformat\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Start an optimization of a workflow\u0026#x27;s field descriptions, measured or one-shot\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://anyformat.mintlify.app/_mintlify/api/og/v2?division=Optimizations\u0026amp;title=Start+Optimization\u0026amp;description=Start+an+optimization+of+a+workflow%27s+field+descriptions%2C+measured+or+one-shot\u0026amp;theme=c205e40eb07780aa729c7f0b\u0026amp;signature=e14a97c6331ef2a124609464363596407ba6705670825800a7dedddc107777fc\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/anyformat/NnPr2dkczBT_mIdW/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"anyformat\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0066FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.anyformat.ai/api-reference-v3/optimizations/start\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference-v3/optimizations/start.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.anyformat.ai/#organization\",\"name\":\"anyformat\",\"url\":\"https://docs.anyformat.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/anyformat/v2HRpcqi657iKMPg/logo/Logo-horizontal.png?fit=max\u0026auto=format\u0026n=v2HRpcqi657iKMPg\u0026q=85\u0026s=7fe1cfff76171b16c27aea272156c95c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.anyformat.ai#website\",\"name\":\"anyformat\",\"url\":\"https://docs.anyformat.ai\",\"publisher\":{\"@id\":\"https://docs.anyformat.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.anyformat.ai/api-reference-v3/optimizations/start#webpage\",\"url\":\"https://docs.anyformat.ai/api-reference-v3/optimizations/start\",\"name\":\"Start Optimization\",\"description\":\"Start an optimization of a workflow's field descriptions, measured or one-shot\",\"dateModified\":\"2026-11-03T09:51:19.201Z\",\"isPartOf\":{\"@id\":\"https://docs.anyformat.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.anyformat.ai/api-reference-v3/optimizations/start#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.anyformat.ai/api-reference-v3/optimizations/start#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"anyformat\",\"item\":\"https://docs.anyformat.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Start Optimization\",\"item\":\"https://docs.anyformat.ai/api-reference-v3/optimizations/start\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.anyformat.ai/api-reference-v3/optimizations/start#apireference\",\"headline\":\"Start Optimization\",\"name\":\"Start Optimization\",\"description\":\"Start an optimization of a workflow's field descriptions, measured or one-shot\",\"url\":\"https://docs.anyformat.ai/api-reference-v3/optimizations/start\",\"mainEntityOfPage\":{\"@id\":\"https://docs.anyformat.ai/api-reference-v3/optimizations/start#webpage\"},\"dateModified\":\"2026-11-03T09:51:19.201Z\",\"publisher\":{\"@id\":\"https://docs.anyformat.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.anyformat.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"anyformat\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"anyformat","nav":{"global":null,"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":""}]},{"tab":"Guide","icon":"book-open","pages":[{"title":"Guide","href":"/introduction"}]},{"tab":"Examples","icon":"flask","pages":[{"title":"Examples","href":"/examples"}]},{"tab":"API Reference","icon":"code","groups":[{"group":"Overview","pages":[{"title":"Introduction","href":"/api-reference-v3/introduction"},{"title":"Authentication","href":"/api-reference-v3/authentication"},{"title":"Error Handling","href":"/api-reference-v3/errors"},{"title":"Check API Key","openapi":"GET /key-check/","href":"/api-reference-v3/key-check"},{"title":"Node schemas","sidebarTitle":"Node schemas","href":"/api-reference-v3/node-schemas"}]},{"group":"Workflows","pages":[{"title":"List Workflows","openapi":"GET /v3/workflows/","href":"/api-reference-v3/workflows/list"},{"title":"Get Workflow","openapi":"GET /v3/workflows/{workflow_id}/","href":"/api-reference-v3/workflows/get"},{"title":"List Workflow Versions","openapi":"GET /v3/workflows/{workflow_id}/versions/","href":"/api-reference-v3/workflows/versions"},{"title":"Get Workflow Usage","openapi":"GET /v3/workflows/{workflow_id}/usage/","href":"/api-reference-v3/workflows/usage"},{"title":"Create Workflow","openapi":"POST /v3/workflows/","href":"/api-reference-v3/workflows/create"},{"title":"Update Workflow","openapi":"PATCH /v3/workflows/{workflow_id}/","href":"/api-reference-v3/workflows/update"},{"title":"Delete Workflow","openapi":"DELETE /v3/workflows/{workflow_id}/","href":"/api-reference-v3/workflows/delete"}]},{"group":"Upload","pages":[{"title":"Upload Document Packet","openapi":"POST /v3/workflows/{workflow_id}/upload/","href":"/api-reference-v3/workflows/upload"},{"title":"Upload and Run","openapi":"POST /v3/workflows/{workflow_id}/upload/run/","href":"/api-reference-v3/workflows/upload-and-run"},{"title":"Upload from URL","openapi":"POST /v3/workflows/{workflow_id}/upload/from-url/","href":"/api-reference-v3/workflows/upload-from-url"}]},{"group":"Document packets","pages":[{"title":"List Document Packets","openapi":"GET /v3/workflows/{workflow_id}/document-packets/","href":"/api-reference-v3/document-packets/list"},{"title":"Get Document Packet","openapi":"GET /v3/document-packets/{document_packet_id}/","href":"/api-reference-v3/document-packets/get"},{"title":"Run Document Packet","openapi":"POST /v3/document-packets/{document_packet_id}/run/","href":"/api-reference-v3/document-packets/run"},{"title":"Delete Document Packet","openapi":"DELETE /v3/document-packets/{document_packet_id}/","href":"/api-reference-v3/document-packets/delete"}]},{"group":"Runs","pages":[{"title":"List Workflow Runs","openapi":"GET /v3/workflows/{workflow_id}/runs/","href":"/api-reference-v3/runs/list"},{"title":"Get Run","openapi":"GET /v3/runs/{run_id}/","href":"/api-reference-v3/runs/get"}]},{"group":"Corrections","pages":[{"title":"Edit Field","openapi":"POST /v3/extractions/{extraction_id}/fields/edit/","href":"/api-reference-v3/extractions/edit-field"},{"title":"Add Row","openapi":"POST /v3/extractions/{extraction_id}/rows/add/","href":"/api-reference-v3/extractions/add-row"},{"title":"Delete Row","openapi":"POST /v3/extractions/{extraction_id}/rows/delete/","href":"/api-reference-v3/extractions/delete-row"},{"title":"Verify Extraction","openapi":"POST /v3/extractions/{extraction_id}/verify/","href":"/api-reference-v3/extractions/verify"}]},{"group":"Splits","pages":[{"title":"Download a split","openapi":"GET /v3/splits/{split_id}/pdf/","href":"/api-reference-v3/splits/download"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","href":"/api-reference-v3/webhooks/overview"},{"title":"Create Webhook","openapi":"POST /v3/webhooks/","href":"/api-reference-v3/webhooks/create"},{"title":"List Webhooks","openapi":"GET /v3/webhooks/","href":"/api-reference-v3/webhooks/list"},{"title":"Delete Webhook","openapi":"DELETE /v3/webhooks/{webhook_id}/","href":"/api-reference-v3/webhooks/delete"},{"title":"Ping Webhook","openapi":"POST /v3/webhooks/{webhook_id}/ping/","href":"/api-reference-v3/webhooks/ping"}]},{"group":"Parse","pages":[{"title":"Parse a Document","openapi":"POST /v3/parse/","href":"/api-reference-v3/parse/parse"},{"title":"Parse a Document from a URL","openapi":"POST /v3/parse/from-url/","href":"/api-reference-v3/parse/parse-from-url"}]},{"group":"Knowledge","pages":[{"title":"Ask","openapi":"POST /v3/workflows/{workflow_id}/knowledge/ask","href":"/api-reference-v3/knowledge/ask"},{"title":"List","openapi":"GET /v3/workflows/{workflow_id}/knowledge/entries","href":"/api-reference-v3/knowledge/list"},{"title":"Search","openapi":"GET /v3/workflows/{workflow_id}/knowledge/search","href":"/api-reference-v3/knowledge/search"},{"title":"Read","openapi":"GET /v3/workflows/{workflow_id}/knowledge/entry","href":"/api-reference-v3/knowledge/read"},{"title":"Download","openapi":"GET /v3/workflows/{workflow_id}/knowledge/snapshot","href":"/api-reference-v3/knowledge/download"}]},{"group":"Evals","pages":[{"title":"Upload to Dataset","openapi":"POST /v3/workflows/{workflow_id}/dataset/upload/","href":"/api-reference-v3/datasets/upload"},{"title":"Get Ground Truth","openapi":"GET /v3/document-packets/{document_packet_id}/ground-truth/","href":"/api-reference-v3/datasets/get-ground-truth"},{"title":"Set Ground Truth","openapi":"PUT /v3/document-packets/{document_packet_id}/ground-truth/","href":"/api-reference-v3/datasets/set-ground-truth"},{"title":"Launch Eval","openapi":"POST /v3/workflows/{workflow_id}/evals/","href":"/api-reference-v3/evals/launch"},{"title":"List Evals","openapi":"GET /v3/workflows/{workflow_id}/evals/","href":"/api-reference-v3/evals/list"},{"title":"Get Eval","openapi":"GET /v3/workflows/{workflow_id}/evals/{eval_id}/","href":"/api-reference-v3/evals/get"},{"title":"Get Eval Accuracy","openapi":"GET /v3/workflows/{workflow_id}/evals/{eval_id}/accuracy/","href":"/api-reference-v3/evals/accuracy"},{"title":"Get Eval Document Fields","openapi":"GET /v3/workflows/{workflow_id}/evals/{eval_id}/document-packets/{document_packet_id}/fields/","href":"/api-reference-v3/evals/document-packet-fields"},{"title":"List Dataset Tags","description":"A workflow's dataset tags, the ids the tag filters on evals and accuracy take","openapi":"GET /v3/workflows/{workflow_id}/dataset/tags/","href":"/api-reference-v3/datasets/tags"}]},{"group":"Optimizations","pages":[{"title":"Start Optimization","openapi":"POST /v3/workflows/{workflow_id}/optimizations/","href":"/api-reference-v3/optimizations/start"},{"title":"List Optimizations","description":"List a workflow's optimizations, newest first","openapi":"GET /v3/workflows/{workflow_id}/optimizations/","href":"/api-reference-v3/optimizations/list"},{"title":"Get Optimization","openapi":"GET /v3/workflows/{workflow_id}/optimizations/{optimization_id}/","href":"/api-reference-v3/optimizations/get"}]},{"group":"SDKs and tools","pages":[{"title":"SDKs and tools","sidebarTitle":"SDKs","href":"/api-reference-v3/sdks"},{"title":"Python SDK","sidebarTitle":"Python","href":"/api-reference-v3/sdks/python"},{"title":"TypeScript SDK","sidebarTitle":"TypeScript","href":"/api-reference-v3/sdks/typescript"},{"title":"Command line (afx)","sidebarTitle":"CLI (afx)","href":"/api-reference-v3/cli"},{"title":"MCP server","sidebarTitle":"MCP server","href":"/api-reference-v3/mcp"},{"title":"SDK migration: 0.x to 1.0","href":"/api-reference-v3/sdk-migration"},{"title":"Migrating from v2","href":"/api-reference-v3/migrating-from-v2"}]},{"group":"API v2 (retired)","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Check API Key","href":"/api-reference/key-check"},{"title":"Response Formats","href":"/api-reference/response-formats"},{"title":"Error Handling","href":"/api-reference/errors"},{"title":"v2 → v3 migration","href":"/api-reference/v2-migration"},{"group":"v2 SDKs","pages":[{"title":"SDKs","href":"/api-reference/sdks/overview"},{"title":"TypeScript SDK Guide","href":"/api-reference/sdks/typescript"},{"title":"Python SDK Guide","href":"/api-reference/sdks/python"}]},{"group":"v2 Workflows","pages":[{"title":"List Workflows","href":"/api-reference/workflows/list"},{"title":"Get Workflow","href":"/api-reference/workflows/get"},{"title":"Create Workflow","href":"/api-reference/workflows/create"},{"title":"Edit a Workflow","href":"/api-reference/workflows/update"},{"title":"Run Workflow","href":"/api-reference/workflows/run"},{"title":"Upload File","href":"/api-reference/workflows/upload"},{"title":"Run Uploaded File","href":"/api-reference/workflows/run-staged"},{"title":"List Workflow Runs","href":"/api-reference/workflows/runs"},{"title":"Delete Workflow","href":"/api-reference/workflows/delete"}]},{"group":"v2 Files","pages":[{"title":"List Files","href":"/api-reference/files/list"},{"title":"Upload File","href":"/api-reference/files/create"},{"title":"Upload File from URL","href":"/api-reference/files/create-from-url"},{"title":"Get File Results","href":"/api-reference/files/results"},{"title":"Delete File","href":"/api-reference/files/delete"}]},{"group":"v2 Webhooks","pages":[{"title":"Overview","href":"/api-reference/webhooks/overview"},{"title":"List Webhooks","href":"/api-reference/webhooks/list"},{"title":"Create Webhook","href":"/api-reference/webhooks/create"},{"title":"Delete Webhook","href":"/api-reference/webhooks/delete"}]}]}]},{"tab":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/changelog/overview"}]}]},"basePath":"","title":"Start Optimization - anyformat","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js","Markdown-BOgQCTwD.js","clsx-BIWXJmsZ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DKZWslLH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-UDqbR6xh.js"]}