Generates one or more alternative assistant responses for a conversation
you supply inline to simulate Phonic agent behavior.
This endpoint is stateless, so it does not create a new conversation or
store anything. The request carries the system prompt, a conversation so
far as `input`, and the tools the assistant may call as
`tool_definitions`.
Each item in `input` is a user message, an assistant message (with
optional `tool_calls`), or a `tool_call_output`. Every assistant tool
call must be followed immediately by the `tool_call_output` item that
carries its result.
This is an experimental feature and must be enabled for your workspace;
otherwise, it returns `404`. Please contact our team if you would like
access.
Request
This endpoint expects an object.
system_promptstringRequired>=1 character
The system prompt the assistant should follow.
inputlist of objectsRequired
The conversation so far, in order. Must contain at least one item.
voice_idstringOptionalDefaults to sabrina
ID of the voice the assistant would speak with. It shapes how the responses are worded.
default_languageenumOptional
ISO 639-1 language code that sets the assistant’s default language to recognize and speak.
additional_languageslist of enumsOptionalDefaults to []
Array of additional ISO 639-1 language codes that the assistant should be able to recognize and speak. Should not include default_language.
tool_definitionslist of objectsOptionalDefaults to []
The tools the assistant may call, defined inline. Names must be unique and cannot be one of the names Phonic reserves for its built-in tools.
num_responsesintegerOptional1-200Defaults to 1
Number of alternative responses to generate.