Skip to content
Aurabase Logo
aurabase

Ephemeral AI Sessions

POST/v1/ai/{project_id}/session

Eliminates API key exposure on mobile and SPA frontends by issuing bounded capability tokens.

Mint headers and body#

HeaderRequiredValue
apikeyyesService role key or authenticated user JWT
Content-Typeyesapplication/json

The minting endpoint checks and reserves token budgets against the project's real monthly quota and caches the resolved provider pipeline for 300 seconds.

Strict capability authentication#

Attention

Endpoints /session/chat, /session/chat/stream, and /session/embed strictly mandate Authorization: Bearer <ticket>. Supplying standard apikey headers is rejected to prevent confusion between permanent keys and ephemeral session capabilities.

Last updated · @aurabase/aurabase-js@0.7.5 · aura@0.3.4↗ Report a problem