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

# Quickstart: your first cited answer

> Go from an empty organisation to a grounded answer: connect a source, wait for ingestion, create an assistant and ask it a question, using only the HTTP API.

Getting a first cited answer takes four steps: create a **collection**, add a **source** and sync it, create an **assistant** over that collection, then ask it a question. All four are below, taking an empty organisation to a grounded, cited answer.

It uses the HTTP API throughout, so each step can be copied as-is. The console equivalents are noted where they exist.

## Before you begin

You need:

* A MITHUNAI organisation. Your MITHUNAI administrator provisions organisations; there is no self-service sign-up.
* An **API key** with the **Editor** role or higher. An Owner or Administrator creates it in the console under **Operations → API keys**. See [API keys](/administration/api-keys).
* A documentation site, sitemap, GitHub repository or set of files to answer from.

Set two environment variables. Every example below uses them.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
export MITHUNAI_URL="https://app.mithunai.com"  # your MITHUNAI host
export MITHUNAI_API_KEY="arukz_sk_..."          # the key you created
```

<Warning>
  An API key is a secret. Keep it on servers and in secret managers. Never put it in a web page, a
  mobile app or a repository.
</Warning>

<Steps>
  <Step title="Confirm a model is available">
    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    curl "$MITHUNAI_URL/arukz/api/v1/models" \
      --header "Authorization: Bearer $MITHUNAI_API_KEY"
    ```

    Pick a model whose `capabilities` include `chat` and save its `id`, such as `openai/gpt-4o`, as `MODEL_ID`. If the list is empty, contact your MITHUNAI administrator; no model provider is configured.
  </Step>

  <Step title="Create a collection">
    A collection is the corpus an assistant answers from. Its embedding model is fixed when you create it.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    curl --request POST "$MITHUNAI_URL/arukz/api/v1/knowledge/collections" \
      --header "Authorization: Bearer $MITHUNAI_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{"name": "Product documentation"}'
    ```

    Save the `id` from the response as `COLLECTION_ID`.

    <Note>
      In the console, the **Knowledge** page creates a collection for you the first time you connect a source.
    </Note>
  </Step>

  <Step title="Connect a knowledge source">
    Register your documentation site. A sitemap is usually faster and more complete than a crawl; see [Knowledge sources](/knowledge/sources) for every source type.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    curl --request POST "$MITHUNAI_URL/arukz/api/v1/knowledge/sources" \
      --header "Authorization: Bearer $MITHUNAI_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "collection_id": "'"$COLLECTION_ID"'",
        "source_type": "sitemap",
        "name": "Docs site",
        "configuration": { "seed_url": "https://docs.example.com/sitemap.xml" }
      }'
    ```

    Save the source `id` as `SOURCE_ID`. In the console: **Knowledge → Connect a knowledge source**.
  </Step>

  <Step title="Ingest it">
    Registering a source does not read it. Start an ingestion job, then poll it until it finishes.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    curl --request POST "$MITHUNAI_URL/arukz/api/v1/knowledge/sources/$SOURCE_ID/sync" \
      --header "Authorization: Bearer $MITHUNAI_API_KEY"

    curl "$MITHUNAI_URL/arukz/api/v1/knowledge/sources/$SOURCE_ID/job" \
      --header "Authorization: Bearer $MITHUNAI_API_KEY"
    ```

    Ingestion runs in the background and a large site takes minutes. Wait for the job to complete before asking questions. See [Ingestion](/knowledge/ingestion).
  </Step>

  <Step title="Create an assistant over the collection">
    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    curl --request POST "$MITHUNAI_URL/arukz/api/v1/assistants" \
      --header "Authorization: Bearer $MITHUNAI_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "name": "Docs assistant",
        "model": "'"$MODEL_ID"'",
        "knowledge_base_ids": ["'"$COLLECTION_ID"'"]
      }'
    ```

    Save the assistant `id` as `ASSISTANT_ID`. Without `model`, an assistant uses `anthropic/claude-sonnet-5`, which answers only if your deployment offers it.

    In the console: **Assistants → New assistant**, then tick the collection under **Knowledge**. See [Create and configure assistants](/assistants/configure).

    <Warning>
      An assistant answers only from the knowledge attached to it, and refuses questions until at least one collection is attached.
    </Warning>
  </Step>

  <Step title="Ask a question">
    Start a conversation, then ask.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    CONVERSATION_ID=$(curl --silent --request POST "$MITHUNAI_URL/arukz/api/v1/conversations" \
      --header "Authorization: Bearer $MITHUNAI_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{"assistant_id": "'"$ASSISTANT_ID"'"}' | jq -r .id)

    curl --request POST "$MITHUNAI_URL/arukz/api/v1/conversations/$CONVERSATION_ID/messages" \
      --header "Authorization: Bearer $MITHUNAI_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{"text": "How do I get started?"}'
    ```

    The response contains the answer and its `citations`. If the answer has `"abstained": true`, your content did not support an answer. That is a correct result, not an error. See [How answers work](/concepts/how-answers-work).

    You can also ask in the console on the **Ask** page.
  </Step>
</Steps>

## Next steps

<Columns cols={2}>
  <Card title="Embed the widget" icon="message-square" href="/channels/widget">
    Put the assistant on your website.
  </Card>

  <Card title="Stream answers" icon="radio" href="/api-reference/streaming">
    Show the answer as it is written.
  </Card>

  <Card title="Test before launch" icon="clipboard-check" href="/assistants/evaluate">
    Check grounded answers and abstentions against your own questions.
  </Card>

  <Card title="Connect MCP clients" icon="plug" href="/channels/mcp">
    Query your knowledge from Claude and IDE assistants.
  </Card>

  <Card title="Compare the channels" icon="share-2" href="/channels/overview">
    Which of the widget, the API and MCP suits who is asking.
  </Card>

  <Card title="When a step goes wrong" icon="life-buoy" href="/resources/troubleshooting">
    Empty model lists, failed ingestion jobs, and what a 401 or 429 means.
  </Card>
</Columns>
