Documentation Index
Fetch the complete documentation index at: https://docs.runpulse.com/llms.txt
Use this file to discover all available pages before exploring further.
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).
form_id: chain off a prior /form/detect, /form/fill, or /form/clear call. The cached PDF and form_fields are reused, so there is no need to re-upload.file_url: public or presigned URL to a PDF.file: direct PDF upload (multipart only).400.
credits_used for this request and a cumulative plan_info.total_credits_used snapshot for your organization.
| Field | Type | Required | Description |
|---|---|---|---|
form_id | string (uuid) | One of these | Reuse a previously processed form. Skips re-upload and re-detection. |
file_url | string (uri) | One of these | Public or presigned URL of a PDF to download and fill. |
file | binary | One of these | Direct PDF upload (multipart only). |
instructions | string | Yes | Natural-language description of what to fill into the form. Example: "Use John Doe, 123 Main St, born 1990-01-01". |
form_fields | array of FormCell | No | Optional override for the cells used when filling. Useful when the caller has hand-edited the cells returned by /form/detect. |
page_range | string | No | 1-based page filter, for example "1,3-5". Alias pages accepted. |
async | boolean | No | When true, returns { job_id, status: "pending" } immediately (HTTP 202) and processes the job in the background. Default false. |
FormResultasync 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. |
form_fields | array of FormCell | Detected cells of the resulting (filled) PDF, refreshed after the fill. |
fields_filled | integer | Number of cells whose value actually changed during this run (no-op writes are not counted). |
credits_used | number | Credits consumed by this request (3 × page_count). |
plan_info | object | { tier, total_credits_used, pages_used } cumulative billing snapshot for your organization (post-request). |
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.FormJobAcceptedasync is true:
result carries the same FormResult shape that the sync flow would have returned inline.
| Code | Description |
|---|---|
| 200 | Filled FormResult returned synchronously. |
| 202 | Async job accepted (async: true). Poll /job/{jobId} for the result. |
| 400 | Missing PDF, more than one PDF source provided, missing instructions, or malformed form_fields. |
| 401 | Authentication failed or missing API key. |
| 404 | Referenced form_id not found (or belongs to a different org). |
| 500 | Internal server error. |
/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.
async: true for long-running jobs (large PDFs, multi-page fills) so the client does not have to keep a connection open.
pdf_url returned in FormResult points at GET /results/{job_id}/pdf and requires authentication (API key or JWT).
API key for authentication
JSON body for POST /form/fill. Provide exactly one of form_id or
file_url (or use the multipart variant to upload a file).
Required natural-language description of what to fill into the
form (e.g. "Use John Doe, 123 Main St, born 1990-01-01").
"Fill in patient name as Jane Doe, DOB 01/15/1990."
Restrict the operation to a subset of pages. Accepts
comma-separated page numbers and ranges, e.g. "1-3,5".
Alias: pages.
When true, the endpoint returns immediately with
{ job_id, status: "pending" } (HTTP 202) and processes the
job in the background. Poll GET /job/{jobId} for the result.
Optional override for the cells used when filling or clearing.
When omitted, Pulse uses the cells stored on the referenced
form_id, or detects them from the uploaded PDF.
ID returned by a previous /form/detect, /form/fill, or
/form/clear call. Reuses the stored PDF and detected fields
without re-uploading.
Public or presigned URL of a PDF to download and fill.
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}.
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.
Number of pages in the output PDF.
x >= 1Detected cells of the resulting PDF (refreshed from the
filled / cleared output for fill / clear, or freshly detected for
/form/detect).
URL to download the resulting PDF binary. Always points at
GET /results/{jobId}/pdf for the originating job. Requires the
same authentication (API key or JWT) as the rest of the API.
Number of cells whose value actually changed during this run.
Present on /form/fill responses only.
x >= 0Number of cells whose value actually changed during this run
(no-op clears on already-empty fields are not counted).
Present on /form/clear responses only.
x >= 0Credits consumed by this request. Detect charges 1 credit per page; fill and clear charge 3 credits per page.
Cumulative billing snapshot for the calling organization. Includes the in-flight request's contribution, so every response reflects post-request state.