Quick Start
Install, configure, and make your first successful Flux API call.
Prerequisites
- Python 3.11+ recommended.
- API keys for Tavily and (optionally) Cohere and Gemini.
- A running Flux backend (
main.py+ routers).
1) Configure Environment
Create a root .env file:
TAVILY_API_KEY=...
COHERE_API_KEY=... # optional but recommended
GEMINI_API_KEY=... # required for /answer and conversation synthesis2) Start the API
python -m uvicorn main:app --host 127.0.0.1 --port 8000Verify readiness:
curl http://127.0.0.1:8000/healthExpected shape:
{
"status": "ok",
"cohere_ready": true,
"tavily_ready": true
}3) First Calls
Search
curl "http://127.0.0.1:8000/search?q=latest+AI+model+releases&limit=5"Answer
curl "http://127.0.0.1:8000/answer?q=why+did+SVB+collapse"Contents Extraction
curl "http://127.0.0.1:8000/contents?urls=https://en.wikipedia.org/wiki/Retrieval-augmented_generation"Local Docs Site (TanStack Start + Fumadocs)
From the docs directory:
npm install
npm run devThen open the docs UI in your browser using the local URL shown by Vite.