Fill the fields of a PDF form with values inferred from a natural
language instructions prompt. Works on both AcroForm PDFs
(true form fields are written) and flat/scanned PDFs (values
are rendered as an overlay using detected cells from OCR).
Input modes — provide exactly one of:
form_id — reuse a previously processed form from a prior
/form/detect, /form/fill, or /form/clear call. Skips
re-detection (fast path); the cached form_fields are
reused.
file_url — public or pre-signed URL of a PDF Pulse will
download.
file — direct binary upload of the PDF. Pulse runs cell
detection internally before filling.
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 form_fields lets callers supply or edit the detected
cells before filling. Optional page_range (alias pages,
e.g. "1-3,5") restricts the operation to a subset of pages.
Synchronous by default — returns the filled FormResult inline
(including a pdf_url you can GET to download the PDF
binary). Set async: true to receive {job_id, status: "pending"} and poll GET /job/.
Billed at 3 credits per page. Requires the form_filler
feature flag to be enabled for your organization.
Fill a PDF form from natural-language instructions. Returns a FormResult synchronously by default (with a pdf_url you can GET to download the filled PDF). Set async: true to run in the background and poll GET /jobjobId for the result.
/form/fill writes values into the fields of a PDF form based on a natural-language instructions prompt. It works on both PDFs with native form fields (where the values are written directly into the form) and on flat or scanned PDFs (where the values are placed into the detected fields).
Billed at 3 credits per page of the PDF being filled. 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.
Field
Type
Description
form_id
string (uuid)
ID of the new form record produced by this run. Pass back via form_id to chain further fills, clears, or detects.
page_count
integer
Number of pages in the output PDF.
pdf_url
string (uri)
URL to download the filled PDF binary. Always points at GET /results/jobId/pdf. Requires the same auth (API key or JWT) as the rest of the API and only serves results owned by the calling organization.
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.
from pulse import Pulseclient = Pulse(api_key="YOUR_API_KEY")result = client.form.fill( file_url="https://example.com/intake-form.pdf", instructions="Fill in patient name as Jane Doe, DOB 01/15/1990.",)print(f"form_id={result.form_id}")print(f"fields_filled={result.fields_filled}")print(f"credits_used={result.credits_used}")print(f"download: {result.pdf_url}")
import { PulseClient } from "pulse-ts-sdk";const client = new PulseClient({ apiKey: "YOUR_API_KEY" });const result = await client.form.fill({ file_url: "https://example.com/intake-form.pdf", instructions: "Fill in patient name as Jane Doe, DOB 01/15/1990.",});console.log(`form_id=${result.form_id}`);console.log(`fields_filled=${result.fields_filled}`);console.log(`download: ${result.pdf_url}`);
curl -X POST https://api.runpulse.com/form/fill \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "file_url": "https://example.com/intake-form.pdf", "instructions": "Fill in patient name as Jane Doe, DOB 01/15/1990." }'
with open("intake-form.pdf", "rb") as f: result = client.form.fill( file=f, instructions="Fill in patient name as Jane Doe, DOB 01/15/1990.", )
import * as fs from "fs";const fileBuffer = fs.readFileSync("intake-form.pdf");const blob = new Blob([fileBuffer], { type: "application/pdf" });const result = await client.form.fill({ file: blob, instructions: "Fill in patient name as Jane Doe, DOB 01/15/1990.",});
curl -X POST https://api.runpulse.com/form/fill \ -H "x-api-key: YOUR_API_KEY" \ -F "file=@intake-form.pdf" \ -F "instructions=Fill in patient name as Jane Doe, DOB 01/15/1990."
Run /form/detect to inspect the detected cells, optionally edit them, then chain a fill that reuses the same form_id. There is no need to re-upload the PDF.
detect = client.form.detect(file_url="https://example.com/intake-form.pdf")# (Optional) edit detected cells locally, e.g. retype a misclassified celledited = []for cell in detect.form_fields or []: if cell.text and cell.text.strip().lower() == "signature": cell.type = "signature" edited.append(cell)result = client.form.fill( form_id=detect.form_id, instructions="Fill in patient name as Jane Doe, DOB 01/15/1990.", form_fields=edited, # omit to use the cached cells from detect)
const detect = await client.form.detect({ file_url: "https://example.com/intake-form.pdf",});const edited = (detect.form_fields ?? []).map((cell) => cell.text?.trim().toLowerCase() === "signature" ? { ...cell, type: "signature" as const } : cell,);const result = await client.form.fill({ form_id: detect.form_id!, instructions: "Fill in patient name as Jane Doe, DOB 01/15/1990.", form_fields: edited,});
# Step 1: detectcurl -X POST https://api.runpulse.com/form/detect \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"file_url": "https://example.com/intake-form.pdf"}'# Step 2: fill via the form_id from step 1curl -X POST https://api.runpulse.com/form/fill \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "form_id": "<form_id from step 1>", "instructions": "Fill in patient name as Jane Doe, DOB 01/15/1990." }'
Use async: true for long-running jobs (large PDFs, multi-page fills) so the client does not have to keep a connection open.
import timesubmission = client.form.fill( file_url="https://example.com/big-form.pdf", instructions="Fill the form for Jane Doe ...", async_=True, # SDK aliases the reserved keyword)while True: job = client.jobs.get_job(job_id=submission.job_id) if job.status in ("completed", "failed"): break time.sleep(2)result = job.result # same FormResult body as the sync flowprint(f"fields_filled={result['fields_filled']} pdf_url={result['pdf_url']}")
const submission = await client.form.fill({ file_url: "https://example.com/big-form.pdf", instructions: "Fill the form for Jane Doe ...", async: true,});let job = await client.jobs.getJob({ jobId: submission.job_id! });while (job.status !== "completed" && job.status !== "failed") { await new Promise((r) => setTimeout(r, 2000)); job = await client.jobs.getJob({ jobId: submission.job_id! });}const result = job.result as Record<string, unknown>;console.log(`fields_filled=${result.fields_filled} pdf_url=${result.pdf_url}`);
# Submit asynccurl -X POST https://api.runpulse.com/form/fill \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "file_url": "https://example.com/big-form.pdf", "instructions": "Fill the form for Jane Doe ...", "async": true }'# Pollcurl https://api.runpulse.com/job/<job_id> \ -H "x-api-key: YOUR_API_KEY"
The pdf_url returned in FormResult points at GET /results/{job_id}/pdf and requires authentication (API key or JWT).
job_id = result.pdf_url.rstrip("/").split("/")[-2]with open("filled.pdf", "wb") as out: for chunk in client.results.get_pdf(job_id=job_id): out.write(chunk)
const jobId = result.pdf_url!.replace(/\/$/, "").split("/").slice(-2, -1)[0];const pdfStream = await client.results.getPdf({ jobId });// pdfStream is a ReadableStream<Uint8Array>; write to disk however you prefer.
/form/fill 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
Filled FormResult 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-fill","slug":"/api-reference/endpoint/form-fill","pageMetadata":{"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"},"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: [\"Fill the fields of a PDF form with values inferred from a natural\\nlanguage \", _jsx(_components.code, {\n children: \"instructions\"\n }), \" 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\", _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 }), \" — reuse a previously processed form from a prior\\n\", _jsx(_components.code, {\n children: \"/form/detect\"\n }), \", \", _jsx(_components.code, {\n children: \"/form/fill\"\n }), \", or \", _jsx(_components.code, {\n children: \"/form/clear\"\n }), \" call. Skips\\nre-detection (fast path); the cached \", _jsx(_components.code, {\n children: \"form_fields\"\n }), \" are\\nreused.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"file_url\"\n }), \" — public or pre-signed URL of a PDF Pulse will\\ndownload.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"file\"\n }), \" — direct binary upload of the PDF. Pulse runs cell\\ndetection internally before filling.\"]\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: \"form_fields\"\n }), \" lets callers supply or edit the detected\\ncells before filling. Optional \", _jsx(_components.code, {\n children: \"page_range\"\n }), \" (alias \", _jsx(_components.code, {\n children: \"pages\"\n }), \",\\ne.g. \", _jsx(_components.code, {\n children: \"\\\"1-3,5\\\"\"\n }), \") restricts the operation to a subset of pages.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Synchronous by default — returns the filled \", _jsx(_components.code, {\n children: \"FormResult\"\n }), \" inline\\n(including a \", _jsx(_components.code, {\n children: \"pdf_url\"\n }), \" you can \", _jsx(_components.code, {\n children: \"GET\"\n }), \" to download the PDF\\nbinary). Set \", _jsx(_components.code, {\n children: \"async: true\"\n }), \" to receive \", _jsx(_components.code, {\n children: \"{job_id, status: \\\"pending\\\"}\"\n }), \" 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: \"3 credits 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:[`Fill a PDF form from natural-language instructions. Returns a `,_jsx(_components.code,{children:`FormResult`}),` synchronously by default (with a `,_jsx(_components.code,{children:`pdf_url`}),` you can `,_jsx(_components.code,{children:`GET`}),` to download the filled PDF). 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/fill`}),` writes values into the fields of a PDF form based on a natural-language `,_jsx(_components.code,{children:`instructions`}),` prompt. It works on both PDFs with native form fields (where the values are written directly into the form) and on flat or scanned PDFs (where the values are placed into the detected fields).`]}),`\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`}),`: chain off a prior `,_jsx(_components.a,{href:`/api-reference/endpoint/form-detect`,children:_jsx(_components.code,{children:`/form/detect`})}),`, `,_jsx(_components.code,{children:`/form/fill`}),`, or `,_jsx(_components.a,{href:`/api-reference/endpoint/form-clear`,children:_jsx(_components.code,{children:`/form/clear`})}),` call. The cached PDF and `,_jsx(_components.code,{children:`form_fields`}),` are reused, so there is no need to re-upload.`]}),`\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:`3 credits per page`}),` of the PDF being filled. 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:`Reuse a previously processed form. Skips re-upload and re-detection.`})]}),_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 to download and fill.`})]}),_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:`instructions`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`Natural-language description of what to fill into the form. Example: `,_jsx(_components.code,{children:`\"Use John Doe, 123 Main St, born 1990-01-01\"`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`form_fields`})}),_jsxs(_components.td,{children:[`array of `,_jsx(_components.a,{href:`#response.body.form_fields`,children:_jsx(_components.code,{children:`FormCell`})})]}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Optional override for the cells used when filling. Useful when the caller has hand-edited the cells returned by `,_jsx(_components.code,{children:`/form/detect`}),`.`]})]}),_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.`]}),`\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 new form record produced by this run. Pass back via `,_jsx(_components.code,{children:`form_id`}),` to chain further fills, clears, or detects.`]})]}),_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 output 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 filled PDF binary. Always points at `,_jsxs(_components.a,{href:`/api-reference/endpoint/poll`,children:[`GET /results/`,`{`,`jobId`,`}`,`/pdf`]}),`. Requires the same auth (API key or JWT) as the rest of the API and only serves results owned by the calling organization.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`form_fields`})}),_jsxs(_components.td,{children:[`array of `,_jsx(_components.a,{href:`#response.body.form_fields`,children:_jsx(_components.code,{children:`FormCell`})})]}),_jsx(_components.td,{children:`Detected cells of the resulting (filled) PDF, refreshed after the fill.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fields_filled`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Number of cells whose value actually changed during this run (no-op writes are not counted).`})]}),_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:`3 × 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:`32`,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:`32`,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:`\"00e2c454-4e6f-429b-bd74-320ad94b2153\"`}),_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/dab7285d-8a65-4cb6-9d24-d5db64d3798e/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.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:`\"Acme Logistics LLC\"`})]}),`\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:`true`}),_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:` \"fields_filled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`7`}),_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:`18.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:`1284.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:`428`})]}),`\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`}),_jsxs(_components.td,{children:[`Filled `,_jsx(_components.code,{children:`FormResult`}),` 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`}),_jsxs(_components.td,{children:[`Missing PDF, more than one PDF source provided, missing `,_jsx(_components.code,{children:`instructions`}),`, or malformed `,_jsx(_components.code,{children:`form_fields`}),`.`]})]}),_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:`fill-from-url`,children:`Fill From URL`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`13`,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:`13`,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.fill(`})]}),`\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://example.com/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:`#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:`\"Fill in patient name as Jane Doe, DOB 01/15/1990.\"`}),_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:`\"fields_filled=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result.fields_filled`}),_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_used=`}),_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:`\"`}),_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:`\"download: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result.pdf_url`}),_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`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`12`,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:`12`,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:`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:` file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com/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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` instructions:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Fill in patient name as Jane Doe, DOB 01/15/1990.\"`}),_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:\"`fields_filled=\"}),_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:`fields_filled`}),_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:\"`download: \"}),_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:`pdf_url`}),_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:`7`,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:`7`,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/fill`}),_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:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"file_url\": \"https://example.com/intake-form.pdf\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"instructions\": \"Fill in patient name as Jane Doe, DOB 01/15/1990.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`file-upload`,children:`File Upload`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`5`,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:`5`,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.fill(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_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`,_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:`\"Fill in patient name as Jane Doe, DOB 01/15/1990.\"`}),_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(CodeBlock,{filename:`TypeScript`,numberOfLines:`9`,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:`9`,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:`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:` file:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` blob`}),_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:` \"Fill in patient name as Jane Doe, DOB 01/15/1990.\"`}),_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(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/fill`}),_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\"`}),_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:` \"instructions=Fill in patient name as Jane Doe, DOB 01/15/1990.\"`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`detect-first-then-fill`,children:`Detect First, Then Fill`}),`\n`,_jsxs(_components.p,{children:[`Run `,_jsx(_components.a,{href:`/api-reference/endpoint/form-detect`,children:_jsx(_components.code,{children:`/form/detect`})}),` to inspect the detected cells, optionally edit them, then chain a fill that reuses the same `,_jsx(_components.code,{children:`form_id`}),`. There is no need to re-upload the PDF.`]}),`\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/intake-form.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:`# (Optional) edit detected cells locally, e.g. retype a misclassified cell`})}),`\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:`result `}),_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:`\"Fill in patient name as Jane Doe, DOB 01/15/1990.\"`}),_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, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# omit to use the cached cells from detect`})]}),`\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/intake-form.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:` 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:`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:` \"Fill in patient name as Jane Doe, DOB 01/15/1990.\"`}),_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`]})})}),_jsx(CodeBlock,{filename:`curl`,numberOfLines:`14`,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:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Step 1: detect`})}),`\n`,_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://example.com/intake-form.pdf\"}'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Step 2: fill via the form_id from step 1`})}),`\n`,_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/fill`}),_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:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"form_id\": \"\u003cform_id from step 1>\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"instructions\": \"Fill in patient name as Jane Doe, DOB 01/15/1990.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`async-fill-with-polling`,children:`Async Fill With Polling`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`async: true`}),` for long-running jobs (large PDFs, multi-page fills) so the client does not have to keep a connection open.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`submission `}),_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:` 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/big-form.pdf\"`}),_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:` instructions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Fill the form for Jane Doe ...\"`}),_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:` async_`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# SDK aliases the reserved keyword`})]}),`\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\":`#C586C0`},children:`while`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` True`}),_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:` job `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.jobs.get_job(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`job_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`submission.job_id)`})]}),`\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:` job.status `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"failed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` break`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time.sleep(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_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:` job.result `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# same FormResult body as the sync flow`})]}),`\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:`\"fields_filled=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'fields_filled'`}),_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:` pdf_url=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'pdf_url'`}),_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`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`14`,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:`14`,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:` submission`}),_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:` file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com/big-form.pdf\"`}),_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:` \"Fill the form for Jane Doe ...\"`}),_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:` async:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_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:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` job`}),_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:`jobs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getJob`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`jobId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` submission`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`job_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`job`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"completed\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` job`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"failed\"`}),_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:` await`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`r`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setTimeout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`r`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2000`}),_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:` job`}),_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:`jobs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getJob`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`jobId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` submission`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`job_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},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`}),`\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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` job`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Record`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`unknown`}),_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:\"`fields_filled=\"}),_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:`fields_filled`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pdf_url=`}),_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:`pdf_url`}),_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:`13`,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:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Submit async`})}),`\n`,_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/fill`}),_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:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"file_url\": \"https://example.com/big-form.pdf\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"instructions\": \"Fill the form for Jane Doe ...\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"async\": true`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Poll`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.runpulse.com/job/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`job_i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`d`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_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\"`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`download-the-filled-pdf`,children:`Download The Filled PDF`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`pdf_url`}),` returned in `,_jsx(_components.code,{children:`FormResult`}),` points at `,_jsx(_components.code,{children:`GET /results/{job_id}/pdf`}),` and requires authentication (API key or JWT).`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`4`,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:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`job_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result.pdf_url.rstrip(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).split(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_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:`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:`\"filled.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"wb\"`}),_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:` out:`})]}),`\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:` chunk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.results.get_pdf(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`job_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`job_id):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` out.write(chunk)`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`3`,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:`3`,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:` jobId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pdf_url`}),_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:`replace`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D16969`},children:`/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#D7BA7D`,\"--shiki-dark-font-weight\":`inherit`},children:`\\\\/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D16969`},children:`/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`split`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`slice`}),_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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` pdfStream`}),_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:`results`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getPdf`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`jobId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// pdfStream is a ReadableStream\u003cUint8Array>; write to disk however you prefer.`})}),`\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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.runpulse.com/results/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`job_i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`d`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/pdf`}),_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:` --output`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` filled.pdf`})]}),`\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":"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"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[1304,1332,"jobId`]}),` for the "],[8288,8316,"jobId`,`/pdf`]}),`. "],[27983,28011,"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":"Fill From URL","slug":"fill-from-url","depth":3,"children":[]},{"title":"File Upload","slug":"file-upload","depth":3,"children":[]},{"title":"Detect First, Then Fill","slug":"detect-first-then-fill","depth":3,"children":[]},{"title":"Async Fill With Polling","slug":"async-fill-with-polling","depth":3,"children":[]},{"title":"Download The Filled PDF","slug":"download-the-filled-pdf","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/pulseai/5215a343261c1e3e/api-fields.js"],"openApiReferenceData":{"operation":{"summary":"Fill form fields with new data","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.","operationId":"formFill","tags":["Form"],"requestBody":"0ebd6443-7f3d-4740-bf0c-c51403b3bf4e","responses":{"200":"905fa954-efb7-473d-acea-f187491a456a","202":"647a85b3-b53d-4b30-9e28-b80ec38bc9ed","400":"62b2f0af-6d02-436d-ae0d-27ba6584ceef","401":"08d47654-ac5c-4063-a1e9-d2b64d9bd995","403":"968b546a-d7a5-4ae8-b1b7-53a2184392b6","404":"b44f076a-0e98-4eeb-ad10-967fe81e1e65","429":"79c0fc5b-2f79-468d-9a7e-d6744ed1df5e","500":"6f3545af-c283-4e47-9312-41fd38e2bcbf","503":"45e6c4cd-a1a8-40e8-b5b3-be7e2c73766a"},"parameters":["bbdda194-20f8-4604-beee-94c13ca6c7da"],"method":"post","type":"path","servers":["e1ef7834-5f16-4759-9585-bf90a3a29520"],"security":["3d136d9b-6b58-4a17-9f2d-f27756a950c2"],"path":"/form/fill","baseUrlOptions":["https://api.runpulse.com"],"title":"Fill form fields with new data","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"bbdda194-20f8-4604-beee-94c13ca6c7da":{"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/fill` 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.","required":["instructions"],"properties":{"instructions":{"type":"string","description":"Required natural-language fill prompt.","isRequired":true,"uniqueKey":"instructions","typeLabel":"string"},"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>"},"form_fields":{"type":"string","description":"Optional JSON-encoded array of `FormCell` objects to override detected cells. Multipart bodies must serialise this field as a string.","uniqueKey":"form_fields","typeLabel":"string"},"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":{"instructions":"\u003cstring>","file":"\u003cstring>","file_url":"\u003cstring>","form_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","form_fields":"\u003cstring>","page_range":"\u003cstring>","async":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"905fa954-efb7-473d-acea-f187491a456a":{"description":"Filled `FormResult` 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"},"647a85b3-b53d-4b30-9e28-b80ec38bc9ed":{"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"},"62b2f0af-6d02-436d-ae0d-27ba6584ceef":{"description":"Conflicting input (more than one of `form_id`, `file_url`, `file`), missing `instructions`, or malformed `form_fields`.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"08d47654-ac5c-4063-a1e9-d2b64d9bd995":{"description":"Authentication failed or missing API key","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"968b546a-d7a5-4ae8-b1b7-53a2184392b6":{"description":"Form filler not enabled for your organization","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"b44f076a-0e98-4eeb-ad10-967fe81e1e65":{"description":"Referenced `form_id` not found","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"79c0fc5b-2f79-468d-9a7e-d6744ed1df5e":{"description":"Rate limit exceeded","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"6f3545af-c283-4e47-9312-41fd38e2bcbf":{"description":"Internal server error","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"45e6c4cd-a1a8-40e8-b5b3-be7e2c73766a":{"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":"Fill Form - Pulse API","navMaps":{"firstHrefInVersion":{"v2":{"href":"/v2/introduction","matchLevel":4},"v1":{"href":"/api-reference/endpoint/form-fill","matchLevel":0},"v1 (old)":{"href":"/v1/api-reference/endpoint/form-fill","matchLevel":1}},"firstHrefInLanguage":{}},"lastModified":"2026-09-01T18:35:16.295Z","originalFileLocation":"api-reference/endpoint/form-fill.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=\"Fill the fields of a PDF form with values inferred from a natural language instructions prompt. Works on both AcroForm PDFs (true form fields are written) and flat/scanned PDFs (values are rendered as an overlay using detected cells from OCR). Input modes — provide exactly one of: - form_id — reuse a previously processed form from a prior /form/detect, /form/fill, or /form/clear call. Skips re-detection (fast path); the cached form_fields are reused. - file_url — public or pre-signed URL of a PDF Pulse will download. - file — direct binary upload of the PDF. Pulse runs cell detection internally before filling. 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 form_fields lets callers supply or edit the detected cells before filling. 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 filled FormResult inline (including a pdf_url you can GET to download the PDF binary). Set async: true to receive {job_id, status: \u0026quot;pending\u0026quot;} and poll GET /job/{jobId}. Billed at 3 credits 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=\"Fill Form - Pulse API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Fill the fields of a PDF form with values inferred from a natural language instructions prompt. Works on both AcroForm PDFs (true form fields are written) and flat/scanned PDFs (values are rendered as an overlay using detected cells from OCR). Input modes — provide exactly one of: - form_id — reuse a previously processed form from a prior /form/detect, /form/fill, or /form/clear call. Skips re-detection (fast path); the cached form_fields are reused. - file_url — public or pre-signed URL of a PDF Pulse will download. - file — direct binary upload of the PDF. Pulse runs cell detection internally before filling. 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 form_fields lets callers supply or edit the detected cells before filling. 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 filled FormResult inline (including a pdf_url you can GET to download the PDF binary). Set async: true to receive {job_id, status: \u0026quot;pending\u0026quot;} and poll GET /job/{jobId}. Billed at 3 credits 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-fill\">\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=Fill+Form\u0026amp;description=Fill+the+fields+of+a+PDF+form+with+values+inferred+from+a+natural%0Alanguage+%60instructions%60+prompt.+Works+on+both+AcroForm+PDFs%0A%28true+form+fields+are+written%29+and\u0026amp;theme=5d4f2a9c3c9a340a1b09ee30\u0026amp;signature=4053a70bcec8c9f97cca2f4b84553d958b6f5ff6743c68b5b99f1c934ab5dc59\">\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=\"Fill Form - Pulse API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Fill the fields of a PDF form with values inferred from a natural language instructions prompt. Works on both AcroForm PDFs (true form fields are written) and flat/scanned PDFs (values are rendered as an overlay using detected cells from OCR). Input modes — provide exactly one of: - form_id — reuse a previously processed form from a prior /form/detect, /form/fill, or /form/clear call. Skips re-detection (fast path); the cached form_fields are reused. - file_url — public or pre-signed URL of a PDF Pulse will download. - file — direct binary upload of the PDF. Pulse runs cell detection internally before filling. 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 form_fields lets callers supply or edit the detected cells before filling. 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 filled FormResult inline (including a pdf_url you can GET to download the PDF binary). Set async: true to receive {job_id, status: \u0026quot;pending\u0026quot;} and poll GET /job/{jobId}. Billed at 3 credits 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=Fill+Form\u0026amp;description=Fill+the+fields+of+a+PDF+form+with+values+inferred+from+a+natural%0Alanguage+%60instructions%60+prompt.+Works+on+both+AcroForm+PDFs%0A%28true+form+fields+are+written%29+and\u0026amp;theme=5d4f2a9c3c9a340a1b09ee30\u0026amp;signature=4053a70bcec8c9f97cca2f4b84553d958b6f5ff6743c68b5b99f1c934ab5dc59\">\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-fill\">\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-fill.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-fill#webpage\",\"url\":\"https://docs.runpulse.com/api-reference/endpoint/form-fill\",\"name\":\"Fill Form\",\"description\":\"Fill the fields of a PDF form with values inferred from a natural language instructions prompt. Works on both AcroForm PDFs (true form fields are written) and flat/scanned PDFs (values are rendered as an overlay using detected cells from OCR). Input modes — provide exactly one of: - form_id — reuse a previously processed form from a prior /form/detect, /form/fill, or /form/clear call. Skips re-detection (fast path); the cached form_fields are reused. - file_url — public or pre-signed URL of a PDF Pulse will download. - file — direct binary upload of the PDF. Pulse runs cell detection internally before filling. 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 form_fields lets callers supply or edit the detected cells before filling. Optional page_range (alias pages, e.g. \\\"1-3,5\\\") restricts the operation to a subset of pages. Synchronous by default — returns the filled FormResult inline (including a pdf_url you can GET to download the PDF binary). Set async: true to receive {job_id, status: \\\"pending\\\"} and poll GET /job/{jobId}. Billed at 3 credits per page. Requires the form_filler feature flag to be enabled for your organization.\",\"dateModified\":\"2026-09-01T18:35:16.295Z\",\"isPartOf\":{\"@id\":\"https://docs.runpulse.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.runpulse.com/api-reference/endpoint/form-fill#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.runpulse.com/api-reference/endpoint/form-fill#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Forms\",\"item\":\"https://docs.runpulse.com/api-reference/endpoint/form-detect\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fill Form\",\"item\":\"https://docs.runpulse.com/api-reference/endpoint/form-fill\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.runpulse.com/api-reference/endpoint/form-fill#apireference\",\"headline\":\"Fill Form\",\"name\":\"Fill Form\",\"description\":\"Fill the fields of a PDF form with values inferred from a natural language instructions prompt. Works on both AcroForm PDFs (true form fields are written) and flat/scanned PDFs (values are rendered as an overlay using detected cells from OCR). Input modes — provide exactly one of: - form_id — reuse a previously processed form from a prior /form/detect, /form/fill, or /form/clear call. Skips re-detection (fast path); the cached form_fields are reused. - file_url — public or pre-signed URL of a PDF Pulse will download. - file — direct binary upload of the PDF. Pulse runs cell detection internally before filling. 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 form_fields lets callers supply or edit the detected cells before filling. Optional page_range (alias pages, e.g. \\\"1-3,5\\\") restricts the operation to a subset of pages. Synchronous by default — returns the filled FormResult inline (including a pdf_url you can GET to download the PDF binary). Set async: true to receive {job_id, status: \\\"pending\\\"} and poll GET /job/{jobId}. Billed at 3 credits per page. Requires the form_filler feature flag to be enabled for your organization.\",\"url\":\"https://docs.runpulse.com/api-reference/endpoint/form-fill\",\"mainEntityOfPage\":{\"@id\":\"https://docs.runpulse.com/api-reference/endpoint/form-fill#webpage\"},\"dateModified\":\"2026-09-01T18:35:16.295Z\",\"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","href":"/api-reference/endpoint/batch-overview"}]},{"group":"Forms","pages":[{"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"},{"title":"Fill Form","openapi":"api-reference/openapi.yml POST /form/fill","href":"/api-reference/endpoint/form-fill"},{"title":"Clear Form","openapi":"api-reference/openapi.yml POST /form/clear","description":"Remove user-entered data from a PDF form, leaving the blank\nform template intact. Erases handwritten entries, typed values,\nand unchecks selected checkboxes — printed labels, field\ntitles, section headers, and other static template content are\npreserved.\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 (fast\n path; cached layout reused).\n- `file_url` — public or pre-signed URL of a PDF Pulse will\n 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\n`instructions` is optional. When omitted, Pulse clears every\nuser-filled field deterministically (no LLM call) on AcroForm\nPDFs, eliminating any chance of hallucinated content. Provide\na natural language prompt to clear only specific fields\n(e.g. `\"clear only the address fields\"`); targeted clears go\nthrough the LLM matcher with a delete-only filter.\n\nOptional `form_fields` and `page_range` (alias `pages`) behave\nthe same as on [Form Fill](api:POST/form/fill).\n\nSynchronous by default — returns the cleared `FormResult`\ninline (including a `pdf_url` you can `GET` to download the\nPDF binary). 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-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-fill"}]}]},"basePath":"","title":"Fill Form - 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"]}