Skip to main content

Overview

The AI processing endpoint allows you to send text messages, images, audio, and PDFs for intelligent analysis. The system can respond synchronously or asynchronously (via postback).

Main Endpoint

POST /ai/process

Payload Parameters

string
required
Tenant ID (obtained from dashboard)
string
required
ID of the lead sending the message
string
required
Sender role: user, assistant, human, system
string
required
Message content
string
required
Message type: text, image, audio, pdf
string
Media URL (required for types other than text)
boolean
default:"false"
When true, accumulates messages and sends response via postback
string
URL to receive the response (required when debounce: true)

Request Example

Message Types

Simple text message.
Send an image for visual analysis.
Send audio for transcription and analysis.
Send a PDF for content extraction.

Debounce Mode

Debounce mode is useful when you want to accumulate multiple messages before processing.

How It Works

  1. When debounce: true, the system accumulates messages for a configured time
  2. After the debounce time, all messages are processed together
  3. The response is sent to the postback_url

Request Flow

Synchronous Response (without debounce)

When debounce: false, the response is returned immediately:

Postback Response

When debounce: true, the postback receives: