← PDF Form Filler
Your token

PDF Form Filler API

Reading a PDF form, typing answers and saving the filled PDF all run free in the browser and need no API: the PDF never leaves your device. The API is for the one metered step: send the labels and choices of a form's empty fields plus your own notes, get back an answer for each field the notes answer, each with a quote of the words it came from.

Base URL: https://api.skillsafe.ai/v1/app-api. Every response is {"data": ...} or {"error": {"code", "message"}}; read error.code and error.message rather than the HTTP status alone.

The task field

This app has one task. Always send "task": "fill_fields".

taskWhat it doesReply
fill_fieldsAnswers each listed field that your notes answer, in the form the label asks for, quoting the exact words of the notes it used. Fields the notes do not answer are left out; nothing is guessed.One JSON object

Input fields

FieldTypeMeaning
taskstring"fill_fields"
fieldsstringJSON text: a list of at most 120 {"id", "label", "type"}, where type is text, checkbox, choice or choices; optional options (the allowed answers), other_allowed, max (characters) and lines ("several").
notesstringYour own text with the answers in it, at most 12,000 characters (the page keeps the start and the end of longer notes and marks the cut).
factsstringJSON text: count, empty_total, form_fields, already_filled, notes_chars, notes_cut.

The reply

job.output.output is JSON text: {"task": "fill_fields", "fills": [{"id", "value", "quote"}]}. value is text for a text field, "yes" or "no" for a checkbox, one of the options for a choice, or a list of them for choices. quote is copied exactly from notes. The page rejects any answer whose quote is not in the notes or whose choice is not an option, and marks a text answer whose numbers are not in the notes for you to check. If the balance ran low, truncated is true and the object may stop early.

Worked example

Input (input.json), for the page's example Job application form and its example notes:

{
  "task": "fill_fields",
  "fields": "[{\"id\":\"f1\",\"label\":\"Full name\",\"type\":\"text\"},{\"id\":\"f2\",\"label\":\"Phone\",\"type\":\"text\"},{\"id\":\"f3\",\"label\":\"Email\",\"type\":\"text\"},{\"id\":\"f4\",\"label\":\"Earliest start date\",\"type\":\"text\"},{\"id\":\"f5\",\"label\":\"Home address\",\"type\":\"text\",\"lines\":\"several\"},{\"id\":\"f6\",\"label\":\"Position applied for\",\"type\":\"choice\",\"options\":[\"Sales associate\",\"Warehouse associate\",\"Customer support\",\"Delivery driver\"]},{\"id\":\"f7\",\"label\":\"Availability\",\"type\":\"choice\",\"options\":[\"Full time\",\"Part time\",\"Weekends only\"]},{\"id\":\"f8\",\"label\":\"I am legally allowed to work in this country\",\"type\":\"checkbox\"},{\"id\":\"f9\",\"label\":\"I am 18 or older\",\"type\":\"checkbox\"},{\"id\":\"f10\",\"label\":\"Most recent job: employer, role and dates\",\"type\":\"text\",\"lines\":\"several\"},{\"id\":\"f11\",\"label\":\"Date signed\",\"type\":\"text\"}]",
  "notes": "Hi! I'm Alex Morgan. Best number is (555) 014-2290 and my email is alex.morgan@example.com.\nI live at 41 Alder Street, Apt 3, Springfield, OR 97477.\nI'd love the customer support role, full time please - I could start June 2, 2026.\nI'm 24 and a US citizen.\nLast job: store associate at Northgate Books from March 2023 to May 2026.",
  "facts": "{\"count\":11,\"empty_total\":11,\"form_fields\":11,\"already_filled\":0,\"notes_chars\":330,\"notes_cut\":0}"
}

Reply:

{
  "task": "fill_fields",
  "fills": [
    {
      "id": "f1",
      "value": "Alex Morgan",
      "quote": "I'm Alex Morgan"
    },
    {
      "id": "f2",
      "value": "(555) 014-2290",
      "quote": "Best number is (555) 014-2290"
    },
    {
      "id": "f3",
      "value": "alex.morgan@example.com",
      "quote": "my email is alex.morgan@example.com"
    },
    {
      "id": "f4",
      "value": "June 2, 2026",
      "quote": "I could start June 2, 2026"
    },
    {
      "id": "f5",
      "value": "41 Alder Street, Apt 3, Springfield, OR 97477",
      "quote": "41 Alder Street, Apt 3, Springfield, OR 97477"
    },
    {
      "id": "f6",
      "value": "Customer support",
      "quote": "I'd love the customer support role"
    },
    {
      "id": "f7",
      "value": "Full time",
      "quote": "full time please"
    },
    {
      "id": "f9",
      "value": "yes",
      "quote": "I'm 24"
    },
    {
      "id": "f10",
      "value": "store associate at Northgate Books from March 2023 to May 2026",
      "quote": "store associate at Northgate Books from March 2023 to May 2026"
    }
  ]
}

On the page, each answer goes into its field with an AI tag and the quote under it, and the report lists what was filled and what was left empty.

Errors

HTTPWhat to do
401The token is missing, expired or a guest token on a run. Get a personal token on the token page.
402The balance is below what the run reserves. Top up at skillsafe.ai/account/billing.
400The body is not a JSON object of the fields above.
429Wait and retry with the same Idempotency-Key.

Step 1 — a tiny client helper

One function that sends JSON and unwraps the {data, error} envelope.

BASE="https://api.skillsafe.ai/v1/app-api"
TOKEN="paste-your-token-here"   # from https://pdf-form-filler.skillsafe.ai/tokens.html
api() { # api METHOD PATH [JSON-BODY]
  curl -s -X "$1" "$BASE$2" -H "Content-Type: application/json" \
    ${TOKEN:+-H "Authorization: Bearer $TOKEN"} ${3:+--data "$3"}
}

Step 2 — a token

A guest token is enough for /me and /estimate. A run is metered, so it needs your personal token: sign in on the token page and copy it.

# a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN=$(curl -s -X POST "$BASE/guest" -H "Content-Type: application/json" -d '{"slug":"pdf-form-filler"}' | jq -r '.data.token')

Step 3 — who am I, and my balance

subject_type is guest or user; credits is the balance (1 credit = $0.0001).

api GET /me | jq '.data | {subject_type, credits}' 

Step 4 — price a run for free

/estimate charges nothing and starts no job. hold_credits is the amount reserved while a run is in flight, not the price; the run is charged what it uses.

# input.json: the run input object - {"task": "fill_fields", "fields": "[...]", "notes": "...", "facts": "{...}"}
api POST /estimate "$(cat input.json)" | jq '.data | {hold_credits, min_credits, model, model_alias, markup_bps, warnings}' 

Step 5 — run it and wait for the job

Send an Idempotency-Key derived from the input: a retry with the same key is never billed twice.

KEY="pdf-form-filler:fill_fields:$(shasum -a 256 input.json | cut -c1-16):a1"
JOB=$(curl -s -X POST "$BASE/run" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $KEY" --data @input.json | jq -r '.data.job_id')
while :; do
  J=$(api GET "/jobs/$JOB"); S=$(echo "$J" | jq -r '.data.status')
  case "$S" in succeeded|failed|cancelled) break;; esac; sleep 2
done
echo "$J" | jq -r '.data.output.output' > reply.json   # one JSON object: {task, fills}
echo "$J" | jq '.data | {charged_credits, truncated}' 

Step 6 — or stream it

/run-stream sends Server-Sent Events while the job runs and the finished job at the end.

# Server-Sent Events: tick/delta events while the job runs, then a final event with the job
curl -N -s -X POST "$BASE/run-stream" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: pdf-form-filler:fill_fields:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json