latestOpenAPI 3.1.02026-08-226994571.1 MB

1e929292ddd5

embeddings

Embeddings

Follows the exact same API spec as OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings

curl -X POST http://localhost:4000/v1/embeddings 
-H "Content-Type: application/json" 
-H "Authorization: Bearer sk-1234" 
-d '{
    "model": "text-embedding-ada-002",
    "input": "The quick brown fox jumps over the lazy dog"
}'
post/embeddings

Request body

modelstring required
inputstring[]
timeoutinteger
api_basestring nullable
api_versionstring nullable
api_keystring nullable
api_typestring nullable
cachingboolean
userstring nullable
litellm_call_idstring nullable
litellm_logging_objobject nullable
logger_fnstring nullable

Response

Successful Response

{"stackTrail":"paths:/embeddings:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}