POST
/
ai
/
tokenization
/
{MODEL_ID}
Tokenization by MODEL_ID
curl --request POST \
  --url https://application_id.applications.lucidworks.com/ai/tokenization/{MODEL_ID} \
  --header 'Content-Type: application/json' \
  --data '{
  "batch": [
    {
      "text": "Mr. and Mrs. Dursley and O'\''\\'\'''\''Malley, of number four, Privet Drive, were proud to say that they were perfectly normal, thank you very much"
    }
  ],
  "useCaseConfig": {
    "dataType": "query or passage"
  },
  "modelConfig": {
    "vectorQuantizationMethod": "max-scale",
    "dimReductionSize": 256
  }
}'
{
  "generatedTokens": [
    {
      "tokens": [
        "\"[CLS]\",                 \"query\",                 \":\",                 \"mr\",                 \".\",                 \"and\",                 \"mrs\",                 \".\",                 \"du\",                 \"##rs\",                 \"##ley\",                 \"and\",                 \"o\",                 \"'\",                 \"malley\",                 \",\",                 \"of\",                 \"number\",                 \"four\",                 \",\",                 \"pri\",                 \"##vet\",                 \"drive\",                 \",\",                 \"were\",                 \"proud\",                 \"to\",                 \"say\",                 \"that\",                 \"they\",                 \"were\",                 \"perfectly\",                 \"normal\",                 \",\",                 \"thank\",                 \"you\",                 \"very\",                 \"much\",                 \".\",                 \"[SEP]\""
      ]
    }
  ],
  "tokensUsed": {
    "inputTokens": 40,
    "promptTokens": 148,
    "completionTokens": 0,
    "totalTokens": 175
  }
}

Headers

Authorization: Bearer ACCESS_TOKEN
string

The authentication and authorization access token.

Content-Type
string

application/json

Example:

"application/json"

Path Parameters

MODEL_ID
string
required

The name of the pre-trained or custom embedding model.

Example:

"e5-small-v2"

Body

application/json

Response

200 - application/json

OK

The response is of type object.