For the complete documentation index, see llms.txt. This page is also available as Markdown.

Generate an AI response (beta)

Runs one of your AI agents on a chat history you provide and returns its reply, without sending anything to a contact. Use it to test an AI agent or to generate replies for your own channel.

The history must end with a message from the user. Each reply reports the AI credits it used. This endpoint is in beta and may change.

Beta
post
Authorizations
api_keystringRequired

Your business's Cekat API key, from Settings → Developers & API in the Cekat dashboard (https://chat.cekat.ai/developers?section=apikeys). Available on the Business and Enterprise plans.

Body
ai_agent_idstring · uuidRequired
Responses
200

The AI agent's reply.

application/json
successbooleanOptional
post/api/ai_response/beta
POST /api/ai_response/beta HTTP/1.1
Host: api.cekat.ai
api_key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 123

{
  "ai_agent_id": "4d3c2b1a-0f9e-4d8c-b7a6-5f4e3d2c1b0a",
  "messages": [
    {
      "role": "user",
      "message": "Halo, toko buka jam berapa?"
    }
  ]
}
{
  "success": true,
  "messages": [
    {
      "role": "assistant",
      "content": "Halo! Toko kami buka setiap hari pukul 09.00 sampai 21.00 WIB.",
      "credits_used": 1
    }
  ],
  "chat_data": {}
}

Last updated