openai-chatkit-frontend-embed

Embed ChatKit frontend UI into Next.js, React, or vanilla JavaScript web frontends.

2|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/zeeshan080/ai-native-robotics --skill openai-chatkit-frontend-embed
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openai-chatkit-frontend-embed
Source: https://github.com/zeeshan080/ai-native-robotics/tree/main/.claude/skills/openai-chatkit-frontend-embed-skill
Command: npx skills add https://github.com/zeeshan080/ai-native-robotics --skill openai-chatkit-frontend-embed

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables developers to embed the ChatKit frontend UI into any web platform (Next.js, React, or vanilla JS) and configure it to connect with either OpenAI-hosted workflows or a custom backend, including auth, domain allowlists, file uploads, and debugging.

Core Features & Use Cases

  • Frontend embedding for Next.js / React / vanilla JS
  • Hosted workflow mode with a domain key
  • Custom backend mode with api.url, fetch, uploadStrategy, domainKey
  • Auth integration and debugging

Quick Start

Create a chatkit-widget element in your page, set api-url to your backend, and mount. If using hosted workflows, configure domain-key and obtain a client token from your backend token endpoint.

Frequently Asked Questions about openai-chatkit-frontend-embed

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I embed ChatKit UI into my React or Next.js frontend?

Embed ChatKit UI by creating a chatkit-widget element in your page and configuring it with either a workflowId plus client token (for hosted workflows) or an api.url plus fetch handler (for custom backends). Mount the widget to enable browser-based chat powered by OpenAI agents.

What's the difference between hosted workflow mode and custom backend mode in ChatKit embedding?

Hosted workflow mode uses a domain key and client token obtained from your backend token endpoint for OpenAI Agent Builder workflows. Custom backend mode connects directly via api.url and fetch, giving you full control over authentication and data handling in your own backend.

How do I configure domain allowlisting and file uploads for embedded ChatKit?

Configure domain allowlisting by passing the domainKey parameter during ChatKit client initialization. For file uploads, set your uploadStrategy in the client configuration to handle direct upload handling securely with proper header injection.

Can I use ChatKit embedding in vanilla JavaScript, or only React and Next.js?

ChatKit embedding works in vanilla JavaScript, React, and Next.js frontends. Create a chatkit-widget element, configure your connection method (hosted or custom backend), and mount it—no framework dependency required.

Why is my embedded ChatKit widget showing blank or not functioning?

Blank or malfunctioning widgets typically result from incorrect api.url configuration, missing or invalid client tokens, improper domain allowlisting, or misconfigured fetch handlers. Verify your backend connection method, token validity, and domainKey settings during initialization.

Do I need a custom backend to use ChatKit embedding, or can I use OpenAI's hosted workflows?

ChatKit embedding supports both approaches: use OpenAI Agent Builder hosted workflows with a domain key and client token for quick setup, or build a custom backend with api.url and fetch for complete control over authentication and backend logic.