In the root of your project, create a .env
file and add your OpenAI API key:
OPENAI_API_KEY=sk-...
npm install @beak/remix --save
# or
yarn add @beak/remix
Create a new wildcard API route in app/routes/beak.$.tsx
:
import { beakHandler } from "@beakjs/remix";
export const action = beakHandler();
const App = () => {
return <Beak baseUrl="/beak">... your app code goes here</Beak>;
};