const response = await fetch("/api/chat", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
botId: "veldt",
messages: [{ role: "user", content: "Hello" }],
}),
});
const { reply } = await response.json();
// Provider API keys stay on the server.
Works well for
- Complete control over design, voice, and accessibility
- Server-side prompts, limits, and secret handling
Trade-offs
- Requires maintaining the UI and server route
- API usage costs and abuse controls need management
USED HERE BY: Veldt Support · Northline Assistant · Solenne Concierge · Aura Voice