apyhub
ARTIFICIAL INTELLIGENCE

AI Text Content Classification API

Hosted on ApyHub

What it does

Content Classification lets you send text and get a Google-backed classification response in return. The endpoint accepts a body object with text and requested_service, and supports a google object with a key and optional google_language when you need to pass Google-specific settings.

Use it when you need to label or route user-generated text, sort incoming support content, or add lightweight content analysis to a workflow. Because the response wraps the result under data.google when requested_service is google, you can integrate it into an existing parser without guessing at extra fields.

The schema is intentionally narrow: you provide the text to classify and the requested service, and the API returns a structured result object. That makes Content Classification a fit for pipelines that need deterministic responses for moderation, enrichment, or downstream AI workflows.

If your app already stores language preferences or API credentials, you can pass them through the google object alongside the text and keep the integration focused on a single classification call.

Provider (requested_service)Atoms
Google500
POST
Content Classification
http://localhost:8080/apyhub/content-classification
QUICKSTARTGUIDE

Quickstart

Send a short piece of text and ask the API to classify it with Google.

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

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 classification result as an 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

Classifies the supplied text using the requested service and returns a JSON object containing the result under data. In this schema, the supported requested_service value is google, and the corresponding result is returned in data.google when that service is requested.

Request Body

ParameterTypeMandatoryDescription
textStringYesThe text to classify.
googleObjectNoGoogle-specific configuration object. Contains the Google service settings.
google.keyStringNoGoogle API key.
google.google_languageStringNoGoogle language code.
requested_serviceENUMYesThe service to use for classification. Allowed value: google.

Response

Returns a JSON object with a data object field. The data object may include a google object, which is present when requested_service is google; the schema does not further constrain the shape of data.google.

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.