Here's an example of fetching an irl-random image with the irl-random endpoint. Returns a random image from any of our real pornography endpoints.

Fetching an irl-random image

Get an irl-random image & its details.


    "id": 65,
    "url": ""

Python example:

import aiohttp

headers = {'Content-type': 'application/json'}
async with aiohttp.ClientSession(headers=headers) as session:
    async with session.get('') as resp:
        image = await resp.json()

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

Last updated