venice
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVenice AI
Venice AI
Privacy-first AI platform. OpenAI-compatible API at . Four privacy tiers — anonymized, private, TEE, E2EE. Zero data retention. No content filtering on most models.
https://api.venice.ai/api/v1This skill covers everything except chat completions. For chat, the right path is BYOK via the platform's tool — see "Chat onboarding" below.
custom_models注重隐私的AI平台。兼容OpenAI的API地址为。提供四个隐私层级——匿名、私有、TEE、E2EE。零数据留存。大多数模型无内容过滤。
https://venice.ai/api/v1本技能涵盖除聊天补全之外的所有功能。如需聊天功能,正确路径是通过平台的工具使用BYOK——请参阅下方的“聊天入门”部分。
custom_modelsQuick capability map
快速能力地图
| Surface | Function |
|---|---|
| Catalog | |
| Account | |
| Image | |
| Audio | |
| Embeddings | |
| Chat probe | |
| Video | |
Endpoints intentionally NOT wrapped: standalone (Venice removed it; use via venice_parameters in chat instead), admin-scoped and (require an admin key the BYOK key can't use).
/tools/search/webenable_web_search/api_keys/billing/usage| 领域 | 功能 |
|---|---|
| 模型目录 | |
| 账户管理 | |
| 图像 | |
| 音频 | |
| 嵌入 | |
| 聊天探测 | |
| 视频 | |
未封装的端点:独立的(Venice已移除;聊天时通过venice_parameters中的替代)、管理员权限的和(需要BYOK密钥无法使用的管理员密钥)。
/tools/search/webenable_web_search/api_keys/billing/usageSetup
配置步骤
- User goes to https://venice.ai/settings/api, creates a key.
- Add the key to the workspace via secure input — never paste in chat:
- If the user wants chat: call . Auto-pops the secure input and registers Venice for chat completions in one shot.
custom_models(action='add_template', vendor='venice') - If the user only wants this skill (image/audio/embeddings): call .
request_env_input(env_vars=[{key='VENICE_API_KEY', label='Venice API Key', required=True}], reason='Use Venice image/audio/embeddings via the venice skill')
- If the user wants chat: call
- The skill resolves the key in this order: → any
VENICE_API_KEYfrom BYOK registration. Either path works; both is fine.CUSTOM_KEY_VENICE_*
account_balance()- 用户访问https://venice.ai/settings/api,创建密钥。
- 通过安全输入将密钥添加到工作区——切勿在聊天中粘贴:
- 若用户需要聊天功能:调用。自动弹出安全输入框,一键完成Venice的聊天补全注册。
custom_models(action='add_template', vendor='venice') - 若用户仅需本技能(图像/音频/嵌入):调用。
request_env_input(env_vars=[{key='VENICE_API_KEY', label='Venice API Key', required=True}], reason='通过venice技能使用Venice图像/音频/嵌入功能')
- 若用户需要聊天功能:调用
- 技能按以下顺序解析密钥:→ BYOK注册生成的任意
VENICE_API_KEY。两种方式均可,同时存在也没问题。CUSTOM_KEY_VENICE_*
account_balance()Usage
使用示例
python
import sys
sys.path.insert(0, "/data/workspace/skills/venice")
from exports import (
list_models, image_generate, image_edit, image_upscale,
tts, transcribe, embeddings,
list_image_styles, list_characters, list_model_traits,
account_balance, chat_with_venice_parameters,
)python
import sys
sys.path.insert(0, "/data/workspace/skills/venice")
from exports import (
list_models, image_generate, image_edit, image_upscale,
tts, transcribe, embeddings,
list_image_styles, list_characters, list_model_traits,
account_balance, chat_with_venice_parameters,
)Browse models
浏览模型
python
undefinedpython
undefinedDefault returns text models only — pass type_filter to scope.
默认仅返回文本模型——可传入type_filter筛选范围。
text_vision = list_models(type_filter="text", only_capabilities=["supportsVision"])
images = list_models(type_filter="image") # 28 image models
ttss = list_models(type_filter="tts") # 10 voices
private_only = list_models(type_filter="text", privacy="private")
all_models = list_models(type_filter="all") # ~244 entries — heavy, use sparingly
Each entry: `id, type, name, description, privacy, context_tokens, max_completion_tokens, capabilities, pricing_input_usd, pricing_output_usd, pricing_cache_input_usd, traits`.
`list_model_traits()` returns Venice's curated picks: `default`, `most_intelligent`, `most_uncensored`, `default_reasoning`, `default_vision`, `default_code`, `function_calling_default`, `fastest`. Use this when the user says "give me Venice's smartest model" — don't guess.text_vision = list_models(type_filter="text", only_capabilities=["supportsVision"])
images = list_models(type_filter="image") # 28个图像模型
ttss = list_models(type_filter="tts") # 10种语音
private_only = list_models(type_filter="text", privacy="private")
all_models = list_models(type_filter="all") # 约244个条目——数据量大,谨慎使用
每个条目包含:`id, type, name, description, privacy, context_tokens, max_completion_tokens, capabilities, pricing_input_usd, pricing_output_usd, pricing_cache_input_usd, traits`。
`list_model_traits()`返回Venice的精选模型分类:`default`, `most_intelligent`, `most_uncensored`, `default_reasoning`, `default_vision`, `default_code`, `function_calling_default`, `fastest`。当用户要求“推荐Venice最智能的模型”时使用该函数——不要自行猜测。Image generation
图像生成
Don't guess model IDs. Venice rotates image models often (e.g. no longer exists; does). Always confirm with before passing a non-default . Same rule for and .
flux-dev-uncensoredflux-2-prolist_models(type_filter="image")model=image_editimage_upscalepython
g = image_generate(
"neon cyberpunk cat in the rain",
model="venice-sd35", # default; see list_models(type_filter='image') for others
width=1024, height=1024, # any aspect-ratio Venice supports
steps=20,
style_preset="Cinematic", # see list_image_styles() for the 76 presets
save_path="cat.webp", # → output/images/cat.webp (platform convention)
)
print(g["saved_path"])Returns .
{id, model, prompt, width, height, image_b64 (always), saved_path, timing}不要自行编造模型ID。Venice会频繁轮换图像模型(例如已停用,可用)。在传入非默认参数前,务必通过确认有效ID。和也遵循此规则。
flux-dev-uncensoredflux-2-promodel=list_models(type_filter="image")image_editimage_upscalepython
g = image_generate(
"雨中的霓虹赛博朋克猫咪",
model="venice-sd35", # 默认模型;可通过list_models(type_filter='image')查看其他模型
width=1024, height=1024, # Venice支持任意宽高比
steps=20,
style_preset="Cinematic", # 可通过list_image_styles()查看76种预设风格
save_path="cat.webp", # → 输出路径:output/images/cat.webp(平台约定)
)
print(g["saved_path"])返回结果:。
{id, model, prompt, width, height, image_b64 (始终返回), saved_path, timing}Image edit
图像编辑
python
e = image_edit(
"output/images/cat.webp",
"make the rain heavier and add lightning",
model="qwen-edit", # default ($0.04/edit). Other valid IDs:
# firered-image-edit, grok-imagine-edit,
# qwen-image-2-edit, qwen-image-2-pro-edit,
# wan-2-7-pro-edit, flux-2-max-edit,
# nano-banana-pro-edit, seedream-v5-lite-edit
save_path="cat_edited.png",
)imagepython
e = image_edit(
"output/images/cat.webp",
"加大雨势并添加闪电",
model="qwen-edit", # 默认模型(0.04美元/次编辑)。其他有效ID包括:
# firered-image-edit, grok-imagine-edit,
# qwen-image-2-edit, qwen-image-2-pro-edit,
# wan-2-7-pro-edit, flux-2-max-edit,
# nano-banana-pro-edit, seedream-v5-lite-edit
save_path="cat_edited.png",
)imageImage upscale
图像超分辨率
python
image_upscale("output/images/cat.webp", scale=2, save_path="cat_2x.png")Topaz-quality upscale. Scale 2 or 4. ~3 MB result for a 512×512 source at 2x.
python
image_upscale("output/images/cat.webp", scale=2, save_path="cat_2x.png")达到Topaz级别的超分辨率效果。支持2倍或4倍缩放。512×512的原图经2倍缩放后,结果约3MB。
TTS
TTS(文本转语音)
python
tts(
"Welcome to Venice",
model="tts-kokoro", # default; alts: tts-xai-v1, tts-elevenlabs-turbo-v2-5,
# tts-orpheus, tts-chatterbox-hd, tts-inworld-1-5-max,
# tts-qwen3-0-6b, tts-qwen3-1-7b
voice="af_alloy", # voice list per model in Venice docs
response_format="mp3", # mp3 | opus | aac | flac | wav | pcm
save_path="welcome.mp3", # → output/audio/welcome.mp3
)python
tts(
"Welcome to Venice",
model="tts-kokoro", # 默认模型;可选模型包括:tts-xai-v1, tts-elevenlabs-turbo-v2-5,
# tts-orpheus, tts-chatterbox-hd, tts-inworld-1-5-max,
# tts-qwen3-0-6b, tts-qwen3-1-7b
voice="af_alloy", # 各模型的语音列表请查阅Venice文档
response_format="mp3", # 可选格式:mp3 | opus | aac | flac | wav | pcm
save_path="welcome.mp3", # → 输出路径:output/audio/welcome.mp3
)Transcribe (STT)
Transcribe(语音转文本,STT)
python
result = transcribe(
"output/audio/welcome.mp3",
model="openai/whisper-large-v3", # default. Alt: stt-xai-v1
# The `openai/` prefix is REQUIRED —
# bare `whisper-large-v3` returns 404.
)
print(result["text"]) # transcribed text
print(result["duration"]) # secondspython
result = transcribe(
"output/audio/welcome.mp3",
model="openai/whisper-large-v3", # 默认模型。可选模型:stt-xai-v1
# 必须添加`openai/`前缀——
# 仅传入`whisper-large-v3`会返回404错误。
)
print(result["text"]) # 转录文本
print(result["duration"]) # 时长(秒)Embeddings
嵌入功能
python
out = embeddings(["hello world", "second sentence"])python
out = embeddings(["hello world", "second sentence"])→ {model, count, dim: 1024 (for bge-m3), vectors: list[list[float]], usage}
→ 返回结果:{model, count, dim: 1024 (对应bge-m3模型), vectors: list[list[float]], usage}
undefinedundefinedCharacters
角色功能
python
list_characters(limit=20) # [{slug, name, description, tags}, ...]python
list_characters(limit=20) # 返回结果:[{slug, name, description, tags}, ...]Use the slug in chat via venice_parameters['character_slug']
在聊天中通过venice_parameters['character_slug']使用slug参数
undefinedundefinedChat onboarding (BYOK is the answer)
聊天入门(BYOK是解决方案)
Don't try to wrap chat completions in this skill. The platform has a first-class BYOK flow that handles streaming, history, cost tracking, and model-switcher integration.
Standard flow when the user says "I want to chat with Venice":
- — confirm Venice is in the curated list (it is, with
custom_models(action='templates')).supports_dynamic_models: true - Optional but recommended for picky users: — returns the live catalog (~75 text models) with capabilities, pricing, and privacy tier. Filter and present the top picks.
custom_models(action='list_vendor_models', vendor='venice') - — registers Venice with one of Venice's models as the chat target. The
custom_models(action='add_template', vendor='venice', upstream_model='<id>')parameter accepts ANY id from step 2's response (Venice has dynamic discovery). Auto-pops the secure-input prompt for the API key.upstream_model - Tell the user how to switch: in chat, or use the model picker.
/model custom/<id>
Recommended models (use to keep this fresh):
list_model_traits()| Use case | Trait | Typical pick |
|---|---|---|
| Smartest text | | |
| Uncensored | | |
| Reasoning | | |
| Vision | | |
| Code | | |
| Cheap & fast | | |
| Function calling | | |
| Privacy: TEE/E2EE | filter | varies |
Pricing varies wildly: is $0.15/$0.60 per 1M tokens; is $1.75/$5.50; Grok 4.20 is even higher. Always check before recommending if the user is cost-sensitive.
llama-3.2-3bzai-org-glm-5-1list_models()不要尝试在本技能中封装聊天补全功能。平台提供原生BYOK流程,可处理流式传输、历史记录、成本跟踪和模型切换集成。
当用户说“我想使用Venice聊天”时的标准流程:
- 调用——确认Venice在精选模板列表中(已包含,且
custom_models(action='templates'))。supports_dynamic_models: true - 对要求较高的用户,可选但推荐:调用——返回实时模型目录(约75个文本模型),包含能力、定价和隐私层级信息。筛选并推荐最优模型。
custom_models(action='list_vendor_models', vendor='venice') - 调用——将Venice注册为聊天目标模型,
custom_models(action='add_template', vendor='venice', upstream_model='<id>')参数可接受步骤2返回的任意模型ID(Venice支持动态发现)。自动弹出API密钥的安全输入提示框。upstream_model - 告知用户切换方式:在聊天中输入,或使用模型选择器。
/model custom/<id>
推荐模型(使用保持信息更新):
list_model_traits()| 使用场景 | 分类标签 | 典型选择 |
|---|---|---|
| 最智能文本模型 | | |
| 无审查模型 | | |
| 推理模型 | | |
| 视觉模型 | | |
| 代码模型 | | |
| 低成本快速模型 | | |
| 函数调用模型 | | |
| 隐私优先:TEE/E2EE | 筛选 | 随模型更新变化 |
定价差异极大:为每百万令牌0.15/0.60美元;为1.75/5.50美元;Grok 4.20定价更高。若用户对成本敏感,推荐前务必通过确认定价。
llama-3.2-3bzai-org-glm-5-1list_models()venice_parameters — Venice-specific chat extensions
venice_parameters — Venice专属聊天扩展参数
These pass through in the OpenAI-compatible chat-completions call. Currently the platform's BYOK chat path doesn't have a UI for them, so users typically:
extra_body- Test them here via to see what they do.
chat_with_venice_parameters() - Use them in production by directly calling Venice from a script (also via this skill's , or any OpenAI SDK pointed at Venice).
chat_with_venice_parameters
python
chat_with_venice_parameters(
"What's the latest Bitcoin price?",
venice_parameters={
"enable_web_search": "on", # "auto" | "on" | "off"
"include_venice_system_prompt": False, # drop Venice's default sysprompt
"enable_web_citations": True, # ask for inline citations
},
)| Parameter | Type | Effect |
|---|---|---|
| "auto" | "on" | "off" | Real-time web search via Brave (ZDR) |
| bool | Auto-fetch URLs in user messages (Firecrawl) |
| bool | Inline citations in the response |
| bool | xAI native search (web + X) for Grok models |
| str | Use a Venice character persona (see |
| bool | Default True. Set False to strip Venice's defaults |
| bool | Drop |
| bool | Force-off thinking on reasoning-capable models |
| bool | Enable E2EE on E2EE-capable models |
The Venice response echoes a block in the body so you can verify the request was actually applied (look for it in ).
venice_parametersraw_response_keys这些参数通过兼容OpenAI的聊天补全调用中的传递。目前平台的BYOK聊天路径暂无UI设置这些参数,因此用户通常:
extra_body- 通过测试参数效果。
chat_with_venice_parameters() - 通过脚本直接调用Venice实现生产环境使用(也可通过本技能的,或指向Venice的任意OpenAI SDK)。
chat_with_venice_parameters
python
chat_with_venice_parameters(
"比特币最新价格是多少?",
venice_parameters={
"enable_web_search": "on", # 可选值:"auto" | "on" | "off"
"include_venice_system_prompt": False, # 移除Venice默认系统提示词
"enable_web_citations": True, # 请求在响应中添加内联引用
},
)| 参数 | 类型 | 作用 |
|---|---|---|
| "auto" | "on" | "off" | 通过Brave (ZDR)实现实时网页搜索 |
| bool | 自动抓取用户消息中的URL内容(基于Firecrawl) |
| bool | 在响应中添加内联引用 |
| bool | 为Grok模型启用xAI原生搜索(网页+X平台) |
| str | 使用Venice角色人设(需调用 |
| bool | 默认值True。设为False可移除Venice默认提示词 |
| bool | 移除推理模型输出中的 |
| bool | 强制关闭支持推理的模型的思考功能 |
| bool | 为支持E2EE的模型启用端到端加密 |
Venice的响应会在返回体中回显块,便于验证请求是否已正确应用(可在中查看)。
venice_parametersraw_response_keysErrors
错误处理
VeniceError(status, message, body)| Status | Message hint | Fix |
|---|---|---|
| 401 | | Endpoint needs an admin-scope key the BYOK key doesn't have. Skip — no workaround. |
| 401 | | Run |
| 400 | | Wrong model name. Check |
| 404 | | Use the suggested model name. STT requires |
遇到4xx/5xx状态码时会抛出。常见错误如下:
VeniceError(status, message, body)| 状态码 | 提示信息 | 解决方法 |
|---|---|---|
| 401 | | 该端点需要管理员权限密钥,BYOK密钥无法使用。跳过此功能——无解决办法。 |
| 401 | | 调用 |
| 400 | | 模型名称错误。通过 |
| 404 | | 使用建议的模型名称。STT功能必须使用 |
Costs
费用说明
This skill talks directly to Venice — costs are billed against the user's Venice balance, not against platform credits. The platform's per-tool ledger does NOT track Venice spend. Tell the user to check periodically. Image edit is $0.04/edit, TTS depends on chars, image generate depends on resolution + steps.
account_balance()account_balance()balance_usdbalance_diem本技能直接与Venice交互——费用从用户的Venice余额中扣除,而非平台 credits。平台的工具账本不追踪Venice消费。请告知用户定期调用查看余额。图像编辑费用为0.04美元/次,TTS费用取决于字符数,图像生成费用取决于分辨率和步数。
account_balance()account_balance()balance_usdbalance_diemPay-as-you-go (USD top-up) — default
按需付费(美元充值)——默认模式
User funds the API key with USD at https://venice.ai/settings/api. Each request decrements . Standard SaaS billing. This is what 99% of users want.
balance_usd用户在https://venice.ai/settings/api为API密钥充值美元。每次请求扣除。标准SaaS计费模式。99%的用户适用此模式。
balance_usdDIEM staking — for high-volume / always-on users
DIEM质押——面向高用量/全天候用户
DIEM is an ERC-20 on Base. Each staked DIEM unlocks $1 of AI compute per day, every day, no expiry (unused daily credits do NOT roll over). Burning DIEM returns the locked VVV (Venice's native token) used to mint it.
Pricing in shows both currencies, e.g. GLM 5.1 input is — meaning Venice's backend auto-detects whether the wallet behind the API key has staked DIEM and routes spend to that bucket first. No skill changes needed to use DIEM — the API key resolves the right pool server-side.
list_models()$1.75/1M usd, 1.75/1M diem| Path | When it makes sense |
|---|---|
| USD top-up | Casual / variable usage. Pay only what you spend. Zero idle cost. |
| Stake DIEM | Daily Venice spend ≥ $1 sustained, OR running 24h agent loops, OR want predictable cost ceiling. Capital is locked in DIEM, but unused daily credits = pure waste, so size to floor of your daily usage. |
Break-even rule of thumb: stake N DIEM only if your projected daily Venice spend is ≥ $N. At any DIEM market price, the math is simple: 1 DIEM costs (current market price) once, gives $1/day forever — break-even time = price / 1.
Setup: — connect a wallet on Base, stake there. Never send DIEM directly to the contract address — use the staking page only. This skill does NOT automate staking (involves wallet ops + Base chain + VVV/DIEM contracts that are out of scope for an inference skill); the user does it once on the website.
https://venice.ai/tokenDIEM是Base链上的ERC-20代币。每质押1枚DIEM,每天可解锁1美元的AI计算额度,无有效期(未使用的每日额度不结转)。销毁DIEM可赎回用于铸造它的VVV(Venice原生代币)。
list_models()$1.75/1M usd, 1.75/1M diem| 模式 | 适用场景 |
|---|---|
| 美元充值 | 偶尔使用/用量波动大。仅为实际消费付费。无闲置成本。 |
| DIEM质押 | 每日Venice消费≥1美元且持续稳定,或运行24小时Agent循环,或需要可预测的成本上限。资金会锁定在DIEM中,但未使用的每日额度会被浪费,因此需根据每日最低用量确定质押数量。 |
收支平衡经验法则:仅当预计每日Venice消费≥N美元时,才质押N枚DIEM。无论DIEM当前市价如何,计算逻辑简单:1枚DIEM花费(当前市价)一次,每天提供1美元额度——回本时间=市价/1。
配置方法:访问——连接Base链钱包,在该页面完成质押。切勿直接向合约地址发送DIEM——仅使用官方质押页面。本技能不自动处理质押流程(涉及钱包操作+Base链+VVV/DIEM合约,超出推理技能范围);用户需在网站上手动完成一次配置。
https://venice.ai/tokenVideo
视频功能
Video is async — the API returns a queue id and you poll. Use for one-shot end-to-end (quote → queue → poll → download → optional cleanup), or call the four primitives directly when you need control.
video_generate()Audio support is per-model, not universal. Pass only after confirming via that the chosen model exposes audio capability. and most text-to-video models do NOT support audio — passing returns . The / defaults default to for that reason; opt in only when you've checked the capability.
audio=Truelist_models(type_filter="video")wan-2-7-text-to-videoaudio=True400: This model does not support audio configurationvideo_queuevideo_generateaudio=Falsepython
from exports import video_generate, video_quote, list_models视频功能为异步——API返回队列ID,需轮询获取结果。可使用实现端到端单次调用(报价→排队→轮询→下载→可选清理),或在需要精细控制时直接调用四个基础函数。
video_generate()音频支持因模型而异,并非所有模型都支持。仅在通过确认所选模型具备音频能力后,再传入。和大多数文本转视频模型不支持音频——传入会返回。因此 / 默认;仅在确认模型支持后才启用该参数。
list_models(type_filter="video")audio=Truewan-2-7-text-to-videoaudio=True400: This model does not support audio configurationvideo_queuevideo_generateaudio=Falsepython
from exports import video_generate, video_quote, list_modelsBrowse video models — confirm capabilities before picking
浏览视频模型——选择前确认能力
videos = list_models(type_filter="video")
videos = list_models(type_filter="video")
Common families: seedance-2-0-text-to-video, wan-2-7-text-to-video,
常见模型系列:seedance-2-0-text-to-video, wan-2-7-text-to-video,
seedance-2-0-image-to-video, seedance-2-0-reference-to-video, kling-o3-r2v.
seedance-2-0-image-to-video, seedance-2-0-reference-to-video, kling-o3-r2v.
Upscale models use upscale_factor instead of resolution.
超分辨率模型使用upscale_factor而非resolution参数。
Audio-capable models are a subset — check capabilities
on each entry.
capabilities支持音频的模型为子集——需查看每个条目的capabilities
。
capabilities1. Cheap path — quote first (free, no balance charge)
1. 低成本路径——先获取报价(免费,不扣除余额)
q = video_quote(
model="wan-2-7-text-to-video",
duration="5s", aspect_ratio="16:9", resolution="720p",
# audio omitted → defaults to False (safe for wan-2-7)
)
q = video_quote(
model="wan-2-7-text-to-video",
duration="5s", aspect_ratio="16:9", resolution="720p",
# 省略audio参数→默认False(wan-2-7模型安全设置)
)
{"quote": 0.55} — USD against your Venice balance
返回结果:{"quote": 0.55} —— 从Venice余额中扣除美元
2. End-to-end (charges balance, polls until done)
2. 端到端调用(扣除余额,轮询直至完成)
v = video_generate(
model="wan-2-7-text-to-video",
prompt="A golden retriever chasing a frisbee at sunset, slow motion.",
duration="5s", resolution="720p",
save_path="retriever.mp4", # → output/videos/retriever.mp4
on_progress=lambda r: print(r.get("status"),
r.get("execution_duration", 0) // 1000, "s"),
)
v = video_generate(
model="wan-2-7-text-to-video",
prompt="日落时分,金毛猎犬慢动作追逐飞盘。",
duration="5s", resolution="720p",
save_path="retriever.mp4", # → 输出路径:output/videos/retriever.mp4
on_progress=lambda r: print(r.get("status"),
r.get("execution_duration", 0) // 1000, "s"),
)
{queue_id, saved_path, bytes, quote_usd, elapsed_s, polls, ...}
返回结果:{queue_id, saved_path, bytes, quote_usd, elapsed_s, polls, ...}
`video_generate` accepts every queue parameter via `**queue_kwargs`:
| Field | Purpose |
|---|---|
| `negative_prompt` | What to avoid |
| `image_url` | First-frame reference (image-to-video) |
| `end_image_url` | Last-frame reference (transition) |
| `audio_url` | Background music input (WAV/MP3, ≤30s, ≤15MB) |
| `video_url` | Video-to-video / upscale input (MP4/MOV/WebM) |
| `reference_image_urls` | Up to 9 character/style references |
| `elements` | Up to 4 advanced elements (Kling O3 R2V style); reference in prompt as `@Element1` |
| `scene_image_urls` | Up to 4 scene references; reference as `@Image1` |
| `upscale_factor` | 1 / 2 / 4 — for upscale models (use instead of resolution) |
| `delete_media_on_completion` | Auto-delete from Venice storage after retrieve |
**Manual loop** when you want fine control (interactive ETA, custom storage, batched jobs):
```python
queued = video_queue(model="...", prompt="...", duration="5s",
resolution="720p", aspect_ratio="16:9")
`video_generate`通过`**queue_kwargs`接受所有排队参数:
| 字段 | 用途 |
|---|---|
| `negative_prompt` | 指定需要避免的内容 |
| `image_url` | 首帧参考图(图像转视频) |
| `end_image_url` | 末帧参考图(转场效果) |
| `audio_url` | 背景音乐输入(WAV/MP3格式,≤30秒,≤15MB) |
| `video_url` | 视频转视频/超分辨率输入(MP4/MOV/WebM格式) |
| `reference_image_urls` | 最多9张角色/风格参考图 |
| `elements` | 最多4个高级元素(Kling O3 R2V风格);在提示词中通过`@Element1`引用 |
| `scene_image_urls` | 最多4张场景参考图;通过`@Image1`引用 |
| `upscale_factor` | 1 / 2 / 4 —— 超分辨率模型使用(替代resolution参数) |
| `delete_media_on_completion` | 完成后自动从Venice存储中删除媒体文件 |
**手动流程(需要精细控制时使用,如交互式ETA、自定义存储、批量任务):**
```python
queued = video_queue(model="...", prompt="...", duration="5s",
resolution="720p", aspect_ratio="16:9")Add audio=True only when the model's capabilities
include audio.
capabilities仅当模型capabilities
包含音频时,才添加audio=True参数。
capabilitiesqid = queued["queue_id"]
download_url = queued.get("download_url") # only for VPS-backed models
while True:
r = video_retrieve(model="...", queue_id=qid)
if "video_bytes" in r:
open("out.mp4", "wb").write(r["video_bytes"]); break
if r.get("status") == "COMPLETED":
# VPS-backed model — fetch download_url
import requests; v = requests.get(download_url, timeout=120)
open("out.mp4", "wb").write(v.content); break
if r.get("status") != "PROCESSING":
raise RuntimeError(r)
time.sleep(5)
video_complete(model="...", queue_id=qid) # cleanup
**Video transcription (YouTube only)**:
```python
video_transcribe_youtube("https://www.youtube.com/watch?v=...")qid = queued["queue_id"]
download_url = queued.get("download_url") # 仅VPS托管模型返回该字段
while True:
r = video_retrieve(model="...", queue_id=qid)
if "video_bytes" in r:
open("out.mp4", "wb").write(r["video_bytes"]); break
if r.get("status") == "COMPLETED":
# VPS托管模型——获取download_url
import requests; v = requests.get(download_url, timeout=120)
open("out.mp4", "wb").write(v.content); break
if r.get("status") != "PROCESSING":
raise RuntimeError(r)
time.sleep(5)
video_complete(model="...", queue_id=qid) # 清理任务
**视频转录(仅支持YouTube):**
```python
video_transcribe_youtube("https://www.youtube.com/watch?v=...")→ {"transcript": "...", "lang": "en"}
→ 返回结果:{"transcript": "...", "lang": "en"}
For arbitrary local audio/video files, use `transcribe()` (uploads to /audio/transcriptions and accepts file paths). For non-YouTube hosted video, strip audio with ffmpeg first then call `transcribe()`.
**Video errors** beyond the table above:
| Code | Meaning |
|---|---|
| 400 | Bad params: model doesn't support that duration/resolution combo, missing `image_url` for i2v, or `prompt` empty |
| 402 | Insufficient balance — top up at venice.ai |
| 413 | Payload too big — use hosted URLs instead of base64 data URIs |
| 422 | Content policy violation (rare on Venice but possible on i2v) |
| 503 | Queue saturated — wait and retry |
Gotchas:
- `duration` is required even for `Auto` (pass it explicitly).
- `download_url` from queue is valid 24h — fetch promptly.
- Upscale models require `upscale_factor`, NOT `resolution`.
- Quote varies wildly by model and duration — wan 5s @ 720p ≈ $0.55, seedance-2-0-pro 10s @ 1080p can be $5+.
对于本地任意音频/视频文件,使用`transcribe()`(上传至/audio/transcriptions,支持文件路径)。对于非YouTube托管的视频,先使用ffmpeg提取音频,再调用`transcribe()`。
**除上述表格外的视频错误:**
| 状态码 | 含义 |
|---|---|
| 400 | 参数错误:模型不支持该时长/分辨率组合,图像转视频缺少`image_url`,或`prompt`为空 |
| 402 | 余额不足——前往venice.ai充值 |
| 413 | 负载过大——使用托管URL替代base64数据URI |
| 422 | 违反内容政策(Venice上很少见,但图像转视频可能出现) |
| 503 | 队列饱和——等待后重试 |
注意事项:
- 即使选择“Auto”,`duration`参数也必须显式传入。
- 队列返回的`download_url`有效期为24小时——请及时下载。
- 超分辨率模型需要`upscale_factor`参数,而非`resolution`。
- 报价因模型和时长差异极大:wan模型5秒720p约0.55美元,seedance-2-0-pro模型10秒1080p可能超过5美元。Don't
禁忌操作
- Don't wrap chat as a function here. Use BYOK.
- Don't fabricate a model id from training data — Venice ships new models weekly. Always or
list_models()first.list_model_traits() - Don't ask the user to paste the API key in chat. Use (or
request_env_input).custom_models add_template
- 不要在本技能中封装聊天功能。请使用BYOK流程。
- 不要根据训练数据编造模型ID——Venice每周都会发布新模型。务必先调用或
list_models()。list_model_traits() - 不要让用户在聊天中粘贴API密钥。请使用(或
request_env_input)。custom_models add_template