API DOCUMENTATION

Text Classification API

The Text Classification API provides automated document categorization and keyword classification for enterprise text analysis workflows. It supports structured ingestion, preprocessing, classification, and confidence scoring for operational intelligence systems.

API OVERVIEW

Core Information

Base URL

https://api.example.com/v1

Supported Formats

AUTHENTICATION

Bearer Token Access

Header Format

Authorization: Bearer YOUR_API_KEY

Example

Authorization: Bearer sk_live_7x93_example_key
ENDPOINTS

Available Routes

REQUEST

POST /classify-text

Endpoint

POST /v1/classify-text

Request Body

{
  "text": "The manufacturing workflow failed during calibration validation.",
  "model": "operations-classifier",
  "language": "en"
}

cURL Example

curl -X POST https://api.example.com/v1/classify-text \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text":"The manufacturing workflow failed during calibration validation.",
"model":"operations-classifier",
"language":"en"
}'
RESPONSE

Successful Output

{
  "status": "success",
  "classification": {
    "category": "Operational Compliance",
    "confidence_score": 0.94,
    "keywords": [
      "manufacturing",
      "workflow",
      "calibration",
      "validation"
    ]
  },
  "processing_time_ms": 182
}
ERROR HANDLING

Response Codes

400 Bad Request

Missing required parameters.

{
  "error": {
    "code": 400,
    "message": "Missing required parameter: text"
  }
}

401 Unauthorized

Invalid API token.

429 Rate Limit

Too many requests.

API Documentation
API DOCUMENTATION