POST /v1/attributions takes source text of up to 4,000,000 characters, or about a million tokens of ordinary prose, in a single call. You send the whole document and TokenPath handles the rest.
Limits
Character limits are checked first and fail with
422 validation_error. The token ceiling is counted with the attribution model’s own tokenizer, over the document only, before any inference runs.
How windowing works
A document that fits in the attribution model’s context is attributed in one pass. A 20,000-token document, about 30 pages, typically returns in under two seconds. A document that does not fit is split into overlapping, model-sized windows. TokenPath attributes the answer against each window in turn and keeps the strongest source for each answer phrase. Offsets always index into the full document you sent, never into a window. Long requests are all or nothing. You get a result only after every window succeeds. If any window fails, or the whole request runs past its time budget, the request fails and returns no partial links.Errors
Billing
TokenPath first holds credits based on the full request size. When the request succeeds, you pay for the tokens the model actually processed. For a windowed request, that is the sum across windows. The question, the answer, and the overlap between neighboring windows are processed once per window, so a windowed request costs a little more than the document’s length alone suggests. See Credits and billing.The raw heatmap
POST /v1/attributions/heatmap does not window. Its token matrix comes from one model context, and matrices from separate windows cannot be merged without changing what the numbers mean. Keep heatmap documents to 400,000 characters or fewer, and use /v1/attributions for anything longer.