Venice AI

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

Actions9

Overview

The node provides integration with Venice AI's chat completion service. It allows users to send a sequence of messages to an AI model and receive generated chat completions in response. This is useful for building conversational agents, chatbots, or any application requiring natural language interaction.

Typical use cases include:

  • Customer support chatbots that generate responses based on user input.
  • Interactive assistants that can hold multi-turn conversations.
  • Content generation tools that produce text completions or suggestions.
  • Experimenting with different AI models and parameters to customize the style and behavior of the chat output.

For example, a user can provide a conversation history as an array of message objects (with roles like "user" and "assistant") and get a continuation from the AI model, optionally streaming partial results as they are generated.

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 JSON array of message objects representing the conversation history. Each object should have a role (e.g., "user", "assistant") and content (the message text).
Stream Boolean flag indicating whether to stream the response incrementally (true) or wait for the full completion (false).
Additional Fields A collection of optional parameters to customize the chat completion:
- Temperature Sampling temperature controlling randomness (range 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 (range 0 to 1) controlling diversity.
- Frequency Penalty Penalizes new tokens based on their existing frequency (-2 to 2).
- Presence Penalty Penalizes new tokens based on whether they appear in the text so far (-2 to 2).
- Stop Sequences JSON array of strings where the generation will stop if encountered.
- Seed Numeric random seed for reproducibility of results.
- Response Format JSON schema defining structured output format for the response.
- Tools JSON array defining additional tool or function definitions to be used by the model.
- Character Slug Identifier for a Venice character persona to use (e.g., "alan-watts").
- Enable Web Search Option to enable web search during the request; possible 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 "thinking" features in reasoning models.

Output

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

  • If streaming is disabled, the output JSON contains the full completion response from Venice AI.
  • If streaming is enabled, the output includes:
    • content: The concatenated text content received incrementally.
    • chunks: An array of streamed chunks representing partial updates from the API.

The exact structure follows Venice AI's chat completion response format, typically including choices with generated text.

No binary data is produced by this operation.

Dependencies

  • Requires an API key credential for Venice AI configured in n8n.
  • The node calls Venice AI's REST API endpoints for chat completions.
  • No other external dependencies are required.

Troubleshooting

  • Invalid JSON in Messages or Additional Fields: Since messages and some additional fields expect JSON input, malformed JSON will cause errors. Ensure valid JSON syntax.
  • Missing Required Parameters: The model and messages properties are mandatory. Omitting them will cause failures.
  • Streaming Issues: When enabling streaming, network interruptions may cause incomplete data. Use stable connections.
  • API Authentication Errors: Ensure the API key credential is correctly set up and has permissions.
  • Unsupported Model IDs: Using an invalid or unsupported model ID will result in API errors.
  • Stop Sequences Format: The stop parameter must be a JSON array of strings; incorrect formats will cause errors.

If errors occur, the node returns error messages describing the issue. Enabling "Continue On Fail" allows processing subsequent items despite errors.

Links and References

Discussion