apyhub
ARTIFICIAL INTELLIGENCE

AI Text Content Classification API

What it does

Content Classification helps you classify text with Google-based analysis. Send a text string and set requested_service to google; you can also include a google object with a key and google_language.

The response wraps the result under data.google when Google is requested. The schema does not define specific classification fields, so expect a structured Google payload rather than fixed labels. That makes the service suitable when you need to route or inspect text using the output returned by Google’s classifier.

Use Content Classification when you need to score, label, or otherwise analyse user-generated text before storing it, moderating it, or passing it into another workflow. For example, you can send review text, support messages, or form submissions and use the returned classification data to decide the next step in your pipeline.

If you are wiring this into an application, keep your integration simple: provide the text, choose the requested service, and read the structured result from data.google.

POST
Content Classification
https://api.eu.apyverse.com/apyhub/content-classification

QUICKSTART

GUIDE

Quickstart

Classify a short piece of text with Google using the required service settings.

curl -X POST "https://api.eu.apyverse.com/apyhub/content-classification" \
  -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 field. When requested_service is google, data.google may be present and contains the Google classification result object.

{
  "data": {
    "google": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading playground…

About this endpoint

What it does

Classifies the provided text using the requested service and returns a JSON object containing a data wrapper with service-specific output. For this schema, the only supported requested service is google, and the corresponding result is returned under data.google when applicable.

Request Body

ParameterTypeMandatoryDescription
textStringYesThe text to classify.
requested_serviceENUMYesMust be google.
googleObjectNoGoogle-specific configuration object. See schema for nested fields.
google.keyStringNoGoogle API key.
google.google_languageStringNoGoogle language code.

Response

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

ParameterTypeMandatoryDescription
dataObjectYesWrapper object for the classification result.
data.googleObjectNoPresent when requested_service is google. The schema allows additional properties within this object.

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.