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

# Quickstart

> Créer un compte, obtenir une clé API, faire une extraction

## Étape 1 : créer un compte

Créez un compte et vérifiez votre email. L’email doit être vérifié pour se connecter.

```bash theme={null}
curl -X POST https://api.kiriku.app/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@example.com",
    "password": "StrongPassw0rd!",
    "firstName": "Ada",
    "lastName": "Lovelace"
  }'
```

Vous recevez un email de vérification. Vous pouvez aussi valider via l’API :

```bash theme={null}
curl -X POST https://api.kiriku.app/v1/auth/verify-email \
  -H "Content-Type: application/json" \
  -d '{ "token": "<VERIFY_TOKEN>" }'
```

## Étape 2 : se connecter et obtenir un JWT

```bash theme={null}
curl -X POST https://api.kiriku.app/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@example.com",
    "password": "StrongPassw0rd!"
  }'
```

Utilisez ensuite le `accessToken` JWT :

```txt theme={null}
Authorization: Bearer <JWT>
```

## Étape 3 : créer une clé API

Une clé API est recommandée pour vos backends.

```bash theme={null}
curl -X POST https://api.kiriku.app/v1/api-keys \
  -H "Authorization: Bearer <JWT>" \
  -H "Content-Type: application/json" \
  -d '{ "name": "backend-prod" }'
```

## Étape 4 : faire une extraction

```bash theme={null}
curl -X POST https://api.kiriku.app/v1/extract \
  -H "X-API-Key: sk_live_..." \
  -F "file=@/path/to/cni_recto.jpg" \
  -F "documentType=cni-senegal" \
  -F "fraudCheck=true" \
  -F "returnConfidence=true" \
  -F "returnRawText=false"
```

## Étape 5 : suivre le résultat

Pour l’async, utilisez `POST /v1/extract/async` puis récupérez avec `GET /v1/extractions/:id`.
