Comment on page
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
https://api.waifu.im/
fav
Get your favorites.
Here is an example to get your favorites:
Curl
Python
Javascript
curl -X GET \
'https://api.waifu.im/fav' \
-H 'Accept-Version: v5' \
-H 'Authorization: Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0'
import requests
url = 'https://api.waifu.im/fav'
headers = {
'Accept-Version': 'v5',
'Authorization': 'Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0',
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
data = response.json()
# Process the response data as needed
else:
print('Request failed with status code:', response.status_code)
const apiUrl = 'https://api.waifu.im/fav';
const headers = new Headers();
headers.append('Accept-Version', 'v5');
headers.append('Authorization', 'Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0');
fetch(apiUrl, { headers })
.then(response => {
if (response.ok) {
return response.json();
} else {
throw new Error('Request failed with status code: ' + response.status);
}
})
.then(data => {
// Process the response data as needed
console.log(data);
})
.catch(error => {
console.error('An error occurred:', error.message);
});
post
https://api.waifu.im/
fav/insert
Inserts an image into the user
Here is an example to insert the image ID
8008
into your favorites:Curl
Python
Javascript
curl -X POST \
'https://api.waifu.im/fav/insert' \
-H 'Content-Type: application/json' \
-H 'Accept-Version: v5' \
-H 'Authorization: Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0' \
-d '{
"image_id": 8008
}'
import requests
url = 'https://api.waifu.im/fav/insert'
headers = {
'Accept-Version': 'v5',
'Authorization': 'Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0',
'Content-Type': 'application/json',
}
data = {
'image_id': 8008
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
data = response.json()
# Process the response data as needed
else:
print('Request failed with status code:', response.status_code)
const apiUrl = 'https://api.waifu.im/fav/insert';
const headers = new Headers();
headers.append('Accept-Version', 'v5');
headers.append('Authorization', 'Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0');
headers.append('Content-Type', 'application/json');
const data = {
image_id: 8008
};
fetch(apiUrl, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => {
if (response.ok) {
return response.json();
} else {
throw new Error('Request failed with status code: ' + response.status);
}
})
.then(data => {
// Process the response data as needed
console.log(data);
})
.catch(error => {
console.error('An error occurred:', error.message);
});
post
https://api.waifu.im/
fav/delete
Removes an image from the user
Here is an example to remove the image ID
8008
from your favorites:Curl
Python
Javascript
curl -X POST \
'https://api.waifu.im/fav/delete' \
-H 'Content-Type: application/json' \
-H 'Accept-Version: v5' \
-H 'Authorization: Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0' \
-d '{
"image_id": 8008
}'
import requests
url = 'https://api.waifu.im/fav/delete'
headers = {
'Accept-Version': 'v5',
'Authorization': 'Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0',
'Content-Type': 'application/json',
}
data = {
'image_id': 8008
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
data = response.json()
# Process the response data as needed
else:
print('Request failed with status code:', response.status_code)
const apiUrl = 'https://api.waifu.im/fav/delete';
const headers = new Headers();
headers.append('Accept-Version', 'v5');
headers.append('Authorization', 'Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0');
headers.append('Content-Type', 'application/json');
const data = {
image_id: 8008
};
fetch(apiUrl, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => {
if (response.ok) {
return response.json();
} else {
throw new Error('Request failed with status code: ' + response.status);
}
})
.then(data => {
// Process the response data as needed
console.log(data);
})
.catch(error => {
console.error('An error occurred:', error.message);
});
post
https://api.waifu.im/
fav/toggle
Toggles an image in the user
Here is an example to toggle the image ID
8008
from your favorites:Curl
Python
Javascript
curl -X POST \
'https://api.waifu.im/fav/toggle' \
-H 'Content-Type: application/json' \
-H 'Accept-Version: v5' \
-H 'Authorization: Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0' \
-d '{
"image_id": 8008
}'
import requests
url = 'https://api.waifu.im/fav/toggle'
headers = {
'Accept-Version': 'v5',
'Authorization': 'Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0',
'Content-Type': 'application/json',
}
data = {
'image_id': 8008
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
data = response.json()
# Process the response data as needed
else:
print('Request failed with status code:', response.status_code)
const apiUrl = 'https://api.waifu.im/fav/toggle';
const headers = new Headers();
headers.append('Accept-Version', 'v5');
headers.append('Authorization', 'Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0');
headers.append('Content-Type', 'application/json');
const data = {
image_id: 8008
};
fetch(apiUrl, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => {
if (response.ok) {
return response.json();
} else {
throw new Error('Request failed with status code: ' + response.status);
}
})
.then(data => {
// Process the response data as needed
console.log(data);
})
.catch(error => {
console.error('An error occurred:', error.message);
});
Last modified 2mo ago