NLP API Overview

API Base URL: https://api.example.com/api

Available features:

Language Detection Sentiment Analysis Entity Recognition Text Categorization Text Summarization Translation Text Correction Text Improvement Text Annotations Originality Detection Similarity Check Text-to-Speech
Rate Limits:
  • 60 requests/minute per IP
  • Requires API key for external requests

Authentication

All API requests require an API key in the X-API-Key header.

Generate API Key

POST /api/generate-key
Content-Type: application/json
{
    "name": "Your Name"
}

Revoke API Key

POST /api/revoke-key/{ID}

Endpoints

Processes the given text with the selected NLP features.

Request Body

{
    "text": "Your input text",
    "settings": {
        "detectLang": true,
        "detectSentiment": true,
        "detectCategory": true,
        "detectResume": true,
        "translate": true,
        "correction": true,
        "detectEntity": true,
        "improvement": true,
        "adnotari": true,
        "rafinare": true,
        "original": true,
        "similitudine": true,
        "vocala": true
    }
}

Returns a structured JSON response with analysis results.

Code Examples

PHP

$response = Http::withHeaders([
    'X-API-Key' => 'your-api-key'
])->post('https://api.example.com/api/process-text', [
    'text' => 'Sample text',
    'settings' => [
        'detectLang' => true,
        'detectSentiment' => true
    ]
]);

Python

import requests
response = requests.post(
    'https://api.example.com/api/process-text',
    headers={'X-API-Key': 'your-api-key'},
    json={
        'text': 'Sample text',
        'settings': {
            'detectLang': True,
            'detectSentiment': True
        }
    })

JavaScript

fetch('https://api.example.com/api/process-text', {
    method: 'POST',
    headers: {
        'X-API-Key': 'your-api-key',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        text: 'Sample text',
        settings: {
            detectLang: true,
            detectSentiment: true
        }
    })
})

Error Codes

Code Description
401 Invalid or missing API key
429 Rate limit exceeded
400 Invalid request parameters
500 Internal server error