पाठ 23 / 26
Deploying: Embedded Chat or Exported Code
Two routes from canvas to users.
Hosted workflow or your own runtime
A published workflow can be served through OpenAI's hosted runtime and embedded in your product with ChatKit, a customisable chat interface that your backend connects to the workflow (your server creates sessions so API keys never reach the browser). Alternatively, export the workflow as Agents SDK code and run it in your own service, where you control tools, data and deployment. Either way, authenticate users in your backend, pass trusted identifiers as inputs, and set limits on usage per user. Product details such as node names and menus change; check the current OpenAI documentation.
Deployment options compared
Choose by control and effort.
embedded chat (hosted workflow) exported SDK code
runs on OpenAI platform your servers
UI embeddable chat component your own UI
custom tools via MCP / hosted tools any Python/TypeScript code
changes publish new workflow version code review + deploy
best for fast launch of a chat experience deep integration, strict controlKeep keys server-side
Never put API keys in browser code; issue short-lived session tokens from your backend.
त्वरित जाँच: Why create chat sessions from your backend?
- So API keys stay on the server and users are authenticated by your app
- Browsers cannot display chat
- It makes the model smarter
- It removes the need for versions
Answer
So API keys stay on the server and users are authenticated by your app — Secrets and identity belong on the server.