Favorites
Get your favorites
By default, this endpoint returns all images in the user favorites, meaning it will also returns lewd images if there are some in the user favorites.
Get your favorites.
GET
https://api.waifu.im/fav
Requires
view_favorites
permission.
Query Parameters
included_tags
array[string]
Force the API to return images with at least all the provided tags.
excluded_tags
array[string]
Force the API to return images without any of the provided tags.
included_files
array[string]
Force the API to provide only the specified file IDs or signatures.
excluded_files
array[string]
Force the API to not list the specified file IDs or signatures.
is_nsfw
string
Force or exclude lewd files (only works if included_tags only contain versatile tags and no nsfw only tag). You can provide 'null' to make it random.
gif
boolean
Force or prevent the API to return .gif files.
order_by
string
Ordering criteria for the images.
orientation
string
Image orientation criteria.
many
boolean
Return an array of 30 files if true.
full
boolean
Returns the full result without any limit (admins only).
width
string
Filter images by width (in pixels). Accepted operators: <=, >=, >, <, !=, =
height
string
Filter images by height (in pixels). Accepted operators: <=, >=, >, <, !=, =
byte_size
string
Filter images by byte size. Accepted operators: <=, >=, >, <, !=, =
Headers
Authorization*
string
Bearer
followed by a space and your token
Here is an example to get your favorites:
Manage your favorites
Inserts an image into the user
POST
https://api.waifu.im/fav/insert
Requires
manage_favorites
permission.
Headers
Authorization*
string
Bearer
followed by a space and your token
Request Body
image_id*
integer
The ID of the image to insert.
user_id
integer
The user ID of the user whose favorites you want to edit.
Here is an example to insert the image ID 8008
into your favorites:
Removes an image from the user
POST
https://api.waifu.im/fav/delete
Requires
manage_favorites
permission.
Headers
Authorization*
string
Bearer
followed by a space and your token
Request Body
image_id*
integer
The ID of the image to remove.
user_id
integer
The user ID of the user whose favorites you want to edit.
Here is an example to remove the image ID 8008
from your favorites:
Toggles an image in the user
POST
https://api.waifu.im/fav/toggle
If the image is already in the user's favorites, it will be removed. If it was not in the favorites, it will be inserted.
Requires manage_favorites
permission.
Headers
Authorization*
string
Bearer
followed by a space and your token
Request Body
image_id*
integer
The ID of the image to toggle.
user_id
integer
The user ID of the user whose favorites you want to edit.
Here is an example to toggle the image ID 8008
from your favorites:
Last updated
Was this helpful?