Detect Language (v1)
Detect the language of a given text using the v1 API.
Endpoint
POST /v1/language_detectDescription
Detect the language of a given text using the v1 API.
Headers
X-API-KEY string (required)
: Your API key for authentication
Content-Type string (required)
: Must be application/json
Request Parameters
Body Parameters
text string (required)
: The text to detect language for
Example Request
curl https://api.translateplus.io/v1/detect_language \
-H "X-API-KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"text": "Bonjour le monde!"
}'Success Response (200 OK)
{
"language": "fr",
"confidence": 0.95
}Response Fields
| Field | Type | Description |
|---|---|---|
language | string | Detected language code |
confidence | float | Confidence score (0.0 to 1.0) |
Error Responses
See Error Handling for common error responses.
Migration to v2
We recommend migrating to the v2 Detect Language endpoint which provides enhanced features and better error handling.