Run cell detection on a PDF and return the detected form_fields
along with a reusable form_id. No LLM matching, no fill, no
clear — this is the OCR / layout step that /form/fill and
/form/clear would otherwise run internally.
The returned form_id references the uploaded PDF and its
detected layout, and can be passed back to a subsequent
/form/fill, /form/clear, or /form/detect call as the
single input source — Pulse will skip detection on the fast
path and reuse the cached cells.
Input modes — provide exactly one of:
form_id — re-detect cells on a previously stored PDF.
Useful when callers want to refresh layout after editing or
when chaining detect calls.
file_url — public or pre-signed URL Pulse will download.
file — direct binary upload of the PDF.
All three input modes ride on the same multipart/form-data
request body. (Callers sending Content-Type: application/json
with form_id / file_url are still accepted server-side for
backward compatibility, but the SDKs only model the multipart
form.)
Optional page_range (alias pages, e.g. "1-3,5") restricts
the operation to a subset of pages.
Synchronous by default — returns the detected layout inline.
Set async: true to receive {job_id, status: "pending"}
immediately and poll GET /job/.
Billed at 1 credit per page. Requires the form_filler
feature flag to be enabled for your organization.
Detect form fields on a PDF and return them as structured cells along with a reusable form_id. Returns a FormResult synchronously by default. Set async: true to run in the background and poll GET /job/jobId for the result.
/form/detect is the entry point for the form-filler workflow when you want to inspect the fields Pulse identified on a PDF before filling or clearing them. Use it to preview detected fields, fix a misclassified cell, see which checkboxes are currently selected, or cache the detection result for repeated chained calls.The returned form_id references the uploaded PDF and its detected layout, and can be passed back to any of /form/detect, /form/fill, or /form/clear as the single input source. Pulse will reuse the cached layout instead of re-detecting it.
Provide the PDF in exactly one of the following ways:
form_id: re-detect on a previously stored PDF (returned by an earlier /form/detect, /form/fill, or /form/clear call). Useful when chaining detect calls or refreshing layout after edits.
file_url: public or presigned URL to a PDF.
file: PDF uploaded inline with the request.
Sending more than one (or none) returns 400.
All three input modes use the same multipart/form-data request body, matching the SDK contract.
Billed at 1 credit per page of the PDF being processed. Every response also returns a top-level credits_used for this request and a cumulative plan_info.total_credits_used snapshot for your organization.
When async is false (default), the call returns a FormResult body directly. Since /form/detect does not modify the PDF, neither fields_filled nor fields_cleared is present.
Field
Type
Description
form_id
string (uuid)
ID of the form record produced by this run. Pass to a subsequent /form/detect, /form/fill, or /form/clear call.
page_count
integer
Number of pages in the PDF.
pdf_url
string (uri)
URL to download the (unmodified) PDF binary. Always points at GET /results/jobId/pdf. Requires the same auth as the rest of the API.
Detected cells. Each carries a normalized bounding_box, a type (text / checkbox / signature), the current text content, and for checkbox cells a checkbox_details[] array with per-box center coordinates, selection state, and labels.
credits_used
number
Credits consumed by this request (1 × page_count).
plan_info
object
{ tier, total_credits_used, pages_used } cumulative billing snapshot for your organization (post-request).
All cell coordinates (bounding_box, checkbox_details[].center_coord) are normalized to [0, 1] with a top-left origin. Multiply by your render width / height to convert to pixel coordinates.
Detect the cells once, hand-edit any that were misclassified, and pass the edited cells back to /form/fill along with the cached form_id. The fill call reuses the cached layout instead of re-detecting it.
detect = client.form.detect(file_url="https://example.com/contract.pdf")# Re-tag a cell the detector got wrongedited = []for cell in detect.form_fields or []: if cell.text and cell.text.strip().lower() == "signature": cell.type = "signature" edited.append(cell)fill = client.form.fill( form_id=detect.form_id, instructions="Sign as Jane Doe, dated 2026-05-01.", form_fields=edited,)
Pass form_id (instead of file_url / file) to refresh the layout on a PDF already stored by Pulse. Useful after a /form/clear round-trip, or to grab the latest cells if you suspect drift.
/form/detect request body. All three input modes (file,
file_url, form_id) ride on this single multipart/form-data
schema; the server validates that exactly one is provided.
Set to "true" to run asynchronously and receive {job_id, status} immediately.
Response
Detected layout returned synchronously.
Result body returned by /form/detect, /form/fill, and
/form/clear. For async jobs (async: true) the same shape is
served back under result on
GET /job/{jobId} [blocked].
ID of the form record produced by this run. Pass to a subsequent /form/detect, /form/fill, or /form/clear call as the single input source to iterate without re-uploading the PDF.
URL to download the resulting PDF binary. Always points at GET /results/{jobId}/pdf [blocked] for the originating job. Authenticated callers can replay this URL until the underlying artifact is garbage-collected.
Detected cells of the resulting PDF (refreshed from the filled/cleared output for fill/clear, or freshly detected for /form/detect). Use these as a starting point for further edits.
Billing tier and cumulative usage information for the calling org, including this form run.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Pulse API","colors":{"primary":"#3573f6","light":"#4a90f9","dark":"#2561ef"},"logo":{"light":"https://mintcdn.com/pulseai/OJ897TEZf8bV6lk8/logo-icon.svg?fit=max\u0026auto=format\u0026n=OJ897TEZf8bV6lk8\u0026q=85\u0026s=1062873c6d0f5dd9971e379f2210c1cb","dark":"https://mintcdn.com/pulseai/OJ897TEZf8bV6lk8/logo-icon.svg?fit=max\u0026auto=format\u0026n=OJ897TEZf8bV6lk8\u0026q=85\u0026s=1062873c6d0f5dd9971e379f2210c1cb"},"favicon":"https://mintcdn.com/pulseai/OJ897TEZf8bV6lk8/logo-icon.svg?fit=max\u0026auto=format\u0026n=OJ897TEZf8bV6lk8\u0026q=85\u0026s=1062873c6d0f5dd9971e379f2210c1cb","api":{"openapi":{"source":"api-reference/openapi.yml","overlays":["api-reference/pulse-version.overlay.yaml"]}},"appearance":{"default":"light","strict":true},"background":{"color":{"light":"#ffffff","dark":"#000000"}},"navbar":{"links":[{"href":"https://platform.runpulse.com","label":"Platform"},{"href":"mailto:support@trypulse.ai","label":"Support"}],"primary":{"type":"button","label":"Get API Key","href":"https://platform.runpulse.com/"}},"footer":{"socials":{"x":"https://x.com/Pulse__AI","linkedin":"https://www.linkedin.com/company/pulse-ai-corp"}},"fonts":{"heading":{"family":"Inria Serif"},"body":{"family":"Geist"}},"icons":{"library":"fontawesome"},"integrations":{"posthog":{"apiKey":"phc_FutnpUqAQasGvZ2zQSA1mt9uu14YLiO85JV69tm0cYz"}},"banner":{"content":"**Pulse API v2 is here.** Upgrading from v1? Read [Moving from V1](/v2/moving-from-v1).","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pulseai","hasAudioNarration":false,"actualSubdomain":"pulseai","customDomains":["docs.runpulse.com"],"gitSource":{"type":"github","owner":"pulse-software-corp","repo":"pulse-api","deployBranch":"pulse-dev","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":"","_id":"6aea3a8ca753b7b0d57a1a6e"},"chroma":{"liveDeploymentHistoryId":"6aeb761eabab6f1fd92eadca","collectionId":"39d7e713-7d91-4940-b071-8ee3b24cf8e8","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeb761eabab6f1fd92eadca"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aed15aa636393f4fd79f708","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"API Reference","count":201},{"language":"default","tag":"Documentation","count":83},{"language":"default","tag":"Errors","count":46},{"language":"default","tag":"Codes","count":45},{"language":"default","tag":"Configs","count":42},{"language":"default","tag":"Cookbooks","count":40},{"language":"default","tag":"Platform Reference","count":28},{"language":"default","tag":"Core Concepts","count":19},{"language":"default","tag":"Agent Tools","count":16},{"language":"default","tag":"Pipeline Steps","count":14}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"rbac-expansion","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":"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":"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},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".build-examples{position:relative;padding-left:48px}.build-examples::before{content:'';position:absolute;left:23px;top:48px;bottom:48px;width:2px;background-color:rgba(255, 255, 255, 0.1)}.example{display:flex;align-items:flex-start;margin-bottom:48px;position:relative}.icon-container{position:relative;left:-48px;margin-right:-24px;width:46px;height:46px;border-radius:12px;background:#1c1c1c;border:1px solid rgba(255, 255, 255, 0.1);display:flex;align-items:center;justify-content:center;z-index:1}.icon-container i{font-size:20px;color:#ffffff}.content{flex:1}.content h3{margin:0 0 8px 0;font-size:20px;font-weight:500}.content p{margin:0;color:rgba(255, 255, 255, 0.7);line-height:1.5}.nav-logo-name{display:flex!important;color:#ffffff;font-size:1.2rem;font-weight:500}.logo-title{display:block!important;visibility:visible!important;opacity:1!important}img[src*=\"/images/platform/\"]{display:block;width:auto;max-width:100%;height:auto;margin:16px auto 24px;background:#ffffff;border:1px solid rgba(15, 23, 42, 0.14);border-radius:8px;box-shadow:0 1px 1px rgba(15, 23, 42, 0.04)}html[class~=\"dark\"] img[src*=\"/images/platform/\"]{background:#020617;border-color:rgba(226, 232, 240, 0.16);box-shadow:0 1px 1px rgba(0, 0, 0, 0.28)}figure.frame img{max-height:440px;width:auto}.mdx-content[data-page-href*=\"/v2/\"] .mermaid svg{max-height:460px}#content-area:has(.api-section) #page-title{font-size:28px;line-height:1.25}#content-area:has(.api-section) .mt-2.text-lg.prose,#content-area:has(.api-section) .mt-2.text-lg.prose p{font-size:14px;line-height:1.6}.api-section-heading-title{margin-top:1rem}.api-section-heading{row-gap:0.5rem}.api-section .pt-6.pb-4{padding-top:0.25rem;padding-bottom:0.25rem}.primitive-param-field>.py-6,.object-param-field>.py-6{padding-top:0.75rem;padding-bottom:0.75rem}.primitive-param-field>.py-6>.mt-4,.object-param-field>.py-6>.mt-4{margin-top:0.25rem}[data-component-part=\"field-info-pill\"]{word-break:normal;overflow-wrap:anywhere}[data-pulse-more]>div>.param-head{cursor:pointer}[data-pulse-more]>div>.param-head::before{content:'';position:absolute;left:-16px;top:8px;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;color:rgb(120 113 108);transform:rotate(-45deg);transition:transform 0.15s}[data-pulse-open]>div>.param-head::before{transform:rotate(45deg);top:6px}[data-pulse-extra]:not([data-pulse-shown]){display:none}[data-pulse-extra]{margin-top:0.5rem}details[data-pulse-children]{margin-top:0.25rem;border:0}details[data-pulse-children]>summary{display:none}details[data-pulse-children]>.expandable-content{margin:0;padding:0 0 0 1rem;border-top:0;border-left:1px solid rgb(231 229 228)}html.dark details[data-pulse-children]>.expandable-content{border-left-color:rgb(255 255 255 / 0.1)}.method-nav-pill{width:auto}.method-nav-pill>[data-pulse-method]{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border-radius:5px;font-size:0;color:var(--pulse-method-color);background:var(--pulse-method-tint)}.method-nav-pill>[data-pulse-method]::before{content:'';width:13px;height:13px;background-color:currentColor;-webkit-mask:var(--pulse-method-icon) center / contain no-repeat;mask:var(--pulse-method-icon) center / contain no-repeat}[data-pulse-method=\"post\"]{--pulse-method-color: #1d4ed8;--pulse-method-tint: #dbeafe;--pulse-method-icon: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E\")}[data-pulse-method=\"get\"]{--pulse-method-color: #15803d;--pulse-method-tint: #dcfce7;--pulse-method-icon: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 7 7 17'/%3E%3Cpath d='M17 17H7V7'/%3E%3C/svg%3E\")}[data-pulse-method=\"del\"],[data-pulse-method=\"delete\"]{--pulse-method-color: #b91c1c;--pulse-method-tint: #fee2e2;--pulse-method-icon: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E\")}[data-pulse-method=\"patch\"],[data-pulse-method=\"put\"]{--pulse-method-color: #b45309;--pulse-method-tint: #fef3c7;--pulse-method-icon: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z'/%3E%3Cpath d='m15 5 4 4'/%3E%3C/svg%3E\")}html.dark [data-pulse-method=\"post\"]{--pulse-method-color: #93c5fd;--pulse-method-tint: rgb(59 130 246 / 0.2)}html.dark [data-pulse-method=\"get\"]{--pulse-method-color: #86efac;--pulse-method-tint: rgb(34 197 94 / 0.2)}html.dark [data-pulse-method=\"del\"],html.dark [data-pulse-method=\"delete\"]{--pulse-method-color: #fca5a5;--pulse-method-tint: rgb(239 68 68 / 0.2)}html.dark [data-pulse-method=\"patch\"],html.dark [data-pulse-method=\"put\"]{--pulse-method-color: #fcd34d;--pulse-method-tint: rgb(245 158 11 / 0.2)}[data-testid=\"try-it-button\"]{display:none}#content-area div:has(>div>div>.method-pill),#content-area div:has(>.method-pill){border:0;padding:0;background:none}#content-area div:has(>.method-pill){gap:0.5rem}.method-pill[data-pulse-method]{display:inline-flex;align-items:center;gap:4px;padding:1px 6px;border-radius:5px;font-size:12px;font-weight:500;line-height:18px;color:var(--pulse-method-color);background:var(--pulse-method-tint)}.method-pill[data-pulse-method]::before{content:'';width:12px;height:12px;background-color:currentColor;-webkit-mask:var(--pulse-method-icon) center / contain no-repeat;mask:var(--pulse-method-icon) center / contain no-repeat}#content-area div:has(>.method-pill) [data-component-part=\"scroll-area-content\"] div{font-size:13px;font-weight:400;color:rgb(82 81 78)}html.dark #content-area div:has(>.method-pill) [data-component-part=\"scroll-area-content\"] div{color:rgb(255 255 255 / 0.6)}"}],"page":{"pagePath":"api-reference/endpoint/form-detect","slug":"/api-reference/endpoint/form-detect","pageMetadata":{"title":"Detect Form Fields","openapi":"api-reference/openapi.yml POST /form/detect","description":"Run cell detection on a PDF and return the detected `form_fields`\nalong with a reusable `form_id`. No LLM matching, no fill, no\nclear — this is the OCR / layout step that `/form/fill` and\n`/form/clear` would otherwise run internally.\n\nThe returned `form_id` references the uploaded PDF and its\ndetected layout, and can be passed back to a subsequent\n`/form/fill`, `/form/clear`, or `/form/detect` call as the\nsingle input source — Pulse will skip detection on the fast\npath and reuse the cached cells.\n\n**Input modes** — provide exactly one of:\n- `form_id` — re-detect cells on a previously stored PDF.\n Useful when callers want to refresh layout after editing or\n when chaining detect calls.\n- `file_url` — public or pre-signed URL Pulse will download.\n- `file` — direct binary upload of the PDF.\n\nAll three input modes ride on the same `multipart/form-data`\nrequest body. (Callers sending `Content-Type: application/json`\nwith `form_id` / `file_url` are still accepted server-side for\nbackward compatibility, but the SDKs only model the multipart\nform.)\n\nOptional `page_range` (alias `pages`, e.g. `\"1-3,5\"`) restricts\nthe operation to a subset of pages.\n\nSynchronous by default — returns the detected layout inline.\nSet `async: true` to receive `{job_id, status: \"pending\"}`\nimmediately and poll [GET /job/{jobId}](api:GET/job/{jobId}).\n\nBilled at **1 credit per page**. Requires the `form_filler`\nfeature flag to be enabled for your organization.","href":"/api-reference/endpoint/form-detect"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Run cell detection on a PDF and return the detected \", _jsx(_components.code, {\n children: \"form_fields\"\n }), \"\\nalong with a reusable \", _jsx(_components.code, {\n children: \"form_id\"\n }), \". No LLM matching, no fill, no\\nclear — this is the OCR / layout step that \", _jsx(_components.code, {\n children: \"/form/fill\"\n }), \" and\\n\", _jsx(_components.code, {\n children: \"/form/clear\"\n }), \" would otherwise run internally.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The returned \", _jsx(_components.code, {\n children: \"form_id\"\n }), \" references the uploaded PDF and its\\ndetected layout, and can be passed back to a subsequent\\n\", _jsx(_components.code, {\n children: \"/form/fill\"\n }), \", \", _jsx(_components.code, {\n children: \"/form/clear\"\n }), \", or \", _jsx(_components.code, {\n children: \"/form/detect\"\n }), \" call as the\\nsingle input source — Pulse will skip detection on the fast\\npath and reuse the cached cells.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Input modes\"\n }), \" — provide exactly one of:\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"form_id\"\n }), \" — re-detect cells on a previously stored PDF.\\nUseful when callers want to refresh layout after editing or\\nwhen chaining detect calls.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"file_url\"\n }), \" — public or pre-signed URL Pulse will download.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"file\"\n }), \" — direct binary upload of the PDF.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"All three input modes ride on the same \", _jsx(_components.code, {\n children: \"multipart/form-data\"\n }), \"\\nrequest body. (Callers sending \", _jsx(_components.code, {\n children: \"Content-Type: application/json\"\n }), \"\\nwith \", _jsx(_components.code, {\n children: \"form_id\"\n }), \" / \", _jsx(_components.code, {\n children: \"file_url\"\n }), \" are still accepted server-side for\\nbackward compatibility, but the SDKs only model the multipart\\nform.)\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Optional \", _jsx(_components.code, {\n children: \"page_range\"\n }), \" (alias \", _jsx(_components.code, {\n children: \"pages\"\n }), \", e.g. \", _jsx(_components.code, {\n children: \"\\\"1-3,5\\\"\"\n }), \") restricts\\nthe operation to a subset of pages.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Synchronous by default — returns the detected layout inline.\\nSet \", _jsx(_components.code, {\n children: \"async: true\"\n }), \" to receive \", _jsx(_components.code, {\n children: \"{job_id, status: \\\"pending\\\"}\"\n }), \"\\nimmediately and poll \", _jsx(_components.a, {\n href: \"api:GET/job/%7BjobId%7D\",\n children: \"GET /job/\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Billed at \", _jsx(_components.strong, {\n children: \"1 credit per page\"\n }), \". Requires the \", _jsx(_components.code, {\n children: \"form_filler\"\n }), \"\\nfeature flag to be enabled for your organization.\"]\n })]\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`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Info,Note,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Detect form fields on a PDF and return them as structured cells along with a reusable `,_jsx(_components.code,{children:`form_id`}),`. Returns a `,_jsx(_components.code,{children:`FormResult`}),` synchronously by default. Set `,_jsx(_components.code,{children:`async: true`}),` to run in the background and poll `,_jsxs(_components.a,{href:`/api-reference/endpoint/poll`,children:[`GET /job/`,`{`,`jobId`,`}`]}),` for the result.`]})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`/form/detect`}),` is the entry point for the form-filler workflow when you want to inspect the fields Pulse identified on a PDF before filling or clearing them. Use it to preview detected fields, fix a misclassified cell, see which checkboxes are currently selected, or cache the detection result for repeated chained calls.`]}),`\n`,_jsxs(_components.p,{children:[`The returned `,_jsx(_components.code,{children:`form_id`}),` references the uploaded PDF and its detected layout, and can be passed back to any of `,_jsx(_components.code,{children:`/form/detect`}),`, `,_jsx(_components.code,{children:`/form/fill`}),`, or `,_jsx(_components.code,{children:`/form/clear`}),` as the single input source. Pulse will reuse the cached layout instead of re-detecting it.`]}),`\n`,_jsx(Heading,{level:`3`,id:`providing-the-pdf`,children:`Providing the PDF`}),`\n`,_jsxs(_components.p,{children:[`Provide the PDF in `,_jsx(_components.strong,{children:`exactly one`}),` of the following ways:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`form_id`}),`: re-detect on a previously stored PDF (returned by an earlier `,_jsx(_components.code,{children:`/form/detect`}),`, `,_jsx(_components.code,{children:`/form/fill`}),`, or `,_jsx(_components.code,{children:`/form/clear`}),` call). Useful when chaining detect calls or refreshing layout after edits.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`file_url`}),`: public or presigned URL to a PDF.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`file`}),`: PDF uploaded inline with the request.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Sending more than one (or none) returns `,_jsx(_components.code,{children:`400`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`All three input modes use the same `,_jsx(_components.code,{children:`multipart/form-data`}),` request body, matching the SDK contract.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`pricing`,children:`Pricing`}),`\n`,_jsxs(_components.p,{children:[`Billed at `,_jsx(_components.strong,{children:`1 credit per page`}),` of the PDF being processed. Every response also returns a top-level `,_jsx(_components.code,{children:`credits_used`}),` for `,_jsx(_components.strong,{children:`this request`}),` and a cumulative `,_jsx(_components.code,{children:`plan_info.total_credits_used`}),` snapshot for your organization.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`form_id`})}),_jsx(_components.td,{children:`string (uuid)`}),_jsx(_components.td,{children:`One of these`}),_jsx(_components.td,{children:`Re-detect on a previously stored PDF.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`file_url`})}),_jsx(_components.td,{children:`string (uri)`}),_jsx(_components.td,{children:`One of these`}),_jsx(_components.td,{children:`Public or presigned URL of a PDF.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`file`})}),_jsx(_components.td,{children:`binary`}),_jsx(_components.td,{children:`One of these`}),_jsx(_components.td,{children:`PDF uploaded inline with the request.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`page_range`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`1-based page filter, for example `,_jsx(_components.code,{children:`\"1,3-5\"`}),`. Alias `,_jsx(_components.code,{children:`pages`}),` accepted.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`async`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`When `,_jsx(_components.code,{children:`true`}),`, returns `,_jsx(_components.code,{children:`{ job_id, status: \"pending\" }`}),` immediately (HTTP 202) and processes the job in the background. Default `,_jsx(_components.code,{children:`false`}),`.`]})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(Heading,{level:`3`,id:`sync-200--formresult`,children:[`Sync (200): `,_jsx(_components.code,{children:`FormResult`})]}),`\n`,_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`async`}),` is `,_jsx(_components.code,{children:`false`}),` (default), the call returns a `,_jsx(_components.code,{children:`FormResult`}),` body directly. Since `,_jsx(_components.code,{children:`/form/detect`}),` does not modify the PDF, neither `,_jsx(_components.code,{children:`fields_filled`}),` nor `,_jsx(_components.code,{children:`fields_cleared`}),` is present.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`form_id`})}),_jsx(_components.td,{children:`string (uuid)`}),_jsxs(_components.td,{children:[`ID of the form record produced by this run. Pass to a subsequent `,_jsx(_components.code,{children:`/form/detect`}),`, `,_jsx(_components.code,{children:`/form/fill`}),`, or `,_jsx(_components.code,{children:`/form/clear`}),` call.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`page_count`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Number of pages in the PDF.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pdf_url`})}),_jsx(_components.td,{children:`string (uri)`}),_jsxs(_components.td,{children:[`URL to download the (unmodified) PDF binary. Always points at `,_jsxs(_components.a,{href:`/api-reference/endpoint/poll`,children:[`GET /results/`,`{`,`jobId`,`}`,`/pdf`]}),`. Requires the same auth as the rest of the API.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`form_fields`})}),_jsxs(_components.td,{children:[`array of `,_jsx(_components.a,{href:`/api-reference/endpoint/form-fill#response.body.form_fields`,children:_jsx(_components.code,{children:`FormCell`})})]}),_jsxs(_components.td,{children:[`Detected cells. Each carries a normalized `,_jsx(_components.code,{children:`bounding_box`}),`, a `,_jsx(_components.code,{children:`type`}),` (`,_jsx(_components.code,{children:`text`}),` / `,_jsx(_components.code,{children:`checkbox`}),` / `,_jsx(_components.code,{children:`signature`}),`), the current `,_jsx(_components.code,{children:`text`}),` content, and for checkbox cells a `,_jsx(_components.code,{children:`checkbox_details[]`}),` array with per-box center coordinates, selection state, and labels.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`credits_used`})}),_jsx(_components.td,{children:`number`}),_jsxs(_components.td,{children:[`Credits consumed by this request (`,_jsx(_components.code,{children:`1 × page_count`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`plan_info`})}),_jsx(_components.td,{children:`object`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`{ tier, total_credits_used, pages_used }`}),` cumulative billing snapshot for your organization (post-request).`]})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`31`,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:`31`,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:` \"form_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"30fe08e1-922e-4012-9dfa-6aed0df430dc\"`}),_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:` \"page_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`6`}),_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:` \"pdf_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.runpulse.com/results/80690a27-ce39-4ad6-a1c7-70c7745238c3/pdf\"`}),_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:` \"form_fields\"`}),_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:` \"page_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_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:` \"bounding_box\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.044`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.038`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.222`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.052`}),_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:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Name (as shown on your income tax return)\"`})]}),`\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:` \"page_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"checkbox\"`}),_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:` \"bounding_box\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.118`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.226`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.634`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.241`}),_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:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Individual/sole proprietor C corporation S corporation Partnership\"`}),_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:` \"checkbox_details\"`}),_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\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"center_coord\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.125`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.232`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"selected\"`}),_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:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Individual/sole proprietor\"`}),_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\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"center_coord\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.300`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.232`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"selected\"`}),_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:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"C corporation\"`}),_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\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"center_coord\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.418`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.232`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"selected\"`}),_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:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"S corporation\"`}),_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\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"center_coord\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.535`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.232`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"selected\"`}),_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:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Partnership\"`}),_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`,_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:` \"credits_used\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`6.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:` \"plan_info\"`}),_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:` \"tier\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"trial\"`}),_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:` \"total_credits_used\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1278.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:` \"pages_used\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`426`})]}),`\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`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`All cell coordinates (`,_jsx(_components.code,{children:`bounding_box`}),`, `,_jsx(_components.code,{children:`checkbox_details[].center_coord`}),`) are normalized to `,_jsx(_components.code,{children:`[0, 1]`}),` with a top-left origin. Multiply by your render width / height to convert to pixel coordinates.`]})}),`\n`,_jsxs(Heading,{level:`3`,id:`async-202--formjobaccepted`,children:[`Async (202): `,_jsx(_components.code,{children:`FormJobAccepted`})]}),`\n`,_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`async`}),` is `,_jsx(_components.code,{children:`true`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,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:` \"job_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abc123-def456-ghi789\"`}),_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:`\"pending\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Poll `,_jsxs(_components.a,{href:`/api-reference/endpoint/poll`,children:[`GET /job/`,`{`,`jobId`,`}`]}),`. The job’s `,_jsx(_components.code,{children:`result`}),` carries the same `,_jsx(_components.code,{children:`FormResult`}),` shape that the sync flow would have returned inline.`]}),`\n`,_jsx(Heading,{level:`3`,id:`status-codes`,children:`Status Codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`200`}),_jsx(_components.td,{children:`Detected layout returned synchronously.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`202`}),_jsxs(_components.td,{children:[`Async job accepted (`,_jsx(_components.code,{children:`async: true`}),`). Poll `,_jsx(_components.code,{children:`/job/{jobId}`}),` for the result.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:`Missing PDF or more than one PDF source provided.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:`Authentication failed or missing API key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsxs(_components.td,{children:[`Referenced `,_jsx(_components.code,{children:`form_id`}),` not found (or belongs to a different org).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`500`}),_jsx(_components.td,{children:`Internal server error.`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`example-usage`,children:`Example Usage`}),`\n`,_jsx(Heading,{level:`3`,id:`detect-from-url`,children:`Detect From URL`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`15`,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:`15`,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:` pulse `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Pulse`})]}),`\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:` Pulse(`}),_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:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.form.detect(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` file_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.irs.gov/pub/irs-pdf/fw9.pdf\"`}),_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`,_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:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"form_id : `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result.form_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"page_count : `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result.page_count`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"# cells : `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`len`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result.form_fields `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`or`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [])`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"credits : `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result.credits_used`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` (1 x `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result.page_count`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pages)\"`}),_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\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` cell `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (result.form_fields `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`or`}),_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:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" [`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`cell.type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`cell.bounding_box`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`cell.text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`!r}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`11`,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:`11`,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:`PulseClient`}),_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:` \"pulse-ts-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:` client`}),_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:` PulseClient`}),_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:` result`}),_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:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`detect`}),_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:` file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://www.irs.gov/pub/irs-pdf/fw9.pdf\"`}),_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`,_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`form_id=\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form_id`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`page_count=\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`page_count`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`# cells=\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form_fields`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`length`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`curl`,numberOfLines:`4`,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:`4`,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.runpulse.com/form/detect`}),_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:` \"x-api-key: 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:` \"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:` '{\"file_url\": \"https://www.irs.gov/pub/irs-pdf/fw9.pdf\"}'`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`file-upload`,children:`File Upload`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`2`,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:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"intake-form.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"rb\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` f:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.form.detect(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`file`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`f)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`6`,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:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` *`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"fs\"`}),_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:` fileBuffer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`readFileSync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"intake-form.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\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:` blob`}),_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:` Blob`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fileBuffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/pdf\"`}),_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:` result`}),_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:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`detect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`file:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` blob`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`curl`,numberOfLines:`3`,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:`3`,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.runpulse.com/form/detect`}),_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:` \"x-api-key: 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:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"file=@intake-form.pdf\"`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`detect-edit-then-fill`,children:`Detect, Edit, Then Fill`}),`\n`,_jsxs(_components.p,{children:[`Detect the cells once, hand-edit any that were misclassified, and pass the edited cells back to `,_jsx(_components.a,{href:`/api-reference/endpoint/form-fill`,children:_jsx(_components.code,{children:`/form/fill`})}),` along with the cached `,_jsx(_components.code,{children:`form_id`}),`. The fill call reuses the cached layout instead of re-detecting it.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`14`,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:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`detect `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.form.detect(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`file_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/contract.pdf\"`}),_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:`# Re-tag a cell the detector got wrong`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`edited `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` []`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` cell `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` detect.form_fields `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`or`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` []:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` cell.text `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`and`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` cell.text.strip().lower() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signature\"`}),_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\":`#D4D4D4`},children:` cell.type `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signature\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` edited.append(cell)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`fill `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.form.fill(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` form_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`detect.form_id,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` instructions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Sign as Jane Doe, dated 2026-05-01.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` form_fields`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`edited,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`15`,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:`15`,children:[_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:` detect`}),_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:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`detect`}),_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:` file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com/contract.pdf\"`}),_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`,_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:` edited`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`detect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form_fields`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` []).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`cell`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` cell`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`trim`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toLowerCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signature\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cell`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signature\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` cell`}),_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`,_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:` fill`}),_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:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fill`}),_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:` form_id:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` detect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},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:` instructions:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Sign as Jane Doe, dated 2026-05-01.\"`}),_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:` form_fields:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` edited`}),_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`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`re-detect-on-a-stored-form`,children:`Re-detect On A Stored Form`}),`\n`,_jsxs(_components.p,{children:[`Pass `,_jsx(_components.code,{children:`form_id`}),` (instead of `,_jsx(_components.code,{children:`file_url`}),` / `,_jsx(_components.code,{children:`file`}),`) to refresh the layout on a PDF already stored by Pulse. Useful after a `,_jsx(_components.code,{children:`/form/clear`}),` round-trip, or to grab the latest cells if you suspect drift.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`fresh `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.form.detect(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`form_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"00e2c454-4e6f-429b-bd74-320ad94b2153\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`curl`,numberOfLines:`4`,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:`4`,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.runpulse.com/form/detect`}),_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:` \"x-api-key: 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:` \"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:` '{\"form_id\": \"00e2c454-4e6f-429b-bd74-320ad94b2153\"}'`})]}),`\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":"Detect Form Fields","openapi":"api-reference/openapi.yml POST /form/detect","description":"Run cell detection on a PDF and return the detected `form_fields`\nalong with a reusable `form_id`. No LLM matching, no fill, no\nclear — this is the OCR / layout step that `/form/fill` and\n`/form/clear` would otherwise run internally.\n\nThe returned `form_id` references the uploaded PDF and its\ndetected layout, and can be passed back to a subsequent\n`/form/fill`, `/form/clear`, or `/form/detect` call as the\nsingle input source — Pulse will skip detection on the fast\npath and reuse the cached cells.\n\n**Input modes** — provide exactly one of:\n- `form_id` — re-detect cells on a previously stored PDF.\n Useful when callers want to refresh layout after editing or\n when chaining detect calls.\n- `file_url` — public or pre-signed URL Pulse will download.\n- `file` — direct binary upload of the PDF.\n\nAll three input modes ride on the same `multipart/form-data`\nrequest body. (Callers sending `Content-Type: application/json`\nwith `form_id` / `file_url` are still accepted server-side for\nbackward compatibility, but the SDKs only model the multipart\nform.)\n\nOptional `page_range` (alias `pages`, e.g. `\"1-3,5\"`) restricts\nthe operation to a subset of pages.\n\nSynchronous by default — returns the detected layout inline.\nSet `async: true` to receive `{job_id, status: \"pending\"}`\nimmediately and poll [GET /job/{jobId}](api:GET/job/{jobId}).\n\nBilled at **1 credit per page**. Requires the `form_filler`\nfeature flag to be enabled for your organization.","href":"/api-reference/endpoint/form-detect"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[1252,1280,"jobId`]}),` for the "],[7860,7888,"jobId`,`/pdf`]}),`. "],[27269,27297,"jobId`]}),`. The job"]]},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[{"title":"Providing the PDF","slug":"providing-the-pdf","depth":3,"children":[]},{"title":"Pricing","slug":"pricing","depth":3,"children":[]}]},{"title":"Request","slug":"request","depth":2,"children":[{"title":"Request Body","slug":"request-body","depth":3,"children":[]}]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"Sync (200): FormResult","slug":"sync-200--formresult","depth":3,"children":[]},{"title":"Async (202): FormJobAccepted","slug":"async-202--formjobaccepted","depth":3,"children":[]},{"title":"Status Codes","slug":"status-codes","depth":3,"children":[]}]},{"title":"Example Usage","slug":"example-usage","depth":2,"children":[{"title":"Detect From URL","slug":"detect-from-url","depth":3,"children":[]},{"title":"File Upload","slug":"file-upload","depth":3,"children":[]},{"title":"Detect, Edit, Then Fill","slug":"detect-edit-then-fill","depth":3,"children":[]},{"title":"Re-detect On A Stored Form","slug":"re-detect-on-a-stored-form","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/pulseai/5215a343261c1e3e/api-fields.js"],"openApiReferenceData":{"operation":{"summary":"Detect form fields on a PDF","description":"Run cell detection on a PDF and return the detected `form_fields`\nalong with a reusable `form_id`. No LLM matching, no fill, no\nclear — this is the OCR / layout step that `/form/fill` and\n`/form/clear` would otherwise run internally.\n\nThe returned `form_id` references the uploaded PDF and its\ndetected layout, and can be passed back to a subsequent\n`/form/fill`, `/form/clear`, or `/form/detect` call as the\nsingle input source — Pulse will skip detection on the fast\npath and reuse the cached cells.\n\n**Input modes** — provide exactly one of:\n- `form_id` — re-detect cells on a previously stored PDF.\n Useful when callers want to refresh layout after editing or\n when chaining detect calls.\n- `file_url` — public or pre-signed URL Pulse will download.\n- `file` — direct binary upload of the PDF.\n\nAll three input modes ride on the same `multipart/form-data`\nrequest body. (Callers sending `Content-Type: application/json`\nwith `form_id` / `file_url` are still accepted server-side for\nbackward compatibility, but the SDKs only model the multipart\nform.)\n\nOptional `page_range` (alias `pages`, e.g. `\"1-3,5\"`) restricts\nthe operation to a subset of pages.\n\nSynchronous by default — returns the detected layout inline.\nSet `async: true` to receive `{job_id, status: \"pending\"}`\nimmediately and poll [GET /job/{jobId}](api:GET/job/{jobId}).\n\nBilled at **1 credit per page**. Requires the `form_filler`\nfeature flag to be enabled for your organization.","operationId":"formDetect","tags":["Form"],"requestBody":"d26db3f8-993e-4e8a-bfb9-5c98b1b20049","responses":{"200":"5561d29a-bb1b-442e-9ebb-b7bf0268a575","202":"214f78fa-cfe8-4fe8-9fc2-2a7e370aebdf","400":"1673e53a-3175-4ec9-86d3-40f1b22a5700","401":"e4f5ee86-61b8-4da9-83e6-69acd3cc42d9","403":"e8013568-4413-4c41-91f9-1a5801f747c7","404":"1f0326f7-05a9-4b72-9e3f-31a21f08ddb2","429":"9adcd008-5a33-4e62-9faf-d47792bf0692","500":"7e0edb1b-b0fa-4e26-9304-0e9ff02b8b2d","503":"fb5db099-d7c4-4761-a4a6-d9967690adb5"},"parameters":["a836e2ab-7fff-4f09-b158-bde8ab439993"],"method":"post","type":"path","servers":["e1ef7834-5f16-4759-9585-bf90a3a29520"],"security":["3d136d9b-6b58-4a17-9f2d-f27756a950c2"],"path":"/form/detect","baseUrlOptions":["https://api.runpulse.com"],"title":"Detect form fields on a PDF","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"a836e2ab-7fff-4f09-b158-bde8ab439993":{"name":"Pulse-Version","in":"header","required":false,"description":"The API version. These pages document version `1`.","schema":{"type":"string","default":"1","enum":["1"],"isRequired":false,"description":"The API version. These pages document version `1`.","uniqueKey":"","typeLabel":"enum\u003cstring>"}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","description":"`/form/detect` request body. All three input modes (`file`,\n`file_url`, `form_id`) ride on this single `multipart/form-data`\nschema; the server validates that exactly one is provided.","properties":{"file":{"type":"string","format":"binary","description":"Direct binary upload of the PDF. Mutually exclusive with `file_url` and `form_id`.","uniqueKey":"file","typeLabel":"file"},"file_url":{"type":"string","format":"uri","description":"Public or pre-signed URL of a PDF Pulse will download. Mutually exclusive with `file` and `form_id`.","uniqueKey":"file_url","typeLabel":"string\u003curi>"},"form_id":{"type":"string","format":"uuid","description":"Reference to a previously processed form. Mutually exclusive with `file` / `file_url`.","uniqueKey":"form_id","typeLabel":"string\u003cuuid>"},"page_range":{"type":"string","description":"Restrict the operation to a subset of pages, e.g. `\"1-3,5\"`.","uniqueKey":"page_range","typeLabel":"string"},"async":{"type":"string","description":"Set to `\"true\"` to run asynchronously and receive `{job_id, status}` immediately.","uniqueKey":"async","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"file":"\u003cstring>","file_url":"\u003cstring>","form_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","page_range":"\u003cstring>","async":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"5561d29a-bb1b-442e-9ebb-b7bf0268a575":{"description":"Detected layout returned synchronously.","content":{"application/json":{"schema":{"type":"object","description":"Result body returned by `/form/detect`, `/form/fill`, and\n`/form/clear`. For async jobs (`async: true`) the same shape is\nserved back under `result` on\n[GET /job/{jobId}](api:GET/job/{jobId}).","properties":{"form_id":{"type":"string","format":"uuid","description":"ID of the form record produced by this run. Pass to a subsequent `/form/detect`, `/form/fill`, or `/form/clear` call as the single input source to iterate without re-uploading the PDF.","uniqueKey":"form_id","typeLabel":"string\u003cuuid>"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the output PDF.","uniqueKey":"page_count","typeLabel":"integer"},"pdf_url":{"type":"string","description":"URL to download the resulting PDF binary. Always points at [GET /results/{jobId}/pdf](api:GET/results/{jobId}/pdf) for the originating job. Authenticated callers can replay this URL until the underlying artifact is garbage-collected.","uniqueKey":"pdf_url","typeLabel":"string"},"form_fields":{"type":"array","description":"Detected cells of the resulting PDF (refreshed from the filled/cleared output for fill/clear, or freshly detected for `/form/detect`). Use these as a starting point for further edits.","items":{"type":"object","description":"A single detected cell on a form page. Cells are produced by Pulse\ncell detection during a `/form/detect`, `/form/fill`, or\n`/form/clear` call and may be passed back via `form_fields` to\noverride what Pulse uses when filling or clearing.\n\nAll coordinate fields (`bounding_box`, `checkbox_coord`) are\nnormalized to `[0, 1]` relative to the page width / height, so\nthey're independent of the renderer's pixel resolution. Multiply\nby your render width / height to convert to your own pixel space.\n`page_number` is 1-indexed.","properties":{"page_number":{"type":"integer","minimum":1,"description":"1-indexed page the cell belongs to.","uniqueKey":"form_fields.items.[INDEX].page_number","typeLabel":"integer"},"bounding_box":{"type":"array","description":"Cell bounding box `[x1, y1, x2, y2]` normalized to the range `[0, 1]` (top-left origin). Same shape as the `bounding_box` field returned by `/extract`.","items":{"type":"number","minimum":0,"maximum":1,"uniqueKey":"form_fields.items.[INDEX].bounding_box.items.[INDEX]","typeLabel":"number"},"minItems":4,"maxItems":4,"uniqueKey":"form_fields.items.[INDEX].bounding_box","typeLabel":"number[]"},"text":{"type":"string","description":"Current text content of the cell. Empty string for unfilled cells.","uniqueKey":"form_fields.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","description":"Detected cell type. Common values are `text`, `checkbox`, and `signature`. Additional values may be returned as the detector evolves.","enum":["text","checkbox","signature"],"uniqueKey":"form_fields.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"row":{"type":"integer","minimum":0,"description":"Row index inside the detected table this cell belongs to, when the cell sits in a tabular region.","uniqueKey":"form_fields.items.[INDEX].row","typeLabel":"integer"},"col":{"type":"integer","minimum":0,"description":"Column index inside the detected table this cell belongs to, when the cell sits in a tabular region.","uniqueKey":"form_fields.items.[INDEX].col","typeLabel":"integer"},"table_idx":{"type":"integer","minimum":0,"description":"Index of the detected table on the page this cell belongs to (0-indexed). Cells outside any detected table may omit this field.","uniqueKey":"form_fields.items.[INDEX].table_idx","typeLabel":"integer"},"checkbox_details":{"type":"array","description":"Only present when `type == \"checkbox\"`. One entry per individual checkbox inside this cell — a single cell often contains multiple checkboxes (e.g. a \"Filing Status\" row with Single / MFJ / MFS / HoH / QSS). The cell-level `text` is the raw OCR'd line covering the whole cell; per-box labels live here on each detail.","items":{"type":"object","description":"A single checkbox inside a `FormCell` of `type == \"checkbox\"`. Bundles the checkbox's normalized center coordinate, current selection state, and the per-box text label.","properties":{"center_coord":{"type":"array","description":"Normalized `[x, y]` center of the checkbox (in `[0, 1]`, top-left origin), in the same coordinate system as `FormCell.bounding_box`.","items":{"type":"number","minimum":0,"maximum":1,"uniqueKey":"form_fields.items.[INDEX].checkbox_details.items.[INDEX].center_coord.items.[INDEX]","typeLabel":"number"},"minItems":2,"maxItems":2,"uniqueKey":"form_fields.items.[INDEX].checkbox_details.items.[INDEX].center_coord","typeLabel":"number[]"},"selected":{"type":"boolean","description":"`true` when the checkbox is currently filled in (selected), `false` otherwise.","uniqueKey":"form_fields.items.[INDEX].checkbox_details.items.[INDEX].selected","typeLabel":"boolean"},"text":{"type":"string","description":"Per-checkbox text label (e.g. `\"Individual/sole proprietor\"`, `\"S corporation\"`). May be an empty string when no label could be confidently associated with this specific box.","uniqueKey":"form_fields.items.[INDEX].checkbox_details.items.[INDEX].text","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"form_fields.items.[INDEX].checkbox_details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"form_fields.items.[INDEX].checkbox_details","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"form_fields.items.[INDEX]","typeLabel":"object"},"uniqueKey":"form_fields","typeLabel":"object[]"},"fields_filled":{"type":"integer","minimum":0,"description":"Number of cells that were filled by this run. Present on `/form/fill` responses only.","uniqueKey":"fields_filled","typeLabel":"integer"},"fields_cleared":{"type":"integer","minimum":0,"description":"Number of cells that were cleared by this run. Present on `/form/clear` responses only.","uniqueKey":"fields_cleared","typeLabel":"integer"},"credits_used":{"type":"number","format":"float","description":"Number of credits consumed by **this request**. Detect charges 1 credit per page; fill and clear charge 3 credits per page.","uniqueKey":"credits_used","typeLabel":"number\u003cfloat>"},"plan_info":{"type":"object","description":"Billing tier and cumulative usage information for the calling org, including this form run.","properties":{"tier":{"type":"string","description":"Billing tier, e.g. `\"trial\"`, `\"growth\"`, `\"pulse_ultra_2\"`.","uniqueKey":"plan_info.tier","typeLabel":"string"},"total_credits_used":{"type":"number","format":"float","description":"Total credits consumed by the organization to date, including this request. The primary billing metric going forward.","uniqueKey":"plan_info.total_credits_used","typeLabel":"number\u003cfloat>"},"pages_used":{"type":"integer","minimum":0,"description":"Total pages processed by the organization to date, including this request. Kept for backward compatibility with clients that haven't migrated to `total_credits_used`.","uniqueKey":"plan_info.pages_used","typeLabel":"integer"},"note":{"type":"string","description":"Optional human-readable note about billing state for this response (e.g. trial credits remaining). Omitted when no note applies.","uniqueKey":"plan_info.note","typeLabel":"string"}},"uniqueKey":"plan_info","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"form_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","page_count":2,"pdf_url":"\u003cstring>","form_fields":[{"page_number":2,"bounding_box":[0.5],"text":"\u003cstring>","type":"text","row":1,"col":1,"table_idx":1,"checkbox_details":[{"center_coord":[0.5],"selected":true,"text":"\u003cstring>"}]}],"fields_filled":1,"fields_cleared":1,"credits_used":123,"plan_info":{"tier":"\u003cstring>","total_credits_used":123,"pages_used":1,"note":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"214f78fa-cfe8-4fe8-9fc2-2a7e370aebdf":{"description":"Async job accepted (`async: true`). Poll `GET /job/{jobId}` for the result.","content":{"application/json":{"schema":{"type":"object","description":"Acknowledgement returned when a form action is submitted for asynchronous processing (`async: true`). Poll `GET /job/{job_id}` to check status and retrieve results. Unlike other async accepts, form accepts carry no `message` field.","required":["job_id","status"],"properties":{"job_id":{"type":"string","description":"Identifier assigned to the asynchronous job.","isRequired":true,"uniqueKey":"job_id","typeLabel":"string"},"status":{"type":"string","enum":["pending"],"description":"Initial status reported by the server.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"job_id":"\u003cstring>","status":"pending"}}},"exampleType":"generated"}},"exampleType":"generated"},"1673e53a-3175-4ec9-86d3-40f1b22a5700":{"description":"Conflicting input (more than one of `form_id`, `file_url`, `file`) or no PDF source.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"e4f5ee86-61b8-4da9-83e6-69acd3cc42d9":{"description":"Authentication failed or missing API key","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"e8013568-4413-4c41-91f9-1a5801f747c7":{"description":"Form filler not enabled for your organization","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"1f0326f7-05a9-4b72-9e3f-31a21f08ddb2":{"description":"Referenced `form_id` not found","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"9adcd008-5a33-4e62-9faf-d47792bf0692":{"description":"Rate limit exceeded","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"7e0edb1b-b0fa-4e26-9304-0e9ff02b8b2d":{"description":"Internal server error","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"fb5db099-d7c4-4761-a4a6-d9967690adb5":{"description":"Organization retention policy is temporarily unavailable. Processing and charging have not started; retry after the seconds in Retry-After.","headers":{"Retry-After":{"description":"Seconds to wait before retrying a retention-policy refusal.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","description":"A machine-readable request failure.","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code, e.g. `REQ_002`. Safe to branch on.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable description of what went wrong.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"description":"Additional context for the error when available, such as the offending field. Absent when there is nothing to add.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"3d136d9b-6b58-4a17-9f2d-f27756a950c2":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key","x-fern-header":{"name":"apiKey","env":"PULSE_API_KEY"},"scopes":[],"schemeName":"ApiKey"}}},"servers":{"e1ef7834-5f16-4759-9585-bf90a3a29520":{"url":"https://api.runpulse.com","description":"Default Pulse API base URL"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","x-fern-header":{"name":"apiKey","env":"PULSE_API_KEY"},"scopes":[],"schemeName":"ApiKey"},"schema":{"title":"x-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKey","name":"x-api-key"}],"title":"ApiKey"}]},"originalFileLocation":"api-reference/openapi.yml"},"subdomain":"pulseai","siteName":"Pulse API","title":"Detect Form Fields - Pulse API","navMaps":{"firstHrefInVersion":{"v2":{"href":"/v2/introduction","matchLevel":4},"v1":{"href":"/api-reference/endpoint/form-detect","matchLevel":0},"v1 (old)":{"href":"/v1/api-reference/endpoint/form-detect","matchLevel":1}},"firstHrefInLanguage":{}},"lastModified":"2026-09-01T18:35:16.297Z","originalFileLocation":"api-reference/endpoint/form-detect.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";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=\"light\"}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=\"Run cell detection on a PDF and return the detected form_fields along with a reusable form_id. No LLM matching, no fill, no clear — this is the OCR / layout step that /form/fill and /form/clear would otherwise run internally. The returned form_id references the uploaded PDF and its detected layout, and can be passed back to a subsequent /form/fill, /form/clear, or /form/detect call as the single input source — Pulse will skip detection on the fast path and reuse the cached cells. Input modes — provide exactly one of: - form_id — re-detect cells on a previously stored PDF. Useful when callers want to refresh layout after editing or when chaining detect calls. - file_url — public or pre-signed URL Pulse will download. - file — direct binary upload of the PDF. All three input modes ride on the same multipart/form-data request body. (Callers sending Content-Type: application/json with form_id / file_url are still accepted server-side for backward compatibility, but the SDKs only model the multipart form.) Optional page_range (alias pages, e.g. \u0026quot;1-3,5\u0026quot;) restricts the operation to a subset of pages. Synchronous by default — returns the detected layout inline. Set async: true to receive {job_id, status: \u0026quot;pending\u0026quot;} immediately and poll GET /job/{jobId}. Billed at 1 credit per page. Requires the form_filler feature flag to be enabled for your organization.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Pulse API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pulseai/EMicLlWnJwlz5Lxs/_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/pulseai/EMicLlWnJwlz5Lxs/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pulseai/EMicLlWnJwlz5Lxs/_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/pulseai/EMicLlWnJwlz5Lxs/_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/pulseai/EMicLlWnJwlz5Lxs/_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/pulseai/EMicLlWnJwlz5Lxs/_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/pulseai/EMicLlWnJwlz5Lxs/_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/pulseai/EMicLlWnJwlz5Lxs/_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/pulseai/EMicLlWnJwlz5Lxs/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Detect Form Fields - Pulse API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run cell detection on a PDF and return the detected form_fields along with a reusable form_id. No LLM matching, no fill, no clear — this is the OCR / layout step that /form/fill and /form/clear would otherwise run internally. The returned form_id references the uploaded PDF and its detected layout, and can be passed back to a subsequent /form/fill, /form/clear, or /form/detect call as the single input source — Pulse will skip detection on the fast path and reuse the cached cells. Input modes — provide exactly one of: - form_id — re-detect cells on a previously stored PDF. Useful when callers want to refresh layout after editing or when chaining detect calls. - file_url — public or pre-signed URL Pulse will download. - file — direct binary upload of the PDF. All three input modes ride on the same multipart/form-data request body. (Callers sending Content-Type: application/json with form_id / file_url are still accepted server-side for backward compatibility, but the SDKs only model the multipart form.) Optional page_range (alias pages, e.g. \u0026quot;1-3,5\u0026quot;) restricts the operation to a subset of pages. Synchronous by default — returns the detected layout inline. Set async: true to receive {job_id, status: \u0026quot;pending\u0026quot;} immediately and poll GET /job/{jobId}. Billed at 1 credit per page. Requires the form_filler feature flag to be enabled for your organization.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Pulse API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.runpulse.com/api-reference/endpoint/form-detect\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pulseai.mintlify.site/_mintlify/api/og/v2?division=Forms\u0026amp;title=Detect+Form+Fields\u0026amp;description=Run+cell+detection+on+a+PDF+and+return+the+detected+%60form_fields%60%0Aalong+with+a+reusable+%60form_id%60.+No+LLM+matching%2C+no+fill%2C+no%0Aclear+%E2%80%94+this+is+the+OCR+%2F+layout\u0026amp;theme=5d4f2a9c3c9a340a1b09ee30\u0026amp;signature=9cce895436901b8629c0d26300bdd890e3310ac41b18dbe570baa22285d11961\">\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=\"Detect Form Fields - Pulse API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run cell detection on a PDF and return the detected form_fields along with a reusable form_id. No LLM matching, no fill, no clear — this is the OCR / layout step that /form/fill and /form/clear would otherwise run internally. The returned form_id references the uploaded PDF and its detected layout, and can be passed back to a subsequent /form/fill, /form/clear, or /form/detect call as the single input source — Pulse will skip detection on the fast path and reuse the cached cells. Input modes — provide exactly one of: - form_id — re-detect cells on a previously stored PDF. Useful when callers want to refresh layout after editing or when chaining detect calls. - file_url — public or pre-signed URL Pulse will download. - file — direct binary upload of the PDF. All three input modes ride on the same multipart/form-data request body. (Callers sending Content-Type: application/json with form_id / file_url are still accepted server-side for backward compatibility, but the SDKs only model the multipart form.) Optional page_range (alias pages, e.g. \u0026quot;1-3,5\u0026quot;) restricts the operation to a subset of pages. Synchronous by default — returns the detected layout inline. Set async: true to receive {job_id, status: \u0026quot;pending\u0026quot;} immediately and poll GET /job/{jobId}. Billed at 1 credit per page. Requires the form_filler feature flag to be enabled for your organization.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pulseai.mintlify.site/_mintlify/api/og/v2?division=Forms\u0026amp;title=Detect+Form+Fields\u0026amp;description=Run+cell+detection+on+a+PDF+and+return+the+detected+%60form_fields%60%0Aalong+with+a+reusable+%60form_id%60.+No+LLM+matching%2C+no+fill%2C+no%0Aclear+%E2%80%94+this+is+the+OCR+%2F+layout\u0026amp;theme=5d4f2a9c3c9a340a1b09ee30\u0026amp;signature=9cce895436901b8629c0d26300bdd890e3310ac41b18dbe570baa22285d11961\">\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/pulseai/EMicLlWnJwlz5Lxs/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Pulse API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3573f6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.runpulse.com/api-reference/endpoint/form-detect\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/form-detect.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.runpulse.com/#organization\",\"name\":\"Pulse API\",\"url\":\"https://docs.runpulse.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pulseai/OJ897TEZf8bV6lk8/logo-icon.svg?fit=max\u0026auto=format\u0026n=OJ897TEZf8bV6lk8\u0026q=85\u0026s=1062873c6d0f5dd9971e379f2210c1cb\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.runpulse.com#website\",\"name\":\"Pulse API\",\"url\":\"https://docs.runpulse.com\",\"publisher\":{\"@id\":\"https://docs.runpulse.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.runpulse.com/api-reference/endpoint/form-detect#webpage\",\"url\":\"https://docs.runpulse.com/api-reference/endpoint/form-detect\",\"name\":\"Detect Form Fields\",\"description\":\"Run cell detection on a PDF and return the detected form_fields along with a reusable form_id. No LLM matching, no fill, no clear — this is the OCR / layout step that /form/fill and /form/clear would otherwise run internally. The returned form_id references the uploaded PDF and its detected layout, and can be passed back to a subsequent /form/fill, /form/clear, or /form/detect call as the single input source — Pulse will skip detection on the fast path and reuse the cached cells. Input modes — provide exactly one of: - form_id — re-detect cells on a previously stored PDF. Useful when callers want to refresh layout after editing or when chaining detect calls. - file_url — public or pre-signed URL Pulse will download. - file — direct binary upload of the PDF. All three input modes ride on the same multipart/form-data request body. (Callers sending Content-Type: application/json with form_id / file_url are still accepted server-side for backward compatibility, but the SDKs only model the multipart form.) Optional page_range (alias pages, e.g. \\\"1-3,5\\\") restricts the operation to a subset of pages. Synchronous by default — returns the detected layout inline. Set async: true to receive {job_id, status: \\\"pending\\\"} immediately and poll GET /job/{jobId}. Billed at 1 credit per page. Requires the form_filler feature flag to be enabled for your organization.\",\"dateModified\":\"2026-09-01T18:35:16.297Z\",\"isPartOf\":{\"@id\":\"https://docs.runpulse.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.runpulse.com/api-reference/endpoint/form-detect#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.runpulse.com/api-reference/endpoint/form-detect#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Pulse API\",\"item\":\"https://docs.runpulse.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Detect Form Fields\",\"item\":\"https://docs.runpulse.com/api-reference/endpoint/form-detect\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.runpulse.com/api-reference/endpoint/form-detect#apireference\",\"headline\":\"Detect Form Fields\",\"name\":\"Detect Form Fields\",\"description\":\"Run cell detection on a PDF and return the detected form_fields along with a reusable form_id. No LLM matching, no fill, no clear — this is the OCR / layout step that /form/fill and /form/clear would otherwise run internally. The returned form_id references the uploaded PDF and its detected layout, and can be passed back to a subsequent /form/fill, /form/clear, or /form/detect call as the single input source — Pulse will skip detection on the fast path and reuse the cached cells. Input modes — provide exactly one of: - form_id — re-detect cells on a previously stored PDF. Useful when callers want to refresh layout after editing or when chaining detect calls. - file_url — public or pre-signed URL Pulse will download. - file — direct binary upload of the PDF. All three input modes ride on the same multipart/form-data request body. (Callers sending Content-Type: application/json with form_id / file_url are still accepted server-side for backward compatibility, but the SDKs only model the multipart form.) Optional page_range (alias pages, e.g. \\\"1-3,5\\\") restricts the operation to a subset of pages. Synchronous by default — returns the detected layout inline. Set async: true to receive {job_id, status: \\\"pending\\\"} immediately and poll GET /job/{jobId}. Billed at 1 credit per page. Requires the form_filler feature flag to be enabled for your organization.\",\"url\":\"https://docs.runpulse.com/api-reference/endpoint/form-detect\",\"mainEntityOfPage\":{\"@id\":\"https://docs.runpulse.com/api-reference/endpoint/form-detect#webpage\"},\"dateModified\":\"2026-09-01T18:35:16.297Z\",\"publisher\":{\"@id\":\"https://docs.runpulse.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.runpulse.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Pulse API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Pulse API","nav":{"global":null,"versions":[{"version":"v2","default":true,"pages":[{"title":"v2","href":"/v2/introduction"}]},{"version":"v1","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"Overview","href":"/api-reference/introduction"},{"title":"SDKs","href":"/api-reference/sdks"},{"title":"Async Processing","href":"/api-reference/async-processing"},{"title":"Structured Output Guidelines","href":"/api-reference/structured-output-guidelines"},{"title":"Bounding Boxes","href":"/api-reference/bounding-boxes"},{"title":"Supported File Types","href":"/api-reference/supported-file-types"},{"title":"Working with Large Documents","href":"/api-reference/large-documents"}]},{"group":"Pipeline Steps","pages":[{"title":"Pipeline Overview","href":"/api-reference/endpoint/pipeline-overview"},{"title":"Classify Document","openapi":"api-reference/openapi.yml POST /classify","href":"/api-reference/endpoint/classify"},{"title":"Extract File","openapi":"api-reference/openapi.yml POST /extract","href":"/api-reference/endpoint/extract"},{"title":"Schema Extraction","openapi":"api-reference/openapi.yml POST /schema","href":"/api-reference/endpoint/schema"},{"title":"Tables","openapi":"api-reference/openapi.yml POST /tables","href":"/api-reference/endpoint/tables"},{"title":"Charts","openapi":"api-reference/openapi.yml POST /charts","href":"/api-reference/endpoint/charts"},{"title":"Split Document","openapi":"api-reference/openapi.yml POST /split","href":"/api-reference/endpoint/split"}]},{"group":"Batch \u0026 Pipelines","pages":[{"title":"Batch Processing","description":"Process multiple documents through the Pulse pipeline in parallel","href":"/api-reference/endpoint/batch-overview"}]},{"group":"Forms","pages":[{"title":"Detect Form Fields","openapi":"api-reference/openapi.yml POST /form/detect","href":"/api-reference/endpoint/form-detect"},{"title":"Fill Form","openapi":"api-reference/openapi.yml POST /form/fill","description":"Fill the fields of a PDF form with values inferred from a natural\nlanguage `instructions` prompt. Works on both AcroForm PDFs\n(true form fields are written) and flat/scanned PDFs (values\nare rendered as an overlay using detected cells from OCR).\n\n**Input modes** — provide exactly one of:\n- `form_id` — reuse a previously processed form from a prior\n `/form/detect`, `/form/fill`, or `/form/clear` call. Skips\n re-detection (fast path); the cached `form_fields` are\n reused.\n- `file_url` — public or pre-signed URL of a PDF Pulse will\n download.\n- `file` — direct binary upload of the PDF. Pulse runs cell\n detection internally before filling.\n\nAll three input modes ride on the same `multipart/form-data`\nrequest body. (Callers sending `Content-Type: application/json`\nwith `form_id` / `file_url` are still accepted server-side for\nbackward compatibility, but the SDKs only model the multipart\nform.)\n\nOptional `form_fields` lets callers supply or edit the detected\ncells before filling. Optional `page_range` (alias `pages`,\ne.g. `\"1-3,5\"`) restricts the operation to a subset of pages.\n\nSynchronous by default — returns the filled `FormResult` inline\n(including a `pdf_url` you can `GET` to download the PDF\nbinary). Set `async: true` to receive `{job_id, status:\n\"pending\"}` and poll [GET /job/{jobId}](api:GET/job/{jobId}).\n\nBilled at **3 credits per page**. Requires the `form_filler`\nfeature flag to be enabled for your organization.","href":"/api-reference/endpoint/form-fill"},{"title":"Clear Form","openapi":"api-reference/openapi.yml POST /form/clear","href":"/api-reference/endpoint/form-clear"}]},{"group":"Jobs, Results \u0026 Webhooks","pages":[{"title":"Poll Job","openapi":"api-reference/openapi.yml GET /job/{jobId}","href":"/api-reference/endpoint/poll"},{"title":"Cancel Job","openapi":"api-reference/openapi.yml DELETE /job/{jobId}","href":"/api-reference/endpoint/delete-job"},{"title":"Download Large Result","openapi":"api-reference/openapi.yml GET /results/{jobId}","href":"/api-reference/endpoint/large-results"},{"title":"Get Result Image","openapi":"api-reference/openapi.yml GET /results/{jobId}/images/{filename}","href":"/api-reference/endpoint/results-image"},{"title":"Download Result PDF","openapi":"api-reference/openapi.yml GET /results/{jobId}/pdf","href":"/api-reference/endpoint/results-pdf"},{"title":"Configure Webhooks","openapi":"api-reference/openapi.yml POST /webhook","href":"/api-reference/endpoint/webhook"}]},{"group":"Account \u0026 Usage","pages":[{"title":"Get Usage","openapi":"api-reference/openapi.yml GET /usage","href":"/api-reference/endpoint/usage"}]}]},{"tab":"Platform Reference","pages":[{"title":"Platform Reference","href":"/platform-reference/introduction"}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/cookbooks/overview"}]}]},{"version":"v1 (old)","tag":"Old","pages":[{"title":"v1 (old)","href":"/v1/api-reference/endpoint/form-detect"}]}]},"basePath":"","title":"Detect Form Fields - Pulse API","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-DcUtcwZ_.js","dist-CJ9Oly2E.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-C5EfhVm0.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-Myd8dsju.js","utils-C2HkQgW0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-8rSppmTv.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B6MjiCFm.js","snippetPresets-DwrSAONL.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-1-a5UQKQ.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C541m7wZ.js","shallow-CWELCZ77.js","getApiPlaygroundDisplay-CTo5Zn03.js","CodeSnippet-D--dzvnl.js","CodeSnippets-DM3cXEDh.js","Page-CxAy5y67.js","getPastedJson-C-VECgcL.js","icon-BPq2-Mg3.js","MethodPill-D9J5cUHd.js","DuplicateIcon-BqHaxUnD.js","createIcon-CIbcZHp9.js","DynamicMarkdown-BKiHAm_d.js","SectionHeading-DstQXt3H.js","axios-vUo_bRtp.js","Markdown-CpxgzsKA.js","AssistantPageLink-Mk6P3qvh.js"]}