Skip to main content
POST
/
llm
/
v1
/
embeddings
Create embeddings
curl --request POST \
  --url https://api.case.dev/llm/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": "<string>",
  "model": "<string>",
  "encoding_format": "float",
  "dimensions": 123,
  "user": "<string>"
}
'
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [
        0.0023,
        -0.0087,
        0.0156,
        "... (1536 dimensions)"
      ]
    }
  ],
  "model": "text-embedding-ada-002",
  "usage": {
    "prompt_tokens": 12,
    "total_tokens": 12
  }
}

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Body

application/json

Embedding request configuration

input
required

Text or array of texts to create embeddings for

model
string
required

Embedding model to use (e.g., text-embedding-ada-002, text-embedding-3-small)

encoding_format
enum<string>
default:float

Format for returned embeddings

Available options:
float,
base64
dimensions
integer

Number of dimensions for the embeddings (model-specific)

user
string

Unique identifier for the end-user

Response

Embeddings created successfully

object
string
Example:

"list"

data
object[]
model
string
usage
object