Documentation
Rest API
Endpoints

Endpoints

Base url: https://v1.nekosapi.com/api

⚠️

The base URL will be moved to https://api.nekosapi.com/v1 in a few days. If the endpoint stops responding, check the new base endpoint.

GET /

GET/
Information
Returns information about the API such as it's endpoints and version.
Parameters
No parameters
Responses
200: Success
The request was successful.
429: Too many requests
You have made too many requests.
API Wrappers
No wrapper support.

GET /stats

GET/stats
Get current API statistics
Get the current API statistics.
Parameters
No parameters
Responses
200: Success
The request was successful.
429: Too many requests
You have made too many requests.
API Wrappers
No wrapper support.

GET /token

This endpoint requires an access token. You can read more about why we have protected endpoints here.

GET/token
Get token information
Get information about the current access token.
Parameters
Authorization*
token (header)
The access token.
Responses
200: Success
The request was successful.
401: Unauthorized
You have not provided a token.
401: Invalid token
The token provided is not a valid token.
429: Too many requests
You have made too many requests.
API Wrappers
No wrapper support.

GET /image

This is the only endpoint (ignoring /token) that requires authorization. You can read more about why we do this here.

GET/image
Get all images
Returns a list of all available images.
Parameters
Authorization*
token (header)
The access token.
limit
number
The maximum amount of images to get. (max. 25)
offset
number
The number of images to skip.
expiry
number
The amount of time in seconds the link will be valid (until expiry) (requires auth)
Responses
200: Success
The request was successful.
400: Invalid limit
The limit provided is not a number between 1 and 25.
400: Invalid offset
The offset provided is not a number greater than 0.
400: Invalid expiry
The provided custom expiry time is not a number greater than 30.
401: Unauthorized
You have not provided a token.
401: Invalid token
The token provided is not a valid token.
403: Missing permission
The access token provided has not got permission to list all images.
403: Missing permission
The access token provided has not got permission to set a custom image expiry time.
403: Missing permission
The custom expiry time is greater than what allowed by the token.
429: Too many requests
You have made too many requests.
API Wrappers
No wrapper support.

GET /image/random

GET/image/random
Get random images
Returns one or more random images from the specified category.
Parameters
categories
list of strings
The category names that the image should have.
limit
number
The maximum amount of images to get. (max. 25)
expiry
number
The amount of time in seconds the link will be valid (until expiry) (requires auth)
Responses
200: Success
The request was successful.
400: Invalid categories
One or more categories selected do not exist.
400: Invalid limit
The specified limit is not a number between 1 and 25.
400: Invalid expiry
The provided custom expiry time is not a number greater than 30.
401: Invalid token
The token provided is not a valid token.
403: Missing permission
The access token provided has not got permission to set a custom image expiry time.
403: Missing permission
The custom expiry time is greater than what allowed by the token.
429: Too many requests
You have made too many requests.
API Wrappers

GET /image/{id}

GET/image/{id}
Get an image
Get an image by its ID.
Parameters
id*
uuid
The ID of the image to get.
expiry
number
The amount of time in seconds the link will be valid (until expiry) (requires auth)
Responses
200: Success
The request was successful.
400: Invalid ID
The provided ID is not a valid UUID.
401: Invalid token
The token provided is invalid.
403: Missing permission
The access token provided has not got permission to set a custom image expiry time.
403: Missing permission
The custom expiry time is greater than what allowed by the token.
404: Not found
Could not find image with the provided ID.
429: Too many requests
You have made too many requests.
API Wrappers

GET /artist

GET/artist
Search for an artist
Search for an artist/get all artists.
Parameters
limit
number
The maximum number of images to get.
offset
number
The number of images to skip.
search
string
A search query (formatted as specified in the reference page).
Responses
200: Success
The request was successful.
400: Invalid limit
The limit provided is not a number between 1 and 25.
400: Invalid offset
The offset provided is not a number greater than 0.
400: Invalid search query
The search query provided is longer than 50 characters.
401: Invalid token
The token provided is invalid.
429: Too many requests
You have made too many requests.
API Wrappers

GET /artist/{id}

GET/artist/{id}
Get an artist
Get an artist by it's ID.
Parameters
id*
uuid
The artist's ID.
Responses
200: Success
The request was successful.
400: Invalid ID
The provided ID is not a valid UUID.
401: Invalid token
The token provided is invalid.
404: Not found
Could not find an artist with the provided ID.
429: Too many requests
You have made too many requests.
API Wrappers

GET /artist/{id}/images

GET/artist/{id}/images
Get an artist's images
Get all images by an artist.
Parameters
id*
uuid
The artist's ID.
limit
number
The maximum amount of images to get.
offset
number
The number of images to skip.
expiry
number
The amount of time in seconds the link will be valid (until expiry) (requires auth)
Responses
200: Success
The request was successful.
400: Invalid ID
The provided ID is not a valid UUID.
400: Invalid limit
The limit provided is not a number between 1 and 25.
400: Invalid offset
The offset provided is not a number greater than 0.
400: Invalid expiry
The provided custom expiry time is not a number greater than 30.
401: Invalid token
The token provided is invalid.
403: Missing permission
The access token provided has not got permission to set a custom image expiry time.
403: Missing permission
The custom expiry time is greater than what allowed by the token.
404: Not found
Could not find an artist with the provided ID.
429: Too many requests
You have made too many requests.
API Wrappers

GET /character

GET/character
Search for a character
Search for a character or get all available characters.
Parameters
limit
number
The maximum amount of characters to get.
offset
number
The amount of characters to skip.
search
string
A search query (formatted as specified in the reference page).
Responses
200: Success
The request was successful.
400: Invalid limit
The limit provided is not a number between 1 and 25.
400: Invalid offset
The offset provided is not a number greater than 0.
400: Invalid search query
The search query provided is longer than 50 characters.
401: Invalid token
The token provided is invalid.
429: Too many requests
You have made too many requests.
API Wrappers

GET /character/{id}

GET/character/{id}
Get a character
Get a character by its ID.
Parameters
id*
uuid
The ID of the character to get.
Responses
200: Success
The request was successful.
400: Invalid ID
The provided ID is not a valid UUID.
404: Not found
Could not find a character with the provided ID.
429: Too many requests
You have made too many requests.
API Wrappers

GET /category

GET/category
Search for a category
Search for a category or get all available categories.
Parameters
limit
number
The maximum amount of categories to get.
offset
number
The amount of categories to skip.
search
string
A search query (formatted as specified in the reference page).
Responses
200: Success
The request was successful.
400: Invalid limit
The limit provided is not a number between 1 and 25.
400: Invalid offset
The offset provided is not a number greater than 0.
400: Invalid search query
The search query provided is longer than 50 characters.
401: Invalid token
The token provided is invalid.
429: Too many requests
You have made too many requests.
API Wrappers

GET /category/{id}

Get a category by its ID.

GET/category/{id}
Get a category
Get a category by its ID.
Parameters
id*
uuid
The ID of the category to get.
Responses
200: Success
The request was successful.
400: Invalid ID
The provided ID is not a valid UUID.
401: Invalid token
The token provided is invalid.
404: Not found
Could not find a category with the provided ID.
429: Too many requests
You have made too many requests.
API Wrappers