/api/agent/compare
Bearer auth (your Almanex key). Optionally pass any of
X-Anthropic-Key,
X-Gemini-Key,
X-OpenAI-Key, or
X-Model-Endpoint+X-Model-Key
to use your own model — billing skips Almanex managed inference (BYOK mode). Setting more than one cascades on transient errors.
{
"tickers": ["NVDA", "AMD", "AVGO"], // 2–8 symbols
"dimension": "growth" // null | growth | margins | valuation | capital-return
// (null = synthesize across all)
"depth": "summary" // summary | deep
} {
"result": "markdown narrative…",
"table": [{ "ticker":"NVDA", "company":"…", "rating":"Buy", … }],
"sources": [{ "ticker":"NVDA", "title":"…", "url":"/reports/nvda/…", "excerpt":"…" }],
"coverage_gaps": ["ZZZZ"],
"_meta": { "billing_mode":"managed" | "byok",
"inference_cost_cents": number | null,
"tokens_used": number, "downstream_calls": number,
"latency_ms": number,
"model": "claude-sonnet-4-6",
"provider": "anthropic" | "gemini" | "openai" | "openai-compat",
"providers_tried": [{ "provider": "...", "model": "...",
"status": "ok" | number | "network_error" | "timeout",
"latency_ms": number, "error_detail"?: string }] }
}