Flux Documentation

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 synthesis

2) Start the API

python -m uvicorn main:app --host 127.0.0.1 --port 8000

Verify readiness:

curl http://127.0.0.1:8000/health

Expected shape:

{
  "status": "ok",
  "cohere_ready": true,
  "tavily_ready": true
}

3) First Calls

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 dev

Then open the docs UI in your browser using the local URL shown by Vite.

On this page