Endpoint
Analyzes multiple texts in a single request. More efficient than making multiple individual requests.
Request
Body Parameters
Array of strings to moderate Min items : 1
Max items : 100 (recommended)
Item type : string
Request Example
cURL
Python SDK
JavaScript SDK
curl -X POST "http://localhost:8000/v1/moderate/batch" \
-H "Content-Type: application/json" \
-d '{
"texts": [
"First text to moderate",
"Second text to moderate",
"Third text to moderate"
]
}'
Response
Success Response (200)
{
"results" : [
{
"text" : "First text to moderate" ,
"label" : { ... },
"ensemble" : { ... },
"meta" : { ... }
},
{
"text" : "Second text to moderate" ,
"label" : { ... },
"ensemble" : { ... },
"meta" : { ... }
}
],
"total_processed" : 2 ,
"processing_time_ms" : 48
}
Metric Value Avg Time Per Text 5-10ms (in batch) Max Batch Size 100 texts (recommended) Total Time ~500ms for 100 texts
Batch processing is 3-4x faster per text compared to individual requests due to model loading overhead amortization.