> For the complete documentation index, see [llms.txt](https://p1ngul1n0.gitbook.io/blackbird/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://p1ngul1n0.gitbook.io/blackbird/ai.md).

# AI

<figure><img src="https://1031369145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkLJ7DVQV2cKs9DodD0DI%2Fuploads%2F3BPhoE4eWkNIml3Y8sqf%2Fai-demo.png?alt=media&amp;token=f7c0adbf-c52b-4046-9936-419256842780" alt=""><figcaption></figcaption></figure>

Blackbird supports AI analysis to generate behavioral insights based on the sites where a username or email is found.

### 🔧 Setup

To enable AI analysis:

1. Generate an API key:

```bash
python blackbird.py --setup-ai
```

> The API key is stored locally in a file named `.ai_key.json`.

2. Run a search with the `--ai` flag:

```bash
python blackbird.py --username johndoe --ai
```

### 📄 Export

AI-generated summaries are also included in the exported PDF reports.

<figure><img src="https://1031369145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkLJ7DVQV2cKs9DodD0DI%2Fuploads%2Fr2Cfu87gVGoWTpyKb55s%2Fai-pdf.png?alt=media&amp;token=818ebdef-d3a4-466f-9eb2-63129279f622" alt="" width="515"><figcaption></figcaption></figure>

### 📊 Rate Limits and Quotas

AI usage is **free** but subject to a daily quota.\
Each user can run a limited number of AI-enhanced searches per day. Once the limit is reached, access is temporarily restricted to prevent abuse and ensure fair usage for all users.

### 🔐 Privacy and Data Handling

Blackbird does **not** send any personal or sensitive information to the AI API.\
Only the **names of the discovered sites** are transmitted for analysis.\
No data is stored or retained after the response is generated.

#### Example of data sent to the AI API:

```json
{"prompt": "DigitalOcean, X, Reddit"}
```

### 💬 Questions and Suggestions

If you have suggestions, feedback, or questions about the AI API, feel free to [open an issue](https://github.com/p1ngul1n0/blackbird/issues) on the GitHub repository.
