Document

Retrieve similar documents chunks based on a prompt

POST
/api/v1/document/nearest
/api/v1/document/nearest

The Authorization access token

Authorization

Authorization
Required
<token>

Please enter a valid access token

In: header

Request Body

application/jsonOptional

The prompt message to find the nearest documents

prompt
Required
string

Minimum length: 1

Query Parameters

spaceIdstring

The space ID to retrieve from

Default: ""

documentIdstring

The specific document ID to retrieve from

Default: ""

limitinteger

The maximum number of documents to retrieve

Default: 3Format: "int32"
curl -X POST "https://example.com/api/v1/document/nearest?spaceId=&documentId=&limit=3" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "string"
  }'

OK