Skip to main content
POST
/
intent-classify
/
batch
Batch Classify
curl --request POST \
  --url https://api.usehandled.io/api/v1/ipaas/inference/intent-classify/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "id": "msg_001",
      "message": "Where is my order?"
    },
    {
      "id": "msg_002",
      "message": "I want a refund for order #4521"
    },
    {
      "id": "msg_003",
      "message": "Do you have this in blue?"
    }
  ],
  "top_k": 1
}
'
{
  "request_id": "<string>",
  "results": [
    {
      "id": "<string>",
      "top_intent": "<string>",
      "confidence": 123
    }
  ],
  "latency_ms": 123,
  "model_version": "<string>"
}

Authorizations

Authorization
string
header
required

API token from your Handled dashboard

Body

application/json
messages
object[]
required

List of message objects (max 100 per request)

Maximum array length: 100
top_k
integer
default:1

Number of top intents per message

Required range: 1 <= x <= 5

Response

Successful batch classification

request_id
string

Unique identifier for the batch request

results
object[]

Classification results for each message

latency_ms
integer

Server-side inference time in milliseconds

model_version
string

Version of the model used