POST

/v1/embeddings

Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.


Request Body

inputstring or array, required

Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings.

modelstring, required

ID of the model to use. Currently sastra-embedding-v1.

Response Format

{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [
        -0.006929283495992422,
        -0.005336422007530928,
        ...
        -4.547132266452536e-5,
        -0.024047505110502243
      ]
    }
  ],
  "model": "sastra-embedding-v1",
  "usage": {
    "prompt_tokens": 5,
    "total_tokens": 5
  }
}