Waifu.im API Docs
  • Introduction
  • Quick Start
  • Versioning
  • Rate Limiting
  • Tags
  • Authentication
  • Permissions
  • Authorization
  • Resources
  • Contact us
  • Reference
    • API Reference
      • Tags
      • Search
      • Favorites
      • Report
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Reference
  2. API Reference

Report

Reports an image.

POST https://api.waifu.im/report

Used to report any inappropriate, offensive or wrongly labelled image in the API.

Requires report permission.

Headers

Name
Type
Description

Authorization*

string

Bearer followed by a space and your token

Request Body

Name
Type
Description

image_id*

integer

The ID of the image to report.

description

string

A brief explanation (up to 200 characters) used to describe the issue.

{
  "author_id": "428346579283272370",
  "description": "The tag 'maid' does not suit the image.",
  "existed": false,
  "image_id": 8008
}
{"detail":"Bad Request"}
{"detail":"Unauthorized"}
{"detail":"Forbidden"}
{"detail":"Not Found"}
{"detail":"Internal Server Error"}

If the image was already reported the existed key will be true.

curl -X POST \
  'https://api.waifu.im/report' \
  -H 'Content-Type: application/json' \
  -H 'Accept-Version: v5' \
  -H 'Authorization: Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0' \
  -d '{
    "image_id": 8008,
    "description": "The tag '\''maid'\'' does not suit the image."
  }'
import requests

url = 'https://api.waifu.im/report'

headers = {
    'Accept-Version': 'v5',
    'Authorization': 'Bearer TjBY0MBcS3-SEc3Ms6T4GKjHGJkbqM6McejlQdnqo2y47jWNLa4agsWYdJukocDqHpm2zYFO5z2AjMzkUSfLsCz1AgbDhSjKLMIOnhJGFgODgOkSnzaAWzvGZZPdbm6vOTxs2chmz-3DSRVzwQLl__eYE4Wnjtr0aIGzXlo82M0',
    'Content-Type': 'application/json',
}

data = {
    'image_id': 8008,
    'description': "The tag 'maid' does not suit the image."
}

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/report';

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,
  description: "The tag 'maid' does not suit the image.",
};

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 => {
    console.log(data);
    // Process the response data as needed
  })
  .catch(error => {
    console.error('An error occurred:', error.message);
  });
PreviousFavorites

Last updated 11 months ago

Was this helpful?