Actions5
- Answer Actions
- Web Search Actions
- Scrape Actions
- YouTube Actions
- PDF Actions
Answer → Generate
AI-generatedSummary
Generate an AI-generated answer to a given query by searching relevant information using the LLMLayer API, with customizable options for model selection, search parameters, and output format.
Inputs
- Query (required) — The question or query to search and answer.
- Model (required) — The AI model to use for generating answers, selectable from various GPT, Groq, Anthropic, and DeepSeek models optimized for different performance and cost needs.
- Answer Type — Format of the generated answer, selectable as Markdown, HTML, or JSON.
- Search Type — Type of search to perform (General or News).
- Location — Location code (e.g., 'us', 'uk') that influences the search results.
- Response Language — Language for the AI-generated response; defaults to automatic detection from the query.
- System Prompt — Custom system prompt to guide the AI's response style or content.
- Include Citations — Whether to include source citations in the generated answer (default true).
- Return Sources — Whether to include the source documents in the output.
- Return Images — Whether to return related images along with the answer.
- Date Filter — Filter search results by recency (e.g., past hour, day, week, etc.).
- Max Tokens — Maximum tokens for the generated answer.
- Temperature — Creativity of the response, from 0 (deterministic) to 2 (highly creative).
- Domain Filter — Comma-separated list of domains to include or exclude (prefix '-' to exclude).
- Max Queries — Maximum number of search queries to perform.
- Search Context Size — Amount of context from the search results to include (low, medium, high).
- JSON Schema — When Answer Type is JSON, optional JSON schema to structure the output.
Output shape
a single JSON object containing the generated answer, optionally including source citations, source documents, and images depending on input parameters
The output JSON may include fields for the answer text in the requested format, source citations if enabled, source documents if requested, and related images if requested. If Answer Type is JSON and a JSON Schema is provided, the output will conform to the schema. Errors are returned in the JSON body with error message if operation fails and continueOnFail is enabled.
