response["raw_response"], it’s recommended to use the standardized response["prompt_blueprint"]. This ensures consistency across different providers.
request_id is only included in the final chunk, indicating the completion of the streaming response.
placeholder role, you can define placeholders within your prompt template that can be replaced with full messages when the prompt is executed.
For more detailed information on Placeholder Messages, including how to create and use them, please refer to our dedicated Placeholder Messages Documentation page.
role: The role of the message sender (user, assistant, system, tool, function, placeholder, developer).content: A list of content items, where each item has a type field that determines the content structure.| Type | Description |
|---|---|
text | Text content with a text field |
thinking | Model reasoning with thinking and optional signature fields |
code | Code block with a code field (from code execution tools) |
image_url | Image content with an image_url object containing a url |
media | Media content (images, PDFs) with a media object |
media_variable | Dynamic media variable with a name field |
output_media | LLM-generated media (e.g. images) with a url and mime_type |
server_tool_use | Server-side tool invocation with id, name, and input |
web_search_tool_result | Web search results with citations |
code_execution_result | Code execution output with output and outcome fields |
mcp_list_tools | MCP server tool listing with server_label and tools |
mcp_call | MCP tool call with name, server_label, and arguments |
mcp_approval_request | MCP tool approval request |
mcp_approval_response | MCP tool approval response |
bash_code_execution_tool_result | Bash tool execution result with tool_use_id and content |
text_editor_code_execution_tool_result | Text editor tool result with tool_use_id and content |
shell_call | Shell tool call with action containing commands |
shell_call_output | Shell tool output with execution results |
apply_patch_call | Apply patch tool call with operation (create, update, delete files) |
apply_patch_call_output | Apply patch tool output |
tools field. Each tool definition follows this structure:
parameters field is of interest because it specifies the expected input parameters for the function. The LLM provider will use this information to generate the appropriate tool call. You can define the parameters using JSON Schema format. You can read moe about how OpenAI uses JSON Schema for defining parameters here. And you can read more about how Anthropic uses JSON Schema for defining parameters here.
tool_calls field in the message. The format is:
id is used by the assistant to track the tool call.type is always function.function contains the function details
name tells us which function to callarguments is a JSON string containing the function’s input parameters.media_variable content allows you to dynamically insert a list of medias into prompt template messages.
The media_variable is nested within the message content. The type and name are required fields specifying the type of content and the name of the variable, respectively. The name is the name of the list of medias to be dynamically inserted.
media_variable to dynamically include medias in your messages.

media is a list of strings, they can either be public URLs or base64 strings.