Sentiment analysis
Feed it a batch of reviews, tickets or comments and get back a positive, negative or neutral verdict for each one, with the confidence behind it. It exists so a support queue, a review feed or a survey column of free text stops being something a human has to skim before anyone can act on it.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
The problem it actually solves
Most teams don't have one long document to judge, they have thousands of short ones: order reviews, app store comments, chat transcripts, open-ended survey fields. Reading them one by one doesn't scale past a few hundred, and a single average rating hides the fact that a product can be loved for its price and hated for its shipping in the same paragraph. text/sentiment gives every item a label and a score so the pile becomes a table you can sort, filter and trend over time.
What happens when you call it
You send an array of text items to POST /text/sentiment, get back a task_id immediately, and the job runs asynchronously against our global edge. When it finishes, you receive a signed webhook with each item's sentiment class and confidence, or you can fetch the same result from a signed link that stays valid for 24 hours. Nothing sits in a browser tab waiting; nothing blocks your request thread.
Where sentiment classification comes from
Judging tone in text is one of the oldest tasks in computational linguistics, tracing back to lexicon-based methods that simply counted positive and negative words. Modern classifiers read context instead of keywords, which is why 'not bad at all' correctly reads as positive rather than being dragged down by the word bad. That context sensitivity is what makes bulk classification trustworthy enough to route real decisions.
Who reaches for this
Support leads who want tickets auto-tagged by mood before a human ever opens them. Product teams building a dashboard that plots sentiment against release dates. Marketplaces scoring seller reviews at intake. Community platforms watching whether a thread is turning sour in real time, not after someone reports it.
How it slots into a pipeline
Because the endpoint is async and stateless, it drops cleanly into a queue-driven workflow: ingest text, call the endpoint, let the webhook write the result back to your database, trigger downstream logic only on the labels you care about. No polling loop required, no dashboard to babysit, and a failed task costs you nothing thanks to automatic retries before it ever reaches a billable error.
What you can do with it
Support ticket triage
Tag every incoming ticket with its sentiment the moment it lands, so genuinely angry customers surface above routine questions instead of waiting in FIFO order.
Review monitoring at scale
Score thousands of product reviews overnight and feed the results into a dashboard that shows sentiment trending by SKU, week over week.
Post-release pulse checks
Run sentiment on app store comments after each release to catch a regression in user mood within hours instead of waiting for the next survey cycle.
Open-ended survey analysis
Turn thousands of free-text 'anything else to add?' survey answers into a positive/negative split you can present in a single slide.
FAQ
How do I use the sentiment analysis API?
Send your text items as a JSON array to POST /text/sentiment, store the task_id you get back, and receive the labeled results by webhook or a signed 24-hour link once processing finishes.
Is there a free tier or trial?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
What languages does it support?
The classifier works across major written languages; accuracy is strongest in high-resource languages, so test a representative sample of your own text before committing to full volume.
What does it cost?
$0.003 per request plus $0.0135 per item, so a batch of 100 short reviews costs the base fee plus $1.30, billed only for items that actually complete.
Can I submit thousands of items in one request?
Yes, batch as many items as you have into one array call; the task runs asynchronously precisely so large batches don't tie up your request thread.
What happens if the task fails?
Failed items are retried automatically up to three times before returning a clear error, and you are never charged for a task that didn't complete.
How is this different from just counting positive and negative words?
Keyword counting misreads negation and sarcasm; our classifier reads full context, so phrases like 'not bad' or 'could have been worse' land in the right class.
How long are results available?
The signed result link stays valid for 24 hours, and your source text is deleted after the retention window — it is never used for training.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/text/sentiment \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"items":["valor-1","valor-2"]}'const res = await fetch("https://api.kit.forhosting.com/text/sentiment", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"items": [
"valor-1",
"valor-2"
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/text/sentiment",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"items": [
"valor-1",
"valor-2"
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/text/sentiment", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"items":["valor-1","valor-2"]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"items":["valor-1","valor-2"]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/text/sentiment", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"items": [
"valor-1",
"valor-2"
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "text.sentiment",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_tokens | 20000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
422 | task_failed | The task failed after 3 retries. You are never charged for it. |