apyhub
Back
▣ ARTIFICIAL INTELLIGENCE

AI Text Language Detection API

Hosted on ApyHub

What it does

Language Detector identifies the language of a text string and returns the result through the selected provider: ApyHub, Azure, or Google. Send a piece of text in body.text, and choose requested_service to route the request to the language engine you want to use.

Use it when you need to classify user-generated content, route support tickets, segment multilingual documents, or decide which downstream translation or NLP pipeline to run. The request schema also supports optional azure and google credential objects when you want to use those providers directly.

The response wraps provider-specific output under data.azure, data.apyhub, or data.google, so you can read the detection result from the service you selected without guessing at extra fields. If you already have a text-processing workflow, this endpoint fits as a lightweight language identification step before indexing, moderation, translation, or analytics.

Because the input is just text plus an optional provider selection, it is easy to slot into forms, ingestion jobs, and batch processing flows where language needs to be detected before the next step runs.

Provider (requested_service)Atoms
Azure500
Google500
ApyHub2000
POST
Detect language of text
https://api.eu.apyhub.com/apyhub/ai-detect-language

QUICKSTART

GUIDE

Quickstart

Send a text sample to detect its language.

curl -X POST "https://api.eu.apyhub.com/apyhub/ai-detect-language" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"Bonjour tout le monde!","requested_service":"apyhub"}'

What you'll get back

Returns a JSON object with a data object. The data object can contain azure, apyhub, and google fields, each holding that provider’s language-detection response object.

{
  "data": {
    "apyhub": {},
    "azure": {},
    "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*
azure
Custom credentials for Azure services.
Azure subscription key.
Azure service region.
Azure endpoint URL.
google
Custom credentials for Google services.
google_credential_json

About this endpoint

What it does

Detects the language of the provided text and returns a JSON object containing a data object with provider-specific result fields. The request body includes the input text and can optionally include credentials/configuration for Azure or Google, plus a requested_service selector.

Request Body

ParameterTypeDescription
textStringThe text to analyze.
azureObjectCustom credentials for Azure services. Includes optional fields such as key, region, endpoint, account_id, and access_token.
azure.keyStringAzure subscription key.
azure.regionStringAzure service region.
azure.endpointStringAzure endpoint URL.
azure.account_idStringAzure account ID.
azure.access_tokenStringOAuth access token for Azure service.
googleObjectCustom credentials for Google services. Includes optional google_language and google_credential_json.
google.google_languageStringTarget language locale.
google.google_credential_jsonObjectGoogle service account credential JSON. See schema for nested fields.
requested_serviceENUMWhich service to use. Allowed values: azure, google, apyhub. Default: apyhub.

Response

Returns a JSON object with a data object field. Inside data, the schema declares provider-specific objects for azure, apyhub, and google, each representing the response object from that service.

ParameterTypeDescription
dataObjectWrapper object for provider-specific language detection results.
data.azureObjectResponse object from Microsoft Azure Cognitive Services.
data.apyhubObjectResponse object from ApyHub language tools.
data.googleObjectResponse object from Google Cloud NLP API.
▣ 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.