# Settings (Scan Configuration)

**Scan Configuration** panel allows you to power your security scans using state-of-the-art Artificial Intelligence. By integrating with the Google Gemini API, **Ultimate Security** moves beyond simple file matching to perform deep, contextual code analysis, identifying complex malware that traditional scanners often miss.

### **Setting Up the AI Engine**

To access these settings, click the **Settings** (gear icon) on the top right of the **AI Scanner** dashboard.

#### **1. Engine Selection**

![scan engine](https://docs.wpultimatesecurity.com/wp-content/uploads/2026/02/scan-engine-1.png)

- **Engine:** Select your preferred AI provider.

#### **2. API Integration**

- **API Key:** Paste your unique API key into this field from AI engines. This key is required to connect your site to the AI model.

- **Get API Key:** If you don’t have a key, click the link to generate one from the AI providers.

- **Test Button:** After entering your key, click **Test** to verify that the connection is active and working correctly.

#### **3. Model Selection**

- **Select Model:** Choose the specific AI model to perform the scan.

#### **4. Performance Settings**

![api timeout](https://docs.wpultimatesecurity.com/wp-content/uploads/2026/02/api-time-out-1.png)

- **API Timeout (seconds):** Define how long the plugin should wait for a response from the AI for each file analyzed.

**Range:** 30–600 seconds.

- **Default:** 300 seconds is recommended for most server environments to prevent timeouts on larger files.

### **Notifications & Automation**

Keep your team informed without having to manually check the dashboard.

- **Email Notifications:** Toggle this switch to **ON** to receive a comprehensive summary of every scan directly in your inbox. This includes details on any detected threats or suspicious patterns found by the AI.

### **Advanced Analysis Controls**

![advanced](https://docs.wpultimatesecurity.com/wp-content/uploads/2026/02/advanced-1.png)

#### **Output Mode**

The **Output Mode** dropdown defines the primary objective of the AI analysis.

- **Perform Security Scan:** (Default) The AI scans for malware, backdoors, and known vulnerabilities.

- **Code Audit/Optimization:** Use this mode if you want the AI to analyze your themes or plugins for performance bottlenecks or coding best practices.

#### **Ignored Directories**

To speed up scans and prevent the AI from wasting resources on non-critical files, you can exclude specific folders.

- **Configuration:** Enter comma-separated directory paths relative to the `wp-content` folder.

- **Recommended Exclusions:** Heavy directories like `node_modules`, `vendor`, or large media cache folders should be added here if they do not contain executable PHP code.

#### **Custom AI Prompt**

For advanced users and security researchers, you can override the default AI logic.

- **Custom Prompt:** Enter specific instructions for the AI model to follow during its analysis. For example: *“Focus only on identifying SQL injection patterns in the following files.”*

- **Note:** Leave this field empty to use the **Ultimate Security** default prompt, which is professionally engineered for comprehensive malware detection.

---
Source: https://docs.wpultimatesecurity.com/docs/ai-scanner/settings-scan-configuration/
