Create
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.
There are two different types of tool configurations:
tool_definitions: defined inline. Typically if you use LiveKit, this is where you can pass in your tool definitions.tools: tools that already exist in Phonic, in the same shape as the STS WebSocketconfigmessage. Built-in tools such aschoose_not_to_respondare passed by their built-in name or as a{type: "built_in", name, tool_config}object. The only tools stored inprojectthat can be referenced by name are transfer tools (transfer to phone number and transfer to agent). Stored built-in tool instances (such as a saved choose not to respond, natural conversation ending or keypad input tool) cannot be referenced by their saved name; pass the built-in itself instead. Your context, webhook, MCP and WebSocket tools cannot be referenced here yet; define those inline astool_definitions.
Each item in input is a user message, an assistant message (with
optional tool_calls or an action), or a tool_call_output. Every
assistant tool call must be followed immediately by the
tool_call_output item that carries its result.
A tool referenced in tools resolves to an action on the generated
response rather than a tool call - the event a live conversation would
have emitted, without the effect actually being carried out.
Authentication
Bearer authentication header of the form Bearer <PHONIC_API_KEY>. Manage your API keys here.
Request
ISO 639-1 language code that sets the assistant’s default language to recognize and speak.
Array of additional ISO 639-1 language codes that the assistant should be able to recognize and speak. Should not include default_language.
Tools defined inline for this request only. Typically if you use LiveKit, this is where you can pass in your tool definitions. Names must be unique, must not repeat a name in tools, and cannot be one of the names Phonic reserves for its built-in tools.
Name of the project the tools referenced by name in tools belong to. Required whenever tools names a tool stored in your workspace; built-in tools can be referenced without it.
Tools the assistant may call that already exist - a built-in tool, passed by its built-in name or as a built_in object, or a transfer tool stored in project, referenced by name. Names must be unique and must not repeat a name in tool_definitions. Stored tools that are not transfer tools cannot be referenced by name here yet. For a stored built-in tool instance, pass the built-in itself (for example choose_not_to_respond, or a built_in object with its tool_config); define other stored tools inline as tool_definitions instead.
The Phonic speech-to-speech model to generate with. Omit it to use the current default model.
The intelligence level of the assistant. high uses a more capable model for more complex reasoning, while standard is optimized for lower latency.
The Phonic speech-to-speech model to generate with. This field is deprecated. Use model instead.
Response
The generated responses - always num_responses of them.