Enable AI

Enable AI

Prerequisites

You need to sign up and add the Pro package at admin.val.build/connect to have access — see pricing on our pricing page.

If you are just getting started head over to our guide.

Enable experimental AI chat

Then add ai.chat.experimental.enable: true to your val.config:

val.config.ts

import { initVal } from "@valbuild/next";

const { s, c, val, config, nextAppRouter } = initVal({
  defaultTheme: "dark",
  ai: {
    chat: {
      experimental: {
        enable: true,
      },
    },
  },
});

export type { t } from "@valbuild/next";
export { s, c, val, config, nextAppRouter };

Login

If you are using Val locally you must be logged in to use the AI chat. Login via the CLI to authenticate your local project with Val Build:

Bash
npx -p @valbuild/cli val login