Skip to main content
POST
/
v1
/
comments
/
{id}
/
reply
Reply to Comment
curl --request POST \
  --url https://api.trynawa.com/v1/comments/{id}/reply
Generate an AI-powered reply that matches the commenter’s language and cultural context. For Arabic comments, replies match the detected dialect (Gulf, Egyptian, Levantine, MSA). For English comments, replies are natural and platform-appropriate. Language is auto-detected unless overridden.
Cost: $0.008 per request (8 credits). Semantic cache hits are free (X-NAWA-Cache: HIT).

Request

Path parameters

ParameterTypeRequiredDescription
idstringYesThe comment ID to reply to.

Body parameters

ParameterTypeRequiredDescription
tonestringNoReply tone: friendly, professional, casual, formal. Default: friendly.
max_lengthintegerNoMaximum reply length in characters. Default: 500.
contextstringNoAdditional context about the channel or video to improve reply relevance.
languagestringNoForce reply language: ar, en, auto. Default: auto (matches commenter’s language).

Example request

curl -X POST https://api.trynawa.com/v1/comments/cmt_abc123/reply \
  -H "Authorization: Bearer nawa_test_sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "tone": "friendly",
    "context": "Tech review channel focused on smartphones"
  }'

Response

Success response (200)

{
  "success": true,
  "result": {
    "comment_id": "cmt_abc123",
    "reply_text": "إن شاء الله الجزء الثاني قريب! تابعنا عشان ما يفوتك 🔔",
    "reply_dialect": "gulf",
    "tone": "friendly",
    "original_intent": "question",
    "original_dialect": "gulf"
  },
  "errors": [],
  "request_id": "req_rep789xyz012"
}

Result fields

FieldTypeDescription
comment_idstringThe comment that was replied to
reply_textstringThe generated reply text
reply_dialectstring | nullDialect used in the reply (matches original). null for English replies.
tonestringThe tone used for the reply
original_intentstringDetected intent of the original comment
original_dialectstringDetected dialect of the original comment