## TL;DR

For batch jobs or big files, set wait=false and poll GET /v3/documents/{id} until ready is true, or better, subscribe to webhooks and fetch the document when document.parse.completed arrives.

## Steps

1. Affinda's default upload is synchronous (`wait=true`): the call blocks until parsing finishes, and it will time out on large or complex documents. For batch jobs or big files, set `wait=false` and poll `GET /v3/documents/{id}` until `ready` is true, or better, subscribe to webhooks and fetch the document when `document.parse.completed` arrives. Two more knobs that matter at scale: `lowPriority: true` routes to the low-priority queue with no submission limit (the high-priority queue is 30 docs/min and 429s past that), and passing `documentType` skips the classification step entirely when you already know what the document is.

## When to use

You are seeing this: Affinda's default upload is synchronous (wait=true): the call blocks until parsing finishes, and it will time out on large or complex documents. Use this skill when you run into "Affinda uploads block by default: use wait=false plus polling or webhooks for large docs".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
