# Request Structure

### Base Url

The base url to retrieve the api is this:

```python
https://kawaii.red/api/
```

{% hint style="info" %}
The output urls are under the domain api.kawaii.red this cannot be used as base url.
{% endhint %}

### Main Endpoint

The main endpoint categorizes the sub endpoints, there are the following main endpoints:

#### Text Endpoint:

```python
https://kawaii.red/api/txt/
```

#### Image Endpoint:

```python
https://kawaii.red/api/png/
```

#### GIF Endpoint:

```python
https://kawaii.red/api/gif/
```

#### Stats Endpoint:

```python
https://kawaii.red/api/stats/
```

### Sub Endpoint

This is the true endpoint here you define exactly what you want from the API.

```python
https://kawaii.red/api/gif/kiss/
```

To see a list of all endpoints either add the term "endpoints" as sub endpoint or look at the category list:

{% content-ref url="/pages/-M\_UQGZPoAj0mgfc9pIz" %}
[Text](/endpoints/text.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M\_UQE\_tWKlRG-RqsYfg" %}
[Image](/endpoints/image.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M\_UQECYnBsIAeROjcLS" %}
[GIF](/endpoints/gif.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M\_UQ9MzoaRoHr\_o8P3X" %}
[Stats](/endpoints/stats.md)
{% endcontent-ref %}

### Token

The token is essential to associate your api requests to you and to display the stats correctly.

```python
https://kawaii.red/api/gif/kiss?token=token
```

#### If you want to know more check here:

{% content-ref url="/pages/-M\_UZVfoYQK8dSdPFBQC" %}
[Token](/tutorials/token.md)
{% endcontent-ref %}

### Type

Type is an optional argument that affects the output of the api, you can choose between json and text.

```python
https://kawaii.red/api/gif/kiss?token=token&type=type
```

#### If you want to know more check here:

{% content-ref url="/pages/-M\_Brp1ZsfqLyVUsEqka" %}
[Request Structure](/request-structure.md)
{% endcontent-ref %}

{% hint style="info" %}
The default type is json.
{% endhint %}

### Filter

Filter is an optional argument that affects the output of the api, you can basically filter out every response.

```python
https://kawaii.red/api/gif/kiss?token=token&filter=filter
```

#### If you want to know more check here:

{% content-ref url="/pages/-M\_UanzCV92kIDP1Eibr" %}
[Filter](/tutorials/filter.md)
{% endcontent-ref %}

{% hint style="warning" %}
The filter must be a array of integers.
{% endhint %}

### Using multiple arguments

If you want to use more than one argument, which occurs as soon as you use the type or the filter, you have to separate them with a &.

```python
https://kawaii.red/api/gif/kiss?token=token&type=type&filter=filter
```

{% hint style="danger" %}
The omission of the & can lead to the fact that only one argument is recognized.
{% endhint %}


---

# 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://docs.kawaii.red/request-structure.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.
