# Key Generator

## /keygen

This endpoint generates random keys based on the specified style provided in the query parameters. Supported styles include 'codeigniter encryption keys', '256-bit wep keys', '160-bit wpa key', '504-bit wpa key', '64-bit wep keys', '128-bit wep keys', '152-bit wep keys', 'serial', 'serial2', and 'serial3'. If the style is not provided or invalid, it returns a 400 error with a corresponding message.

### Query Parameters

| Parameter | Type   | Description                            |
| --------- | ------ | -------------------------------------- |
| `style`   | String | The format type for the generated key. |

### Responses

**Content-Type:** application/json

**Body:**

```json
{
    "key": "ABCD-EFGH-IJKL-MNOP"
}
```

### Serial Style

Formats the raw key to resemble a serial key based on the specified format type. Supports three format types:

* `'serial'`: Formats to `XXXX-XXXX-XXXX` where `X` represents a character.
* `'serial2'`: Formats to `XXXXX-XXXXX-XXXXX`.
* `'serial3'`: Formats to `XXXXX-XXX-XXXXX-XXX`. If no format type matches, it returns the raw key without any formatting.

### Other Styles

```javascript
256-bit wep keys
```

```javascript
160-bit wpa key
```

```javascript
504-bit wpa key
```

```javascript
64-bit wep keys
```

```javascript
128-bit wep keys
```

```javascript
152-bit wep keys
```

#### Note

* This API is intended for generating random keys for various purposes such as software licenses, access tokens, etc.
