Flambe docs

Embed a search query

Returns the embedding vector for a search string, using the same model that indexed the recipes. Use it to run your own semantic search over recipes you have synced locally — embedding the query client-side with a different model would not produce comparable distances.

POST
/api/ai/embed-query

Returns the embedding vector for a search string, using the same model that indexed the recipes. Use it to run your own semantic search over recipes you have synced locally — embedding the query client-side with a different model would not produce comparable distances.

Authorization

bearerAuth
AuthorizationBearer <token>

A Clerk session JWT. Obtain one with a Clerk frontend SDK (session.getToken()) or, for server-to-server use, with a Clerk machine token. The token's sub claim is the Flambe user id that scopes every request.

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

curl -X POST "https://example.com/api/ai/embed-query" \  -H "Content-Type: application/json" \  -d '{    "query": "something warm with lentils"  }'
{  "embedding": [    0  ]}