Works with Next.js Docs

AI assistant for Next.js documentation sites

Whether you use Nextra, Fumadocs, or a custom Next.js docs setup, AIML.chat integrates seamlessly with one script tag. No SSR changes, no API routes to add.

Why use AIML.chat with Next.js Docs?

  • Works with Nextra, Fumadocs, and custom Next.js docs
  • Next.js Script component handles optimal loading
  • Compatible with App Router and Pages Router
  • No API routes or server components needed

Installation

Get up and running in under 5 minutes. No backend changes needed.

// app/layout.tsx — add the Script component
import Script from 'next/script'

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          src="https://cdn.aiml.chat/v1/widget.js"
          data-api-key="YOUR_API_KEY"
          data-website-id="YOUR_WEBSITE_ID"
          strategy="lazyOnload"
        />
      </body>
    </html>
  )
}

The embed snippet

This is all that goes on your page. No other dependencies.

import Script from 'next/script'

<Script
  src="https://cdn.aiml.chat/v1/widget.js"
  data-api-key="YOUR_API_KEY"
  data-website-id="YOUR_WEBSITE_ID"
  strategy="lazyOnload"
/>

Ready to add AI to your Next.js Docs site?

Free plan includes 100 messages/month, 50 pages, and no credit card required.

Start for free →