# 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"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pyauthgg.xfuey.dev/administration/licenses/generatelicense.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
