chatkit-js

Integrate OpenAI ChatKit UI components into Next.js applications with a configurable backend API.

Updated Dec 28, 2025
One-click install
npx skills add https://github.com/shuremali02/The-Evolution-of-Todo---Mastering-Spec-Driven-Development---Cloud-Native-AI --skill chatkit-js-shuremali02
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chatkit-js
Source: https://github.com/shuremali02/The-Evolution-of-Todo---Mastering-Spec-Driven-Development---Cloud-Native-AI/tree/main/.claude/skills/chatkit-js
Command: npx skills add https://github.com/shuremali02/The-Evolution-of-Todo---Mastering-Spec-Driven-Development---Cloud-Native-AI --skill chatkit-js-shuremali02

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Integrate OpenAI ChatKit UI components into Next.js applications with a configurable backend API to deliver rich chat experiences without building UI from scratch.

Core Features & Use Cases

  • Theming and customization to match your app design.
  • Authentication token injection via a custom fetch function for secure API calls.
  • Conversation history management and widget embedding for a seamless chat experience.
  • Deterministic client integration using the useChatKit hook with a pluggable API configuration.

Quick Start

Install the @openai/chatkit-react package and configure a ChatKit client using your API URL and optional domain key to get started.

Frequently Asked Questions about chatkit-js

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

FAQPage Schema
How do I integrate OpenAI ChatKit UI into a Next.js application?

Integrate OpenAI ChatKit UI into Next.js by installing the @openai/chatkit-react package and configuring the client using the useChatKit hook with your backend API URL and domain key. This embeds chat components without building UI from scratch.

How does authentication work with OpenAI ChatKit in React?

Authentication for OpenAI ChatKit in React works by injecting a custom fetch function into the useChatKit hook. This pluggable function handles JWT-based requests securely across frontend and backend boundaries for API calls.

Do I need a backend API to use ChatKit components in Next.js?

Yes, using ChatKit components in Next.js requires a configurable backend API. You must set the NEXT_PUBLIC_CHAT_API_URL and NEXT_PUBLIC_OPENAI_DOMAIN_KEY environment variables to drive the client API configuration.

Can I customize the theme of OpenAI ChatKit widgets?

Yes, you can customize the theme of OpenAI ChatKit widgets to match your application design. The integration supports theming, conversation history management, and seamless widget embedding for a consistent chat experience.

What environment variables are required for OpenAI ChatKit client configuration?

OpenAI ChatKit client configuration requires NEXT_PUBLIC_CHAT_API_URL and NEXT_PUBLIC_OPENAI_DOMAIN_KEY environment variables. These drive the pluggable API configuration and connect the React components to your backend.