> ## 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.

# Szybki start

> Wykonaj pierwszy request API w mniej niż 2 minuty

## Krok 1: Utwórz klucz API

Przejdź do [Panelu Aigmented](https://aigmented.io) → Ustawienia → Klucze API → **Utwórz nowy klucz**.

Skopiuj klucz — zaczyna się od `sk-` i jest pokazywany tylko raz.

<Note>
  Potrzebujesz roli **Moderator** lub wyższej, aby tworzyć i używać kluczy API. Użytkownicy z rolą User nie mają dostępu do API.
</Note>

## Krok 2: Wylistuj kolekcje

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

Otrzymasz listę kolekcji wiedzy z ich identyfikatorami:

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

## Krok 3: Zadaj pytanie

Użyj ID kolekcji, aby zadać pytanie:

```bash theme={null}
curl -X POST https://aigmented.io/api/v1/collections/49/ask \
  -H "Authorization: Bearer sk-TWOJ_KLUCZ_API" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Jakie są główne funkcje?",
    "mode": "fast"
  }'
```

Odpowiedź:

```json theme={null}
{
  "answer": "Główne funkcje obejmują...",
  "sources": [
    { "card_id": "abc123", "title": "Przegląd produktu", "score": 0.95 }
  ],
  "model": "google/gemini-3-flash-preview",
  "tokens_used": { "llm_prompt": 621, "llm_completion": 84 }
}
```

## Następne kroki

<CardGroup cols={2}>
  <Card title="Uwierzytelnianie" icon="key" href="/docs/authentication">
    Dowiedz się o kluczach API, rolach i limitach tokenów.
  </Card>

  <Card title="Wyszukiwanie i pytania" icon="magnifying-glass" href="/docs/guides/search-and-ask">
    Poznaj filtry wyszukiwania, streaming i rozmowy wieloturowe.
  </Card>
</CardGroup>
