EK Hub API

Embedded Widget vs Headless API

Understanding the differences between the two integration approaches.

EK Hub offers two ways to integrate AI chat into your application:

Comparison

FeatureEmbedded WidgetHeadless API
UI providedYes (pre-built)No (bring your own)
Auth mechanismAPI key → JWT (20 min)API key per request
Domain validationYes (origin check)No (server-to-server)
CORS handlingBuilt-inNot needed
HeyGen avatarSupportedNot supported
Response buttonsSupportedNot supported
Follow-up suggestionsSupportedSupported
Response formatHTMLMarkdown (default) or HTML
User identityAnonymous (auto UUID)Optional externalUserId
Setup effortMinimal (copy-paste embed code)More (build your own UI)
CustomisationLimited to widget configFull control

When to Use the Embedded Widget

  • You want a quick, drop-in chat solution
  • You don't need deep customisation
  • You want HeyGen avatar support
  • You're embedding in a website and want zero backend work

When to Use the Headless API

  • You want full control over the chat UI design
  • You're building a mobile app, desktop app, or custom web interface
  • You need to integrate chat into an existing application or internal tool
  • You want to build automated workflows or chatbots
  • You need to track users with your own user IDs

Can I Use Both?

Yes! The embedded widget and headless API are completely independent. They share the same agents and knowledge base but use separate session management. You can use the widget on your website and the API for your mobile app simultaneously.

On this page