POST
/
v1
/
embeddings
curl --location 'https://api.llmrails.com/v1/embeddings' \
--header 'X-API-KEY: {token}' \
--header 'Content-Type: application/json' \
--data '{
   "input":["As they rounded a bend in the path that ran beside the river, Lara recognized the silhouette of a fig tree atop a nearby hill."],
   "model":"embedding-multi-v1" 
}'
{
    "object": "list",
    "data": [
        {
            "object": "embedding",
            "index": 0,
            "embedding": [
                0.03622923046350479,
                -0.007412001956254244,
                ......
                -0.014109186828136444
            ]
        }
    ],
    "model": "embedding-multi-v1",
    "usage": {
        "prompt_tokens": 38,
        "total_tokens": 38
    }
}
curl --location 'https://api.llmrails.com/v1/embeddings' \
--header 'X-API-KEY: {token}' \
--header 'Content-Type: application/json' \
--data '{
   "input":["As they rounded a bend in the path that ran beside the river, Lara recognized the silhouette of a fig tree atop a nearby hill."],
   "model":"embedding-multi-v1" 
}'
{
    "object": "list",
    "data": [
        {
            "object": "embedding",
            "index": 0,
            "embedding": [
                0.03622923046350479,
                -0.007412001956254244,
                ......
                -0.014109186828136444
            ]
        }
    ],
    "model": "embedding-multi-v1",
    "usage": {
        "prompt_tokens": 38,
        "total_tokens": 38
    }
}

Body

application/json
input
required

Input text to embed

model
enum<string>
required

Embedding model choice

Available options:
embedding-english-v1,
embedding-multi-v1

Response

200 - application/json
object
string
required

Object type, list is only choice now

data
object[]
required

Embedding Response Item

model
enum<string>
required

Embedding model

Available options:
embedding-english-v1,
embedding-multi-v1
usage
object
required

Usage response