Alpha API

This API is currently in alpha. Breaking changes may occur between releases. We recommend pinning to a specific version and monitoring the changelog for updates.

POST
/v1/search

Search across your team's knowledge with semantic understanding and multi-path retrieval.

AuthorizationBearer <token>

Use your Lightfast API key (sk-lf-...) as the bearer token.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://lightfast.ai/v1/search" \  -H "Content-Type: application/json" \  -d '{    "query": "string"  }'
{
  "results": [
    {
      "id": "string",
      "title": "string",
      "snippet": "string",
      "score": 0,
      "source": "string",
      "type": "string",
      "url": "string",
      "occurredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "total": 9007199254740991,
  "requestId": "string"
}
{
  "defined": true,
  "code": "BAD_REQUEST",
  "status": 400,
  "message": "Invalid request",
  "data": {
    "field": "string",
    "reason": "string"
  }
}
{
  "defined": true,
  "code": "UNAUTHORIZED",
  "status": 401,
  "message": "Authentication required",
  "data": null
}
{
  "defined": true,
  "code": "FORBIDDEN",
  "status": 403,
  "message": "Access denied",
  "data": null
}
{
  "defined": true,
  "code": "NOT_FOUND",
  "status": 404,
  "message": "Resource not found",
  "data": {
    "resource": "string"
  }
}