Skip to main content
POST
/
v1
/
boards
/
{boardId}
/
documents
/
search
Semantic search
curl --request POST \
  --url https://api.chatgrid.ai/v1/v1/boards/{boardId}/documents/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "What were the Q1 revenue numbers?",
  "limit": 10,
  "threshold": 0.5,
  "node_ids": [
    "e5f6a7b8-c9d0-1234-efab-345678901234"
  ]
}
'
{
  "object": "list",
  "data": [
    {
      "id": "dd112233-4455-6677-8899-aabbccddeeff",
      "content": "The quarterly revenue increased by 15%...",
      "node_id": "e5f6a7b8-c9d0-1234-efab-345678901234",
      "metadata": {
        "chunkIndex": 0,
        "totalChunks": 5,
        "sourceType": "api_vectorize"
      },
      "score": 0.87
    }
  ],
  "has_more": false,
  "cursor": null
}

Authorizations

Authorization
string
header
required

Pass your API key (prefixed cgk_) or a Supabase JWT in the Authorization: Bearer <token> header.

Path Parameters

boardId
string<uuid>
required

Board UUID.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Body

application/json
query
string
required

Natural language search query.

Required string length: 1 - 2000
Example:

"What were the Q1 revenue numbers?"

limit
integer
default:10

Maximum number of results to return.

Required range: 1 <= x <= 50
threshold
number
default:0.5

Minimum similarity score threshold (0-1).

Required range: 0 <= x <= 1
node_ids
string[]

Restrict search to chunks associated with these nodes.

Example:
["e5f6a7b8-c9d0-1234-efab-345678901234"]

Response

Search results ranked by relevance.

object
enum<string>
Available options:
list
data
object[]
has_more
boolean
Example:

false

cursor
string | null
Example:

null