provider | string or SelectableOption | No | chat_gpt | AI provider to ask: ‘chat_gpt’ (OpenAI, default), ‘claude’ (Anthropic), ‘gemini’ (Google) or ‘perplexity’. |
model | string | No | - | Model name as listed by dataforseo_list_llm_models, e.g. gpt-4.1-mini, gpt-5.5, claude-sonnet-5, gemini-2.5-flash, sonar-pro. Leave empty for the provider default (gpt-4.1-mini, claude-haiku-4-5, gemini-2.5-flash, sonar). Reasoning models such as the gpt-5 family cost more and cannot be forced to search the web. |
prompt | string | Yes | - | The question or task to send, e.g. ‘What are the best project management tools for agencies?‘ |
system_message | string | No | - | Optional instructions that set the role, tone or format of the answer. |
web_search | string or SelectableOption | No | auto | ’auto’ (default) lets the model decide whether to search the web, ‘always’ forces a web search so the answer cites live sources (chat_gpt non-reasoning models such as gpt-4.1-mini, and claude), ‘off’ answers from training data only. Perplexity always searches the web. |
country | string or SelectableOption | No | - | Two-letter country code (US, GB, DE…) used to localise the web search; a DataForSEO country location code such as 2840 also works. Not supported by gemini. Leave empty for the provider default. |
max_output_tokens | integer | No | - | Maximum length of the answer in tokens (16 to 4096). Leave empty for the model default. Reasoning models such as the gpt-5 family and the o-series do not accept it. |
temperature | number | No | - | Randomness of the answer from 0 (deterministic) to 2 (creative). Leave empty for the provider default. |