Rubric Classify
Endpoints
Rubric Classify
Classify a comment against a custom rubric with predefined scoring criteria.
POST
Rubric Classify
Classify a comment against a custom rubric. Define your own categories and scoring criteria for domain-specific classification.Documentation Index
Fetch the complete documentation index at: https://developers.trynawa.com/llms.txt
Use this file to discover all available pages before exploring further.
Cost: $0.003 per request (3 credits). 500 free requests/month on this endpoint — no credit card required. Semantic cache hits are free (
X-NAWA-Cache: HIT).Request
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The comment text to classify. Max 5,000 characters. |
rubric | object | Yes | The rubric definition with categories and criteria. |
rubric.categories | string[] | Yes | List of category names to classify against. |
rubric.descriptions | object | No | Category descriptions to guide the model. Keys are category names, values are description strings. |
platform | string | No | Source platform for context. |
Example request
Response
Success response (200)
Result fields
| Field | Type | Description |
|---|---|---|
category | string | The top matching category from your rubric |
category_confidence | number | Confidence score (0–1) for the top category |
scores | object | Confidence scores for all rubric categories |
dialect | string | Detected Arabic dialect |
dialect_confidence | number | Dialect confidence score (0–1) |
language | string | Detected language code |
cached | boolean | Whether served from semantic cache |