Execute a single Sogni platform tool call.
Maps tool call arguments to sogni.projects.create(), waits for the media
generation to complete, and returns the result URLs.
Optionaloptions: ToolExecutionOptionsExecute multiple tool calls from a single LLM response.
Sogni tool calls (prefixed with sogni_) are executed automatically via
projects.create(). Non-Sogni tool calls are delegated to the onToolCall
callback if provided, or returned as errors.
Array of tool calls from result.tool_calls
Optionaloptions: ToolExecutionOptions & {Execution options plus optional handler for non-Sogni tools
OptionalonToolCall?: (toolCall: ToolCall) => Promise<string>Handler for non-Sogni tool calls. Must return the tool result content string.
OptionalonToolProgress?: (toolCall: ToolCall, progress: ToolExecutionProgress) => voidPer-tool progress callback (wraps the per-tool onProgress with tool identity).
API for executing Sogni platform tool calls (image, video, music generation).
Accessed via
sogni.chat.tools. Provides methods to execute tool calls returned by the LLM, mapping them tosogni.projects.create()calls automatically.Example