ai_llm_response
Query ChatGPT, Claude, Gemini, or Perplexity with a prompt and get the answer plus cited sources, so you can check what AI models say about a local business.
Instructions
Gets what a specific LLM says about a query. Returns response_text, the model used, sources with URLs, fan_out_queries, and web_search_used. Each source carries a position — the order it was cited, from 1, counted after duplicate pages collapse. Supports chat_gpt, claude, gemini, perplexity.
WHETHER YOU GET SOURCES depends on whether the model searched the web. perplexity searches on every call, so its sources are populated and it needs no parameters. The other three answer from training data unless you set web_search: true, and on local business questions they otherwise do not search at all.
WEB SEARCH SUPPORT DIFFERS BY PLATFORM. claude takes web_search, force_web_search, search_country and search_city — the full set. chat_gpt takes all four except that GPT-5 models drop force_web_search. gemini takes web_search only: a search can be permitted but never compelled, and it cannot be geographically scoped. perplexity takes search_country only and cannot be switched off. Asking for something a platform does not support returns a 400 saying what it does support.
COST: 8 credits, or 20/40 if model pins a premium/frontier model. With web_search: true it is priced from the measured cost of searching — 24 for chat_gpt, 27 for gemini, 40 for claude. perplexity stays at 8 with search included.
ACCURACY WARNING: without web search a model may state confident, wrong facts about a local business, including that an open business has closed. When checking what a model says about a real business, use a platform that searches: perplexity, or any platform with web_search: true.
MATCHING CITATIONS ON GEMINI: domain is the registrable domain and never the subdomain, because Google's grounding data does not transmit one — a client at orangecounty.example.com is reported as example.com. Match on the registrable domain for subdomain-hosted sites. The other three platforms return the full hostname.
Sampling settings are left at each platform's defaults, which differ and are not all low, so repeating a prompt returns different wording — treat one run as a sample, not a fixed answer.
May take 15-60 seconds; with web_search: true, expect the upper end.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fresh | No | Bypass the hour of caching and run the query again. Use when sampling the same prompt repeatedly to measure how the answer varies — a cached hit would return the earlier run and hide the variance. Always billed at the normal price, since there is no cache hit to be free. | |
| model | No | Optional model name (e.g. gpt-5.4-mini, claude-sonnet-5, claude-opus-5, gemini-3.8-flash, sonar). Defaults to the newest standard-tier model for each platform at 8 credits. Pinning changes the cost: standard 8 credits, premium (Opus-class) 20, frontier (Fable-class) 40; an unrecognised model bills at the frontier rate. An unsupported value returns a 400 listing what the platform accepts. | |
| prompt | Yes | Prompt to send to the LLM (e.g. "What is the best plumber in Portland?"). Max 500 characters. | |
| platform | Yes | Which LLM to query | |
| web_search | No | Let the model search the web before answering, so it can cite sources. Strongly recommended when asking about a real business — without it models answer from training data and can assert an open business has closed. Not accepted on perplexity, which always searches. Raises the price to the measured cost of searching: 24 credits chat_gpt, 27 gemini, 40 claude. | |
| search_city | No | City to search from, e.g. "Wichita". Grounds the search where the customer actually is, which is usually the point for local work. Accepted on chat_gpt and claude only. | |
| search_country | No | ISO 3166-1 alpha-2 country to search from, e.g. "US". Accepted on chat_gpt, claude and perplexity; not on gemini. | |
| force_web_search | No | Require the search rather than leaving it to the model's judgement. Requires web_search: true. Accepted on claude, and on chat_gpt only for non-GPT-5 models. Not available on gemini or perplexity. In testing it changed which sources were retrieved more than what the answer said, so reach for it when you need a search guaranteed, not for better answers. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| prompt | Yes | ||
| sources | Yes | ||
| platform | Yes | ||
| response_text | Yes | ||
| fan_out_queries | Yes | ||
| web_search_used | No |