Guides
Lineage
Keep only the passages of a page or document that answer a question, with names and dates filled in.
2 min read · Updated 14 Sept 2026
Sending a whole page or document to a model costs tokens and buries the answer. Cut it into chunks instead and each chunk loses who and when it was about.
Lineage keeps only the passages that answer your question, with the people, organisations and dates written back in. No search runs.
Your own text
Send text and a query.
curl https://fluxsearch.io/api/v1/lineage \ -H "Authorization: Bearer $FLUX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text":"Northwind Studio shipped version 4.2 of its design app on 12 August. The release adds offline editing and a new colour picker. Its chief product officer, Maya Chen, said the team spent most of the summer on performance. Support for older tablets ends in January.","query":"What does the new release add?"}'import osimport requestsresponse = requests.post( "https://fluxsearch.io/api/v1/lineage", headers={"Authorization": f"Bearer {os.environ['FLUX_API_KEY']}"}, json={"text":"Northwind Studio shipped version 4.2 of its design app on 12 August. The release adds offline editing and a new colour picker. Its chief product officer, Maya Chen, said the team spent most of the summer on performance. Support for older tablets ends in January.","query":"What does the new release add?"},)print(response.json())const response = await fetch("https://fluxsearch.io/api/v1/lineage", { method: "POST", headers: { Authorization: `Bearer ${process.env.FLUX_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({"text":"Northwind Studio shipped version 4.2 of its design app on 12 August. The release adds offline editing and a new colour picker. Its chief product officer, Maya Chen, said the team spent most of the summer on performance. Support for older tablets ends in January.","query":"What does the new release add?"}),});console.log(await response.json());Response, trimmed
{ "request_id": "req_5645fbcdc50c489aa4ed834b", "query": "What does the new release add?", "selection": { "examined_tokens": 57, "returned": 1, "reduction_ratio": 0.80702 }, "results": [ { "text": "The release adds offline editing and a new colour picker.", "enriched_text": "The release adds offline editing and a new colour picker.", "score": 0.9952915906906128, "annotations": [] } ]}A web page
Send url instead. Flux fetches the page. If the site refuses, you get a bad_request with the site's reason, and nothing is charged.
curl https://fluxsearch.io/api/v1/lineage \ -H "Authorization: Bearer $FLUX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://docs.python.org/3/whatsnew/3.12.html", "query": "What changed about f-strings?"}'import osimport requestsresponse = requests.post( "https://fluxsearch.io/api/v1/lineage", headers={"Authorization": f"Bearer {os.environ['FLUX_API_KEY']}"}, json={"url": "https://docs.python.org/3/whatsnew/3.12.html", "query": "What changed about f-strings?"},)print(response.json())const response = await fetch("https://fluxsearch.io/api/v1/lineage", { method: "POST", headers: { Authorization: `Bearer ${process.env.FLUX_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ url: "https://docs.python.org/3/whatsnew/3.12.html", query: "What changed about f-strings?" }),});console.log(await response.json());Response, trimmed
{ "request_id": "req_24c53df8a28f44f7a4fa1a9f", "query": "What changed about f-strings?", "selection": { "examined_tokens": 2659, "returned": 25, "reduction_ratio": 0.81873 }, "results": [ { "text": "and others in gh-103764.)PEP 701: Syntactic formalization of f-stringsPEP 701 lifts some restrictions on the usage of f-strings.", "enriched_text": "and others in gh-103764.)PEP 701: Syntactic formalization of f-stringsPEP 701 lifts some restrictions on the usage of f-strings.", "score": 0.749510645866394, "annotations": [ { "type": "product", "text": "gh-103764", "canonical": null }, { "type": "product", "text": "PEP 701", "canonical": null } ] }, { "text": "components, it is now possible to nest f-strings arbitrarily:>>> f\"{f\"{f\"{f\"{f\"{f\"{1+1}\"}\"}\"}\"}\"}\"'2'Multi-line expressions and comments: In Python 3.11, f-string expressions", "enriched_text": "components, it is now possible to nest f-strings arbitrarily:>>> f\"{f\"{f\"{f\"{f\"{f\"{1+1}\"}\"}\"}\"}\"}\"'2'Multi-line expressions and comments: In Python 3.11, f-string expressions", "score": 0.8996853232383728, "annotations": [ { "type": "product", "text": "Python 3.11", "canonical": null } ] } ]}Many documents at once
Send documents, up to 100. The response is a list in the same order, and each document is billed separately.
curl https://fluxsearch.io/api/v1/lineage \ -H "Authorization: Bearer $FLUX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"When does support for older tablets end?","documents":[{"text":"Northwind Studio shipped version 4.2 of its design app on 12 August. The release adds offline editing and a new colour picker. Its chief product officer, Maya Chen, said the team spent most of the summer on performance. Support for older tablets ends in January."},{"text":"Customer reports that exports fail on a 2019 tablet since the last update. They asked whether their device will keep getting fixes. The agent replied that it would, until support for older devices ends."}]}'import osimport requestsresponse = requests.post( "https://fluxsearch.io/api/v1/lineage", headers={"Authorization": f"Bearer {os.environ['FLUX_API_KEY']}"}, json={"query":"When does support for older tablets end?","documents":[{"text":"Northwind Studio shipped version 4.2 of its design app on 12 August. The release adds offline editing and a new colour picker. Its chief product officer, Maya Chen, said the team spent most of the summer on performance. Support for older tablets ends in January."},{"text":"Customer reports that exports fail on a 2019 tablet since the last update. They asked whether their device will keep getting fixes. The agent replied that it would, until support for older devices ends."}]},)print(response.json())const response = await fetch("https://fluxsearch.io/api/v1/lineage", { method: "POST", headers: { Authorization: `Bearer ${process.env.FLUX_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({"query":"When does support for older tablets end?","documents":[{"text":"Northwind Studio shipped version 4.2 of its design app on 12 August. The release adds offline editing and a new colour picker. Its chief product officer, Maya Chen, said the team spent most of the summer on performance. Support for older tablets ends in January."},{"text":"Customer reports that exports fail on a 2019 tablet since the last update. They asked whether their device will keep getting fixes. The agent replied that it would, until support for older devices ends."}]}),});console.log(await response.json());Response, trimmed
{ "object": "list", "data": [ { "request_id": "req_228a7445d30c4c53838814d2", "query": "When does support for older tablets end?", "selection": { "examined_tokens": 57, "returned": 1, "reduction_ratio": 0.85965 }, "results": [ { "text": "Support for older tablets ends in January.", "enriched_text": "Support for older tablets ends in January.", "score": 0.9938151240348816, "annotations": [ { "type": "time", "text": "January", "canonical": null } ] } ] }, { "request_id": "req_228a7445d30c4c53838814d2", "query": "When does support for older tablets end?", "selection": { "examined_tokens": 42, "returned": 1, "reduction_ratio": 0.66667 }, "results": [ { "text": "The agent replied that it would, until support for older devices ends.", "enriched_text": "The agent replied that it would, until support for older devices ends.", "score": 0.8638346195220947, "annotations": [ { "type": "person", "text": "The agent", "canonical": null } ] } ] } ]}Each result
- text (required)string
- The passage exactly as it appears in your document.
- enriched_text (required)string
- The passage with context added only where it needs it, such as an exact date or the name behind "she". Never null: when there is nothing to add, it equals
text. - score (required)number | null
- How well the passage answers the query. Higher is better. Passages below
selection.thresholdare not returned. - annotations (required)Annotation[]
Next steps
Web searchSearch the live web and get ranked results, with or without the passages that answer your query.LlamaIndexAnswer questions from your own PDFs using only the passages that matter, and give your LlamaIndex agent live web search.API referenceBrowse every endpoint and see exactly what each one returns.