POST
Get an agent's reply

Authorizations

Authorization
string
header
required

API token from the Voho console. Begins with voho_sk_live_.

Path Parameters

id
string
required

The agent's ID, from /v1/agents.

Body

application/json
text
string
required

What the caller said. Truncated at 4,000 characters.

Example:

"وين طلبي؟ رقمه سبعة تسعة واحد اثنين"

history
object[]

The conversation so far. Only the last 20 turns are used.

variables
object

Values for this call. They override the agent's stored defaults, which is the point of them: one agent, a value per call.

Example:
audio
boolean
default:true

Set to false to get text only and skip the synthesis charge.

Response

The reply.

reply
string
greeting
string

The agent's greeting with variables filled in, for the start of a call.

audio
string | null

The spoken reply, base64 encoded. Null when audio was false.

content_type
string | null
Example:

"audio/mpeg"

cost_cents
integer

What this call cost, in cents. Also returned as the X-Voho-Cost-Cents header.