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

# Quickstart

> Run your first search in about five minutes

This guide creates an index, adds one document, and searches it with `curl`.

<Warning>
  Run these commands from a trusted machine or backend. Never expose your API key in browser code.
</Warning>

<Steps>
  <Step title="Set your credentials">
    Use the production API URL and the API key supplied during onboarding.

    ```bash theme={null}
    export BREADBOWL_API_URL="https://embed.breadbowl.ai"
    export BREADBOWL_API_KEY="qkv_live_..."
    ```
  </Step>

  <Step title="Create an index">
    ```bash theme={null}
    curl --fail-with-body --silent --show-error \
      "$BREADBOWL_API_URL/v1/indexes" \
      -H "Authorization: Bearer $BREADBOWL_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"name":"quickstart","text_retention":"none"}'
    ```

    Copy the `id` from the response, then set it for the next requests:

    ```bash theme={null}
    export BREADBOWL_INDEX_ID="paste-index-id-here"
    ```
  </Step>

  <Step title="Add a document">
    ```bash theme={null}
    curl --fail-with-body --silent --show-error \
      "$BREADBOWL_API_URL/v1/indexes/$BREADBOWL_INDEX_ID/documents" \
      -H "Authorization: Bearer $BREADBOWL_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "documents": [{
          "doc_id": "refund-policy",
          "text": "Refund requests are accepted within 30 days of purchase.",
          "metadata": {"status": "published"}
        }]
      }'
    ```

    A successful response has `"upserted_documents": 1` and `"failed": []`.
  </Step>

  <Step title="Search">
    ```bash theme={null}
    curl --fail-with-body --silent --show-error \
      "$BREADBOWL_API_URL/v1/indexes/$BREADBOWL_INDEX_ID/search" \
      -H "Authorization: Bearer $BREADBOWL_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query":"How long do I have to request a refund?"}'
    ```

    The first result should reference `refund-policy`. In your application, use its `doc_id` to load the original text from your own datastore.
  </Step>
</Steps>

Next, learn how to [ingest documents](/guides/ingest-documents), [use search results](/guides/search), or browse the [complete API reference](/api-reference/overview).
