Sasaki API


Introduction

The Sasaki API is a simple image API that allows you to easily access a large number of different anime images. The API is maintained continuously and images are added continuously to offer a huge selection of images. 

Url structure

1
http://api.sasaki.me:4444/{endpoint}

The url always remains the same except for the last element which is changed to the desired endpoint, the list of possible endpoints can be found below.

Get example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import asyncio
import aiohttp

async def main():
    async with aiohttp.ClientSession() as session:
        async with session.get(f"http://api.sasaki.me:4444/kiss") as response:
            image = await response.text()
            print(image)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

>>> response: https://api.sasaki.me/images/kiss/kiss7.gif

In this example aiohttp is used for the request, of course this can also be done with other packages. Basically it is just a url get request and then reading the text from the website.

Bot example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
import aiohttp, discord
from discord.ext import commands

bot = commands.Bot(command_prefix="!", intents=discord.Intents.default())

@bot.event
async def on_ready():
    print('Bot is online')

@bot.command()
async def kiss(ctx, user: discord.User = None):
    async with aiohttp.ClientSession() as session:
        async with session.get(f"http://api.sasaki.me:4444/kiss") as response:
            image = await response.text()
    if user:
        embed = discord.Embed(title=f'{ctx.author.name} kisses {user.name}')
    else:
        embed = discord.Embed(title=f'{ctx.author.name} kisses someone')
    embed.set_image(url=image)
    await ctx.send(embed=embed)

bot.run('Bot-Token')

This example is the same as the get example, but written to be a discord bot.

API Endpoints

alarm, amazing, ask, baka, bite, blush, blyat, coffee, confused, cry, cuddle, cute, dance, destroy, die, dodge, error, facedesk, facepalm, fbi, fightme, fuckyou, happy, hide, highfive, hug, kill, kiss, laugh, lick, lonely, love, mad, nom, nosebleed, nothanks, ok, pat, poke, pout, puke, punch, purr, pusheen, run, scared, scream, shocked, shoot, shrug, slap, sleepy, smile, smoke, smug, spin, stare, stomp, stone, tickle, trap, triggered, uwu, wasted, wave, wiggle, yeet