Skip to main content
POST
/
projects
/
{project_reference}
/
environments
/
{environmentName}
/
search
Search environment files with a vector
curl --request POST \
  --url https://api.veryfront.com/projects/{project_reference}/environments/{environmentName}/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "vector": [
    123
  ],
  "dimension": 768,
  "limit": 10,
  "cursor": "<string>",
  "threshold": 0.7
}
'
{
  "data": [
    {
      "chunk": {
        "id": "<string>",
        "file_path": "<string>",
        "file_version_id": "<string>",
        "index": 123,
        "content": "<string>",
        "start_offset": 123,
        "end_offset": 123,
        "token_count": 123,
        "file_id": "<string>",
        "metadata": {}
      },
      "score": 123,
      "match_type": "semantic"
    }
  ],
  "page_info": {
    "self": "<string>",
    "first": null,
    "next": "<string>",
    "prev": "<string>"
  },
  "search_time_ms": 123,
  "total_matches": 123
}

Documentation Index

Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use a JWT bearer token or a Veryfront API key in the Authorization header.

Path Parameters

project_reference
string
required

Project ID, slug, or domain from the authenticated context.

environmentName
string
required

Environment name from the route. Current behavior searches production content.

Body

application/json
vector
number[]
required

Pre-computed query embedding vector.

Required array length: 768 - 4096 elements
dimension
required

Embedding vector dimension: 768, 1024, 1536, 3072, or 4096.

Available options:
768
limit
number
default:10

Maximum search results to return, from 1 to 100.

Required range: 1 <= x <= 100
cursor
string

Opaque cursor returned from page_info.next.

threshold
number
default:0.7

Minimum similarity score for returned semantic matches.

Required range: 0 <= x <= 1

Response

Search results.

data
object[]
required

Vector search matches ordered by relevance.

page_info
object
required

Pagination cursor values for traversing the result set.

search_time_ms
number
required

Server-side search duration in milliseconds.

total_matches
number
required

Total number of matches reported by the search backend.