Guides

Test mode

Build and test the whole integration for free with pf_test_ keys and simulated outcomes.

Every account has two modes:

TestLive
Keyspf_test_…pf_live_…
CostFreeUses credit
ValuesSample values in your schema's shapeRead from the document
SpeedA few secondsSeconds to minutes
WebhooksSigned and delivered to public https endpointsPublic https only

Test mode is for building and testing integrations. It does not read the document: uploads are checked and stored, but extraction returns deterministic samples, such as "Sample invoice number" for strings and dates like 2026-01-16, with synthetic sources: quotes are snippets of the document's text that are not related to the values. Sample numbers are not consistent with each other (a tax can exceed the subtotal), so do not test business rules on them.

What is shared#

  • Schemas are shared by both modes, so you can test with the exact schema_id and schema_version you will use in production.
  • Documents, jobs and webhook endpoints belong to one mode. A test key cannot see live data and the other way around; doing so returns 403 mode_mismatch or 404.

Simulate outcomes#

Choose the outcome with metadata.test_outcome:

json
{ "document_id": "doc_…", "schema_id": "sch_…", "metadata": { "test_outcome": "needs_review" } }
test_outcomeJob statusUse it to test
completed (default)completedThe normal path.
needs_reviewcompleted_with_unresolvedreview_required, unresolved_fields and your review queue.
failedfailedError handling and the extraction.failed webhook.

Without metadata, the uploaded file name decides: a name containing needs_review (or needs-review) or failed produces that outcome, so invoice-needs-review.pdf always comes back for review.

Not available in test mode#

  • Schema suggestions use real models and need a live key or the console (test_mode_unsupported).
  • Engine debugging routes for large results; test results are small, so use /result or /result/export (not_available_in_test_mode).

Console#

The mode switch in the console's top bar chooses which data you see and which mode new runs use. Runs started in the playground in test mode are free as well.