AI: Analysis 10 credits LLM

Sentiment Analysis API

Perform deep sentiment analysis on any text using Claude-powered AI. Unlike simple positive/negative classifiers, this API provides aspect-level sentiment — detecting which specific topics or features are positive or negative in a review or feedback item.

Try it live →

How it works

POST your text. The API returns an overall sentiment (positive/negative/neutral/mixed) with a confidence score, a list of detected sentiment aspects with their individual scores, and key phrases that drove the sentiment classification.

Use cases

API Reference

POST https://slopshop.gg/v1/llm-sentiment
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Input parameters

ParameterTypeRequiredDescription
text string required The text to process with AI
options object optional Optional configuration (format, length, etc.)

Example response

{
  "data": {
    "result": "AI-generated result based on your input.",
    "model": "claude-3-5-sonnet",
    "tokens_used": 150
  },
  "meta": {
    "credits_used": 10,
    "engine": "real",
    "ms": 4
  }
}

Examples

Three real-world scenarios showing how developers use Sentiment Analysis in production.

Example 1
Analyze product review
Detect sentiment and which product aspects are positive or negative.
curl -X POST https://slopshop.gg/v1/llm-sentiment \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "The battery life is incredible but the camera is disappointing compared to competitors."}'
Example 2
Monitor support ticket tone
Classify an incoming support email as frustrated, neutral, or happy.
curl -X POST https://slopshop.gg/v1/llm-sentiment \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "I've been waiting 3 days for a response and my order still hasn't shipped. This is unacceptable."}'
Example 3
Analyze employee survey
Extract sentiment from an open-ended survey response.
curl -X POST https://slopshop.gg/v1/llm-sentiment \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "I love the flexible work hours, but the communication between teams could definitely be improved."}'

Code examples

curl

curl -X POST https://slopshop.gg/v1/llm-sentiment \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "your data here"}'

Python

import requests

response = requests.post(
    "https://slopshop.gg/v1/llm-sentiment",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"input": "your data here"}
)
result = response.json()
print(result["data"])

Node.js

const response = await fetch("https://slopshop.gg/v1/llm-sentiment", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ input: "your data here" })
});
const { data } = await response.json();
console.log(data);

CLI

# Install the Slopshop CLI
npm install -g slopshop

# Set your API key
export SLOPSHOP_KEY=your_api_key

# Call llm-sentiment
slop llm-sentiment '{"input": "your data here"}'

Pricing

Credits per call
10
credits
Cost per call
$0.01
at Starter tier
Tier
LLM
Requires LLM key

Credits are purchased in bundles starting at $1 for 1,000 credits. All compute APIs like this one use 10 credits per call — that's $0.01. See all pricing tiers.

Related APIs in AI: Analysis

View the full API catalog · Try in playground · Documentation