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.
POST
/
embeddings
/api/v1/embeddings
curl --request POST \
--url https://api.venice.ai/api/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"encoding_format": "float",
"input": "The quick brown fox jumped over the lazy dog",
"model": "text-embedding-bge-m3"
}
'
import requests
url = "https://api.venice.ai/api/v1/embeddings"
payload = {
"encoding_format": "float",
"input": "The quick brown fox jumped over the lazy dog",
"model": "text-embedding-bge-m3"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
encoding_format: 'float',
input: 'The quick brown fox jumped over the lazy dog',
model: 'text-embedding-bge-m3'
})
};
fetch('https://api.venice.ai/api/v1/embeddings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
"error": "This API key is restricted to configured IP addresses, and this request's source IP is not allowed"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
يجب أن يكون input سلسلة نصية أو مصفوفة من السلاسل النصية. تُرفض مصفوفات معرّفات الـ tokens بـ HTTP 400. يجب على OpenAIEmbeddings في LangChain ضبط check_embedding_ctx_length=False.
Input text to embed, encoded as a string or array of strings. To embed multiple inputs in a single request, pass an array of strings. The input must not exceed the max input tokens for the model (8192 tokens), cannot be an empty string, and any array must contain 2048 items or less. Token arrays are not supported and return HTTP 400. LangChain OpenAIEmbeddings sends token arrays unless you set check_embedding_ctx_length=False.
{
"error": "This API key is restricted to configured IP addresses, and this request's source IP is not allowed"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Venice API Docs","colors":{"primary":"#125DA3","light":"#125DA3","dark":"#125DA3"},"logo":{"light":"https://mintcdn.com/veniceai/gFXvp87w4B810n0Y/logo/light.svg?fit=max\u0026auto=format\u0026n=gFXvp87w4B810n0Y\u0026q=85\u0026s=121558c3bff1e4e012fcd34bdc50555c","dark":"https://mintcdn.com/veniceai/0vNwudF9KfvWPUSs/logo/dark.svg?fit=max\u0026auto=format\u0026n=0vNwudF9KfvWPUSs\u0026q=85\u0026s=79383337fb486ba06afb95cb7d0b4bf7","href":"https://venice.ai/?utm_source=venice-api-documentation"},"favicon":"https://mintcdn.com/veniceai/wJjdz14nrhedln0s/favicon.png?fit=max\u0026auto=format\u0026n=wJjdz14nrhedln0s\u0026q=85\u0026s=171a8dd0d43182f3b386c25e13152d92","api":{"openapi":"swagger.yaml","playground":{"proxy":false},"mdx":{"auth":{"method":"bearer"},"server":"https://api.venice.ai/api/v1"}},"navbar":{"links":[],"primary":{"type":"button","label":"Try Venice","href":"https://venice.ai/chat?utm_source=venice-api-documentation"}},"footer":{"socials":{"x":"https://x.com/AskVenice","discord":"https://discord.gg/askvenice","github":"https://github.com/veniceai","linkedin":"https://www.linkedin.com/company/venice-ai"}},"seo":{"metatags":{"og:site_name":"Venice API Docs","og:locale":"en_US","og:logo":"/logo/light.svg","article:publisher":"Venice AI","twitter:site":"@AskVenice"},"indexing":"navigable"},"icons":{"library":"tabler"},"styling":{"codeblocks":"system","latex":true},"integrations":{"gtm":{"tagId":"GTM-KFP6HX49"},"plausible":{"domain":"docs.venice.ai"}},"navigation":{"languages":[{"language":"en","default":true,"href":"overview/about-venice"},{"language":"pt-BR","href":"pt-BR/overview/about-venice"},{"language":"ar","href":"ar/overview/about-venice"},{"language":"it","href":"it/overview/about-venice"},{"language":"de","href":"de/overview/about-venice"},{"language":"es","href":"es/overview/about-venice"},{"language":"fr","href":"fr/overview/about-venice"},{"language":"zh","href":"zh/overview/about-venice"},{"language":"ko","href":"ko/overview/about-venice"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"veniceai","hasAudioNarration":false,"actualSubdomain":"veniceai","customDomains":["docs.venice.ai"],"gitSource":{"type":"github","owner":"veniceai","repo":"api-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeba83883de95559c37383e","collectionId":"ba70b5b5-5a7f-43a9-aa61-8b1e89b3fc36","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeba83883de95559c37383e"},"feedback":{"edits":true,"issues":true,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeba83883de95559c37383e","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"en","tag":"Docs","count":80},{"language":"ar","tag":"التوثيق","count":80},{"language":"de","tag":"Dokumentation","count":80},{"language":"es","tag":"Documentación","count":80},{"language":"fr","tag":"Documentation","count":80},{"language":"it","tag":"Documentazione","count":80},{"language":"ko","tag":"문서","count":80},{"language":"pt-BR","tag":"Documentação","count":80},{"language":"zh","tag":"文档","count":80},{"language":"en","tag":"API Reference","count":58},{"language":"en","tag":"Venice APIs","count":58},{"language":"ar","tag":"مرجع الـ API","count":58},{"language":"ar","tag":"Venice APIs","count":58},{"language":"de","tag":"API-Referenz","count":58},{"language":"de","tag":"Venice APIs","count":58},{"language":"es","tag":"Referencia de la API","count":58},{"language":"es","tag":"Venice APIs","count":58},{"language":"fr","tag":"Référence de l'API","count":58},{"language":"fr","tag":"Venice APIs","count":58},{"language":"it","tag":"Riferimento API","count":58},{"language":"it","tag":"Venice APIs","count":58},{"language":"ko","tag":"API 레퍼런스","count":58},{"language":"ko","tag":"Venice APIs","count":58},{"language":"pt-BR","tag":"Referência da API","count":58},{"language":"pt-BR","tag":"Venice APIs","count":58},{"language":"zh","tag":"API 参考","count":58},{"language":"zh","tag":"Venice APIs","count":58},{"language":"en","tag":"Audio","count":18},{"language":"en","tag":"Learn","count":18},{"language":"ar","tag":"الصوت","count":18},{"language":"ar","tag":"تعلّم","count":18},{"language":"de","tag":"Audio","count":18},{"language":"de","tag":"Lernen","count":18},{"language":"es","tag":"Audio","count":18},{"language":"es","tag":"Aprender","count":18},{"language":"fr","tag":"Audio","count":18},{"language":"fr","tag":"Apprendre","count":18},{"language":"it","tag":"Audio","count":18},{"language":"it","tag":"Impara","count":18},{"language":"ko","tag":"오디오","count":18},{"language":"ko","tag":"학습","count":18},{"language":"pt-BR","tag":"Áudio","count":18},{"language":"pt-BR","tag":"Aprender","count":18},{"language":"zh","tag":"音频","count":18},{"language":"zh","tag":"学习","count":18},{"language":"it","tag":"Immagini","count":12},{"language":"ko","tag":"이미지","count":12},{"language":"zh","tag":"图像","count":12},{"language":"en","tag":"Models","count":11},{"language":"en","tag":"Text \u0026 Chat","count":11},{"language":"ar","tag":"النماذج","count":11},{"language":"ar","tag":"النص والدردشة","count":11},{"language":"de","tag":"Modelle","count":11},{"language":"de","tag":"Text \u0026 Chat","count":11},{"language":"es","tag":"Modelos","count":11},{"language":"es","tag":"Texto y chat","count":11},{"language":"fr","tag":"Modèles","count":11},{"language":"fr","tag":"Texte et chat","count":11},{"language":"it","tag":"Modelli","count":11},{"language":"it","tag":"Testo e chat","count":11},{"language":"ko","tag":"모델","count":11},{"language":"ko","tag":"텍스트 및 채팅","count":11},{"language":"pt-BR","tag":"Modelos","count":11},{"language":"pt-BR","tag":"Texto e chat","count":11},{"language":"zh","tag":"模型","count":11},{"language":"zh","tag":"文本与聊天","count":11},{"language":"en","tag":"Agents \u0026 Integrations","count":10},{"language":"ar","tag":"الوكلاء والتكاملات","count":10},{"language":"de","tag":"Agenten \u0026 Integrationen","count":10},{"language":"es","tag":"Agentes e integraciones","count":10},{"language":"fr","tag":"Agents et intégrations","count":10},{"language":"it","tag":"Agenti e integrazioni","count":10},{"language":"ko","tag":"에이전트 및 통합","count":10},{"language":"pt-BR","tag":"Agentes e integrações","count":10},{"language":"zh","tag":"智能体与集成","count":10},{"language":"en","tag":"Video","count":9},{"language":"ar","tag":"الفيديو","count":9},{"language":"de","tag":"Video","count":9},{"language":"es","tag":"Vídeo","count":9},{"language":"fr","tag":"Vidéo","count":9},{"language":"it","tag":"Video","count":9},{"language":"ko","tag":"비디오","count":9},{"language":"pt-BR","tag":"Vídeo","count":9},{"language":"zh","tag":"视频","count":9},{"language":"en","tag":"Coding Tools","count":8},{"language":"ar","tag":"أدوات البرمجة","count":8},{"language":"de","tag":"Coding-Tools","count":8},{"language":"es","tag":"Herramientas de código","count":8},{"language":"fr","tag":"Outils de code","count":8},{"language":"pt-BR","tag":"Ferramentas de código","count":8}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","href":"/_mintlify/custom/veniceai/38e9692f6f9630fd/style.css"}],"page":{"pagePath":"ar/api-reference/endpoint/embeddings/generate","slug":"/ar/api-reference/endpoint/embeddings/generate","pageMetadata":{"title":"إنشاء Embeddings","openapi":"POST /embeddings","og:title":"Embeddings | Venice API Docs","og:description":"توثيق يغطي واجهة embeddings API من Venice.","description":"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.\n\n**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.","href":"/ar/api-reference/endpoint/embeddings/generate"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Create embeddings for the supplied input. \", _jsx(_components.code, {\n children: \"input\"\n }), \" must be a string or an array of strings. Token arrays (integer IDs) are rejected with HTTP 400. LangChain \", _jsx(_components.code, {\n children: \"OpenAIEmbeddings\"\n }), \" sends token arrays unless \", _jsx(_components.code, {\n children: \"check_embedding_ctx_length\"\n }), \" is \", _jsx(_components.code, {\n children: \"False\"\n }), \". Wrappers that construct \", _jsx(_components.code, {\n children: \"OpenAIEmbeddings\"\n }), \" without that flag, including gpt-researcher’s \", _jsx(_components.code, {\n children: \"openai\"\n }), \" provider, still send token arrays.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Authentication:\"\n }), \" This endpoint accepts either a Bearer API key or a \", _jsx(_components.code, {\n children: \"SIGN-IN-WITH-X\"\n }), \" header for x402 wallet-based authentication. The legacy \", _jsx(_components.code, {\n children: \"X-Sign-In-With-X\"\n }), \" header is also accepted during migration. When using x402, a \", _jsx(_components.code, {\n children: \"402 Payment Required\"\n }), \" response indicates insufficient balance and includes top-up instructions.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,..._provideComponents(),...props.components},{Warning}=_components;if(!Warning)_missingMdxReference(`Warning`,true);return _jsx(Warning,{children:_jsxs(_components.p,{children:[`يجب أن يكون `,_jsx(_components.code,{children:`input`}),` سلسلة نصية أو مصفوفة من السلاسل النصية. تُرفض مصفوفات معرّفات الـ tokens بـ HTTP 400. يجب على `,_jsx(_components.code,{children:`OpenAIEmbeddings`}),` في LangChain ضبط `,_jsx(_components.code,{children:`check_embedding_ctx_length=False`}),`.`]})})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"إنشاء Embeddings","openapi":"POST /embeddings","og:title":"Embeddings | Venice API Docs","og:description":"توثيق يغطي واجهة embeddings API من Venice.","description":"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.\n\n**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.","href":"/ar/api-reference/endpoint/embeddings/generate"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/veniceai/e2ef95b7f404dd19/model-search.js"],"openApiReferenceData":{"operation":{"description":"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.\n\n**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.","operationId":"createEmbedding","parameters":["ba89901d-3fc7-4d6d-81df-675824e11b0f"],"security":["afff3cf6-a72f-4534-825c-849ed0feaa30","bb60e445-0aae-4400-a935-7fbbb27ee0f3"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.001","max":"10.00"},"protocols":[{"x402":{}}]},"summary":"/api/v1/embeddings","tags":["Embeddings"],"requestBody":"aaf66cef-1fc6-4176-bf26-43e78fdef941","responses":{"200":"7e916ac9-28a3-4a5b-8680-5ded444367b0","400":"3a860355-17cc-4c47-9aaf-eb037ed7058b","401":"63366bbc-8734-4d7d-86b9-0831bfa13d87","402":"9c6c1307-733e-4196-9958-5c09024846fc","403":"50ac70fb-78fb-41c0-9be4-8e867cb4fde7","415":"5db601f4-6b7f-436e-8b04-888904987d38","429":"9797dab8-4b33-4137-8e21-c8b3e2305154","500":"68d96240-db6e-4964-9ee3-83cdf05ef183","503":"14c55484-85c8-4892-b867-66e201b3b639"},"method":"post","type":"path","servers":["96b8ffc4-1f58-4ed1-b77c-eaed66e7de5d"],"path":"/embeddings","baseUrlOptions":["https://api.venice.ai/api/v1"],"title":"/api/v1/embeddings","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","disableProxy":true},"dependencies":{"parameters":{"ba89901d-3fc7-4d6d-81df-675824e11b0f":{"description":"Supported compression encodings (gzip, br)","in":"header","name":"Accept-Encoding","required":false,"schema":{"example":"gzip, br","type":"string","isRequired":false,"description":"Supported compression encodings (gzip, br)","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"oneOf":[{"type":"string","title":"string","description":"Input text to embed, encoded as a string or array of strings. To embed multiple inputs in a single request, pass an array of strings. The input must not exceed the max input tokens for the model (8192 tokens), cannot be an empty string, and any array must contain 2048 items or less. Token arrays are not supported and return HTTP 400. LangChain OpenAIEmbeddings sends token arrays unless you set check_embedding_ctx_length=False.","minLength":1,"example":"The quick brown fox jumped over the lazy dog","isRequired":true,"uniqueKey":"input.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"input.oneOf.1.items.[INDEX]","typeLabel":"string"},"title":"array","description":"Input text to embed, encoded as a string or array of strings. To embed multiple inputs in a single request, pass an array of strings. The input must not exceed the max input tokens for the model (8192 tokens), cannot be an empty string, and any array must contain 2048 items or less. Token arrays are not supported and return HTTP 400. LangChain OpenAIEmbeddings sends token arrays unless you set check_embedding_ctx_length=False.","maxItems":2048,"minItems":1,"example":"The quick brown fox jumped over the lazy dog","isRequired":true,"uniqueKey":"input.oneOf.1","typeLabel":"string[]"}],"isRequired":true,"uniqueKey":"input","typeLabel":"string | string[]"},"model":{"oneOf":[{"type":"string","description":"ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.","example":"text-embedding-bge-m3","isRequired":true,"uniqueKey":"model.oneOf.0","typeLabel":"string"},{"type":"string","description":"ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.","enum":["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"],"example":"text-embedding-bge-m3","isRequired":true,"uniqueKey":"model.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"model","typeLabel":"string | enum\u003cstring>"},"dimensions":{"type":"integer","minimum":1,"description":"The number of dimensions the resulting output embeddings should have.","uniqueKey":"dimensions","typeLabel":"integer"},"encoding_format":{"type":"string","enum":["float","base64"],"default":"float","description":"The format to return the embeddings in. Can be either `float` or `base64`.","example":"float","uniqueKey":"encoding_format","typeLabel":"enum\u003cstring>"},"user":{"type":"string","description":"This is an unused parameter and is discarded by Venice. It is supported solely for API compatibility with OpenAI.","uniqueKey":"user","typeLabel":"string"}},"required":["input","model"],"additionalProperties":false,"description":"Create embeddings for the supplied input.","example":{"encoding_format":"float","input":"The quick brown fox jumped over the lazy dog","model":"text-embedding-bge-m3"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"encoding_format":"float","input":"The quick brown fox jumped over the lazy dog","model":"text-embedding-bge-m3"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"7e916ac9-28a3-4a5b-8680-5ded444367b0":{"description":"OK","headers":{"X-Balance-Remaining":{"description":"Remaining x402 credit balance in USD after this request (only present for x402 auth).","required":false,"schema":{"type":"string","example":"4.230000"}},"Content-Encoding":{"description":"The encoding used to compress the response","schema":{"enum":["gzip","br"],"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"embedding":{"type":"array","items":{"type":"number","uniqueKey":"data.items.[INDEX].embedding.items.[INDEX]","typeLabel":"number"},"description":"The embedding vector","isRequired":true,"uniqueKey":"data.items.[INDEX].embedding","typeLabel":"number[]"},"index":{"type":"integer","description":"The index of this embedding in the list","isRequired":true,"uniqueKey":"data.items.[INDEX].index","typeLabel":"integer"},"object":{"type":"string","enum":["embedding"],"description":"The object type, which is always \"embedding\"","isRequired":true,"uniqueKey":"data.items.[INDEX].object","typeLabel":"enum\u003cstring>"}},"required":["embedding","index","object"],"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"description":"The list of embeddings generated by the model.","isRequired":true,"uniqueKey":"data","typeLabel":"object[]"},"model":{"type":"string","description":"The name of the model used to generate the embedding.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"object":{"type":"string","enum":["list"],"description":"The object type, which is always \"list\"","isRequired":true,"uniqueKey":"object","typeLabel":"enum\u003cstring>"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"The number of tokens used by the prompt.","isRequired":true,"uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"The total number of tokens used by the request.","isRequired":true,"uniqueKey":"usage.total_tokens","typeLabel":"integer"}},"required":["prompt_tokens","total_tokens"],"description":"The usage information for the request.","isRequired":true,"uniqueKey":"usage","typeLabel":"object"}},"required":["data","model","object","usage"],"example":{"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}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"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}}}},"exampleType":"generated"}},"exampleType":"generated"},"3a860355-17cc-4c47-9aaf-eb037ed7058b":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"A description of the error","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{},"description":"Details about the incorrect input","example":{"_errors":[],"field":{"_errors":["Field is required"]}},"uniqueKey":"details","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","details":{"_errors":[],"field":{"_errors":["Field is required"]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"63366bbc-8734-4d7d-86b9-0831bfa13d87":{"description":"- Authentication failed\n- This model is only available to Pro users","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"A description of the error","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"9c6c1307-733e-4196-9958-5c09024846fc":{"description":"Payment or balance required. Response varies by authentication state:\n\n**API Key users:** Standard error response with `INSUFFICIENT_BALANCE` code. Top up your Venice balance at venice.ai.\n\n**Unauthenticated x402 discovery:** Structured x402 response with `x402Version`, `resource`, `accepts`, and `extensions[\"sign-in-with-x\"]`. The `accepts` array advertises Base and Solana payment requirements.\n\n**Authenticated x402 wallet users with insufficient credit:** Structured response with `PAYMENT_REQUIRED` code containing:\n- `topUpInstructions`: Step-by-step guide to top up via x402 protocol\n- `supportedTokens` / `supportedChains`: Accepted payment methods\n- `siwxChallenge`: Fresh Sign-In-With-X challenge metadata\n\nThe `PAYMENT-REQUIRED` header also contains a base64-encoded x402 protocol object with the payment requirements for programmatic discovery.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded JSON with x402 payment requirements. Present on x402 middleware 402 responses. Decode to choose and sign one accepted payment requirement programmatically.","required":false,"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"A description of the error","isRequired":true,"uniqueKey":"oneOf.0.error","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"Returned when an inference request has no API key or wallet authentication. The JSON body includes x402 discovery requirements and authentication options.","required":["x402Version","resource","accepts","authOptions"],"properties":{"x402Version":{"type":"number","description":"x402 protocol version.","example":2,"isRequired":true,"uniqueKey":"oneOf.1.x402Version","typeLabel":"number"},"resource":{"type":"object","properties":{"url":{"type":"string","description":"Protected resource URL.","example":"https://api.venice.ai/api/v1/chat/completions","isRequired":true,"uniqueKey":"oneOf.1.resource.url","typeLabel":"string"},"description":{"type":"string","description":"Human-readable resource description.","example":"Venice API","isRequired":true,"uniqueKey":"oneOf.1.resource.description","typeLabel":"string"},"mimeType":{"type":"string","description":"Resource MIME type.","example":"application/json","isRequired":true,"uniqueKey":"oneOf.1.resource.mimeType","typeLabel":"string"}},"required":["url","description","mimeType"],"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.resource","typeLabel":"object"},"accepts":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","enum":["exact"],"description":"x402 payment scheme.","example":"exact","isRequired":true,"uniqueKey":"oneOf.1.accepts.items.[INDEX].scheme","typeLabel":"enum\u003cstring>"},"network":{"type":"string","description":"Payment network for this requirement.","example":"solana","isRequired":true,"uniqueKey":"oneOf.1.accepts.items.[INDEX].network","typeLabel":"string"},"asset":{"type":"string","description":"USDC token address or mint for the selected network.","example":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","isRequired":true,"uniqueKey":"oneOf.1.accepts.items.[INDEX].asset","typeLabel":"string"},"amount":{"type":"string","description":"Required payment amount in base units (USDC has 6 decimals).","example":"10000000","isRequired":true,"uniqueKey":"oneOf.1.accepts.items.[INDEX].amount","typeLabel":"string"},"payTo":{"type":"string","description":"Receiver wallet address for the selected network.","example":"8qUL23aSj7mDWdoLMXGHFvnVCT9wd7jXcysiekroADEL","isRequired":true,"uniqueKey":"oneOf.1.accepts.items.[INDEX].payTo","typeLabel":"string"},"maxTimeoutSeconds":{"type":"number","description":"Maximum time allowed for payment settlement.","example":300,"isRequired":true,"uniqueKey":"oneOf.1.accepts.items.[INDEX].maxTimeoutSeconds","typeLabel":"number"},"extra":{"type":"object","properties":{},"description":"Network-specific x402 metadata. Solana requirements include a feePayer.","example":{"name":"USD Coin","version":"2","feePayer":"BFK9TLC3edb13K6v4YyH3DwPb5DSUpkWvb7XnqCL9b4F"},"isRequired":true,"uniqueKey":"oneOf.1.accepts.items.[INDEX].extra","typeLabel":"object"}},"required":["scheme","network","asset","amount","payTo","maxTimeoutSeconds","extra"],"additionalProperties":false,"uniqueKey":"oneOf.1.accepts.items.[INDEX]","typeLabel":"object"},"description":"Protocol payment requirements. Clients should choose one entry, such as Base or Solana, and sign exactly that requirement.","isRequired":true,"uniqueKey":"oneOf.1.accepts","typeLabel":"object[]"},"authOptions":{"type":"object","properties":{"apiKey":{"type":"object","properties":{"header":{"type":"string","description":"API key authentication header format.","example":"Authorization: Bearer YOUR_API_KEY","isRequired":true,"uniqueKey":"oneOf.1.authOptions.apiKey.header","typeLabel":"string"},"getKey":{"type":"string","description":"Where to create or manage API keys.","example":"https://venice.ai/settings/api","isRequired":true,"uniqueKey":"oneOf.1.authOptions.apiKey.getKey","typeLabel":"string"},"docs":{"type":"string","description":"API key documentation URL.","example":"https://docs.venice.ai/api-reference","isRequired":true,"uniqueKey":"oneOf.1.authOptions.apiKey.docs","typeLabel":"string"}},"required":["header","getKey","docs"],"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.authOptions.apiKey","typeLabel":"object"},"x402Wallet":{"type":"object","properties":{"header":{"type":"string","description":"Header used for Sign-In-With-X wallet authentication.","example":"SIGN-IN-WITH-X","isRequired":true,"uniqueKey":"oneOf.1.authOptions.x402Wallet.header","typeLabel":"string"},"legacyHeader":{"type":"string","description":"Legacy Sign-In-With-X header accepted during migration.","example":"X-Sign-In-With-X","isRequired":true,"uniqueKey":"oneOf.1.authOptions.x402Wallet.legacyHeader","typeLabel":"string"},"topUp":{"type":"string","description":"Endpoint used to discover and submit x402 top-up payments.","example":"POST /api/v1/x402/top-up","isRequired":true,"uniqueKey":"oneOf.1.authOptions.x402Wallet.topUp","typeLabel":"string"},"docs":{"type":"string","description":"x402 top-up API documentation URL.","example":"https://docs.venice.ai/api-reference/endpoint/x402/top-up","isRequired":true,"uniqueKey":"oneOf.1.authOptions.x402Wallet.docs","typeLabel":"string"}},"required":["header","legacyHeader","topUp","docs"],"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.authOptions.x402Wallet","typeLabel":"object"}},"required":["apiKey","x402Wallet"],"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.authOptions","typeLabel":"object"},"error":{"type":"string","description":"Human-readable payment requirement message.","example":"Payment required","uniqueKey":"oneOf.1.error","typeLabel":"string"},"extensions":{"type":"object","properties":{},"description":"Protocol extensions. Inference 402 responses include `sign-in-with-x` with a SIWX challenge for wallet-credit authentication.","uniqueKey":"oneOf.1.extensions","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"oneOf.1","typeLabel":"object"},{"type":"object","required":["error","code","reason","suggestedTopUpUsd","minimumTopUpUsd","supportedTokens","supportedChains","topUpInstructions","siwxChallenge"],"properties":{"error":{"type":"string","enum":["Payment required"],"description":"Error message indicating payment is required.","isRequired":true,"uniqueKey":"oneOf.2.error","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["PAYMENT_REQUIRED"],"description":"Machine-readable error code.","isRequired":true,"uniqueKey":"oneOf.2.code","typeLabel":"enum\u003cstring>"},"reason":{"type":"string","enum":["insufficient_balance"],"description":"Reason the x402-authenticated request could not proceed.","isRequired":true,"uniqueKey":"oneOf.2.reason","typeLabel":"enum\u003cstring>"},"suggestedTopUpUsd":{"type":"number","description":"Suggested amount to top up in USD.","example":10,"isRequired":true,"uniqueKey":"oneOf.2.suggestedTopUpUsd","typeLabel":"number"},"minimumTopUpUsd":{"type":"number","description":"Minimum allowed top-up amount in USD.","example":5,"isRequired":true,"uniqueKey":"oneOf.2.minimumTopUpUsd","typeLabel":"number"},"supportedTokens":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.2.supportedTokens.items.[INDEX]","typeLabel":"string"},"description":"List of supported token symbols for payment.","example":["USDC"],"isRequired":true,"uniqueKey":"oneOf.2.supportedTokens","typeLabel":"string[]"},"supportedChains":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.2.supportedChains.items.[INDEX]","typeLabel":"string"},"description":"List of supported top-up rails.","example":["base","solana"],"isRequired":true,"uniqueKey":"oneOf.2.supportedChains","typeLabel":"string[]"},"topUpInstructions":{"type":"object","properties":{"step1":{"type":"string","description":"First step: get payment requirements.","example":"POST /api/v1/x402/top-up with no payment header to get payment requirements","isRequired":true,"uniqueKey":"oneOf.2.topUpInstructions.step1","typeLabel":"string"},"step2":{"type":"string","description":"Second step: sign the payment.","example":"Choose a payment option from accepts and sign a USDC transfer authorization using the x402 SDK (createPaymentHeader)","isRequired":true,"uniqueKey":"oneOf.2.topUpInstructions.step2","typeLabel":"string"},"step3":{"type":"string","description":"Third step: submit the payment.","example":"POST /api/v1/x402/top-up with the signed PAYMENT-SIGNATURE header","isRequired":true,"uniqueKey":"oneOf.2.topUpInstructions.step3","typeLabel":"string"},"receiverWallet":{"type":"string","description":"Legacy Base receiver wallet address. Prefer the selected accepts entry from /x402/top-up for network-specific payTo values.","example":"\u003cRECEIVER_WALLET_ADDRESS>","isRequired":true,"uniqueKey":"oneOf.2.topUpInstructions.receiverWallet","typeLabel":"string"},"tokenAddress":{"type":"string","description":"Legacy Base USDC token address. Prefer the selected accepts entry from /x402/top-up for network-specific assets.","example":"\u003cUSDC_TOKEN_ADDRESS>","isRequired":true,"uniqueKey":"oneOf.2.topUpInstructions.tokenAddress","typeLabel":"string"},"tokenDecimals":{"type":"number","description":"Token decimal places.","example":6,"isRequired":true,"uniqueKey":"oneOf.2.topUpInstructions.tokenDecimals","typeLabel":"number"},"network":{"type":"string","description":"Legacy Base target network. Prefer the selected accepts entry from /x402/top-up for network-specific values.","example":"eip155:8453","isRequired":true,"uniqueKey":"oneOf.2.topUpInstructions.network","typeLabel":"string"},"minimumAmountUsd":{"type":"number","description":"Minimum top-up amount in USD.","example":5,"isRequired":true,"uniqueKey":"oneOf.2.topUpInstructions.minimumAmountUsd","typeLabel":"number"}},"required":["step1","step2","step3","receiverWallet","tokenAddress","tokenDecimals","network","minimumAmountUsd"],"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.2.topUpInstructions","typeLabel":"object"},"siwxChallenge":{"type":"object","properties":{"info":{"type":"object","properties":{"domain":{"type":"string","description":"Domain for the SIWX challenge.","example":"api.venice.ai","isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge.info.domain","typeLabel":"string"},"uri":{"type":"string","description":"Resource URI for the challenge.","example":"https://api.venice.ai/api/v1/chat/completions","isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge.info.uri","typeLabel":"string"},"version":{"type":"string","description":"SIWX version.","example":"1","isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge.info.version","typeLabel":"string"},"nonce":{"type":"string","description":"Unique nonce for replay protection.","example":"{{nonce}}","isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge.info.nonce","typeLabel":"string"},"issuedAt":{"type":"string","description":"ISO timestamp when the challenge was issued.","example":"2026-04-09T12:00:00.000Z","isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge.info.issuedAt","typeLabel":"string"},"expirationTime":{"type":"string","description":"ISO timestamp when the challenge expires.","example":"2026-04-09T12:05:00.000Z","isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge.info.expirationTime","typeLabel":"string"},"statement":{"type":"string","description":"Human-readable statement for the signature.","example":"Sign in to Venice AI","isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge.info.statement","typeLabel":"string"}},"required":["domain","uri","version","nonce","issuedAt","expirationTime","statement"],"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge.info","typeLabel":"object"},"supportedChains":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","description":"Supported chain identity.","example":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge.supportedChains.items.[INDEX].chainId","typeLabel":"string"},"type":{"type":"string","enum":["eip191","eip1271","ed25519"],"description":"Signature type accepted for this chain.","example":"ed25519","isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge.supportedChains.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"required":["chainId","type"],"additionalProperties":false,"uniqueKey":"oneOf.2.siwxChallenge.supportedChains.items.[INDEX]","typeLabel":"object"},"description":"Supported SIWX chains and signature types.","isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge.supportedChains","typeLabel":"object[]"}},"required":["info","supportedChains"],"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.2.siwxChallenge","typeLabel":"object"},"message":{"type":"string","description":"Human-readable context about the payment requirement.","example":"Insufficient x402 balance","uniqueKey":"oneOf.2.message","typeLabel":"string"},"currentBalanceUsd":{"type":"number","description":"Current x402 credit balance for the wallet.","example":0.01,"uniqueKey":"oneOf.2.currentBalanceUsd","typeLabel":"number"},"minimumBalanceUsd":{"type":"number","description":"Minimum x402 credit balance required before the request can run.","example":0.1,"uniqueKey":"oneOf.2.minimumBalanceUsd","typeLabel":"number"},"description":{"type":"string","description":"Protected resource description.","example":"Venice API","uniqueKey":"oneOf.2.description","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"oneOf.2","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"50ac70fb-78fb-41c0-9be4-8e867cb4fde7":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["This API key is restricted to configured IP addresses, and this request's source IP is not allowed"],"description":"A description of the error","example":"This API key is restricted to configured IP addresses, and this request's source IP is not allowed","isRequired":true,"uniqueKey":"error","typeLabel":"enum\u003cstring>"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"This API key is restricted to configured IP addresses, and this request's source IP is not allowed"}}},"exampleType":"generated"}},"description":"This API key is restricted to configured IP addresses, and this request's source IP is not allowed","exampleType":"generated"},"5db601f4-6b7f-436e-8b04-888904987d38":{"description":"Invalid request content-type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"A description of the error","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"9797dab8-4b33-4137-8e21-c8b3e2305154":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"A description of the error","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"68d96240-db6e-4964-9ee3-83cdf05ef183":{"description":"Inference processing failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"A description of the error","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"14c55484-85c8-4892-b867-66e201b3b639":{"description":"The model is at capacity. Please try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"A description of the error","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"afff3cf6-a72f-4534-825c-849ed0feaa30":{"BearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http","scopes":[],"schemeName":"BearerAuth"}},"bb60e445-0aae-4400-a935-7fbbb27ee0f3":{"siwx":{"description":"Wallet-based authentication using the x402 protocol (Sign-In-With-X). Supports EVM SIWE signatures on Base and Ed25519 signatures on Solana mainnet.\n\n**Header format:** Base64-encoded JSON object with the following fields:\n- `address` — EVM or Solana wallet address\n- `message` — Signed SIWX message. EVM wallets use EIP-4361 SIWE; Solana wallets use the Solana SIWX message format.\n- `signature` — Signature of the message, signed by the wallet's private key. EVM signatures are hex; Solana signatures may be base58 or base64.\n- `timestamp` — Unix timestamp in milliseconds\n- `chainId` — Chain identity. Use `8453`, `\"8453\"`, or `\"eip155:8453\"` for Base; use `\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\"` for Solana.\n- `type` — Optional signature type. Use `\"ed25519\"` for Solana. Omitted means EVM/EIP-191 for backward compatibility.\n\n**EVM SIWE message fields:**\n- `domain`: `api.venice.ai`\n- `uri`: `https://api.venice.ai`\n- `version`: `\"1\"`\n- `chainId`: `8453`\n- `nonce`: Random 16-character hex string\n- `issuedAt` / `expirationTime`: ISO timestamps (recommended TTL: 10 minutes)\n- `statement`: `\"Sign in to Venice API\"`\n\n**Example (TypeScript):**\n```\nimport { Wallet } from 'ethers'\nimport { SiweMessage } from 'siwe'\n\nconst wallet = new Wallet(PRIVATE_KEY)\nconst msg = new SiweMessage({ domain: 'api.venice.ai', address: wallet.address, statement: 'Sign in to Venice API', uri: 'https://api.venice.ai', version: '1', chainId: 8453, nonce: crypto.randomUUID().replace(/-/g, '').slice(0, 16), issuedAt: new Date().toISOString(), expirationTime: new Date(Date.now() + 600000).toISOString() })\nconst signature = await wallet.signMessage(msg.prepareMessage())\nconst header = btoa(JSON.stringify({ address: wallet.address, message: msg.prepareMessage(), signature, timestamp: Date.now(), chainId: 8453 }))\n// Set header: SIGN-IN-WITH-X: \u003cheader>\n```\n\n**Solana message fields:** The signed message starts with `\u003cdomain> wants you to sign in with your Solana account:`, followed by the wallet address and the standard `URI`, `Version`, `Chain ID`, `Nonce`, `Issued At`, and optional `Expiration Time` fields. Use `type: \"ed25519\"` and `chainId: \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\"` in the encoded JSON payload.\n\n**SDK:** `npm install venice-x402-client` provides `VeniceClient` and `createAuthFetch` which handle this automatically.\n\n**Billing:** x402 users pay from a prepaid USDC credit balance. Top up via `POST /x402/top-up`. When balance is insufficient, endpoints return `402` with structured top-up instructions.","in":"header","name":"SIGN-IN-WITH-X","type":"apiKey","scopes":[],"schemeName":"siwx"}}},"servers":{"96b8ffc4-1f58-4ed1-b77c-eaed66e7de5d":{"url":"https://api.venice.ai/api/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"bearerFormat":"JWT","scheme":"bearer","type":"http","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"},{"schemes":[{"scheme":{"description":"Wallet-based authentication using the x402 protocol (Sign-In-With-X). Supports EVM SIWE signatures on Base and Ed25519 signatures on Solana mainnet.\n\n**Header format:** Base64-encoded JSON object with the following fields:\n- `address` — EVM or Solana wallet address\n- `message` — Signed SIWX message. EVM wallets use EIP-4361 SIWE; Solana wallets use the Solana SIWX message format.\n- `signature` — Signature of the message, signed by the wallet's private key. EVM signatures are hex; Solana signatures may be base58 or base64.\n- `timestamp` — Unix timestamp in milliseconds\n- `chainId` — Chain identity. Use `8453`, `\"8453\"`, or `\"eip155:8453\"` for Base; use `\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\"` for Solana.\n- `type` — Optional signature type. Use `\"ed25519\"` for Solana. Omitted means EVM/EIP-191 for backward compatibility.\n\n**EVM SIWE message fields:**\n- `domain`: `api.venice.ai`\n- `uri`: `https://api.venice.ai`\n- `version`: `\"1\"`\n- `chainId`: `8453`\n- `nonce`: Random 16-character hex string\n- `issuedAt` / `expirationTime`: ISO timestamps (recommended TTL: 10 minutes)\n- `statement`: `\"Sign in to Venice API\"`\n\n**Example (TypeScript):**\n```\nimport { Wallet } from 'ethers'\nimport { SiweMessage } from 'siwe'\n\nconst wallet = new Wallet(PRIVATE_KEY)\nconst msg = new SiweMessage({ domain: 'api.venice.ai', address: wallet.address, statement: 'Sign in to Venice API', uri: 'https://api.venice.ai', version: '1', chainId: 8453, nonce: crypto.randomUUID().replace(/-/g, '').slice(0, 16), issuedAt: new Date().toISOString(), expirationTime: new Date(Date.now() + 600000).toISOString() })\nconst signature = await wallet.signMessage(msg.prepareMessage())\nconst header = btoa(JSON.stringify({ address: wallet.address, message: msg.prepareMessage(), signature, timestamp: Date.now(), chainId: 8453 }))\n// Set header: SIGN-IN-WITH-X: \u003cheader>\n```\n\n**Solana message fields:** The signed message starts with `\u003cdomain> wants you to sign in with your Solana account:`, followed by the wallet address and the standard `URI`, `Version`, `Chain ID`, `Nonce`, `Issued At`, and optional `Expiration Time` fields. Use `type: \"ed25519\"` and `chainId: \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\"` in the encoded JSON payload.\n\n**SDK:** `npm install venice-x402-client` provides `VeniceClient` and `createAuthFetch` which handle this automatically.\n\n**Billing:** x402 users pay from a prepaid USDC credit balance. Top up via `POST /x402/top-up`. When balance is insufficient, endpoints return `402` with structured top-up instructions.","in":"header","name":"SIGN-IN-WITH-X","type":"apiKey","scopes":[],"schemeName":"siwx"},"schema":{"title":"SIGN-IN-WITH-X","type":"string","description":"Wallet-based authentication using the x402 protocol (Sign-In-With-X). Supports EVM SIWE signatures on Base and Ed25519 signatures on Solana mainnet.\n\n**Header format:** Base64-encoded JSON object with the following fields:\n- `address` — EVM or Solana wallet address\n- `message` — Signed SIWX message. EVM wallets use EIP-4361 SIWE; Solana wallets use the Solana SIWX message format.\n- `signature` — Signature of the message, signed by the wallet's private key. EVM signatures are hex; Solana signatures may be base58 or base64.\n- `timestamp` — Unix timestamp in milliseconds\n- `chainId` — Chain identity. Use `8453`, `\"8453\"`, or `\"eip155:8453\"` for Base; use `\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\"` for Solana.\n- `type` — Optional signature type. Use `\"ed25519\"` for Solana. Omitted means EVM/EIP-191 for backward compatibility.\n\n**EVM SIWE message fields:**\n- `domain`: `api.venice.ai`\n- `uri`: `https://api.venice.ai`\n- `version`: `\"1\"`\n- `chainId`: `8453`\n- `nonce`: Random 16-character hex string\n- `issuedAt` / `expirationTime`: ISO timestamps (recommended TTL: 10 minutes)\n- `statement`: `\"Sign in to Venice API\"`\n\n**Example (TypeScript):**\n```\nimport { Wallet } from 'ethers'\nimport { SiweMessage } from 'siwe'\n\nconst wallet = new Wallet(PRIVATE_KEY)\nconst msg = new SiweMessage({ domain: 'api.venice.ai', address: wallet.address, statement: 'Sign in to Venice API', uri: 'https://api.venice.ai', version: '1', chainId: 8453, nonce: crypto.randomUUID().replace(/-/g, '').slice(0, 16), issuedAt: new Date().toISOString(), expirationTime: new Date(Date.now() + 600000).toISOString() })\nconst signature = await wallet.signMessage(msg.prepareMessage())\nconst header = btoa(JSON.stringify({ address: wallet.address, message: msg.prepareMessage(), signature, timestamp: Date.now(), chainId: 8453 }))\n// Set header: SIGN-IN-WITH-X: \u003cheader>\n```\n\n**Solana message fields:** The signed message starts with `\u003cdomain> wants you to sign in with your Solana account:`, followed by the wallet address and the standard `URI`, `Version`, `Chain ID`, `Nonce`, `Issued At`, and optional `Expiration Time` fields. Use `type: \"ed25519\"` and `chainId: \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\"` in the encoded JSON payload.\n\n**SDK:** `npm install venice-x402-client` provides `VeniceClient` and `createAuthFetch` which handle this automatically.\n\n**Billing:** x402 users pay from a prepaid USDC credit balance. Top up via `POST /x402/top-up`. When balance is insufficient, endpoints return `402` with structured top-up instructions.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"siwx","name":"SIGN-IN-WITH-X"}],"title":"siwx"}]},"originalFileLocation":"swagger.yaml"},"subdomain":"veniceai","siteName":"Venice API Docs","title":"Embeddings | Venice API Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/endpoint/embeddings/generate","matchLevel":1},"pt-BR":{"href":"/pt-BR/api-reference/endpoint/embeddings/generate","matchLevel":1},"ar":{"href":"/ar/api-reference/endpoint/embeddings/generate","matchLevel":0},"it":{"href":"/it/api-reference/endpoint/embeddings/generate","matchLevel":1},"de":{"href":"/de/api-reference/endpoint/embeddings/generate","matchLevel":1},"es":{"href":"/es/api-reference/endpoint/embeddings/generate","matchLevel":1},"fr":{"href":"/fr/api-reference/endpoint/embeddings/generate","matchLevel":1},"zh":{"href":"/zh/api-reference/endpoint/embeddings/generate","matchLevel":1},"ko":{"href":"/ko/api-reference/endpoint/embeddings/generate","matchLevel":1}}},"lastModified":"2026-08-18T13:57:52.407Z","originalFileLocation":"ar/api-reference/endpoint/embeddings/generate.mdx","locale":"ar"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"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\u0026#x27;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.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Venice API Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/veniceai/bx2bxRtmLEf0wvnq/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/veniceai/bx2bxRtmLEf0wvnq/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/veniceai/bx2bxRtmLEf0wvnq/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/veniceai/bx2bxRtmLEf0wvnq/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/veniceai/bx2bxRtmLEf0wvnq/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/veniceai/bx2bxRtmLEf0wvnq/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/veniceai/bx2bxRtmLEf0wvnq/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/veniceai/bx2bxRtmLEf0wvnq/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/veniceai/bx2bxRtmLEf0wvnq/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Embeddings | Venice API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"توثيق يغطي واجهة embeddings API من Venice.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Venice API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.venice.ai/ar/api-reference/endpoint/embeddings/generate\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://veniceai.mintlify.app/_mintlify/api/og/v2?division=%D8%A7%D9%84%D8%AA%D8%B6%D9%85%D9%8A%D9%86%D8%A7%D8%AA\u0026amp;title=%D8%A5%D9%86%D8%B4%D8%A7%D8%A1+Embeddings\u0026amp;description=Create+embeddings+for+the+supplied+input.+%60input%60+must+be+a+string+or+an+array+of+strings.+Token+arrays+%28integer+IDs%29+are+rejected+with+HTTP+400.+LangChain+%60Ope\u0026amp;theme=508d743c1f2720564c9062e7\u0026amp;signature=8a75079ec10dc617da02a790f54684fb85df6ec56634557024a1c2e4b5a5f754\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Embeddings | Venice API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"توثيق يغطي واجهة embeddings API من Venice.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://veniceai.mintlify.app/_mintlify/api/og/v2?division=%D8%A7%D9%84%D8%AA%D8%B6%D9%85%D9%8A%D9%86%D8%A7%D8%AA\u0026amp;title=%D8%A5%D9%86%D8%B4%D8%A7%D8%A1+Embeddings\u0026amp;description=Create+embeddings+for+the+supplied+input.+%60input%60+must+be+a+string+or+an+array+of+strings.+Token+arrays+%28integer+IDs%29+are+rejected+with+HTTP+400.+LangChain+%60Ope\u0026amp;theme=508d743c1f2720564c9062e7\u0026amp;signature=8a75079ec10dc617da02a790f54684fb85df6ec56634557024a1c2e4b5a5f754\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/veniceai/bx2bxRtmLEf0wvnq/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Venice API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#125DA3\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"og:logo\" content=\"/logo/light.svg\">\u003cmeta data-mint-head name=\"article:publisher\" content=\"Venice AI\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.venice.ai/ar/api-reference/endpoint/embeddings/generate\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ar/api-reference/endpoint/embeddings/generate.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ar\" href=\"https://docs.venice.ai/ar/api-reference/endpoint/embeddings/generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.venice.ai/api-reference/endpoint/embeddings/generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://docs.venice.ai/pt-BR/api-reference/endpoint/embeddings/generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"it\" href=\"https://docs.venice.ai/it/api-reference/endpoint/embeddings/generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"de\" href=\"https://docs.venice.ai/de/api-reference/endpoint/embeddings/generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.venice.ai/es/api-reference/endpoint/embeddings/generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.venice.ai/fr/api-reference/endpoint/embeddings/generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.venice.ai/zh/api-reference/endpoint/embeddings/generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.venice.ai/ko/api-reference/endpoint/embeddings/generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.venice.ai/api-reference/endpoint/embeddings/generate\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.venice.ai/#organization\",\"name\":\"Venice API Docs\",\"url\":\"https://docs.venice.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/veniceai/gFXvp87w4B810n0Y/logo/light.svg?fit=max\u0026auto=format\u0026n=gFXvp87w4B810n0Y\u0026q=85\u0026s=121558c3bff1e4e012fcd34bdc50555c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.venice.ai#website\",\"name\":\"Venice API Docs\",\"url\":\"https://docs.venice.ai\",\"publisher\":{\"@id\":\"https://docs.venice.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.venice.ai/ar/api-reference/endpoint/embeddings/generate#webpage\",\"url\":\"https://docs.venice.ai/ar/api-reference/endpoint/embeddings/generate\",\"name\":\"إنشاء Embeddings\",\"description\":\"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.\",\"dateModified\":\"2026-08-18T13:57:52.407Z\",\"isPartOf\":{\"@id\":\"https://docs.venice.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.venice.ai/ar/api-reference/endpoint/embeddings/generate#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.venice.ai/ar/api-reference/endpoint/embeddings/generate#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Venice APIs\",\"item\":\"https://docs.venice.ai/ar/api-reference/api-spec\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"إنشاء Embeddings\",\"item\":\"https://docs.venice.ai/ar/api-reference/endpoint/embeddings/generate\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.venice.ai/ar/api-reference/endpoint/embeddings/generate#apireference\",\"headline\":\"إنشاء Embeddings\",\"name\":\"إنشاء Embeddings\",\"description\":\"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.\",\"url\":\"https://docs.venice.ai/ar/api-reference/endpoint/embeddings/generate\",\"mainEntityOfPage\":{\"@id\":\"https://docs.venice.ai/ar/api-reference/endpoint/embeddings/generate#webpage\"},\"dateModified\":\"2026-08-18T13:57:52.407Z\",\"publisher\":{\"@id\":\"https://docs.venice.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.venice.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Venice API Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Venice API Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"pages":[{"title":"en","href":"/api-reference/endpoint/embeddings/generate"}]},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/pt-BR/api-reference/endpoint/embeddings/generate"}]},{"language":"ar","tabs":[{"tab":"التوثيق","icon":"book","pages":[{"title":"التوثيق","href":"/ar/overview/about-venice"}]},{"tab":"النماذج","icon":"box","pages":[{"title":"النماذج","href":"/ar/models/overview"}]},{"tab":"تعلّم","icon":"layout-grid","pages":[{"title":"تعلّم","href":"/ar/learn"}]},{"tab":"مرجع الـ API","icon":"code","groups":[{"group":"Venice APIs","pages":[{"title":"مقدمة","href":"/ar/api-reference/api-spec"},{"title":"حدود المعدل","href":"/ar/api-reference/rate-limiting"},{"title":"رموز الأخطاء","href":"/ar/api-reference/error-codes"},{"group":"الدردشة","expanded":false,"pages":[{"title":"إكمال المحادثات","openapi":"POST /chat/completions","href":"/ar/api-reference/endpoint/chat/completions"},{"title":"Responses","openapi":"POST /responses","href":"/ar/api-reference/endpoint/responses/create"},{"title":"لاحقة ميزات النموذج","href":"/ar/api-reference/endpoint/chat/model_feature_suffix"},{"title":"إنشاء القرارات","openapi":"POST /decisions","href":"/ar/api-reference/endpoint/decisions/create"},{"title":"التوافق مع System One","openapi":"POST /systemone","href":"/ar/api-reference/endpoint/decisions/systemone"}]},{"group":"الصور","expanded":false,"pages":[{"title":"توليد الصور","openapi":"POST /image/generate","href":"/ar/api-reference/endpoint/image/generate"},{"title":"تكبير الصور وتحسينها","openapi":"POST /image/upscale","href":"/ar/api-reference/endpoint/image/upscale"},{"title":"تحرير (المعروف بـ Inpaint)","openapi":"POST /image/edit","href":"/ar/api-reference/endpoint/image/edit"},{"title":"تحرير الصور المتعدد","openapi":"POST /image/multi-edit","href":"/ar/api-reference/endpoint/image/multi-edit"},{"title":"إزالة الخلفية","openapi":"POST /image/background-remove","href":"/ar/api-reference/endpoint/image/background-remove"},{"title":"أنماط الصور","openapi":"GET /image/styles","href":"/ar/api-reference/endpoint/image/styles"},{"title":"توليد الصور (واجهة متوافقة مع OpenAI)","openapi":"POST /images/generations","href":"/ar/api-reference/endpoint/image/generations"}]},{"group":"الصوت","expanded":false,"pages":[{"title":"واجهة Speech API (تجريبية)","openapi":"POST /audio/speech","href":"/ar/api-reference/endpoint/audio/speech"},{"title":"استنساخ الصوت","openapi":"POST /audio/voices","href":"/ar/api-reference/endpoint/audio/voices"},{"title":"واجهة Transcriptions API (تجريبية)","openapi":"POST /audio/transcriptions","href":"/ar/api-reference/endpoint/audio/transcriptions"},{"title":"وضع توليد الصوت في قائمة الانتظار","openapi":"POST /audio/queue","href":"/ar/api-reference/endpoint/audio/queue"},{"title":"استرجاع الصوت","openapi":"POST /audio/retrieve","href":"/ar/api-reference/endpoint/audio/retrieve"},{"title":"تسعير توليد الصوت","openapi":"POST /audio/quote","href":"/ar/api-reference/endpoint/audio/quote"},{"title":"إكمال الصوت","openapi":"POST /audio/complete","href":"/ar/api-reference/endpoint/audio/complete"},{"title":"وضع تغيير الصوت في قائمة الانتظار","openapi":"POST /audio/voice-changer/queue","href":"/ar/api-reference/endpoint/audio/voice-changer/queue"},{"title":"استرجاع تغيير الصوت","openapi":"POST /audio/voice-changer/retrieve","href":"/ar/api-reference/endpoint/audio/voice-changer/retrieve"},{"title":"تسعير تغيير الصوت","openapi":"POST /audio/voice-changer/quote","href":"/ar/api-reference/endpoint/audio/voice-changer/quote"},{"title":"إكمال تغيير الصوت","openapi":"POST /audio/voice-changer/complete","href":"/ar/api-reference/endpoint/audio/voice-changer/complete"}]},{"group":"الفيديو","expanded":false,"pages":[{"title":"وضع توليد الفيديو في قائمة الانتظار","openapi":"POST /video/queue","href":"/ar/api-reference/endpoint/video/queue"},{"title":"استرجاع الفيديو","openapi":"POST /video/retrieve","href":"/ar/api-reference/endpoint/video/retrieve"},{"title":"تسعير توليد الفيديو","openapi":"POST /video/quote","href":"/ar/api-reference/endpoint/video/quote"},{"title":"إكمال الفيديو","openapi":"POST /video/complete","href":"/ar/api-reference/endpoint/video/complete"}]},{"group":"الأدوات","expanded":false,"pages":[{"title":"محلِّل النصوص","openapi":"POST /augment/text-parser","href":"/ar/api-reference/endpoint/augment/text-parser"},{"title":"استخراج محتوى الويب","openapi":"POST /augment/scrape","href":"/ar/api-reference/endpoint/augment/scrape"},{"title":"البحث في الويب","openapi":"POST /augment/search","href":"/ar/api-reference/endpoint/augment/search"},{"title":"شبكات Crypto","openapi":"GET /crypto/rpc/networks","href":"/ar/api-reference/endpoint/crypto/networks"},{"title":"Crypto RPC","openapi":"POST /crypto/rpc/{network}","description":"Proxy a JSON-RPC request to a supported blockchain node and bill per credit.\n\n## Request shapes\n- **Single request**: a JSON-RPC 2.0 object (`{ \"jsonrpc\":\"2.0\", \"method\":\"…\", \"params\":[…], \"id\":1 }`).\n- **Batch**: an array of up to 100 JSON-RPC 2.0 objects. If any item references an unsupported method, the entire batch is rejected with 400 and the offending methods are listed.\n\n## Supported methods\nMethods are classified into three pricing tiers:\n- **Standard (1×)**: `eth_call`, `eth_getBalance`, `eth_blockNumber`, `eth_sendRawTransaction`, `eth_getLogs`, `net_version`, `web3_clientVersion`, ERC-4337 bundler methods (`eth_sendUserOperation`, etc.), chain-family extensions (`zks_*`, `linea_*`, `bor_*`, `starknet_*`), and Solana methods (`getAccountInfo`, `getBalance`, `getLatestBlockhash`, `sendTransaction`, etc.).\n- **Advanced (2×)**: `trace_*`, `debug_*`, `txpool_inspect`, `txpool_status`, `arbtrace_*`.\n- **Large (4×)**: `trace_replayBlockTransactions`, `trace_replayTransaction`, `txpool_content`, `arbtrace_replay*`, and Solana `getLargestAccounts`, `getSupply`.\n\nStateful filter methods (`eth_newFilter`, `eth_getFilterChanges`, `eth_uninstallFilter`, etc.) are **not supported** — they break on a load-balanced HTTP proxy because filter state is pinned to a single upstream backend. Use `eth_getLogs` instead.\n\nWebSocket-only methods (EVM `eth_subscribe`/`eth_unsubscribe` and Solana `*Subscribe`/`*Unsubscribe`) return 400 because this proxy is HTTP-only.\n\n## Pricing\nCredits consumed per call = `baseCredits[chain] × methodTier`. `baseCredits` is 20 for most EVM chains (Ethereum, Base, Optimism, Arbitrum, Polygon, Linea, Avalanche, BSC, Blast) and Starknet; 30 for zkSync Era and Solana. The USD price per credit is `~7e-7` — a single standard EVM call costs ≈ $0.000014 and a large trace-replay costs ≈ $0.000056.\n\nPer-request errors at the JSON-RPC layer (HTTP 200 with an `error` field in a response item) are billed at 5 credits instead of the full method tier — a small concession for methods not supported on a given chain or bad-parameter responses.\n\n## Rate limits\nTwo caps apply per caller:\n- **Requests per minute**: 100 on the paid tier.\n- **Credits per rolling 24 hours**: 10,000,000 on the paid tier.\nWhen either cap is exceeded, the request returns 429 with a `customMessage` identifying which cap tripped. The per-minute cap also sets the `X-RateLimit-*` response headers.\n\n## Idempotency\nSet the `Idempotency-Key` request header to any string matching `[A-Za-z0-9_-]{1,255}` to enable safe retries. The response is cached for 24 hours keyed on `(user, idempotency-key)`; replaying the same key with the same body returns the cached response with `Idempotent-Replayed: true`. Reusing the same key with a different body returns 400 to prevent silent corruption.\n\n**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.","href":"/ar/api-reference/endpoint/crypto/rpc"}]},{"group":"التضمينات","expanded":false,"pages":[{"title":"إنشاء Embeddings","openapi":"POST /embeddings","href":"/ar/api-reference/endpoint/embeddings/generate"}]},{"group":"النماذج","expanded":false,"pages":[{"title":"قائمة النماذج","openapi":"GET /models","description":"Returns a list of available models supported by the Venice.ai API across text, image, audio, video, and related inference types.","href":"/ar/api-reference/endpoint/models/list"},{"title":"خريطة التوافق","openapi":"GET /models/compatibility_mapping","href":"/ar/api-reference/endpoint/models/compatibility_mapping"},{"title":"سمات النماذج","openapi":"GET /models/traits","href":"/ar/api-reference/endpoint/models/traits"}]},{"group":"مفاتيح الـ API","expanded":false,"pages":[{"title":"قائمة مفاتيح API","openapi":"GET /api_keys","href":"/ar/api-reference/endpoint/api_keys/list"},{"title":"الحصول على تفاصيل مفتاح API","openapi":"GET /api_keys/{id}","href":"/ar/api-reference/endpoint/api_keys/get"},{"title":"إنشاء مفتاح API","openapi":"POST /api_keys","href":"/ar/api-reference/endpoint/api_keys/create"},{"title":"تحديث مفتاح API","openapi":"PATCH /api_keys","href":"/ar/api-reference/endpoint/api_keys/update"},{"title":"حذف مفتاح API","openapi":"DELETE /api_keys","href":"/ar/api-reference/endpoint/api_keys/delete"},{"title":"إنشاء مفتاح API بمحفظة Web3","openapi":"GET /api_keys/generate_web3_key","href":"/ar/api-reference/endpoint/api_keys/generate_web3_key/get"},{"title":"إنشاء مفتاح API بمحفظة Web3","openapi":"POST /api_keys/generate_web3_key","href":"/ar/api-reference/endpoint/api_keys/generate_web3_key/post"}]},{"group":"حدود معدّل مفاتيح الـ API","expanded":false,"pages":[{"title":"حدود المعدل والأرصدة","openapi":"GET /api_keys/rate_limits","href":"/ar/api-reference/endpoint/api_keys/rate_limits"},{"title":"سجلات حدود المعدل","openapi":"GET /api_keys/rate_limits/log","href":"/ar/api-reference/endpoint/api_keys/rate_limit_logs"}]},{"group":"الشخصيات","expanded":false,"pages":[{"title":"الحصول على شخصية","openapi":"GET /characters/{slug}","href":"/ar/api-reference/endpoint/characters/get"},{"title":"قائمة الشخصيات","openapi":"GET /characters","href":"/ar/api-reference/endpoint/characters/list"},{"title":"قائمة مراجعات الشخصيات","openapi":"GET /characters/{slug}/reviews","href":"/ar/api-reference/endpoint/characters/reviews"}]},{"group":"الفوترة","expanded":false,"pages":[{"title":"رصيد الفوترة","openapi":"GET /billing/balance","href":"/ar/api-reference/endpoint/billing/balance"},{"title":"استخدام الفوترة (أُزيلت)","openapi":"GET /billing/usage","href":"/ar/api-reference/endpoint/billing/usage"},{"title":"تحليلات استخدام الفوترة (بيتا)","openapi":"GET /billing/usage-analytics","href":"/ar/api-reference/endpoint/billing/usage-analytics"},{"title":"سجل استخدام الفوترة","openapi":"GET /billing/usage-history","href":"/ar/api-reference/endpoint/billing/usage-history"}]},{"group":"X402","expanded":true,"pages":[{"title":"رصيد X402","openapi":"GET /x402/balance/{walletAddress}","href":"/ar/api-reference/endpoint/x402/balance"},{"title":"شحن رصيد X402","openapi":"POST /x402/top-up","href":"/ar/api-reference/endpoint/x402/top-up"},{"title":"معاملات X402","openapi":"GET /x402/transactions/{walletAddress}","href":"/ar/api-reference/endpoint/x402/transactions"}]}]}]},{"tab":"سجل التغييرات","icon":"history","href":"https://featurebase.venice.ai/changelog"},{"tab":"الحالة","icon":"activity","href":"https://veniceai-status.com"}]},{"language":"it","pages":[{"title":"it","href":"/it/api-reference/endpoint/embeddings/generate"}]},{"language":"de","pages":[{"title":"de","href":"/de/api-reference/endpoint/embeddings/generate"}]},{"language":"es","pages":[{"title":"es","href":"/es/api-reference/endpoint/embeddings/generate"}]},{"language":"fr","pages":[{"title":"fr","href":"/fr/api-reference/endpoint/embeddings/generate"}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/api-reference/endpoint/embeddings/generate"}]},{"language":"ko","pages":[{"title":"ko","href":"/ko/api-reference/endpoint/embeddings/generate"}]}]},"basePath":"","title":"Embeddings | Venice API Docs","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-BAvA99GL.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js","Markdown-nKm-uidQ.js","clsx-ClVdStUn.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CIQkMg3R.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-ImrFS4Fy.js"]}