Flambe docs

Create a realtime assistant session

Mints a short-lived client secret for the hands-free cooking assistant, so a client can open a realtime connection without ever holding a long-lived provider key. Scope it to a recipe with `recipeId`. The secret expires quickly — request one per session, at the moment the user starts talking, rather than caching it.

POST
/api/ai/session

Mints a short-lived client secret for the hands-free cooking assistant, so a client can open a realtime connection without ever holding a long-lived provider key. Scope it to a recipe with recipeId.

The secret expires quickly — request one per session, at the moment the user starts talking, rather than caching it.

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/session" \  -H "Content-Type: application/json" \  -d '{}'
{  "clientSecret": "string",  "expiresAt": 0}