Intent Detection API

POST Intent Detection API

/api/v1/ai/intent

Detect user intent from natural language messages for routing, support workflows, and automation.

Request Body Parameters

Field Type Required Description
message string Required The user message or text to classify
context string Optional Optional product context to improve classification

Example Request

JSON Request
{
  "message": "I want to cancel my subscription",
  "context": "billing support"
}
cURL
curl -X POST https://rsflowhub.com/api/v1/ai/intent \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "I want to cancel my subscription",
    "context": "billing support"
  }'

Example Response

JSON Response
{
  "success": true,
  "data": {
    "result": {
      "intent": "cancel_subscription",
      "confidence": 0.97,
      "suggested_action": "route_to_billing",
      "alternatives": [
        { "intent": "upgrade_plan", "confidence": 0.02 },
        { "intent": "pause_account", "confidence": 0.01 }
      ]
    }
  },
  "meta": {
    "credits_used": 1,
    "credits_remaining": 999
  }
}

SDK Examples

Use the same endpoint with JavaScript, Python, or PHP.

cURL
curl -X POST 'https://rsflowhub.com/api/v1/ai/intent' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "message": "I want to cancel my subscription",
    "context": "billing support"
}'
Use intent labels in your app logic
Route actions by result.intent and use confidence thresholds for fallback handling.

Ready to build?

Create your free account and make your first API call in minutes.