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

# Quickstart

> Make your first API request in under 2 minutes

## Step 1: Create an API key

Go to your [Aigmented Dashboard](https://aigmented.io) → Settings → API Keys → **Create New Key**.

Copy the key — it starts with `sk-` and is shown only once.

<Note>
  You need **Moderator** role or above to create and use API keys. Users with the basic User role cannot access the API.
</Note>

## Step 2: List your collections

```bash theme={null}
curl https://aigmented.io/api/v1/collections/list \
  -H "Authorization: Bearer sk-YOUR_API_KEY"
```

You'll get a list of your knowledge collections with their IDs:

```json theme={null}
{
  "message": "List of collections",
  "data": [
    {
      "id": 49,
      "name": "Product Documentation",
      "status": "processed",
      "_count": { "knowledgeCards": 1248 }
    }
  ]
}
```

## Step 3: Ask a question

Use the collection ID to ask a question:

```bash theme={null}
curl -X POST https://aigmented.io/api/v1/collections/49/ask \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What are the main features?",
    "mode": "fast"
  }'
```

Response:

```json theme={null}
{
  "answer": "The main features include...",
  "sources": [
    { "card_id": "abc123", "title": "Product Overview", "score": 0.95 }
  ],
  "model": "google/gemini-3-flash-preview",
  "tokens_used": { "llm_prompt": 621, "llm_completion": 84 }
}
```

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/docs/authentication">
    Learn about API keys, roles, and token limits.
  </Card>

  <Card title="Search & Ask" icon="magnifying-glass" href="/docs/guides/search-and-ask">
    Explore search filters, streaming, and multi-turn conversations.
  </Card>
</CardGroup>
