Venice.ai Supreme Router
Smart, cost-optimized model routing for Venice.ai — the AI platform for people who don't want Big Tech watching over their shoulder.
Unlike OpenAI, Anthropic, and Google — where every prompt is logged, analyzed, and potentially used to train future models — Venice offers true privacy with zero data retention on private models. Your conversations stay yours. Venice is also uncensored: no content filters, no refusals, no "I can't help with that."
Setup
- Get a Venice.ai API key from venice.ai/settings/api
- Set the environment variable:
export VENICE_API_KEY="your-key-here"
Or configure in ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"venice-router": {
"enabled": true,
"apiKey": "YOUR_VENICE_API_KEY"
}
}
}
}
Usage
Route a prompt (auto-selects model)
python3 {baseDir}/scripts/venice-router.py --prompt "What is 2+2?"
Force a specific tier
python3 {baseDir}/scripts/venice-router.py --tier cheap --prompt "Tell me a joke"
python3 {baseDir}/scripts/venice-router.py --tier budget-medium --prompt "Write a Python function"
python3 {baseDir}/scripts/venice-router.py --tier mid --prompt "Explain quantum computing"
python3 {baseDir}/scripts/venice-router.py --tier premium --prompt "Write a distributed systems architecture"
Stream output
python3 {baseDir}/scripts/venice-router.py --stream --prompt "Write a poem about lobsters"
Web search (LLM searches the web and cites sources)
python3 {baseDir}/scripts/venice-router.py --web-search --prompt "Latest news on AI regulation"
Uncensored mode (prefer models with no content filters)
python3 {baseDir}/scripts/venice-router.py --uncensored --prompt "Write edgy creative fiction"
Private-only mode (zero data retention, no Big Tech proxying)
python3 {baseDir}/scripts/venice-router.py --private-only --prompt "Analyze this confidential contract"
Conversation-aware routing (multi-turn context)
# Save conversation history as JSON, then route follow-ups with context
python3 {baseDir}/scripts/venice-router.py --conversation history.json --prompt "Can you add tests too?"
The router analyzes conversation history to keep context: trivial follow-ups ("thanks") go cheap, while follow-ups in complex code discussions stay at the right tier.
Function calling (tool use)
# Define tools in a JSON file (OpenAI tools format)
python3 {baseDir}/scripts/venice-router.py --tools tools.json --prompt "What's the weather in NYC?"
python3 {baseDir}/scripts/venice-router.py --tools tools.json --tool-choice auto --prompt "Search for latest AI news"
Tool definitions use the standard OpenAI format. The router auto-bumps to mid tier minimum for function calling since it requires capable models.
Cost budget tracking
# Show current spending
python3 {baseDir}/scripts/venice-router.py --budget-status
# Track per-session costs
python3 {baseDir}/scripts/venice-router.py --session-id my-project --prompt "help me code"
Set VENICE_DAILY_BUDGET and/or VENICE_SESSION_BUDGET to enforce spending limits. The router auto-downgrades tiers as you approach budget limits.
Classify only (no API call)
python3 {baseDir}/scripts/venice-router.py --classify "Explain the Riemann hypothesis"
List available models and tiers
python3 {baseDir}/scripts/venice-router.py --list-models
Override model directly
python3 {baseDir}/scripts/venice-router.py --model deepseek-v3.2 --prompt "Hello"
Tiers
| Tier |
Models |
Cost (input/output per 1M tokens) |
Best For |
| cheap |
Venice Small (qwen3-4b), GLM 4.7 Flash, GPT OSS 120B, Llama 3.2 3B |
$0.05–$0.15 / $0.15–$0.60 |
Simple Q&A, greetings, math, lookups |
| budget |
Qwen 3 235B, Venice Uncensored, GLM 4.7 Flash Heretic |
$0.14–$0.20 / $0.75–$0.90 |
Moderate questions, summaries, translations |
| budget-medium |
Grok Code Fast, DeepSeek V3.2, MiniMax M2.1 |
$0.25–$0.40 / $1.00–$1.87 |
Moderate-to-complex tasks, code snippets, structured output |
| mid |
DeepSeek V3.2, MiniMax M2.1/M2.5, Qwen3 Thinking 235B, Venice Medium, Llama 3.3 70B |
$0.25–$0.70 / $1.00–$3.50 |
Code generation, analysis, longer writing, reasoning |
| high |
GLM 5, Kimi K2 Thinking, Kimi K2.5, Grok 4.1 Fast, Hermes 3 405B, Gemini 3 Flash |
$0.50–$1.10 / $1.25–$3.75 |
Complex reasoning, multi-step tasks, code review |
| premium |
GPT-5.2, GPT-5.2 Codex, Gemini 3 Pro, Gemini 3.1 Pro (1M ctx), Claude Opus/Sonnet 4.5/4.6 |
$2.19–$6.00 / $15.00–$30.00 |
Expert-level analysis, architecture, research papers |
Routing Strategy
The router classifies each prompt using keyword + heuristic analysis:
- Length — longer prompts suggest more complex tasks
- Keywords — domain-specific terms (e.g., "architecture", "optimize", "prove") signal complexity
- Code markers — presence of code blocks, function names, or technical syntax
- Instruction depth — multi-step instructions, comparisons, or "explain in detail" bump the tier
- Conversational simplicity — greetings, yes/no, small talk stay on the cheapest tier
- Conversation history — when
--conversation is provided, analyzes full chat context: code in history boosts tier, trivial follow-ups ("thanks") downgrade, tool calls in history signal complexity
- Function calling —
--tools auto-bumps to at least mid tier (capable models required)
- Thinking/reasoning mode —
--thinking prefers chain-of-thought reasoning models (Qwen3 Thinking, Kimi K2) and bumps to at least mid tier
- Budget constraints — progressive tier downgrade as spending approaches daily/session limits (95% → cheap, 80% → budget, 60% → mid, 40% → high)
The classifier errs on the side of cheaper models — it only escalates when there's strong signal for complexity.
Environment Variables
| Variable |
Description |
Default |
VENICE_API_KEY |
Venice.ai API key (required) |
— |
VENICE_DEFAULT_TIER |
Minimum floor tier — auto-classification never goes below this. Valid: cheap, budget, budget-medium, mid, high, premium |
budget |
VENICE_MAX_TIER |
Maximum tier to ever use (cost cap) |
premium |
VENICE_TEMPERATURE |
Default temperature |
0.7 |
VENICE_MAX_TOKENS |
Default max tokens |
4096 |
VENICE_STREAM |
Enable streaming by default |
false |
VENICE_UNCENSORED |
Always prefer uncensored models |
false |
VENICE_PRIVATE_ONLY |
Only use private models (zero data retention) |
false |
VENICE_WEB_SEARCH |
Enable web search by default ($10/1K calls) |
false |
VENICE_THINKING |
Always prefer thinking/reasoning models |
false |
VENICE_DAILY_BUDGET |
Max daily spend in USD (0 = unlimited) |
0 |
VENICE_SESSION_BUDGET |
Max per-session spend in USD (0 = unlimited) |
0 |
Why Venice.ai?
- 🔒 Private inference — Models marked "Private" have zero data retention. Your data never trains anyone's model.
- 🔓 Uncensored — No guardrails blocking legitimate use cases. No refusals, no filters.
- 🔌 OpenAI-compatible — Same API format, just change the base URL. Drop-in replacement.
- 📦 30+ models — From tiny efficient models ($0.05/M) to Claude Opus 4.6 and GPT-5.2.
- 🌐 Built-in web search — LLMs can search the web and cite sources in a single API call.
Tips
- Use
--classify to preview which tier a prompt would hit before spending tokens
- Set
VENICE_MAX_TIER=mid to cap costs and never hit premium models
- Use
--uncensored for creative, security research, or other content mainstream AI won't touch
- Use
--private-only when processing sensitive/confidential data — zero retention guaranteed
- Use
--web-search when you need up-to-date information with cited sources
- Use
--conversation with a JSON message history for smarter multi-turn routing
- Use
--tools to enable function calling — the router auto-bumps to capable models
- Set
VENICE_DAILY_BUDGET=1.00 to cap daily spend at $1 — the router auto-downgrades tiers as you approach the limit
- Use
--budget-status to see a detailed breakdown of your spending by tier
- Use
--thinking for math proofs, logic puzzles, and multi-step reasoning — routes to Qwen3 Thinking or Kimi K2 models
- The router prefers private (self-hosted) Venice models over anonymized ones when available at the same tier
- When
--uncensored is active, the router auto-bumps to the nearest tier with uncensored models
- Combine with OpenClaw WebChat for a seamless chat experience routed through Venice.ai
1---
2name: venice-router
3version: 1.5.0
4description: Supreme model router for Venice.ai — the privacy-first, uncensored AI platform. Automatically classifies query complexity and routes to the cheapest adequate model. Supports web search, uncensored mode, private-only mode (zero data retention), conversation-aware routing, cost budgets, function calling, thinking/reasoning mode, and 35+ Venice.ai text models. Use when the user wants to chat via Venice.ai, send prompts through Venice, or needs smart model selection to minimize API costs while keeping data private from Big Tech.
5homepage: https://venice.ai
6source: https://github.com/PlusOne/venice.ai-router-openclaw
7user-invocable: true
8metadata:
9 source: https://skillmd.com/skills/modbender/venice-router
10 openclaw:
11 emoji: "🦞🚀"
12 homepage: https://github.com/PlusOne/venice.ai-router-openclaw
13 os: ["linux", "macos"]
14 requires:
15 bins: ["python3"]
16 env: ["VENICE_API_KEY"]
17 primaryEnv: VENICE_API_KEY
18 optionalEnv:
19 - VENICE_DEFAULT_TIER
20 - VENICE_MAX_TIER
21 - VENICE_TEMPERATURE
22 - VENICE_MAX_TOKENS
23 - VENICE_STREAM
24 - VENICE_UNCENSORED
25 - VENICE_PRIVATE_ONLY
26 - VENICE_WEB_SEARCH
27 - VENICE_THINKING
28 - VENICE_DAILY_BUDGET
29 - VENICE_SESSION_BUDGET
30 notes: "Python 3.8+ (stdlib only, no pip dependencies). All scripts bundled under scripts/. Source: https://github.com/PlusOne/venice.ai-router-openclaw"
31 cliHelp: "python3 venice-router.py --help\nusage: venice-router.py [-h] [--prompt PROMPT] [--tier {cheap,budget,budget-medium,mid,high,premium}] [--model MODEL] [--classify CLASSIFY] [--list-models] [--stream] [--temperature TEMPERATURE] [--max-tokens MAX_TOKENS] [--system SYSTEM] [--prefer-anon] [--uncensored] [--private-only] [--web-search] [--character CHARACTER] [--json] [--thinking] [--conversation CONVERSATION] [--tools TOOLS] [--tool-choice TOOL_CHOICE] [--budget-status] [--session-id SESSION_ID]\nExamples: --prompt \"What is 2+2?\" | --tier mid --prompt \"Explain recursion\" | --stream --prompt \"Write a haiku\" | --web-search --prompt \"Latest AI news\" | --uncensored --prompt \"Creative fiction\" | --private-only --prompt \"Sensitive data\" | --thinking --prompt \"Prove the halting problem\" | --conversation history.json --prompt \"continue\" | --tools tools.json --prompt \"Get weather\" | --budget-status | --classify \"Design a microservices architecture\" | --list-models"
32 install:
33 - id: python-brew
34 kind: brew
35 formula: python
36 bins: ["python3"]
37 label: "Install Python (brew)"
38---
39
40# Venice.ai Supreme Router
41
42Smart, cost-optimized model routing for [Venice.ai](https://venice.ai) — the AI platform for people who don't want Big Tech watching over their shoulder.
43
44Unlike OpenAI, Anthropic, and Google — where every prompt is logged, analyzed, and potentially used to train future models — Venice offers **true privacy** with zero data retention on private models. Your conversations stay yours. Venice is also **uncensored**: no content filters, no refusals, no "I can't help with that."
45
46## Setup
47
481. Get a Venice.ai API key from [venice.ai/settings/api](https://venice.ai/settings/api)
492. Set the environment variable:
50
51```bash
52export VENICE_API_KEY="your-key-here"
53```
54
55Or configure in `~/.openclaw/openclaw.json`:
56
57```json
58{
59 "skills": {
60 "entries": {
61 "venice-router": {
62 "enabled": true,
63 "apiKey": "YOUR_VENICE_API_KEY"
64 }
65 }
66 }
67}
68```
69
70## Usage
71
72### Route a prompt (auto-selects model)
73
74```bash
75python3 {baseDir}/scripts/venice-router.py --prompt "What is 2+2?"
76```
77
78### Force a specific tier
79
80```bash
81python3 {baseDir}/scripts/venice-router.py --tier cheap --prompt "Tell me a joke"
82python3 {baseDir}/scripts/venice-router.py --tier budget-medium --prompt "Write a Python function"
83python3 {baseDir}/scripts/venice-router.py --tier mid --prompt "Explain quantum computing"
84python3 {baseDir}/scripts/venice-router.py --tier premium --prompt "Write a distributed systems architecture"
85```
86
87### Stream output
88
89```bash
90python3 {baseDir}/scripts/venice-router.py --stream --prompt "Write a poem about lobsters"
91```
92
93### Web search (LLM searches the web and cites sources)
94
95```bash
96python3 {baseDir}/scripts/venice-router.py --web-search --prompt "Latest news on AI regulation"
97```
98
99### Uncensored mode (prefer models with no content filters)
100
101```bash
102python3 {baseDir}/scripts/venice-router.py --uncensored --prompt "Write edgy creative fiction"
103```
104
105### Private-only mode (zero data retention, no Big Tech proxying)
106
107```bash
108python3 {baseDir}/scripts/venice-router.py --private-only --prompt "Analyze this confidential contract"
109```
110
111### Conversation-aware routing (multi-turn context)
112
113```bash
114# Save conversation history as JSON, then route follow-ups with context
115python3 {baseDir}/scripts/venice-router.py --conversation history.json --prompt "Can you add tests too?"
116```
117
118The router analyzes conversation history to keep context: trivial follow-ups ("thanks") go cheap, while follow-ups in complex code discussions stay at the right tier.
119
120### Function calling (tool use)
121
122```bash
123# Define tools in a JSON file (OpenAI tools format)
124python3 {baseDir}/scripts/venice-router.py --tools tools.json --prompt "What's the weather in NYC?"
125python3 {baseDir}/scripts/venice-router.py --tools tools.json --tool-choice auto --prompt "Search for latest AI news"
126```
127
128Tool definitions use the standard OpenAI format. The router auto-bumps to `mid` tier minimum for function calling since it requires capable models.
129
130### Cost budget tracking
131
132```bash
133# Show current spending
134python3 {baseDir}/scripts/venice-router.py --budget-status
135
136# Track per-session costs
137python3 {baseDir}/scripts/venice-router.py --session-id my-project --prompt "help me code"
138```
139
140Set `VENICE_DAILY_BUDGET` and/or `VENICE_SESSION_BUDGET` to enforce spending limits. The router auto-downgrades tiers as you approach budget limits.
141
142### Classify only (no API call)
143
144```bash
145python3 {baseDir}/scripts/venice-router.py --classify "Explain the Riemann hypothesis"
146```
147
148### List available models and tiers
149
150```bash
151python3 {baseDir}/scripts/venice-router.py --list-models
152```
153
154### Override model directly
155
156```bash
157python3 {baseDir}/scripts/venice-router.py --model deepseek-v3.2 --prompt "Hello"
158```
159
160## Tiers
161
162| Tier | Models | Cost (input/output per 1M tokens) | Best For |
163|------|--------|-----------------------------------|----------|
164| **cheap** | Venice Small (qwen3-4b), GLM 4.7 Flash, GPT OSS 120B, Llama 3.2 3B | $0.05–$0.15 / $0.15–$0.60 | Simple Q&A, greetings, math, lookups |
165| **budget** | Qwen 3 235B, Venice Uncensored, GLM 4.7 Flash Heretic | $0.14–$0.20 / $0.75–$0.90 | Moderate questions, summaries, translations |
166| **budget-medium** | Grok Code Fast, DeepSeek V3.2, MiniMax M2.1 | $0.25–$0.40 / $1.00–$1.87 | Moderate-to-complex tasks, code snippets, structured output |
167| **mid** | DeepSeek V3.2, MiniMax M2.1/M2.5, Qwen3 Thinking 235B, Venice Medium, Llama 3.3 70B | $0.25–$0.70 / $1.00–$3.50 | Code generation, analysis, longer writing, reasoning |
168| **high** | GLM 5, Kimi K2 Thinking, Kimi K2.5, Grok 4.1 Fast, Hermes 3 405B, Gemini 3 Flash | $0.50–$1.10 / $1.25–$3.75 | Complex reasoning, multi-step tasks, code review |
169| **premium** | GPT-5.2, GPT-5.2 Codex, Gemini 3 Pro, Gemini 3.1 Pro (1M ctx), Claude Opus/Sonnet 4.5/4.6 | $2.19–$6.00 / $15.00–$30.00 | Expert-level analysis, architecture, research papers |
170
171## Routing Strategy
172
173The router classifies each prompt using keyword + heuristic analysis:
174
1751. **Length** — longer prompts suggest more complex tasks
1762. **Keywords** — domain-specific terms (e.g., "architecture", "optimize", "prove") signal complexity
1773. **Code markers** — presence of code blocks, function names, or technical syntax
1784. **Instruction depth** — multi-step instructions, comparisons, or "explain in detail" bump the tier
1795. **Conversational simplicity** — greetings, yes/no, small talk stay on the cheapest tier
1806. **Conversation history** — when `--conversation` is provided, analyzes full chat context: code in history boosts tier, trivial follow-ups ("thanks") downgrade, tool calls in history signal complexity
1817. **Function calling** — `--tools` auto-bumps to at least `mid` tier (capable models required)
1828. **Thinking/reasoning mode** — `--thinking` prefers chain-of-thought reasoning models (Qwen3 Thinking, Kimi K2) and bumps to at least `mid` tier
1839. **Budget constraints** — progressive tier downgrade as spending approaches daily/session limits (95% → cheap, 80% → budget, 60% → mid, 40% → high)
184
185The classifier errs on the side of cheaper models — it only escalates when there's strong signal for complexity.
186
187## Environment Variables
188
189| Variable | Description | Default |
190|----------|-------------|---------|
191| `VENICE_API_KEY` | Venice.ai API key (required) | — |
192| `VENICE_DEFAULT_TIER` | Minimum floor tier — auto-classification never goes below this. Valid: `cheap`, `budget`, `budget-medium`, `mid`, `high`, `premium` | `budget` |
193| `VENICE_MAX_TIER` | Maximum tier to ever use (cost cap) | `premium` |
194| `VENICE_TEMPERATURE` | Default temperature | `0.7` |
195| `VENICE_MAX_TOKENS` | Default max tokens | `4096` |
196| `VENICE_STREAM` | Enable streaming by default | `false` |
197| `VENICE_UNCENSORED` | Always prefer uncensored models | `false` |
198| `VENICE_PRIVATE_ONLY` | Only use private models (zero data retention) | `false` |
199| `VENICE_WEB_SEARCH` | Enable web search by default ($10/1K calls) | `false` |
200| `VENICE_THINKING` | Always prefer thinking/reasoning models | `false` |
201| `VENICE_DAILY_BUDGET` | Max daily spend in USD (0 = unlimited) | `0` |
202| `VENICE_SESSION_BUDGET` | Max per-session spend in USD (0 = unlimited) | `0` |
203
204## Why Venice.ai?
205
206- **🔒 Private inference** — Models marked "Private" have zero data retention. Your data never trains anyone's model.
207- **🔓 Uncensored** — No guardrails blocking legitimate use cases. No refusals, no filters.
208- **🔌 OpenAI-compatible** — Same API format, just change the base URL. Drop-in replacement.
209- **📦 30+ models** — From tiny efficient models ($0.05/M) to Claude Opus 4.6 and GPT-5.2.
210- **🌐 Built-in web search** — LLMs can search the web and cite sources in a single API call.
211
212## Tips
213
214- Use `--classify` to preview which tier a prompt would hit before spending tokens
215- Set `VENICE_MAX_TIER=mid` to cap costs and never hit premium models
216- Use `--uncensored` for creative, security research, or other content mainstream AI won't touch
217- Use `--private-only` when processing sensitive/confidential data — zero retention guaranteed
218- Use `--web-search` when you need up-to-date information with cited sources
219- Use `--conversation` with a JSON message history for smarter multi-turn routing
220- Use `--tools` to enable function calling — the router auto-bumps to capable models
221- Set `VENICE_DAILY_BUDGET=1.00` to cap daily spend at $1 — the router auto-downgrades tiers as you approach the limit
222- Use `--budget-status` to see a detailed breakdown of your spending by tier
223- Use `--thinking` for math proofs, logic puzzles, and multi-step reasoning — routes to Qwen3 Thinking or Kimi K2 models
224- The router prefers **private** (self-hosted) Venice models over anonymized ones when available at the same tier
225- When `--uncensored` is active, the router auto-bumps to the nearest tier with uncensored models
226- Combine with OpenClaw WebChat for a seamless chat experience routed through Venice.ai