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 $LITELLM_MASTER_KEY" 
-d '{
    "model": "text-embedding-ada-002",
    "input": "The quick brown fox jumps over the lazy dog"
}'
post/embeddings

Request

  • Base URL: https://docs.litellm.com.cn (the document declares no server; this is the origin it was published from)
  • URL: https://docs.litellm.com.cn/embeddings
  • Auth: API key in header x-litellm-api-key

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

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.