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/openai/deployments/{model}/embeddings
Authorization
Path parameters
model*Model
Response

Successful Response

Body
any
Request
const response = await fetch('/openai/deployments/{model}/embeddings', {
    method: 'POST',
    headers: {},
});
const data = await response.json();
Response
{
  "detail": [
    {
      "loc": [
        "text"
      ],
      "msg": "text",
      "type": "text"
    }
  ]
}