Get an agent's reply
Drive an agent from your own telephony: text in, text and audio out.
How a call is assembled
You send what the caller said and the turns so far. Only the last 20 turns are used, so trim rather than growing the array forever.Variables
variables are per request, and that is the whole point of them: one agent, a different value on every call. Anything you send overrides the defaults stored on the agent, and the values are filled into both the instructions and the greeting.
Skipping the audio
Setaudio to false when you only want the text: a chat channel, a test harness, an evaluation run. The turn is still charged; the synthesis is not.
Cost
Two cents a turn, plus the speech of the reply at the agent’s model rate. Both are incost_cents and in the X-Voho-Cost-Cents header.
Authorizations
API token from the Voho console. Begins with voho_sk_live_.
Path Parameters
The agent's ID, from /v1/agents.
Body
What the caller said. Truncated at 4,000 characters.
"وين طلبي؟ رقمه سبعة تسعة واحد اثنين"
The conversation so far. Only the last 20 turns are used.
Values for this call. They override the agent's stored defaults, which is the point of them: one agent, a value per call.
Set to false to get text only and skip the synthesis charge.
Response
The reply.
The agent's greeting with variables filled in, for the start of a call.
The spoken reply, base64 encoded. Null when audio was false.
"audio/mpeg"
What this call cost, in cents. Also returned as the X-Voho-Cost-Cents header.

