# Retrieve NSFW media

### Fetch available types and categories

<mark style="color:green;">`GET`</mark>` ``https//api.hentaicord.net/image/types`

Fetch arrays of available types and categories.

#### **Headers**

| Name          | Value            |
| ------------- | ---------------- |
| Authorization | Your token here. |

| Name          | Value            |
| ------------- | ---------------- |
| Authorization | Your token here. |

#### **Response**

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

```json
{
    code: 200,
    message: "Here's an array of our available types and their associated categories.",
    data: [
      { type1: [ "category1", "category2", "category3" ] },
      { type2: [ "category4", "category5", "category6" ] },
      // And so forth...
    ],
    requestsLeft: 499, // Requests you have remaining.
    refreshIn: UnixTimestamp // Time until midnight (UK / London timezone)
}
```

{% endtab %}

{% tab title="500" %}

```json
{
    code: 500,
    message: "Internal Server Error",
    requestsLeft: 499, // Requests you have remaining.
    refreshIn: UnixTimestamp // Time until midnight (UK / London timezone)
}
```

{% endtab %}
{% endtabs %}

***

### Fetch random image from specified type and category

<mark style="color:green;">`GET`</mark>` ``https//api.hentaicord.net/image/fetch/:type/:category`

#### Headers

| Name          | Value            |
| ------------- | ---------------- |
| Authorization | Your token here. |

#### Response

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

```json
{
    code: 200,
    message: "Here's a random image from your specified type and category.",
    data: {
      imageUrl: "https://api.hentaicord.net/assets/:type/:category/image.{ext}",
      chosen: {
        type: "YourSelectedType",
        category: "YourSelectedCategory"
      }
    },
    requestsLeft: 499, // Requests you have remaining.
    refreshIn: UnixTimestamp // Time until midnight (UK / London timezone)
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    code: 400,
    message: "The type or category you supplied is incorrect",
    requestsLeft: 499, // Requests you have remaining.
    refreshIn: UnixTimestamp // Time until midnight (UK / London timezone)
}
```

{% endtab %}

{% tab title="500" %}

```json
{
    code: 500,
    message: "Internal Server Error",
    requestsLeft: 499, // Requests you have remaining.
    refreshIn: UnixTimestamp // Time until midnight (UK / London timezone)
}
```

{% endtab %}
{% endtabs %}
