Trace every AI
answer back
to its source.

Most citations hand the reader a 40-page document. TokenPath hands them the exact sentence.

Ask an AI what we do:ChatGPTClaude
A question, its answer, and the exact source behind itA diagram in three parts. At the top, a question. Below it an answer, with one phrase in it marked as traced. A curved thread runs from that phrase down to the source, where the single sentence the phrase was drawn from is lit up. Every other line in both is left plain.QUESTIONANSWEREXACT SOURCE
Integration

One endpoint. No SDK to install.

Send the document, the question, and the answer. You get back each answer span, the document span behind it, and how confident the match is — enough to highlight, cite, or log in a few lines. Raw token-by-token maps live at /v1/attributions/heatmap.

# one call — TokenPath finds the phrases worth sourcing
curl https://api.tokenpath.ai/v1/attributions \
  -H "Authorization: Bearer $TOKENPATH_API_KEY" \
  -d '{
    "document": "In Q3, Northwind's revenue grew 18%…",
    "question": "How fast did revenue grow?",
    "answer": "Revenue grew 18% year over year."
  }'
# automatically selected answer phrases, in answer order
{ "spans": [{
  "answer": { "start": 13, "end": 16, "text": "18%" },
  "source": {
    "start": 32, "end": 35, "text": "18%",
    "confidence": 0.82   # how sure we are of the match
  }
}] }

Under the hood, TokenPath measures attention over your document and rolls it up into spans — no prompting, no second answer to generate. The method, with real attention maps, is in How TokenPath works.

Ask an AI to add TokenPath to your app

Why not just ask the model to cite itself?
You can. Here's where it breaks.

model.cite()

Ask the model

Have the LLM footnote itself. Straightforward, no extra infrastructure.

Too coarse. Points at a few numbered sources at best — never the exact tokens inside a long document, so the reader still has to go hunting.

retrieve + rerank

Retrieve and re-rank

Pull the relevant chunks and re-rank them with an embedding model — the standard RAG path, and it scales.

Confuses duplicates. When the same fact, number, or date appears in two places, it can't tell which one the answer used — common in tables and financial docs.

tokenpath

Measure the attention

Run the document and the answer through an attribution model and read which tokens the answer leaned on. Nothing to prompt, nothing to trust.

Exact. Lands on the exact tokens — the right cell, the right clause — down to the character.

Never confused. Points at the specific occurrence the answer used, even when the same value appears a dozen times.

Fast. One extra read of the document — no second answer to generate, no reranker round-trips. A 20,000-token document (roughly 30 pages) comes back in under two seconds, and it scales to million-token documents.

Benchmark · LongBench-Cite

Frontier-grade citations, without the frontier bill.

On LongBench-Cite — one shared answer, one judge — reading attention post-hoc scores 0.815 F1: it matches Anthropic's Citations API (0.812) and lands within 0.04 of a prompted frontier LLM (0.851), while doing it ~7× cheaper and ~5–6× faster— on any model's answer, without regenerating it.

Read the full benchmark
Citation F1 · reported avg, 480 test examples
gpt-5.5 prompted0.851
TokenPath0.815
Anthropic Citations0.812
emb + rerank0.622
~7× cheaper
cost / query · $0.013 vs ~$0.09
~5–6× faster
p50 latency · 1.6 s vs ~8–10 s
Chrome extension

The same tracing, in your browser.

Browse with TokenPath chats with any page, PDF, or YouTube video — and every answer traces back to its exact source: the sentence highlighted in the page you are reading, or the video seeked to the second it was said.

Get the extension

FAQs

What exactly is the TokenPath API?

One HTTP endpoint. You send a document, a question, and an answer your model already produced; you get back which spans of the answer came from which spans of the document, with a confidence for each match. TokenPath generates nothing, rewrites no prompts, and sits nowhere near your inference path — it is a measurement you run after the answer exists.

Does it work with my model?

All of them. Because attribution runs after generation, it needs no access to your model's weights, logprobs, or internals — only the text. GPT, Claude, Gemini, Llama, your own fine-tune, or the final answer from a multi-step agent all work identically. The attention being read is our attribution model's, over your document and your answer; your generator is untouched.

Can we run TokenPath on-premise, or in our own VPC?

Yes. Attribution runs on open-weight models on GPUs we operate ourselves — there is no OpenAI, Anthropic, or Google anywhere in the attribution path, and nothing that needs to phone home. So the whole of it can run inside your network, air-gapped if that is what your policy requires. It is not self-serve: talk to us and we will size it with you.

What happens to the documents we send you?

They are processed and discarded. Request content — document, question, answer — is never written to a database; it lives in server memory for the life of the request. We do not train on it and we do not log it: operational logs carry status and latency, not content, and are deleted after 30 days. Usage records count tokens for billing and contain no part of your text. The detail is in the privacy policy; a DPA comes from sales.

What does it cost?

$1 per million tokens, pay as you go, counted across the document, question, and answer you send. That is the on-demand list price: at volume, or against an annual commitment, it comes down substantially. Start on the 10 million free tokens with no card, then talk to us once you know your volume. Failed requests are never charged.

How fast is it, and how long can the document be?

A 20,000-token document — roughly 30 pages — comes back in under two seconds. Longer source text is split into overlapping model-sized windows automatically, up to a million tokens in a single call, and you get a result only once every window has succeeded.

Does it work on PDFs, and in other languages?

PDFs: yes, on the extracted text — keep a map from character offsets back to page coordinates and you can highlight the exact clause. Languages: we have benchmarked 23, plus a pilot across all 22 scheduled Indian languages, and it works across them too — an answer in Hindi or Arabic attributed back to an English contract. The numbers.

What does confidence mean — is it a hallucination score?

No. Confidence is the strength of the link between one span of the answer and one span of the source, from 0 to 1 — the thing to rank and annotate citations by. It tells you where text came from, not whether the answer is right. Answer text with no support in the document simply comes back with no link.

Something not answered here? Write to support@tokenpath.ai, or book a call.

Start with 10 million free tokens.

No card required, no monthly minimum. One endpoint, any model, a dollar per million tokens on demand after that — less at volume. Why we're building this.

Book a call

Talk to us

15–30 min — bring your stack, we'll show you attribution on your own docs.

Meet with