LLM Research
Grounded web synthesis powered by Brave Search, Perplexity Sonar Pro, and xAI Grok — three best-in-class vendors integrated in one multi-provider parallel call to answer time-sensitive questions (markets, earnings, regulation, breaking news) without relying on stale model knowledge.
What's inside#
Three complementary research surfaces:
- Web Search (
/web_search): Aggregates link results from Brave, citation-rich synthesis from Perplexity, and social sentiment from Grok in parallel. Returns a unified envelope with synthesized answer + citations + deduplicated link list. The "what's happening right now" tool. - Perplexity Synthesis (
/perplexity): Direct Perplexity Sonar Pro call — citation-rich prose synthesis. Use when the answer must be grounded with explicit source URLs (e.g., "summarize NVIDIA's last earnings call and link the transcript"). - X/Twitter Sentiment (
/x_sentiment): Direct Grok call returning real-time social sentiment narrative for a ticker or free-form query. Quantifies bullish vs. bearish fintwit vibe and names notable accounts. Use for retail sentiment, breaking rumours, and what the market is saying right now.
All three are cached at the engine layer (15-min LRU) so repeated calls inside a single agent loop don't double-bill the vendor.
Access#
6 credits per call. Pro and up (Enterprise also supported).
Endpoints#
| Method | Path | Description |
|---|---|---|
GET | /api/v3/research/web_search | Multi-provider web search (Brave + Perplexity + optional Grok). Returns synthesized answer + social sentiment + citations + deduplicated link list. |
GET | /api/v3/research/perplexity | Perplexity Sonar Pro citation-rich research synthesis. Returns prose + source URLs. |
GET | /api/v3/research/x_sentiment | Grok real-time X/Twitter sentiment narrative (ticker- or query-targeted). Returns narrative + bullish/bearish quantification + sources. |
Examples#
Bash: Multi-provider web search#
Shell
1curl -H "Authorization: Bearer $TENGU_API_KEY" \2 "https://firm.tengu.co/api/v3/research/web_search?query=NVIDIA%20earnings%20Q4%202024&providers=brave,perplexity,grok&count=5"3 4# Response structure:5# {6# "ok": true,7# "timestamp": "2024-12-16T14:22:00Z",8# "query": "NVIDIA earnings Q4 2024",9# "providers_used": ["brave", "perplexity", "grok"],10# "synthesized_answer": "NVIDIA reported record Q4 revenue of $60.9B, up 126% YoY, beating estimates...",11# "social_sentiment": "Overwhelmingly bullish across fintwit. Retail investors excited about AI moat; some profit-taking chatter on valuation...",12# "citations": [13# {"url": "https://investor.nvidia.com/...", "title": "NVIDIA Q4 FY2024 Earnings Release"},14# {"url": "https://seekingalpha.com/...", "title": "NVIDIA Earnings: Q4 Beats Expectations"}15# ],16# "results": [17# {18# "title": "NVIDIA Reports Record Q4 Revenue",19# "url": "https://...",20# "snippet": "NVIDIA achieved record quarterly revenue...",21# "published": "2024-01-24T10:30:00Z",22# "source_provider": "brave"23# }24# ],25# "total_results": 12,26# "total_tokens": 1250,27# "cached": false,28# "search_time_ms": 342029# }Python: Perplexity synthesis with custom system prompt#
Python
1import os, requests2 3r = requests.get(4 "https://firm.tengu.co/api/v3/research/perplexity",5 params={6 "query": "What are the key headwinds and tailwinds for Apple in 2025?",7 "system_prompt": "You are a skeptical equity analyst. Cite all sources. Be precise on numbers."8 },9 headers={"Authorization": f"Bearer {os.environ['TENGU_API_KEY']}"},10 timeout=30,11)12r.raise_for_status()13data = r.json()14 15# Extract the research envelope16print(f"Provider: {data['provider']}")17print(f"Answer:\n{data['answer']}")18print(f"Sources: {data['sources']}")19print(f"Citations:\n" + "\n".join(c["title"] for c in data["citations"]))20 21# Each call costs 6 credits; check wallet balance in the dashboardRelated#
- Pricing & credits — credit costs per product and plan details
- API reference — full endpoint specs and response schemas
- News & Sentiment — equity news headlines and sentiment (Starter+, 2 credits)