The Venice Dev Tools CLI provides a convenient command-line interface for interacting with the Venice AI API. This allows you to quickly generate text, create images, and manage your API keys directly from your terminal.
Install the CLI globally using npm:
npm install -g venice-dev-tools
Before using the CLI, you need to configure your API key:
venice configure
This will prompt you to enter your Venice AI API key, which will be securely stored for future use.
Generate text responses using Venice AI models:
venice chat "Tell me about artificial intelligence"
Options:
--model <model>
: Specify the model to use (default: llama-3.3-70b)--system <message>
: Set a system message--stream
: Enable streaming mode for real-time responses--web-search
: Enable web search capability--attach <files>
: Attach files to the message (comma-separated paths)--pdf-mode <mode>
: How to process PDF files (image, text, or both) (default: image)Create images with various models and styles:
venice image "A serene mountain landscape at sunset"
Options:
--model <model>
: Specify the image model to use--style <style>
: Set the image style--width <width>
: Set the image width--height <height>
: Set the image height--output <path>
: Save the image to a specific pathList available models and their capabilities:
venice models list
Manage your Venice AI API keys:
venice keys list
venice keys create
venice keys delete <key-id>
venice keys rate-limits
List and interact with pre-defined AI characters:
venice characters list
venice chat --character "Scientist" "Explain quantum physics"
Enable streaming for real-time responses:
venice chat --stream "Write a short story about a robot"
Enable web search capability for more up-to-date information:
venice chat --web-search "What are the latest developments in AI?"
Process PDF documents with different modes:
# Process PDF as binary data (default mode)
venice chat --attach document.pdf "Summarize this document"
# Process PDF as text
venice chat --attach document.pdf --pdf-mode text "Summarize this document"
# Process PDF as both text and binary data
venice chat --attach document.pdf --pdf-mode both "Summarize this document"
For proper PDF-to-image conversion, you’ll need to convert the PDF first:
# Using ImageMagick (if installed)
convert -density 150 document.pdf -quality 90 document.png
# Then use the converted image
venice chat --attach document.png "Analyze this image"
You can also attach multiple files to provide both text and image context:
# Attach both a text file and an image file
venice chat --attach "document.txt,image.png" "Analyze these files"
The CLI supports standard input/output redirection:
echo "Explain the concept of recursion" | venice chat
venice chat "Write a poem about the ocean" > ocean-poem.txt
venice chat "What is the capital of France?"
venice chat --character "Historian" "Describe the Renaissance period"
venice image "A futuristic city with flying cars" --style "digital-art" --output city.png
venice chat --stream "Write a step-by-step guide to baking bread"
If you encounter any issues with the CLI, try the following:
npm update -g venice-dev-tools
venice configure --show
Check your network connection and the Venice AI service status.
venice chat --debug "Your prompt here"
For additional help with any command, use the --help
flag:
```bash venice –help venice chat –help venice image –help