venice-embeddings
Skill2 starsChanged 5 months agoMITView on GitHub
Call POST /embeddings on Venice. Covers request shape (input, model, encoding_format, dimensions, user), OpenAI compatibility, response compression (gzip/br), and practical usage for retrieval, clustering, and RAG.
- Reads credentials
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- veniceai/skillsedited, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- veniceai/skills★ 17124% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- cheaptokensSkill
- venice-api-keysSkill
- venice-api-overviewSkill
- venice-audio-musicSkill
- venice-audio-speechSkill
- venice-audio-transcriptionSkill
- venice-augmentSkill
- venice-authSkill
- venice-billingSkill
- venice-charactersSkill
- venice-chatSkill
- venice-crypto-rpcSkill
- venice-errorsSkill
- venice-image-editSkill
- venice-image-generateSkill
- venice-modelsSkill
- venice-responsesSkill
- venice-videoSkill
- venice-x402Skill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 96
Keep batches ≤ model context limit total tokens.
- Distinctive: line 110
Always pin the model ID — cosine distances are not comparable across different embedding models.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Venice Embeddings
POST /api/v1/embeddings returns vector embeddings for strings. It's OpenAI-compatible: the request and response match https://api.openai.com/v1/embeddings closely enough that the OpenAI SDK works out of the box with baseURL: "https://api.venice.ai/api/v1".
Use when
- You're building retrieval / RAG / similarity search.
- You need text clustering, classification, deduplication, or reranking.
- You want Venice's "no-training, no-retention" stance on inference inputs — embeddings are generated and returned; the API does not publish E2EE semantics on
/embeddingsthe way it does on selected chat models.
Text-only. For image/multimodal signals, either run images through a vision chat model and embed the description, or pick a multimodal-capable embedding model from GET /models?type=embedding (the catalog changes; inspect model_spec on each row).
Minimal request
curl https://api.venice.ai/api/v1/embeddings \
-H "Authorization: Bearer $VENICE_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip, br" \
-d '{
"model": "text-embedding-bge-m3",
"input": "Why is the sky blue?"
}'{
"object": "list",
"model": "text-embedding-bge-m3",
"data": [
{ "object": "embedding", "index": 0, "embedding": [0.0023, -0.0093, 0.0158, ...] }
],
"usage": { "prompt_tokens": 8, "total_tokens": 8 }
}Request schema
| Field | Type | Notes |
model | string | Required. Model ID from GET /models?type=embedding. |
input | string | string[] | number[] | number[][] | Required. Single string, array of strings (≤ 2048 entries), or pre-tokenized arrays. |
encoding_format | "float" | "base64" | Default "float". Use "base64" for ~4× payload shrinkage; decode client-side. |
dimensions | integer | Optional. Truncate output dimensions. Only meaningful when the model's model_spec.supportsCustomDimensions === true — behavior on non-supporting models is model-dependent; test a small call before relying on it. |
user | string | Accepted for OpenAI compat. Discarded by Venice. |
input max tokens per string is capped at the model's model_spec.maxInputTokens (typically 8192). Batch arrays are capped at 2048 items. Venice returns one embedding per element, in order, with matching index.
Response headers & compression
Request Accept-Encoding: gzip, br. The response will include Content-Encoding accordingly. For long batches this matters — vectors are large.
For x402 auth, X-Balance-Remaining reports your remaining USDC credits.
Using the OpenAI SDK
import OpenAI from 'openai'
const client = new OpenAI({
apiKey: process.env.VENICE_API_KEY,
baseURL: 'https://api.venice.ai/api/v1',
})
const res = await client.embeddings.create({
model: 'text-embedding-bge-m3',
input: ['first doc', 'second doc'],
})
const vec0 = res.data[0].embeddingBatch-embedding pattern
async function embedBatch(texts: string[], batchSize = 64) {
const out: number[][] = []
for (let i = 0; i < texts.length; i += batchSize) {
const slice = texts.slice(i, i + batchSize)
const res = await client.embeddings.create({
model: 'text-embedding-bge-m3',
input: slice,
encoding_format: 'float',
})
for (const row of res.data) out[i + row.index] = row.embedding
}
return out
}- Keep batches ≤ model context limit total tokens.
- On
429, back off exponentially and halve the batch — seevenice-errors.
Choosing a model
Query GET /models?type=embedding for the current catalog. Each entry exposes:
model_spec.embeddingDimensions— native output dimension (e.g. 1024 for BGE-M3).model_spec.maxInputTokens— max tokens per input string.model_spec.supportsCustomDimensions— whetherdimensionscan truncate the output.model_spec.pricing.input.usd/.diem— cost per million input tokens.
Built-in options include text-embedding-bge-m3, text-embedding-bge-en-icl, text-embedding-qwen3-8b, text-embedding-qwen3-0-6b, text-embedding-multilingual-e5-large-instruct, text-embedding-3-small, text-embedding-3-large, gemini-embedding-2-preview, text-embedding-nemotron-embed-vl-1b-v2.
Always pin the model ID — cosine distances are not comparable across different embedding models.
Error handling
| Code | Meaning |
400 | Validation error. Check details in the response for the exact field. |
401 | Auth / Pro-only model. |
402 | Insufficient balance. Bearer → INSUFFICIENT_BALANCE. x402 → structured PAYMENT_REQUIRED. |
415 | Wrong Content-Type — must be application/json. |
429 | Rate limited. |
500 | Inference failed; retry with jitter. |
503 | Model at capacity; retry later. |
Gotchas
dimensionsis only meaningful whenmodel_spec.supportsCustomDimensions === true. Behavior on other models is model-dependent — test with a small request before relying on it.inputmust not be empty; Venice rejects empty strings with400.- Whether the returned vectors are L2-normalized depends on the model — verify with
Math.hypot(...v) ≈ 1before assuming. - For RAG, store
modelalongside the vector so you can re-embed on upgrade.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

