> For the complete documentation index, see [llms.txt](https://pyauthgg.xfuey.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pyauthgg.xfuey.dev/administration/licenses/generatelicense.md).

# GenerateLicense()

| Arguments | Type    | Required | Default |
| --------- | ------- | -------- | ------- |
| Amount    | Integer | True     |         |
| Days      | Integer | True     |         |
| Level     | Integer | True     |         |
| Format    | Integer | True     |         |
| Prefix    | String  | False    |         |
| Length    | Integer | False    |         |

![Available License Formats](/files/-MPl4b8J0TsbHSKWRNVX)

{% hint style="warning" %}
Make sure to pass a prefix if needed.
{% endhint %}

```python
import PyAuthGG

Admin = PyAuthGG.Administration("ADMIN API KEY")

Admin.GenerateLicense(2, 31, 1, 4, "XFUEY", 10)
```

### Success Response

```javascript
{
   "0":"XFUEY-D7A7A2HURO",
   "1":"XFUEY-IDBYZHLKPM"
}
```

### Error Response

The following error is returned when a prefix format does not get a prefix passed.

```javascript
{
   "status":"failed",
   "info":"No prefix"
}
```
