API Docs

Powerful sentiment analysis API powered by Eva AI Framework

Authentication

Free Access During Testing!
The API is currently free to use while we're in testing phase. No API key required.
Rate Limit: Maximum 1 request per second per IP address during the testing period. Exceeding this limit will result in a 429 (Too Many Requests) response.

Base URL

https://az-buka.com/api/v1

Basic Endpoints

GET /api/v1/health

Check API health status and view model metrics.

Response Example:

{
  "status": "healthy",
  "version": "1.0.0",
  "model": "eva_sentiment.jls",
  "framework": "Eva AI Framework",
  "metrics": {
    "accuracy": 0.8966,
    "precision": 0.967,
    "recall": 0.908,
    "f1_score": 0.937,
    "throughput": 5555
  },
  "timestamp": "2025-11-30T17:39:41Z"
}
                    
GET /api/v1/stats

Get detailed model statistics and capabilities.

Response Example:

{
    "model": "eva_sentiment.jls",
    "framework": "Eva AI Framework",
    "metrics": { ... },
    "capabilities": [
        "Binary sentiment classification",
        "Confidence scoring",
        "Real-time analysis",
        "Batch processing",
        "Aspect-based analysis"
    ],
    "limitations": {
        "max_text_length": 5000,
        "max_batch_size": 100,
        "languages": ["English"]
    }
}
                    
POST /api/v1/sentiment

Analyze sentiment of a single text.

Request Body:

text
string (required) - Text to analyze (max 5000 characters)

Request Example:

{
    "text": "This product is amazing! Highly recommend it."
}
                    

Response Example:

{
    "score": 0.9245,
    "sentiment": "positive",
    "text": "This product is amazing! Highly recommend it.",
    "confidence": 0.8532,
    "timestamp": "2025-11-30T17:39:41Z"
}
                    
GET /api/v1/sentiment?text={text}

Analyze sentiment via query parameter.

Example Request:

GET /api/v1/sentiment?text=Great%20product
POST /api/v1/batch

Analyze multiple texts in a single request (max 100).

Request Body:

texts
array of strings (required) - Array of texts to analyze

Request Example:

{
    "texts": [
        "Great product!",
        "Terrible quality, waste of money",
        "Average, nothing special"
    ]
}
                    

Response Example:

{
    "count": 3,
    "results": [
        {
        "score": 0.9245,
        "sentiment": "positive",
        "confidence": 0.8532,
        ...
        },
        {
        "score": 0.1234,
        "sentiment": "negative",
        "confidence": 0.7821,
        ...
        },
        ...
    ],
    "timestamp": "2025-11-30T17:39:41Z"
}
                    

Analytics Endpoints

POST /api/v1/analyze/aspects

Analyze sentiment for specific product aspects (quality, price, battery, design, performance, service, ease_of_use).

Request Body:

text
string (required) - Review text

Request Example:

{
    "text": "Great quality but the price is too high. Battery life is excellent."
}
                    

Response Example:

{
    "text": "Great quality but...",
    "overall_sentiment": {
        "score": 0.7234,
        "sentiment": "positive",
        "confidence": 0.6543
    },
    "aspects": {
        "quality": {
        "mentioned": true,
        "sentiment": "positive",
        "score": 0.7234,
        "confidence": 0.6543
        },
        "price": {
        "mentioned": true,
        "sentiment": "positive",
        "score": 0.7234,
        "confidence": 0.6543
        },
        "battery": {
        "mentioned": true,
        "sentiment": "positive",
        "score": 0.7234,
        "confidence": 0.6543
        }
    },
    "aspects_found": 3,
    "timestamp": "2025-11-30T17:39:41Z"
}
                    
POST /api/v1/analyze/trends

Analyze sentiment trends over time.

Request Body:

reviews
array of objects (required) - Each object must have "text" and "timestamp"

Request Example:

{
    "reviews": [
        {
        "text": "Great product!",
        "timestamp": "2025-11-25T10:00:00Z"
        },
        {
        "text": "Not satisfied",
        "timestamp": "2025-11-26T14:30:00Z"
        }
    ]
}
                    

Response Example:

{
    "total_reviews": 2,
    "trends": [
        {
        "date": "2025-11-25",
        "avg_sentiment": 0.8534,
        "count": 1,
        "positive_ratio": 1.0
        },
        {
        "date": "2025-11-26",
        "avg_sentiment": 0.2341,
        "count": 1,
        "positive_ratio": 0.0
        }
    ],
    "timestamp": "2025-11-30T17:39:41Z"
}
                    
POST /api/v1/analyze/distribution

Analyze sentiment distribution across reviews.

Request Body:

texts
array of strings (required) - Reviews to analyze

Response Example:

{
    "total_reviews": 100,
    "distribution": {
        "very_negative": 5,
        "negative": 10,
        "neutral": 15,
        "positive": 40,
        "very_positive": 30
    },
    "statistics": {
        "average_score": 0.7234,
        "positive_ratio": 0.70,
        "negative_ratio": 0.30,
        "median_score": 0.7456,
        "std_deviation": 0.2134
    },
    "timestamp": "2025-11-30T17:39:41Z"
}
                    
POST /api/v1/analyze/dashboard

Get comprehensive analytics dashboard with all insights.

Request Body:

reviews
array of objects (required) - Each object must have "text", optionally "timestamp"

Response Example:

{
"summary": {
    "total_reviews": 150,
    "average_score": 0.7456,
    "positive_ratio": 0.73,
    "negative_ratio": 0.27
},
"distribution": {
    "very_negative": 8,
    "negative": 32,
    "neutral": 20,
    "positive": 60,
    "very_positive": 30
},
"key_insights": {
    "top_complaints": [
    {"word": "expensive", "count": 15},
    {"word": "slow", "count": 12}
    ],
    "top_praises": [
    {"word": "excellent", "count": 25},
    {"word": "quality", "count": 20}
    ]
},
"top_aspects": [
    ["quality", 45],
    ["price", 38],
    ["performance", 22]
],
"trends": [...],
"timestamp": "2025-11-30T17:39:41Z"
}
                    

Code Examples

Python

import requests
# Single sentiment analysis
response = requests.post(
    "https://az-buka.com/api/v1/sentiment",
    json={"text": "This product is amazing!"}
)
result = response.json()
print(f"Sentiment: {result['sentiment']}")
print(f"Score: {result['score']}")
print(f"Confidence: {result['confidence']}")

# Batch analysis
response = requests.post(
    "https://az-buka.com/api/v1/batch",
    json={
        "texts": [
            "Great product!",
            "Not satisfied",
            "Average quality"
        ]
    }
)
results = response.json()
print(f"Analyzed {results['count']} reviews")
            

JavaScript

// Single sentiment analysis
const response = await fetch('https://az-buka.com/api/v1/sentiment', {
    method: 'POST',
    headers: {'Content-Type': 'application/json'},
    body: JSON.stringify({text: 'This product is amazing!'})
});
const result = await response.json();
console.log(`Sentiment: ${result.sentiment}`);
console.log(`Score: ${result.score}`);

// Aspect-based analysis
const aspectResponse = await fetch('https://az-buka.com/api/v1/analyze/aspects', {
    method: 'POST',
    headers: {'Content-Type': 'application/json'},
    body: JSON.stringify({
        text: 'Great quality but price is high'
    })
});
const aspects = await aspectResponse.json();
console.log(`Found ${aspects.aspects_found} aspects`);
            

cURL

# Single sentiment
curl -X POST https://az-buka.com/api/v1/sentiment \
-H "Content-Type: application/json" \
-d '{"text": "This product is amazing!"}'

# Batch analysis
curl -X POST https://az-buka.com/api/v1/batch \
-H "Content-Type: application/json" \
-d '{"texts": ["Great!", "Not good", "Average"]}'

# Dashboard analytics
curl -X POST https://az-buka.com/api/v1/analyze/dashboard \
-H "Content-Type: application/json" \
-d '{"reviews": [{"text": "Great!", "timestamp": "2025-11-30T10:00:00Z"}]}'
            

Error Codes

Status Code Error Description
400 Bad Request Missing required fields, invalid input, or text too long/short
404 Not Found Endpoint does not exist
429 Too Many Requests Rate limit exceeded (max 1 request per second)
500 Internal Server Error Server error during processing

Error Response Format

{
    "error": "Text too long (max 5000 characters, got 7500)",
    "timestamp": "2025-11-30T17:39:41Z"
}
            
Rate Limiting: Currently limited to 1 request per second per IP. For production use, contact us for higher limits.