Skip to main content
POST
/
api
/
user
/
embeddings
Get embedding chunks for an upload
curl --request POST \
  --url https://pria.praxislxp.com/api/user/embeddings \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "upload": "665a1b2c3d4e5f6789012300"
}
'
{
  "success": true,
  "data": [
    {
      "_id": "665a1b2c3d4e5f6789012345",
      "chunkText": "This is a paragraph from the uploaded document...",
      "chunkLen": 512,
      "chunkIndex": 0,
      "upload": "665a1b2c3d4e5f6789012300",
      "chunkUrl": "#page=2",
      "created": "2023-11-07T05:31:56Z",
      "usage": 128
    }
  ]
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
upload
string
required

The ID of the upload whose embedding chunks to retrieve

Example:

"665a1b2c3d4e5f6789012300"

Response

Embedding chunks retrieved successfully

success
boolean
Example:

true

data
object[]

Embedding chunks sorted by chunkIndex (max 1000)