apyhub
ARTIFICIAL INTELLIGENCE · SECURITY & PRIVACY

AI Text Moderation API

What it does

Text Moderation checks a text string for moderation results using the requested service. Send body.text with the text you want analysed and set body.requested_service to google. If you need Google-specific handling, you can also include body.google.key and body.google.google_language.

Use Text Moderation when you need to inspect user-generated content before publishing it, flagging, or routing it for review. The request is focused and the response is simple: the API returns a data object with a google object when requested_service is google.

That makes it suitable for comment systems, chat moderation workflows, marketplace listings, and other places where you need an automated moderation step in front of stored or public content. You send the text, get back the moderation payload, and decide how to handle the result in your application.

Text Moderation is best when you already know which moderation backend you want to use and need a lightweight endpoint around it.

POST
Text Moderation
https://api.eu.apyverse.com/apyhub/text-moderation

QUICKSTART

GUIDE

Quickstart

Send a piece of text for moderation with Google as the requested service.

curl -X POST "https://api.eu.apyverse.com/apyhub/text-moderation" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "ApyHub provides powerful APIs for developers worldwide.",
    "requested_service": "google"
  }'

What you'll get back

Returns a JSON object with a data object. When requested_service is google, data.google is present and contains the moderation result object.

{
  "data": {
    "google": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
google

About this endpoint

What it does

Sends text to the moderation endpoint and returns a JSON object containing a data object. For requested_service: "google", the response may include a google object with service-specific moderation output.

Request Body

ParameterTypeMandatoryDescription
textStringYesThe text to moderate.
googleObjectNoGoogle-specific configuration object. See schema for nested fields.
google.keyStringNoGoogle API key.
google.google_languageStringNoGoogle language code.
requested_serviceENUMYesService to use. Allowed value: google.

Response

Returns a JSON object with a data object field. When requested_service is google, data may include a google object containing the moderation result.

ParameterTypeMandatoryDescription
dataObjectYesResponse wrapper object. May include google when requested_service is google.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.