POST /api/v1/chat#

Send a message to an agent and receive a response.

Request#

Headers#

HeaderValueRequired
AuthorizationBearer hmt_your_keyYes
Content-Typeapplication/jsonYes

Body Parameters#

FieldTypeRequiredDescription
agent_idstringYesThe agent to send the message to
messagestringYesThe user message content
conversation_idstringNoContinue an existing conversation

Example#

bash
curl -X POST https://humuter.com/api/v1/chat \
  -H "Authorization: Bearer hmt_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "ag_abc123",
    "message": "What are your business hours?",
    "conversation_id": "conv_xyz789"
  }'

Response#

json
{
  "id": "msg_def456",
  "conversation_id": "conv_xyz789",
  "agent_id": "ag_abc123",
  "role": "assistant",
  "content": "Our business hours are Monday through Friday, 9 AM to 5 PM EST.",
  "created_at": "2026-03-04T12:00:00Z",
  "credits_used": 1
}

Errors#

CodeReason
400Missing agent_id or message
401Invalid or missing API key
402Insufficient credits
404Agent not found
429Rate limit exceeded
Use conversation_id to maintain context across multiple messages in the same conversation.