AI Face Swap
Easily Embed AI Face Swap Plugin

Copy the snippet below then paste it into your website builder. You can make an AI app in minutes not months.

Try this AI plugin on your website

Copy the code below and paste it into your website.

<div id='basedlabs-embed' data-id='ec445ed1-3a77-4867-b602-c31cee28c944' data-mode='shadow' data-lazyload='true' data-dark-mode='false'></div>
<script async type='text/javascript' src='https://basedlabs.ai/embeds/embedComponent.js'></script>

For Next.js SSR

Copy the useEffect code and add it within your React component.

function HomePage() {
  useEffect(() => {
    const script = document.createElement('script');
    script.src = 'https://basedlabs.ai/embeds/embedComponent.js';
    script.async = true;

    script.onload = () => {
      if (window.initializeEmbedComponent) {
        window.initializeEmbedComponent();
      } else {
        console.error('initializeEmbedComponent is not available on window');
      }
    };

    document.body.appendChild(script);

    return () => {
      document.body.removeChild(script);
    };
  }, []);

  return (
    <main>
      <Head>
        <title>Hi</title>
      </Head>
      <section className='bg-white'>
        <div className='layout relative flex min-h-screen flex-col items-center justify-center py-12 text-center'>
          <div
            id='basedlabs-embed'
            data-id='ec445ed1-3a77-4867-b602-c31cee28c944'
            data-mode='shadow'
            data-lazyload='true'
            data-dark-mode='false'
          ></div>
        </div>
      </section>
    </main>
  );
}

Frequently asked questions