/api/v1/embeddings
Create embeddings for the supplied input. input must be a string or an array of strings. Token arrays (integer IDs) are rejected with HTTP 400. LangChain OpenAIEmbeddings sends token arrays unless check_embedding_ctx_length is False. Wrappers that construct OpenAIEmbeddings without that flag, including gpt-researcher's openai provider, still send token arrays.
Authentication: This endpoint accepts either a Bearer API key or a SIGN-IN-WITH-X header for x402 wallet-based authentication. The legacy X-Sign-In-With-X header is also accepted during migration. When using x402, a 402 Payment Required response indicates insufficient balance and includes top-up instructions.
Request
- Base URL: https://api.venice.ai
- URL: https://api.venice.ai/api/v1/embeddings
- Auth: one of:
- HTTP bearer
- API key in header SIGN-IN-WITH-X
Headers
Supported compression encodings (gzip, br)
Request body
Example request
{
"encoding_format": "float",
"input": "The quick brown fox jumped over the lazy dog",
"model": "text-embedding-bge-m3"
}Response
OK
Example response
{
"data": [
{
"embedding": [
0.0023064255,
-0.009327292,
0.015797377
],
"index": 0,
"object": "embedding"
}
],
"model": "text-embedding-bge-m3",
"object": "list",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}Changes
No recorded changes to this operation across all 1 revision of this API.