For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocsAPI ReferenceSDKs
DocsAPI ReferenceSDKs
  • Overview
    • API reference
  • Mesh API
      • POSTInit Upload
      • GETList Files
      • GETGet File Status
      • POSTTrigger Embedding Bulk
      • POSTVector Search
LogoLogo
Mesh APIFiles & RAG

Vector Search

||View as Markdown|
POST
https://api.meshapi.ai/v1/files/search
POST
/v1/files/search
$curl -X POST https://api.meshapi.ai/v1/files/search \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "query": "climate change impact on agriculture"
>}'
1{
2 "results": [
3 {
4 "score": 0.987,
5 "text": "Rising temperatures have led to decreased crop yields in several regions.",
6 "parent_text": "The effects of climate change on global agriculture are profound and varied.",
7 "file_id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890",
8 "file_name": "climate_study_2023.pdf",
9 "file_type": "pdf",
10 "mime_type": "application/pdf",
11 "chunk_index": 12,
12 "created_at": 1688208000,
13 "metadata": {}
14 }
15 ]
16}
Was this page helpful?
Previous

Trigger Embedding Bulk

Next

Create Batch

Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
querystringRequired
top_kintegerOptional1-50Defaults to 5
file_idslist of strings or nullOptional
Restrict to these file IDs
filtermap from strings to any or nullOptional

Match on any metadata key/value pairs

date_frominteger or nullOptional

Unix timestamp — only chunks created after this

date_tointeger or nullOptional

Unix timestamp — only chunks created before this

Response

Successful Response
resultslist of objects

Errors

422
Unprocessable Entity Error