Skip to main content
The intelligence endpoints power Ask Flux — Flux’s governed conversational assistant — and its administrator review and performance tracking facilities. Ask Flux answers questions across cost, anomalies, optimization, right-sizing, inventory, and governance by invoking 19 declared server-side tools, each of which validates and bounds its arguments before calling the same governed services the UI uses. The model never receives a database connection, Azure credential, or arbitrary query interface; it can only name a tool and the server decides whether the call is legal.

GET /api/intelligence/status

Auth: reader Returns the current intelligence assistant configuration status — whether AI is enabled, which provider and models are active, and current spend against the configured budget ceiling.

POST /api/intelligence/chat

Auth: reader Sends a conversation turn to Ask Flux and returns a validated structured reply. The assistant invokes bounded governed tools to retrieve evidence, then constructs a JSON response that is validated for structure, grounding, and partial-coverage disclosure before being returned. Every reply receives a deterministic 0–100 quality score.
Requires FLUX_INTELLIGENCE_AI_ENABLED=true and a configured provider credential (FLUX_DEEPSEEK_API_KEY, FLUX_OPENROUTER_API_KEY, or FLUX_FOUNDRY_API_KEY). Returns 503 when AI is disabled or the provider is unreachable.

Request body (IntelligenceChatRequest)

context object fields:

Model profiles

Response fields

Error responses

Example request

Example response (truncated)


POST /api/intelligence/feedback

Auth: reader Records a helpful / not-helpful rating and optional reason for a completed intelligence request. Returns 204 No Content on success, 404 if the request ID is not found.

Request body (IntelligenceFeedback)


POST /api/intelligence/performance

Auth: reader Attaches browser-side round-trip and render timing to a completed intelligence request. Called automatically by the Ask Flux UI after the reply renders. Returns 204 No Content on success, 404 if the request ID is not found.

Request body (IntelligenceClientPerformance)


GET /api/intelligence/review

Auth: admin only Returns recent Ask Flux transcript events for administrator quality review. Each event includes the prompt, validated reply, invoked tools, quality score, per-stage timing, and any feedback recorded against the request. Transcript retention is governed by FLUX_AI_TRANSCRIPT_RETENTION_DAYS (default 30 days). Model reasoning is never retained.

Query parameters

Response fields per event


POST /api/semantic/expert

Auth: reader Translates a plain-language question into validated, read-only SQL over the governed semantic views, executes it with a row cap and watchdog, and returns the results. The model proposes SQL; Flux validates every statement (read-only, allowlisted views only, no file functions) before execution. One self-correction round is attempted on validation failure; a 422 is returned if the SQL cannot be validated after both attempts.

Request body (ExpertExplorerRequest)

Each history turn (ExpertExplorerTurn):

Response fields

Error responses

Example request

Example response (truncated)


GET /api/semantic

Auth: reader Returns the governed semantic catalog — available models, measures, dimensions, and their descriptions. Use this to discover what can be queried through /api/semantic/query or the Expert Explorer.

POST /api/semantic/query

Auth: reader Executes a structured query against the governed semantic layer. Specify a model, measures, optional dimensions and filters, and a time grain. Returns governed query results without requiring SQL.

Request body (SemanticQueryRequest)

Example request

Error responses