# Welcome!

## Welcome to **Any** API

Welcome to **Any API**! Here you'll find all the documentation you need to get up and running with the **Any API**.

## Want to jump right in?

Feeling like an eager beaver? Jump in to the quick start docs and get making your first request:

{% content-ref url="/pages/YMBR81onRoagcxtneAer" %}
[Quick Start](/quick-start)
{% endcontent-ref %}

## Want to deep dive?

Dive a little deeper and start exploring our API reference to get an idea of everything that's possible with the API:

{% content-ref url="/pages/24QY6CfbVEsRE6X0iH7j" %}
[API Reference](/reference/api-reference)
{% endcontent-ref %}


# Quick Start

## Get your API keys

Almost all requests don't need an API Key to work, if you need any function that needs it, you can request one from [Any Bot support server](https://discord.gg/5UyuwbNu8j)

## Make your first request

To make your first request, send a request to the `dog` endpoint. This will get a `dog`, which is nice.

## Return Dog

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/dog`

It will return a random photo and a random fact of some dog.

#### Headers

| Name     | Type   | Description            |
| -------- | ------ | ---------------------- |
| API\_KEY | string | You API Key (Optional) |

{% tabs %}
{% tab title="200 Dog successfully returned" %}

```javascript
{
    "message": "OK",
    "image": "http://api.any-bot.tech/img/dog/mydogimage.jpg",
    "fact": "Dogs are the best friends of humans",
    "status": 200
}
```

{% endtab %}
{% endtabs %}

Take a look at how you might call this method using `curl`:

{% tabs %}
{% tab title="JavaScript" %}

```javascript
let xhr = new XMLHttpRequest();

xhr.open("GET", "https://api.any-bot.xyz/api/v1/dog");
xhr.setRequestHeader("API-KEY", "Optional")

xhr.send();

xhr.onload = () => console.log(xhr.responseText);
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl https://api.any-bot.xyz/api/v1/dog
    --header "API-KEY: Optional"  
```

{% endtab %}
{% endtabs %}


# API Reference

Dive into the specifics of each API endpoint by checking out our complete documentation.

## Animals

All the methods associated with `animals`

{% content-ref url="/pages/KkRPSVAHce2HBPElibZE" %}
[Animals](/reference/api-reference/animals)
{% endcontent-ref %}

## Anime

All the methods associated with `anime`:

{% content-ref url="/pages/1sPAU8ca6jreOjn0YIOw" %}
[Anime](/reference/api-reference/anime)
{% endcontent-ref %}

## Utils

All the methods associated with `utils`:

{% content-ref url="/pages/fmwvZ569Ytd7rE0fAo04" %}
[Utils](/reference/api-reference/utils)
{% endcontent-ref %}


# Animals

All routes to obtain animals that exist even now

## Get Dog

## Return Dog

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/dog`

It will return a random photo and a random fact of some dog.

#### Request Body

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200 Dog successfully returned" %}

```javascript
{
    "message": "OK",
    "image": "http://api.any-bot.tech/img/dog/mydogimage.jpg",
    "fact": "Dogs are the best friends of humans",
    "status": 200
}
```

{% endtab %}
{% endtabs %}

## Get Cat

## Return Cat

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/cat`

It will return a random photo and a random fact of some cat.

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK Cat successfully returned" %}

```javascript
{
    "message": "OK",
    "image": "http://api.any-bot.tech/img/cat/mycatimage.jpg",
    "fact": "Cats are very affectionate.",
    "status": 200
}
```

{% endtab %}
{% endtabs %}

## Get **Bear**

## Return Bear

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/bear`

It will return a random photo and a random fact of some bear.

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK Bear successfully returned" %}

```javascript
{
    "message": "OK",
    "image": "http://api.any-bot.tech/img/bear/mybearimage.jpg",
    "fact": "Bears are very hairy.",
    "status": 200
}
```

{% endtab %}
{% endtabs %}

## **Get Bird**

## Return Bird

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/bird`

It will return a random photo and a random fact of some bird.

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK Bird successfully returned" %}

```javascript
{
    "message": "OK",
    "image": "http://api.any-bot.tech/img/bird/mybirdimage.jpg",
    "fact": "Some birds sing in the early morning.",
    "status": 200
}
```

{% endtab %}
{% endtabs %}

## Get **Fox**

## Return Fox

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/fox`

It will return a random photo and a random fact of some **fox**.

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK Fox successfully returned" %}

```javascript
{
    "message": "OK",
    "image": "http://api.any-bot.tech/img/fox/myfoximage.jpg",
    "fact": "Foxes are depicted in animated series as thieves.",
    "status": 200
}
```

{% endtab %}
{% endtabs %}

## **Get Koala**

## Return Koala

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/koala`

It will return a random photo and a random fact of some **koala**.

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK Fox successfully returned" %}

```javascript
{
    "message": "OK",
    "image": "http://api.any-bot.tech/img/koala/mykoalaimage.jpg",
    "fact": "Koalas eat eucalyptus leaves.",
    "status": 200
}
```

{% endtab %}
{% endtabs %}


# Anime

All routes that include some kind of anime thing.

{% hint style="info" %}
**Good to know:** These routes, unlike the animal routes, are animated gifs.
{% endhint %}

## **Wink**

## Return Wink GIF

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/wink`

This will return a **wink** GIF from some anim&#x65;**.**

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK Wink successfully returned" %}

```javascript
{
    "message": "OK",
    "image": "http://api.any-bot.tech/img/wink/mywinkgif.gif",
    "status": 200
}
```

{% endtab %}
{% endtabs %}

## Pat

## Return Pat GIF

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/pat`

This will return a **pat** GIF from some anim&#x65;**.**

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK Pat successfully returned" %}

```javascript
{
    "message": "OK",
    "image": "http://api.any-bot.tech/img/pat/mypatgif.gif",
    "status": 200
}
```

{% endtab %}
{% endtabs %}

## Hug

## Return Hug GIF

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/hug`

This will return a **hug** GIF from some anim&#x65;**.**

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK Hug successfully returned" %}

```javascript
{
    "message": "OK",
    "image": "http://api.any-bot.tech/img/hug/myhuggif.gif",
    "status": 200
}
```

{% endtab %}
{% endtabs %}


# Utils

All routes that do varied things.

{% hint style="warning" %}
**Good to know:** Some routes in this section will require an API Key
{% endhint %}

## Flip Text

## Flip the text

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/fliptext`

All text put into this input will be flipped

#### Query Parameters

| Name                                   | Type   | Description        |
| -------------------------------------- | ------ | ------------------ |
| text<mark style="color:red;">\*</mark> | string | Text to be flipped |

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "message": "OK",
    "text": "Hello World",
    "flipped": "dlroW olleH",
    "status": 200
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "message": "Bad Request",
    "status": 400,
    "error": "text is required",
    "example": "?text=HelloWorld"
}
```

{% endtab %}
{% endtabs %}

## Base64

## Encode to base64

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/base64`

The text that has been put will be coded **based64**

#### Query Parameters

| Name                                   | Type   | Description      |
| -------------------------------------- | ------ | ---------------- |
| text<mark style="color:red;">\*</mark> | string | Text to be coded |

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "message": "OK",
    "text": "Hello World",
    "base64": "SGVsbG8gV29ybGQ=",
    "status": 200
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "message": "Bad Request",
    "status": 400,
    "error": "text is required",
    "example": "?text=HelloWorld"
}
```

{% endtab %}
{% endtabs %}

## Decode to base64

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/decodebase64`

The text that has been put will be decoded **based64**

#### Query Parameters

| Name                                   | Type   | Description        |
| -------------------------------------- | ------ | ------------------ |
| text<mark style="color:red;">\*</mark> | string | Text to be decoded |

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "message": "OK",
    "text": "Hello World",
    "base64": "SGVsbG8gV29ybGQ=",
    "status": 200
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "message": "Bad Request",
    "status": 400,
    "error": "text is required",
    "example": "?text=HelloWorld"
}
```

{% endtab %}
{% endtabs %}

## Binary

## Encode to binary

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/binary`

The text that has been put will be coded **binary**

#### Query Parameters

| Name                                   | Type   | Description      |
| -------------------------------------- | ------ | ---------------- |
| text<mark style="color:red;">\*</mark> | string | Text to be coded |

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "message": "OK",
    "text": "Hello World",
    "binary": "1001000 1100101 1101100 1101100 1101111 100000 1010111 1101111 1110010 1101100 1100100",
    "status": 200
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "message": "Bad Request",
    "status": 400,
    "error": "text is required",
    "example": "?text=HelloWorld"
}
```

{% endtab %}
{% endtabs %}

## Decode to binary

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/decodebinary`

The text that has been put will be decoded **binary**

#### Query Parameters

| Name                                   | Type   | Description        |
| -------------------------------------- | ------ | ------------------ |
| text<mark style="color:red;">\*</mark> | string | Text to be decoded |

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "message": "OK",
    "text": "Hello World",
    "binary": "1001000 1100101 1101100 1101100 1101111 100000 1010111 1101111 1110010 1101100 1100100",
    "status": 200
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "message": "Bad Request",
    "status": 400,
    "error": "text is required",
    "example": "?text=HelloWorld"
}
```

{% endtab %}
{% endtabs %}

## Coin Flip

## Coin Flip

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/coinflip`

Return a random side of a coin<br>

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "message": "OK",
    "result": "heads",
    "status": 200
}
```

{% endtab %}
{% endtabs %}

## Password

## Create a Random Password

<mark style="color:blue;">`GET`</mark> `https://api.any-bot.xyz/api/v1/password`

Create a strong and random password

#### Query Parameters

| Name   | Type   | Description                                    |
| ------ | ------ | ---------------------------------------------- |
| length | number | The desired size of the password (Maximum 200) |

#### Headers

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| API\_KEY | string | Your API Key (Optional) |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "message": "OK",
    "password": "%JWN9+%Ee-",
    "length": 10,
    "status": 200
}
```

{% endtab %}

{% tab title="200: OK Exceeding the allowed limit" %}

```javascript
{
    "message": "OK",
    "password": "-hX5#JmYI+xrbB_Ng8y/Lhtn6pWqg=PBNxCZSLq?PsnSgm/2#2/ms7@UC_h1vhpw&*SsK6qEq/$Al*Jm3Uyd&WoJjKu.c9fs&Jl0xu*CafPo#5HKg@gIjybnFF#4/PV@,_W&N./JDFOfrW$olc30vJkh9QuZ_r5-f@Y7$Km&CtVgK_p7hOW7d0=SLxiYqLDv#/xD2a14",
    "note": "The length of the note is limited to 200 characters",
    "length": 200,
    "status": 200
}
```

{% endtab %}
{% endtabs %}

## Upload

{% hint style="danger" %}
This route necessarily needs an API Key
{% endhint %}

<mark style="color:green;">`POST`</mark> `https://api.any-bot.xyz/api/v1`

#### Query Parameters

| Name                                   | Type   | Description      |
| -------------------------------------- | ------ | ---------------- |
| name<mark style="color:red;">\*</mark> | string | Name of the file |
| url<mark style="color:red;">\*</mark>  | URL    | URL of the file  |
| id<mark style="color:red;">\*</mark>   | number | ID of the file   |

#### Headers

| Name                                       | Type   | Description  |
| ------------------------------------------ | ------ | ------------ |
| API\_KEY<mark style="color:red;">\*</mark> | string | Your API Key |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "message": "File uploaded",
  "name": "123_test",
  "url": "https://api.any-bot.tech/img/uploads/123_test"
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    "message": "API_KEY required"
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
  "message": "Missing parameters"
}
```

{% endtab %}
{% endtabs %}


