Venice.ai API requests

Sending anonymous requests to venice.ai over Anyone socks5 Proxy

  1. Create an account and generate an API token on https://venice.ai/settings/apiarrow-up-right.

  2. Copy the bash script below and save it to a file, for example script.sh .

#!/bin/bash

if [ $# -eq 0 ]; then
    echo 'Usage: bash script.sh "Hello World!"'
    exit 1
fi

MESSAGE=$1

JSON=$(jq -n --arg msg "$MESSAGE" '{
  model: "venice-uncensored",
  messages: [{role: "user", content: $msg}]
}')

curl -s --socks5 127.0.0.1:9050 https://api.venice.ai/api/v1/chat/completions \
  -H "Authorization: Bearer VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$JSON" \
  | jq -r '.choices[0].message.content'
  1. Start a socks5 proxy using using npm or other preferred method.

  2. Send a request using the script bash script.sh "Hello World" .

Last updated