ForHosting KIT · Text & AI

Classify intent

A message rarely announces its purpose in plain words; this endpoint reads between the lines and returns what the writer is actually trying to do — ask a question, request a refund, book something, complain, cancel. It exists so the next step in a conversation can be decided by a machine instead of a human reading every line first.

● StablePer request + per item$0.003
Use it from WebAPIEmailApp soonTelegram soon

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 gap this fills

Sentiment tells you the mood, topic classification tells you the subject, but neither answers the one question a routing system actually needs: what does this person want done? A message can be neutral in tone and still be an urgent cancellation request. text/intent is built specifically to answer that operational question, returning the underlying intent rather than a description of tone or topic.

How the request and response work

Call POST /text/intent with your text items, optionally including the set of intents you care about, and receive a task_id immediately. The job runs asynchronously; when finished, each item comes back with its predicted intent and a confidence score, delivered by a signed webhook or a signed link valid for 24 hours. You decide which confidence threshold is safe enough to act on automatically versus which should still land in front of a person.

Where intent classification comes from

The idea has deep roots in dialogue systems and early voice assistants, which had to map a spoken sentence to one of a fixed set of actions before they could do anything useful — 'set an alarm', 'play a song', 'check the weather'. Text-based intent classification for written messages inherits that same practical framing: it isn't trying to understand everything about a sentence, only to answer the one question that determines what happens next.

Who this saves the most time for

Support teams that want incoming messages auto-routed to billing, technical or cancellation queues before a human reads them. Chat and email automation builders who need a first pass at intent before deciding whether a bot can handle a message or it needs escalation. Sales teams triaging inbound leads by whether the message is a genuine purchase intent or a general inquiry.

How it fits an automated workflow

Because intents are usually a fixed, known set per business, teams often pass their own category list on each call rather than relying on a generic taxonomy, which keeps the output directly usable for routing logic with no translation layer in between. The endpoint's async design means a burst of a thousand incoming messages after a marketing send doesn't create backpressure anywhere in your stack, and failed items retry automatically at no charge before surfacing a clear error.

Inbox auto-routing

Classify every inbound support email as billing, technical, cancellation or general so it lands in the right queue before anyone reads it.

Chatbot handoff decisions

Detect when a user's intent has shifted from a simple question to a request a bot can't safely resolve, and escalate to a human at that exact moment.

Lead qualification

Separate messages that show genuine buying intent from casual inquiries so sales reps spend their time on the leads most likely to convert.

Voice-of-customer categorization

Tag thousands of stored chat transcripts by intent after the fact to see what fraction of contacts were actually cancellation attempts.

What is intent classification and how is it different from sentiment analysis?

Intent classification identifies what a person wants done — ask, buy, cancel, complain — while sentiment analysis only identifies the emotional tone; you often need both, but they answer different questions.

How do I use the intent detection API?

Send your texts to POST /text/intent, optionally with your own intent categories, keep the returned task_id, and receive each item's predicted intent and confidence by webhook or a signed 24-hour link.

Can I define my own custom intents?

Yes, you can pass the specific set of intents relevant to your business on each call rather than being limited to a generic list, which keeps results directly usable in your routing logic.

Is there a free 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.

How much does it cost?

$0.003 per request plus $0.0135 per item, so classifying 1,000 messages costs the base fee plus $13, and you're only billed for items that complete successfully.

How accurate is intent detection on short messages?

Short, clear messages classify reliably; very ambiguous one-word messages carry less signal, so it's worth testing your own message patterns before relying on fully automatic routing.

Can I send thousands of messages in one batch?

Yes, the endpoint is built for bulk batches and runs asynchronously specifically so large volumes don't block your application while waiting for results.

What happens to my messages after classification?

Text is deleted after the retention window and is never used for training; failed items retry automatically up to three times before returning a clear error, and a failed task is never charged.

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.

POSThttps://api.kit.forhosting.com/text/intent

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.

curl -X POST https://api.kit.forhosting.com/text/intent \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":["valor-1","valor-2"]}'
{
  "items": [
    "valor-1",
    "valor-2"
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "text.intent",
  "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.

Per request$0.003
Per item$0.0135

Published price — no tokens, no invented credits. A failed task is never charged.

max_tokens20000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →