apyhub
ARTIFICIAL INTELLIGENCE

AI Text Moderation API

Hosted on ApyHub

What it does

Text Moderation checks a text string and routes it to Google moderation for analysis. Send the text you want reviewed, set requested_service to google, and include the optional google object when you need to pass a Google API key or language hint.

The request schema is simple: the body must include text and requested_service. Inside google, you can provide key and google_language. The response returns a data object with a google field when Google is the requested service, so you can work with the moderation result in the format returned by that provider.

Use Text Moderation when you need to screen user-generated content before publishing, queueing, or storing it. It fits comment systems, chat inputs, marketplace listings, and other workflows where you need a moderation check in the request path or as part of a background review step.

Because the output mirrors the selected provider, it is straightforward to plug into existing moderation pipelines without reshaping the response around extra fields that are not part of the schema.

Provider (requested_service)Atoms
Google500
POST
Text Moderation
http://localhost:8080/apyhub/text-moderation
QUICKSTARTGUIDE

Quickstart

Send your text and the Google service settings in one JSON request to check moderation.

curl -X POST "http://localhost:8080/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",
    "google": {
      "key": "AIzaSyExampleKey123456789",
      "google_language": "en"
    }
  }'

What you'll get back

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

{
  "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

Submits a text string for moderation and returns a JSON object containing a data object. When requested_service is google, the response may include a google object with the moderation result.

Request Body

ParameterTypeMandatoryDescription
textStringYesThe text to be moderated.
requested_serviceENUMYesService to use for moderation. Allowed value: google.
googleObjectNoGoogle-specific configuration object.
google.keyStringYesGoogle API key.
google.google_languageStringNoGoogle language code.

Response

Returns a JSON object with a data object field. The data object may include a google object when requested_service is google.

ParameterTypeMandatoryDescription
dataObjectYesResponse payload object. May include google when requested_service is google.
data.googleObjectNoGoogle moderation result object. The schema does not define its inner fields.

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.