Flux
Sign in
Getting started

Getting started

Create a key and make your first web search and Lineage requests in a few minutes.

1 min read · Updated 14 Sept 2026
On this page

Models answer from stale training data, and a whole web page in the prompt costs thousands of tokens while hiding who said what. Flux returns live results and only the passages that matter, with the people, organisations and dates they mention named inline.

Quickstart

  1. Create a key

    Sign up and open API keys. New accounts start with free credit. Then put the key in your shell.

    export FLUX_API_KEY="<your key>"
    $env:FLUX_API_KEY = "<your key>"
  2. Search the web

    Send a query. Flux reads the top enrich results for you and returns the passages that answer it.

    curl https://fluxsearch.io/api/v1/search \  -H "Authorization: Bearer $FLUX_API_KEY" \  -H "Content-Type: application/json" \  -d '{"query": "total solar eclipse August 2027 path", "max_results": 5, "enrich": 2}'
    import osimport requestsresponse = requests.post(    "https://fluxsearch.io/api/v1/search",    headers={"Authorization": f"Bearer {os.environ['FLUX_API_KEY']}"},    json={"query": "total solar eclipse August 2027 path", "max_results": 5, "enrich": 2},)for result in response.json()["results"]:    print(result["rank"], result["title"], result["url"])
    const response = await fetch("https://fluxsearch.io/api/v1/search", {  method: "POST",  headers: {    Authorization: `Bearer ${process.env.FLUX_API_KEY}`,    "Content-Type": "application/json",  },  body: JSON.stringify({    query: "total solar eclipse August 2027 path",    max_results: 5,    enrich: 2,  }),});const { results } = await response.json();for (const result of results) console.log(result.rank, result.title, result.url);
    Response, trimmed
    {  "request_id": "req_1e15f9c87c2249868460228c",  "query": "total solar eclipse August 2027 path",  "results": [    {      "rank": 1,      "title": "August 2, 2027 Solar Eclipse Map - NSO",      "url": "https://nso.edu/eclipse-map-2027-aug2/",      "snippet": "The August 2, 2027 total solar eclipse will cross Spain, Gibralter, Morocco, Algeria, Tunisia, Libya, Egypt, Saudi Arabia, Yemem and Somali…",      "lineage": null    },    {      "rank": 2,      "title": "2027 Total Solar Eclipse Maps",      "url": "https://nationaleclipse.com/maps/map_08022027.html",      "snippet": "On August 2, 2027, a total solar eclipse will occur in Europe, Africa, and the Middle East. In Europe, the path of totality will cross over…",      "lineage": null    }  ]}
  3. Read one page

    Send a URL and your question. Flux fetches the page and keeps only the passages that answer it.

    curl https://fluxsearch.io/api/v1/lineage \  -H "Authorization: Bearer $FLUX_API_KEY" \  -H "Content-Type: application/json" \  -d '{"url": "https://science.nasa.gov/mission/webb/", "query": "When did Webb launch?"}'
    import osimport requestsresponse = requests.post(    "https://fluxsearch.io/api/v1/lineage",    headers={"Authorization": f"Bearer {os.environ['FLUX_API_KEY']}"},    json={"url": "https://science.nasa.gov/mission/webb/", "query": "When did Webb launch?"},)for passage in response.json()["results"]:    print(passage["enriched_text"])
    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://science.nasa.gov/mission/webb/",    query: "When did Webb launch?",  }),});const { results } = await response.json();for (const passage of results) console.log(passage.enriched_text);
    Response, trimmed
    {  "request_id": "req_900f9a70689d4828a839dd43",  "query": "When did Webb launch?",  "selection": {    "examined_tokens": 4811,    "returned": 4,    "reduction_ratio": 0.84993  },  "results": [    {      "text": "Webb launched on Dec. 25th 2021.",      "enriched_text": "Webb launched on Dec. 25th 2021. [when: Dec 25, 2021]",      "score": 0.967724621295929,      "annotations": [        {          "type": "time",          "text": "Dec. 25th 2021",          "canonical": "Dec 25, 2021"        }      ]    },    {      "text": "Mission Type Astrophysics Partners NASA/ESA/CSA Launch Dec 25, 2021 Arrival at L2 Jan 24, 2022 Key Facts Fact Sheet Premiere Telescope of Next Decade extending the tantalizing dis…",      "enriched_text": "Mission Type Astrophysics Partners NASA/ESA/CSA Launch Dec 25, 2021 Arrival at L2 Jan 24, 2022 Key Facts Fact Sheet Premiere Telescope of Next Decade extending the tantalizing discoveries of the Hubble Space Telescope. [when: Jan 2021]",      "score": 0.7764766216278076,      "annotations": [        {          "type": "organisation",          "text": "NASA",          "canonical": null        },        {          "type": "organisation",          "text": "ESA",          "canonical": null        },        {          "type": "time",          "text": "Jan",          "canonical": "Jan 2021"        }      ]    }  ]}

Request fields

Search

query (required)string
What to search for. Must not be empty.
max_resultsinteger
The most results to return, from 1 to 20. A value outside that range is moved inside it. You may get fewer.
Default 10
filtersSearchFilters
enrichinteger
How many of the results to read for passages, up to max_results. Defaults to all of them. 0 returns results without reading any pages, which is fastest.

Lineage

textstring
The document to read. Up to 60,000 characters.
urlstring
A page for Flux to fetch instead of sending text. If the site refuses, the response is a bad_request with the site's reason, and nothing is charged.
querystring
The question the passages should answer. Without it, query in the response is null.
documentsobject[]
Several documents in one request, each with its own text or url. Up to 100.

Next steps