Skip to content

Build an AI chatbot

Give your product a brain. Up and running without managing servers.

  1. 1
    OpenAI

    Create an OpenAI account and generate an API key from the API Keys page. Store this key securely as an environment variable called OPENAI_API_KEY. Choose a model like gpt-4o-mini for cost-effective conversations or gpt-4o for more complex reasoning tasks.

    Open OpenAI
  2. 2
    Vercel AI SDK

    Install the Vercel AI SDK with npm install ai openai. Create an API route that initializes the OpenAI client and uses streamText() to stream responses back to the client. This handles all the complexity of streaming and provides React hooks for your chat UI.

    Open Vercel AI SDK
  3. 3
    Supabase

    Create a conversations table with columns for id, user_id, created_at, and a messages JSONB column to store the chat history. Enable Row Level Security so users can only access their own conversations. Use the Supabase client to save and load conversation history.

    Open Supabase

Estimated Monthly Cost

Verified Apr 2026
Supabase

500 MB DB, 50K MAUs, 1 GB storage, 2 projects

Free

Free

1 tool free at this scale
Est. total$0/mo

Estimates based on publicly listed pricing. Actual costs may vary — always verify on each tool's pricing page.

Frequently asked questions

Costs depend on your scale. Most tools in this stack offer a free tier to start. Open the cost calculator on this page to estimate monthly cost based on your users and revenue.

This stack uses 3 tools: OpenAI, Supabase, Vercel AI SDK. Each tool is picked to work well with the others and to cover a specific part of the workflow.

Yes. The stack is a recommended starting point. You can replace any tool with an alternative you already use. Check the setup guide first to confirm the integration points you'll need to rebuild.

Most makers finish the 3-step setup in under an hour. Creating accounts and connecting the first integration takes the most time.

Have a better stack?

Share your favorite tool combination and help other builders.

Suggest a stack