Skip to content
AIModCon

API Documentation

Moderation API quick guide

Use the moderation endpoint to label user content as SFW, NSFW, or BANNED in a single request.

Authentication methods

  • Sign up with email + password at /accounts/signup/ and log in at /accounts/login/.
  • Reset passwords via /accounts/password-reset/ (email-driven flow).
  • Email verification is optional and depends on deployment settings; if enabled, you must verify before signing in.
  • API requests use your issued key in the Authorization header.
Authorization: Bearer $API_KEY

Moderation endpoint usage

POST /v1/moderate/

  • Required field: content (plain text).
  • Maximum length: 500 characters.
  • Non-printable or non-text input is rejected.

Request example

curl -X POST https://api.aimodcon.com/v1/moderate/ \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "content=User content to evaluate"

Only printable text is accepted. Max length: 500 characters.

Response examples

Success

{
  "result": "SFW"
}

Error: missing or invalid API key (401)

{
  "error": "Invalid API key."
}

Error: missing content (400)

{
  "error": "Content is required."
}

Error handling

  • 401 Invalid or missing API key.
  • 400 Missing content, content too long, or non-text input.

Error responses include a single error string that matches the payload examples above.

Rate limits

The public demo experience is limited to 10 requests per minute and 200 requests per day. The API endpoint does not enforce rate limits in code today; the source of truth is the API view implementation in core/views.py.