HOST
Host SDKs
Each host mints a scoped embed token, then the page opens JS chat or an iframe. The host API key never leaves the server.
No framework
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.
PHP
Framework-agnostic PHP. Factory::factory() → embed()->createToken(). Your page only receives origin and token.
Laravel
The package wraps sveda-ai/client, mints Sanctum MCP tokens, and exposes StartSidecarSessionController.
Python
One client. Flask, Django, and FastAPI are route wrappers. start_host_session returns origin, token, expires_in, appearance.
Node
Native fetch. startHostSession talks to the sidecar. The page still opens chat with data-sveda-open buttons.
Ruby
The gem mints embed tokens with Bearer host auth. Rails is a controller and a layout. Plain Ruby is the same HTTP call.
Go
No framework required. net/http plus the module is the host. Templates only render chat buttons when the origin is set.
Java
HttpClient transport. Spring Boot is a controller and Thymeleaf. The SDK does not need Spring.
.NET
net8.0 Sveda.Client. ASP.NET is MapPost plus a layout. The library is usable from any HttpClient host.
Same handshake on every host
Numbered steps on each language page match this contract. Skip the SDK with no framework.
-
1
Run sveda-server
SVEDA_EMBED_ENABLED=trueand a host API key. CORS lists the page origin so/build/sveda/sveda-chat.cssandsveda-chat.jsload. -
2
Install the SDK
Or skip it. A static page plus curl or a 20-line mint route is enough.
-
3
Match the keys
SVEDA_CLIENT_HOST_API_KEYequalsSVEDA_EMBED_HOST_API_KEY. -
4
POST /sveda/session
Return
origin,token,expires_in. -
5
Open the chat
Set
data-sveda-originanddata-sveda-session, then JS or iframe.
Start without a framework.
Static HTML, an iframe, or a 20-line session endpoint. Then pick a language SDK when you want typed minting.