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

# Quickstart

> Create a key, add a document, and query it.

<Steps>
  <Step title="Create a key">
    Sign in at [conare.ai/console](https://conare.ai/console) and create an API key. It starts
    with `sk-conare-` and is shown once. Keep it on your server.

    ```bash theme={null}
    export CONARE_API_KEY=sk-conare-...
    ```
  </Step>

  <Step title="Add a document">
    <CodeGroup>
      ```ts TypeScript theme={null}
      import { Conare } from "conare"; // npm install conare

      const conare = new Conare(); // reads CONARE_API_KEY
      const docs = conare.namespace("docs");

      await docs.add({
        id: "refunds",
        text: "Refunds are available for 30 days after purchase.",
        metadata: { team: "support" },
      });
      ```

      ```bash curl theme={null}
      curl https://api.conare.ai/namespaces/docs/documents \
        -H "Authorization: Bearer $CONARE_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{"documents": [{"id": "refunds", "text": "Refunds are available for 30 days after purchase.", "metadata": {"team": "support"}}]}'
      ```
    </CodeGroup>

    The namespace `docs` is created by this first write.
  </Step>

  <Step title="Query">
    <CodeGroup>
      ```ts TypeScript theme={null}
      const results = await docs.query("how do refunds work?", { topK: 5 });
      // [{ id: "refunds", text: "Refunds are available...", score: 0.91, metadata: { team: "support" } }]
      ```

      ```bash curl theme={null}
      curl https://api.conare.ai/namespaces/docs/query \
        -H "Authorization: Bearer $CONARE_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{"query": "how do refunds work?", "top_k": 5}'
      ```
    </CodeGroup>

    Put the results in your model's prompt.
  </Step>
</Steps>

Next: [connect an app](/sources), [filter by metadata](/concepts/filters), or
[add Conare to your agent over MCP](/mcp).
