Venice AI

Use Venice AI for chat, image generation, embeddings, and more

Actions9

Overview

This node integrates with Venice AI to provide advanced chat completion capabilities. It allows users to send a sequence of messages to an AI model and receive generated conversational responses. This is useful for building chatbots, virtual assistants, or any application requiring natural language interaction.

Typical use cases include:

  • Customer support automation by generating helpful replies.
  • Interactive storytelling or role-playing scenarios using custom characters.
  • Generating creative content or brainstorming ideas through conversational AI.

For example, you can send a user message like "Hello" and get a context-aware response from the selected AI model.

Properties

Name Meaning
Model The ID of the AI model to use for chat completion. Examples: venice-uncensored, llama-3.3-70b, qwen-2.5-vl.
Messages A JSON array of message objects representing the conversation history. Each object should have a role (e.g., "user", "assistant") and content (the text message).
Stream Boolean flag indicating whether to stream the response incrementally (true) or receive it as a whole (false).
Additional Fields A collection of optional parameters to customize the chat completion behavior:
- Temperature Sampling temperature controlling randomness (0 to 2). Higher values produce more diverse outputs.
- Max Tokens Maximum number of tokens to generate in the completion.
- Top P Nucleus sampling threshold (0 to 1) controlling diversity.
- Frequency Penalty Penalizes new tokens based on their existing frequency (-2 to 2), reducing repetition.
- Presence Penalty Penalizes new tokens based on whether they appear in the text so far (-2 to 2), encouraging topic diversity.
- Stop Sequences JSON array of strings where the generation will stop if encountered.
- Seed Numeric seed for random number generation to enable reproducible results.
- Response Format JSON schema defining structured output format for the response.
- Tools JSON array defining additional tools or functions available during generation.
- Character Slug Identifier for a Venice character to influence style or persona (e.g., "alan-watts").
- Enable Web Search Option to enable web search integration for the request. Values: Off, Auto, On.
- Enable Web Citations Boolean to include citations when web search is enabled.
- Strip Thinking Response Boolean to remove "thinking" blocks from reasoning models' responses.
- Disable Thinking Boolean to disable internal "thinking" processes in reasoning models.

Output

The node outputs a JSON object containing the chat completion result:

  • When streaming is disabled, the output JSON includes the full generated content under a property such as content.
  • When streaming is enabled, the output includes both the concatenated content string and an array of incremental chunks received during streaming.

The exact structure depends on the API response but generally contains the generated text and metadata about choices.

No binary data is produced for this operation.

Dependencies

  • Requires an API key credential for Venice AI service configured in n8n.
  • Network access to Venice AI endpoints.
  • Uses helper functions for formatting messages and handling streaming responses.

Troubleshooting

  • Invalid JSON in Messages or Additional Fields: Since some inputs expect JSON strings (e.g., messages, stop sequences), malformed JSON will cause errors. Ensure proper JSON formatting.
  • Missing Required Parameters: The model and messages properties are mandatory. Omitting them will cause failures.
  • Streaming Issues: If streaming is enabled but the connection is unstable, partial or incomplete responses may occur.
  • API Errors: Errors returned from Venice AI (e.g., invalid model ID, quota exceeded) will be surfaced. Check your API key validity and usage limits.
  • Character Slug Not Found: Using an invalid character slug may result in default behavior or errors.
  • Web Search Configuration: Enabling web search requires proper setup and may affect response times.

Links and References

Discussion