Actions2
Overview
This node integrates with a language model service to generate text completions or process videos based on user input. It supports multiple large language models (LLMs) and allows fine-tuning of generation parameters such as temperature, max tokens, and sampling controls. The node is useful for automating content creation, generating responses, summarizing text, or analyzing video content via an external AI API.
Typical use cases include:
- Generating creative or informative text from prompts.
- Customizing output randomness and length for tailored results.
- Processing video URLs to extract insights or perform AI-driven analysis.
Properties
| Name | Meaning |
|---|---|
| Operation | Choose between "Generate Text" or "Process Video" operation modes. |
| Model Type | Select the LLM model to use. Options include Gemini variants, Llama 3.1 versions, Mistral, Mixtral, WizardLM, and others. |
| Prompt | The input prompt string that the LLM will respond to. |
| Temperature | Controls randomness in text generation; higher values produce more diverse outputs. |
| Max Tokens | Maximum number of tokens to generate in the response. |
| Top P | Nucleus sampling parameter controlling token selection breadth (probability mass). |
| Top K | Limits token selection to top K candidates during generation. |
| Saftey Settings : Hate Block | Level of filtering for hate speech content: None, Low, Medium, High (only for certain Gemini models). |
| Saftey Settings : Harrasment Block | Level of filtering for harassment content: None, Low, Medium, High (only for certain Gemini models). |
| Saftey Settings : Sexual Block | Level of filtering for sexual content: None, Low, Medium, High (only for certain Gemini models). |
| Saftey Settings : Dangerous Content Block | Level of filtering for dangerous content: None, Low, Medium, High (only for certain Gemini models). |
Output
The node outputs JSON data containing the response from the AI API:
For Generate Text operation:
The JSON contains the generated text completion or related metadata returned by the LLM service.For Process Video operation:
The JSON contains the AI analysis or processing result of the provided video URL.
If an error occurs during the API call, the output JSON includes an error field describing the issue.
The node does not output binary data.
Dependencies
- Requires an API key credential for authenticating with the external AI service.
- The node makes HTTP POST requests to the configured API domain endpoints
/llmsfor text generation and/process-videofor video processing. - Network connectivity and valid credentials are necessary for successful execution.
Troubleshooting
No credentials returned!
This error indicates missing or misconfigured API authentication credentials. Ensure the API key credential is properly set up in n8n.API request failures or timeouts
Network issues, invalid API keys, or service downtime can cause errors. Check internet connectivity, verify API key validity, and confirm the external service status.Invalid or empty prompt
Providing an empty prompt may lead to unexpected or empty responses. Always supply meaningful input text.Unsupported model or operation combination
Some safety settings only apply to specific Gemini models. Using them with unsupported models may have no effect.Continue On Fail behavior
If enabled, the node returns error details in the output JSON instead of stopping execution, allowing workflows to handle errors gracefully.
Links and References
- No direct external links are embedded in the source code.
- Refer to your AI service provider's official documentation for detailed API usage and model descriptions.
