> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dmly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect OpenAI

> Connect an OpenAI API key so your flows can reply with AI, search your documents and call tools.

DMLY does not ship its own AI — you bring your own provider account and key. Connecting one
unlocks the AI step in the flow builder, so your bot can write replies, look things up in your
own documents and take actions on a contact. OpenAI is one of four providers you can connect;
it is the only one that supports every AI capability DMLY offers.

<Note>
  The AI providers are plan-gated. If AI isn't included in your plan, the tiles still appear but
  you can't open them — see [Plan gating](#plan-gating) below and [Plans](/billing/plans).
</Note>

## Connect your key

<Steps>
  <Step title="Create an API key at OpenAI">
    In your OpenAI account, go to **Settings → API keys** and create a key. It starts with
    `sk-`. Copy it — OpenAI shows the full key only once.
  </Step>

  <Step title="Open the OpenAI tile">
    In DMLY, go to **Integrations** and select the **AI** tab, then select **OpenAI**. The
    panel's **Setup guide** points you to platform.openai.com if you still need a key.
  </Step>

  <Step title="Paste the key and connect">
    Paste the key into **API key** and connect. The tile then reads **Connected**, and the
    knowledge base controls appear on the panel.
  </Step>

  <Step title="Use it in a flow">
    Connecting a provider changes nothing on its own. Open a flow, add the AI step, and pick
    an OpenAI model there. See [AI replies](/automation/ai-replies).
  </Step>
</Steps>

<Warning>
  The API key is a password to your OpenAI account. Anyone with it can spend against your
  OpenAI billing. Create a key for DMLY alone so you can revoke it without breaking anything
  else.
</Warning>

## What it powers

<Columns cols={2}>
  <Card title="AI replies" icon="comments" href="/automation/ai-replies">
    The AI step writes the reply instead of you scripting it, using your prompt and the
    conversation so far.
  </Card>

  <Card title="File search" icon="file-magnifying-glass" href="/integrations/knowledge-base">
    The AI searches documents you've uploaded — your price list, policies, FAQs — and answers
    from them.
  </Card>

  <Card title="Web search" icon="globe">
    The AI can look something up on the web while writing a reply.
  </Card>

  <Card title="Tools" icon="wrench" href="/automation/ai-agent-tools">
    The AI can tag a contact, book an appointment and use the other actions you allow it.
  </Card>
</Columns>

## Your knowledge base

The AI's knowledge base is built from **Vector stores** on the OpenAI panel: a store is a group
of documents the AI can search while it writes a reply. Create a store, then add documents to
it — upload a **PDF, TXT or MD up to 20 MB**, or paste a web address and DMLY fetches the page
and indexes it for you.

Uploading documents doesn't make the AI use them. In the flow's AI step you turn on **Document
search (File Search)** and pick which stores that step can read. If no store is picked, the AI answers from
its own general knowledge and your prompt only. Full detail in
[Knowledge base](/integrations/knowledge-base).

<Note>
  Vector stores exist only for OpenAI and Google Gemini. Claude and DeepSeek can't search your
  documents at all — if a knowledge base matters to you, those two are not an option.
</Note>

## Try it before it goes live

The AI step's **Playground** tab in the flow builder lets you send a test message and see the
reply the AI would produce, along with which tools it decided to call. Nothing there reaches a
real contact: no message is sent, nothing lands in the [Inbox](/inbox/overview), and contact
actions are simulated rather than actually applied. It's the safe place to check a prompt
before you publish the flow.

## Choosing a provider

All four AI providers connect the same way — an API key on their tile in the **AI** tab. They
differ in what the AI can then do:

| Provider          | AI replies | File search | Web search | Tools | Reasoning effort |
| ----------------- | ---------- | ----------- | ---------- | ----- | ---------------- |
| **OpenAI**        | Yes        | Yes         | Yes        | Yes   | Yes              |
| **Google Gemini** | Yes        | Yes         | Yes        | Yes   | No               |
| **Claude**        | Yes        | No          | Yes        | Yes   | No               |
| **DeepSeek**      | Yes        | No          | No         | Yes   | No               |

<Tip>
  If you're not sure, start with OpenAI. It's the only provider where every capability is
  available.
</Tip>

## Plan gating

<Accordion title="What you see when AI isn't in your plan">
  The four AI tiles — **OpenAI**, **Claude**, **Google Gemini** and **DeepSeek** — stay visible
  on the **Integrations** page so you can see what's there, but they don't open. Each tile shows
  a **Plan locked** badge instead of its status badge, and the action reads
  **Upgrade**. Selecting the tile shows: *"The AI Agent isn't included in your plan. Upgrade to
  connect OpenAI, Claude, Gemini or DeepSeek."*

  Whether AI is included depends on your plan — see [Plans](/billing/plans) and
  [Upgrading](/billing/upgrading-downgrading).
</Accordion>

<Accordion title="You had AI connected and it stopped working">
  The gate is enforced on the server, not just on the tile. If a workspace moves to a plan
  without AI, an OpenAI key that's already connected stays stored but is no longer usable:
  connecting or re-saving a key, the vector stores and the Playground are all blocked, and the
  AI step is skipped when a flow runs. Move back to a plan that includes AI and the same key
  works again — you don't need to reconnect.
</Accordion>
