POST /sveda/session
host route
HOST
The browser never holds SVEDA_EMBED_HOST_API_KEY. Your backend calls POST /sveda/embed/token, then the page opens JS chat or an iframe.
POST /sveda/session
host route
sveda_embed_
token prefix
9
language guides
A widget that mints tokens in the browser ships your host key. A Vue-only kit leaves PHP and Go hosts rewriting the handshake. The mint belongs on the server, in the language you already run.
SVEDA_EMBED_HOST_API_KEY stays on the sidecar and the host process. The page only receives origin + token.
Every SDK returns origin, token, expires_in, appearance. sveda-host.js does not care which backend minted it.
Laravel, Django, Nest, Rails, Spring, ASP.NET are wrappers. PHP, Go, and a static page plus curl still work.
Same five steps on every host. The language pages only change the install line and the mint helper.
1
Enable embed, set a host API key, and list the page origin in CORS.
2
Language SDK if you have a backend. No framework if you only need HTML plus a tiny POST.
3
Host
SVEDA_CLIENT_HOST_API_KEY
equals sidecar
SVEDA_EMBED_HOST_API_KEY.
4
Expose
POST /sveda/session.
Return origin, token, expires_in.
5
Page buttons
data-sveda-open
for JS or iframe.
Step-by-step install for each stack, plus a no-framework path.
HOST
A static page can open the chat. Something on your origin still has to mint the embed token — curl for local, or a tiny POST /sveda/session.
HOST
Framework-agnostic PHP. Factory::factory() → embed()->createToken(). Your page only receives origin and token.
HOST
The package wraps sveda-ai/client, mints Sanctum MCP tokens, and exposes StartSidecarSessionController.
HOST
One client. Flask, Django, and FastAPI are route wrappers. start_host_session returns origin, token, expires_in, appearance.
HOST
Native fetch. startHostSession talks to the sidecar. The page still opens chat with data-sveda-open buttons.
HOST
The gem mints embed tokens with Bearer host auth. Rails is a controller and a layout. Plain Ruby is the same HTTP call.
HOST
No framework required. net/http plus the module is the host. Templates only render chat buttons when the origin is set.
HOST
HttpClient transport. Spring Boot is a controller and Thymeleaf. The SDK does not need Spring.
HOST
net8.0 Sveda.Client. ASP.NET is MapPost plus a layout. The library is usable from any HttpClient host.
Nine step-by-step guides. Same session JSON. Same two chat openers.