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.

Know a better stack?

Share your favourite tool combination with the community.

Suggest a stack