Skip to main content

Does TokenPath generate answers?

No. TokenPath attributes an answer you already have, from any model. The optional POST /v1/generate endpoint exists only so demos can run on a TokenPath key alone.

Does it work with my model?

Yes. TokenPath needs only the text: the document, the question, and the answer. It does not need your model’s weights, logprobs, or prompts. Answers from GPT, Claude, Gemini, Llama, a fine-tune, or a multi-step agent all work the same way.

Which endpoint should I use?

POST /v1/attributions for almost everything. Use POST /v1/attributions/heatmap only when you need raw token-level attention.

How long can the document be?

With an API key, up to 4,000,000 characters, and at most 1,050,000 tokens, on /v1/attributions. Long text is split into windows automatically. The question and answer can be up to 10,000 characters each. See Long documents. Without a key, the limits are 20,000 Unicode characters for the document and 2,000 each for question and answer. See keyless access.

How fast is it?

A 20,000-token document, about 30 pages, typically returns in under two seconds. Windowed requests for very long documents take longer. Give those a client timeout of 300 seconds.

Can I attribute against several documents at once?

Yes. Join them into one document and record where each one starts, then map each source range back to its document. See Multiple documents.

Does it work with PDFs?

Yes, on the extracted text. Keep a map from character offsets to page coordinates, and you can highlight the exact supporting text on the page. See PDF attribution.

Does it work in other languages?

Yes, including across languages. For example, an answer in Hindi can be attributed to an English source. TokenPath has been benchmarked on 23 languages. See the multilingual benchmark.

What does confidence mean?

It is the strength of one link between an answer phrase and a source range, from 0 to 1. Use it to rank and style citations. It says where text came from, not whether the answer is correct. See Confidence.

Why is my highlight off by a few characters?

Almost always, the offset_encoding doesn’t match your language. The default is utf-16, which suits JavaScript. Send utf-32 from Python and utf-8 from Go or Rust. See Offsets and encoding.

What happens to the documents I send?

TokenPath processes them in memory and discards them when the request finishes. Request content is not written to a database, not logged, and not used for training. Usage records store token counts only. See the privacy policy.

Can TokenPath run in my own cloud or on-premises?

Yes. Attribution runs on open-weight models, so the whole service can run inside your network. This is not self-serve. Email [email protected] to size a deployment.

How much does it cost?

Small keyless attribution requests are free. Keyed requests cost $1 per million tokens across the document, question, and answer, with 10 million free tokens to start. Failed requests are never charged. See Credits and billing.

Are responses cached?

No. Every request runs fresh. Store the results yourself if you want to reuse them.