irl-creampie

Here's an example of fetching an irl-creampie image with the irl-creampie endpoint.

Fetching an irl-creampie image

Get an irl-creampie image & its details.

GET https://nekos.pro/api/irl-creampie

{
    "id": 100,
    "url": "https://cdn.nekos.pro/irl-creampie/3fc5ef00d0654842b7d4be2796947805.png"
}

Python example:

import aiohttp

headers = {'Content-type': 'application/json'}
async with aiohttp.ClientSession(headers=headers) as session:
    async with session.get('https://nekos.pro/api/irl-creampie') as resp:
        image = await resp.json()
        print(image['url'])

This example assumes you are using asyncio & running a Discord bot, which you should be using instead of requests, which is blocking.

Last updated