> For the complete documentation index, see [llms.txt](https://docs.kawaii.red/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kawaii.red/request-structure.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.kawaii.red/request-structure.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
