Unverified50% confidenceSolutionExact time
Both useChat and useCompletion support specifying a custom backend route via the api parameter, where the backend calls the model provider API, thereby avoiding exposure of keys on the frontend.
1
Sources
50%
Confidence
Long-term
Relevance
9/30/2026
First Seen
Sources
Related Entities
Related Claims
UnverifiedBoth useChat and useCompletion abstract the consumption logic of Server-Sent Events (SSE) and are deeply integrated with Next.js's Route Handlers or Edge Functions.74% similarUnverifiedBefore ReAct, WebGPT and ToolFormer had already explored the possibility of LLMs calling external tools, but were limited to a single-call pattern.68% similarUnverifiedBoth useChat and useCompletion implement streaming output based on the Web Streams API.68% similarUnverifiedFrontend and backend typically communicate through APIs following RESTful or GraphQL protocol specifications65% similarUnverifiedThe same set of backend APIs in a frontend-backend separation architecture can simultaneously serve web browsers, mobile apps, and WeChat mini-programs64% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/960812API
curl https://kongchang.com/api/v1/knowledge/claims/960812MCP
get_claim(id=960812)