Venice AI

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

Actions9

Overview

The node integrates with Venice AI to generate images based on text prompts using a simplified interface compatible with OpenAI-style image generation requests. It allows users to specify an image generation model, provide a textual description (prompt), select the desired image size, and choose the response format (either a base64-encoded JSON or a URL). This operation is useful for quickly generating images from descriptive text without complex configuration.

Common scenarios:

  • Creating illustrative images for blog posts or social media content.
  • Generating concept art or design ideas from textual descriptions.
  • Rapid prototyping of visual assets in creative workflows.

Example:
A user inputs the prompt "a futuristic city skyline at sunset" with the model set to "hidream" and size "512x512". The node returns either a base64-encoded image or a URL pointing to the generated image, which can then be used downstream in the workflow.

Properties

Name Meaning
Model Image generation model to use (e.g., "hidream").
Prompt Text description of the image to generate.
Size Desired image dimensions. Options: Auto, 256x256, 512x512, 1024x1024, 1536x1024, 1024x1536, 1792x1024, 1024x1792. "Auto" lets the service decide the best size.
Response Format Format of the returned image data. Options: Base64 JSON (b64_json) or URL (url).

Output

The output is a JSON object containing the image generation result:

  • If Response Format is Base64 JSON, the output JSON includes a base64-encoded string representing the image data.
  • If Response Format is URL, the output JSON contains a URL pointing to the generated image hosted by the service.

The exact structure follows the Venice AI API's /images/generations endpoint response, typically including fields like data with image information.

No binary data output is produced in this simplified generation operation.

Dependencies

  • Requires an active connection to the Venice AI API service.
  • Needs an API key credential configured in n8n for authentication with Venice AI.
  • The node uses internal helper functions to make HTTP POST requests to Venice AI endpoints.

Troubleshooting

  • Missing or invalid API credentials: Ensure that the API key credential for Venice AI is correctly set up in n8n.
  • Invalid prompt or model name: Verify that the prompt is a non-empty string and the model name corresponds to a supported image generation model.
  • Unsupported size option: Use one of the predefined size options or "Auto".
  • API request failures: Network issues or service downtime may cause errors; check connectivity and Venice AI service status.
  • Unexpected response format: Confirm that the selected response format matches your downstream processing expectations.

If errors occur, the node will throw exceptions unless "Continue On Fail" is enabled, in which case error messages are included in the output JSON.

Links and References

Discussion