Risk Metrics

AI Risk Analyst

Natural language risk analysis with OpenAI tool calling against RiskModels data (DAL). LLM tokens are billed per the chat capability; each internal tool call is billed separately at the same rates as the corresponding REST endpoints (e.g. metrics-snapshot, ticker-returns). search_tickers is free. Returns tool_calls_summary and expanded _agent (llm_cost_usd, tool_cost_usd, tool_calls).

post/chat

Request

  • Base URL: https://riskmodels.app/api
  • URL: https://riskmodels.app/api/chat
  • Auth: HTTP bearer

Request body

modelstring

AI model to use (default gpt-4o-mini)

response_mode'markdown' | 'catalog' | 'hybrid'

Reserved for future streaming / A2UI modes; non-streaming JSON today.

parallel_tool_callsboolean

When false, sets OpenAI parallel_tool_calls to false. Omit or true for parallel tool execution on supported models (e.g. gpt-4o-mini).

execute_tools_sequentiallyboolean

When true, server executes tool calls sequentially instead of concurrently.

workspace_toolsboolean

Offer the riskmodels.net workspace command-bus tools (set_subject / set_window) and emit their typed actions as distinct action SSE frames. Honored only when streaming (Accept: text/event-stream) — the frame is the delivery channel — and intended for the workspace-mounted portal chat, which validates actions client-side (fail-closed) before applying them.

Response

Assistant reply, accumulated token usage across tool rounds, optional tool_calls_summary, lineage metadata, and _agent cost breakdown (LLM + tools).

modelstring
_metadataobject

Example response

{
  "_agent": {
    "cost_usd": 0.005,
    "latency_ms": 145,
    "request_id": "req_abc123xyz",
    "confidence": {
      "overall": 0.98
    },
    "data_freshness": "2026-02-21T10:30:00Z",
    "billing_code": "ticker_returns_v2"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.