Flux

OpenAI SDK

Call Flux web search and Lineage from the OpenAI SDK you already use: change the base URL and pick a model.

Website

Flux speaks the Chat Completions and Responses APIs. Point the SDK at https://fluxsearch.io/api/v1, use your Flux key, and choose flux-search-1 to search the web or flux-lineage-1 to run Lineage.

Python

python
import os
from openai import OpenAI
 
client = OpenAI(base_url="https://fluxsearch.io/api/v1", api_key=os.environ["FLUX_API_KEY"])
 
response = client.chat.completions.create(
model="flux-search-1",
messages=[{"role": "user", "content": "who runs barclays"}],
)
print(response.choices[0].message.content)

TypeScript

typescript
import OpenAI from "openai";
 
const client = new OpenAI({
baseURL: "https://fluxsearch.io/api/v1",
apiKey: process.env.FLUX_API_KEY,
});
 
const completion = await client.chat.completions.create({
model: "flux-search-1",
messages: [{ role: "user", content: "who runs barclays" }],
});
console.log(completion.choices[0].message.content);

Citations and provenance

The message content is the enriched text. Citations arrive as url_citation annotations, the shape OpenAI clients already render, and provenance annotations carry the named entities and where each passage came from.

Streaming, domain filters and the full request shape are in the API reference.