Documentation
Images
Get a Random Image File

Get a Random Image File

This endpoint allows you to get a redirect to a random image's file URL, filtering by tags, characters, artists, etc.

Endpoint Details

  • URL: /v3/images/random
  • Method: GET
  • Response: JSON

Parameters

LocationNameTypeDescriptionRequired
QueryratingArray of strings [safe, suggestive, borderline, explicit]The (age) rating of the image.No
Queryis_originalBooleanWhether the image's idea is original or it uses characters/settings/content from another place (not original).No
Queryis_screenshotBooleanWhether the image is a screenshot of an anime ep./manga page.No
Queryis_flaggedBooleanWhether the image is flagged by mods.No
Queryis_animatedBooleanWhether the image is animated or not. This'll become useful in the future when we add GIFs.No
QueryartistArray of integersThe artist's ID.No
QuerycharacterArray of integersThe character's ID.No
QuerytagArray of integersThe tag's ID.No

Example Request

random_image_file.py
import requests
 
res = requests.get("https://api.nekosapi.com/v3/images/random/file")
res.raise_for_status()
 
data = res.content