REST: conversation.item.added
- HTTP request
- Body parameters
- Message
- FileSearchToolCall
- 0Item
- WebSearchToolCall
- WebSearchActionSearch
- SourcesItem
- WebSearchActionOpenPage
- WebSearchActionFind
- ImageGenToolCall
- ComputerToolCall
- ClickParam
- DoubleClickAction
- Drag
- DragPoint
- KeyPressAction
- Move
- Screenshot
- Scroll
- Type
- Wait
- ComputerCallSafetyCheckParam
- ReasoningItem
- Summary
- ReasoningTextContent
- CodeInterpreterToolCall
- LocalShellToolCall
- LocalShellExecAction
- LocalShellToolCallOutput
- FunctionShellCall
- FunctionShellAction
- FunctionShellCallOutput
- FunctionShellCallOutputContent
- FunctionShellCallOutputTimeoutOutcome
- FunctionShellCallOutputExitOutcome
- ApplyPatchToolCall
- ApplyPatchCreateFileOperation
- ApplyPatchDeleteFileOperation
- ApplyPatchUpdateFileOperation
- ApplyPatchToolCallOutput
- MCPListTools
- MCPListToolsTool
- MCPApprovalRequest
- MCPApprovalResponseResource
- MCPToolCall
- CustomToolCall
- CustomToolCallOutput
- Response
HTTP request
POST https://ai.api.cloud.yandex.net/v1/realtime/server-events/conversation.item.added
Body parameters
Request schema: application/json
{
"type": "string",
"event_id": "string",
"item": "unknown",
"previous_item_id": "string"
}
Returned when a conversation item is added (created/inserted).
|
Field |
Description |
|
type |
enum Required field. The event type. Always
|
|
event_id |
string Required field. |
|
item |
Any of Message | unknown | unknown | FileSearchToolCall | WebSearchToolCall | ImageGenToolCall | ComputerToolCall | unknown | ReasoningItem | CodeInterpreterToolCall | LocalShellToolCall | LocalShellToolCallOutput | FunctionShellCall | FunctionShellCallOutput | ApplyPatchToolCall | ApplyPatchToolCallOutput | MCPListTools | MCPApprovalRequest | MCPApprovalResponseResource | MCPToolCall | CustomToolCall | CustomToolCallOutput |
|
previous_item_id |
string |
Message
A message to or from the model.
|
Field |
Description |
|
type |
enum Required field. The type of the message. Always set to
|
|
id |
string Required field. The unique ID of the message. |
|
status |
enum Required field.
|
|
role |
enum Required field.
|
|
content[] |
unknown Required field. |
FileSearchToolCall
The results of a file search tool call.
|
Field |
Description |
|
id |
string Required field. The unique ID of the file search tool call. |
|
type |
enum Required field. The type of the file search tool call. Always
|
|
status |
enum Required field. The status of the file search tool call. One of
|
|
queries[] |
string Required field. |
|
results |
Any of 0Item | null |
0Item
|
Field |
Description |
|
file_id |
string The unique ID of the file. |
|
text |
string The text that was retrieved from the file. |
|
filename |
string The name of the file. |
|
attributes |
Any of object (map<string, string>) | null |
|
score |
number (float) The relevance score of the file - a value between 0 and 1. |
WebSearchToolCall
The results of a web search tool call.
|
Field |
Description |
|
id |
string Required field. The unique ID of the web search tool call. |
|
type |
enum Required field. The type of the web search tool call. Always
|
|
status |
enum Required field. The status of the web search tool call.
|
|
action |
Any of WebSearchActionSearch | WebSearchActionOpenPage | WebSearchActionFind |
WebSearchActionSearch
Action type "search" - Performs a web search query.
|
Field |
Description |
|
type |
enum Required field. The action type.
|
|
query |
string Required field. The search query. |
|
sources[] |
Required field. A source used in the search. |
SourcesItem
A source used in the search.
|
Field |
Description |
|
type |
enum Required field. The type of source. Always
|
|
url |
string Required field. The URL of the source. |
WebSearchActionOpenPage
Action type "open_page" - Opens a specific URL from search results.
|
Field |
Description |
|
type |
enum Required field. The action type.
|
|
url |
string (uri) Required field. The URL opened by the model. |
WebSearchActionFind
Action type "find": Searches for a pattern within a loaded page.
|
Field |
Description |
|
type |
enum Required field. The action type.
|
|
url |
string (uri) Required field. The URL of the page searched for the pattern. |
|
pattern |
string Required field. The pattern or text to search for within the page. |
ImageGenToolCall
An image generation request made by the model.
|
Field |
Description |
|
type |
enum Required field. The type of the image generation call. Always
|
|
id |
string Required field. The unique ID of the image generation call. |
|
status |
enum Required field. The status of the image generation call.
|
|
result |
Any of string | null |
ComputerToolCall
CURRENTLY NOT SUPPORTED
|
Field |
Description |
|
type |
enum Required field. The type of the computer call. Always
|
|
id |
string Required field. The unique ID of the computer call. |
|
call_id |
string Required field. An identifier used when responding to the tool call with output. |
|
action |
Any of ClickParam | DoubleClickAction | Drag | KeyPressAction | Move | Screenshot | Scroll | Type | Wait |
|
pending_safety_checks[] |
Required field. A pending safety check for the computer call. |
|
status |
enum Required field. The status of the item. One of
|
ClickParam
A click action.
|
Field |
Description |
|
type |
enum Required field. Specifies the event type. For a click action, this property is always
|
|
button |
enum Required field.
|
|
x |
integer Required field. The x-coordinate where the click occurred. |
|
y |
integer Required field. The y-coordinate where the click occurred. |
DoubleClickAction
A double click action.
|
Field |
Description |
|
type |
enum Required field. Specifies the event type. For a double click action, this property is always set to
|
|
x |
integer Required field. The x-coordinate where the double click occurred. |
|
y |
integer Required field. The y-coordinate where the double click occurred. |
Drag
A drag action.
|
Field |
Description |
|
type |
enum Required field. Specifies the event type. For a drag action, this property is
|
|
path[] |
Required field. An x/y coordinate pair, e.g. |
DragPoint
An x/y coordinate pair, e.g. { x: 100, y: 200 }
|
Field |
Description |
|
x |
integer Required field. The x-coordinate. |
|
y |
integer Required field. The y-coordinate. |
KeyPressAction
A collection of keypresses the model would like to perform.
|
Field |
Description |
|
type |
enum Required field. Specifies the event type. For a keypress action, this property is always set to
|
|
keys[] |
string Required field. One of the keys the model is requesting to be pressed. |
Move
A mouse move action.
|
Field |
Description |
|
type |
enum Required field. Specifies the event type. For a move action, this property is
|
|
x |
integer Required field. The x-coordinate to move to. |
|
y |
integer Required field. The y-coordinate to move to. |
Screenshot
A screenshot action.
|
Field |
Description |
|
type |
enum Required field. Specifies the event type. For a screenshot action, this property is
|
Scroll
A scroll action.
|
Field |
Description |
|
type |
enum Required field. Specifies the event type. For a scroll action, this property is
|
|
x |
integer Required field. The x-coordinate where the scroll occurred. |
|
y |
integer Required field. The y-coordinate where the scroll occurred. |
|
scroll_x |
integer Required field. The horizontal scroll distance. |
|
scroll_y |
integer Required field. The vertical scroll distance. |
Type
An action to type in text.
|
Field |
Description |
|
type |
enum Required field. Specifies the event type. For a type action, this property is
|
|
text |
string Required field. The text to type. |
Wait
A wait action.
|
Field |
Description |
|
type |
enum Required field. Specifies the event type. For a wait action, this property is
|
ComputerCallSafetyCheckParam
A pending safety check for the computer call.
|
Field |
Description |
|
id |
string Required field. The ID of the pending safety check. |
|
code |
Any of string | null |
|
message |
Any of string | null |
ReasoningItem
A description of the chain of thought used by a reasoning model while generating a response. ''
'
|
Field |
Description |
|
type |
enum Required field. The type of the object. Always
|
|
id |
string Required field. The unique identifier of the reasoning content. |
|
encrypted_content |
Any of string | null |
|
summary[] |
Required field. A summary text from the model. |
|
content[] |
Required field. Reasoning text from the model. |
|
status |
enum The status of the item. One of
|
Summary
A summary text from the model.
|
Field |
Description |
|
type |
enum Required field. The type of the object. Always
|
|
text |
string Required field. A summary of the reasoning output from the model so far. |
ReasoningTextContent
Reasoning text from the model.
|
Field |
Description |
|
type |
enum Required field. The type of the reasoning text. Always
|
|
text |
string Required field. The reasoning text from the model. |
CodeInterpreterToolCall
A tool call to run code.
|
Field |
Description |
|
type |
enum Required field. The type of the code interpreter tool call. Always
|
|
id |
string Required field. The unique ID of the code interpreter tool call. |
|
status |
enum Required field. The status of the code interpreter tool call. Valid values are
|
|
container_id |
string Required field. The ID of the container used to run the code. |
|
code |
Any of string | null |
|
outputs |
Any of unknown | null |
LocalShellToolCall
A tool call to run a command on the local shell.
|
Field |
Description |
|
type |
enum Required field. The type of the local shell call. Always
|
|
id |
string Required field. The unique ID of the local shell call. |
|
call_id |
string Required field. The unique ID of the local shell tool call generated by the model. |
|
action |
Required field. Execute a shell command on the server. |
|
status |
enum Required field. The status of the local shell call.
|
LocalShellExecAction
Execute a shell command on the server.
|
Field |
Description |
|
type |
enum Required field. The type of the local shell action. Always
|
|
command[] |
string Required field. |
|
timeout_ms |
Any of integer | null |
|
working_directory |
Any of string | null |
|
env |
object (map<string, string>) Required field. |
|
user |
Any of string | null |
LocalShellToolCallOutput
The output of a local shell tool call.
|
Field |
Description |
|
type |
enum Required field. The type of the local shell tool call output. Always
|
|
id |
string Required field. The unique ID of the local shell tool call generated by the model. |
|
output |
string Required field. A JSON string of the output of the local shell tool call. |
|
status |
Any of enum | null |
FunctionShellCall
A tool call that executes one or more shell commands in a managed environment.
|
Field |
Description |
|
type |
enum Required field. The type of the item. Always
|
|
id |
string Required field. The unique ID of the shell tool call. Populated when this item is returned via API. |
|
call_id |
string Required field. The unique ID of the shell tool call generated by the model. |
|
action |
Required field. Execute a shell command. |
|
status |
enum Required field.
|
|
created_by |
string The ID of the entity that created this tool call. |
FunctionShellAction
Execute a shell command.
|
Field |
Description |
|
commands[] |
string Required field. A list of commands to run. |
|
timeout_ms |
Any of integer | null |
|
max_output_length |
Any of integer | null |
FunctionShellCallOutput
The output of a shell tool call.
|
Field |
Description |
|
type |
enum Required field. The type of the shell call output. Always
|
|
id |
string Required field. The unique ID of the shell call output. Populated when this item is returned via API. |
|
call_id |
string Required field. The unique ID of the shell tool call generated by the model. |
|
output[] |
FunctionShellCallOutputContent Required field. The content of a shell call output. |
|
max_output_length |
Any of integer | null |
|
created_by |
string |
FunctionShellCallOutputContent
The content of a shell call output.
|
Field |
Description |
|
stdout |
string Required field. |
|
stderr |
string Required field. |
|
outcome |
Any of FunctionShellCallOutputTimeoutOutcome | FunctionShellCallOutputExitOutcome |
|
created_by |
string |
FunctionShellCallOutputTimeoutOutcome
Indicates that the shell call exceeded its configured time limit.
|
Field |
Description |
|
type |
enum Required field. The outcome type. Always
|
FunctionShellCallOutputExitOutcome
Indicates that the shell commands finished and returned an exit code.
|
Field |
Description |
|
type |
enum Required field. The outcome type. Always
|
|
exit_code |
integer Required field. Exit code from the shell process. |
ApplyPatchToolCall
A tool call that applies file diffs by creating, deleting, or updating files.
|
Field |
Description |
|
type |
enum Required field. The type of the item. Always
|
|
id |
string Required field. The unique ID of the apply patch tool call. Populated when this item is returned via API. |
|
call_id |
string Required field. The unique ID of the apply patch tool call generated by the model. |
|
status |
enum Required field.
|
|
operation |
Any of ApplyPatchCreateFileOperation | ApplyPatchDeleteFileOperation | ApplyPatchUpdateFileOperation |
|
created_by |
string The ID of the entity that created this tool call. |
ApplyPatchCreateFileOperation
Instruction describing how to create a file via the apply_patch tool.
|
Field |
Description |
|
type |
enum Required field. Create a new file with the provided diff.
|
|
path |
string Required field. Path of the file to create. |
|
diff |
string Required field. Diff to apply. |
ApplyPatchDeleteFileOperation
Instruction describing how to delete a file via the apply_patch tool.
|
Field |
Description |
|
type |
enum Required field. Delete the specified file.
|
|
path |
string Required field. Path of the file to delete. |
ApplyPatchUpdateFileOperation
Instruction describing how to update a file via the apply_patch tool.
|
Field |
Description |
|
type |
enum Required field. Update an existing file with the provided diff.
|
|
path |
string Required field. Path of the file to update. |
|
diff |
string Required field. Diff to apply. |
ApplyPatchToolCallOutput
The output emitted by an apply patch tool call.
|
Field |
Description |
|
type |
enum Required field. The type of the item. Always
|
|
id |
string Required field. The unique ID of the apply patch tool call output. Populated when this item is returned via API. |
|
call_id |
string Required field. The unique ID of the apply patch tool call generated by the model. |
|
status |
enum Required field.
|
|
output |
Any of string | null |
|
created_by |
string The ID of the entity that created this tool call output. |
MCPListTools
A list of tools available on an MCP server.
|
Field |
Description |
|
type |
enum Required field. The type of the item. Always
|
|
id |
string Required field. The unique ID of the list. |
|
server_label |
string Required field. The label of the MCP server. |
|
tools[] |
Required field. A tool available on an MCP server. |
|
error |
Any of string | null |
MCPListToolsTool
A tool available on an MCP server.
|
Field |
Description |
|
name |
string Required field. The name of the tool. |
|
description |
Any of string | null |
|
input_schema |
Required field. The JSON schema describing the tool''s input. |
|
annotations |
Any of Annotations0 | null |
MCPApprovalRequest
A request for human approval of a tool invocation.
|
Field |
Description |
|
type |
enum Required field. The type of the item. Always
|
|
id |
string Required field. The unique ID of the approval request. |
|
server_label |
string Required field. The label of the MCP server making the request. |
|
name |
string Required field. The name of the tool to run. |
|
arguments |
string Required field. A JSON string of arguments for the tool. |
MCPApprovalResponseResource
A response to an MCP approval request.
|
Field |
Description |
|
type |
enum Required field. The type of the item. Always
|
|
id |
string Required field. The unique ID of the approval response |
|
approval_request_id |
string Required field. The ID of the approval request being answered. |
|
approve |
boolean Required field. Whether the request was approved. |
|
reason |
Any of string | null |
MCPToolCall
An invocation of a tool on an MCP server.
|
Field |
Description |
|
type |
enum Required field. The type of the item. Always
|
|
id |
string Required field. The unique ID of the tool call. |
|
server_label |
string Required field. The label of the MCP server running the tool. |
|
name |
string Required field. The name of the tool that was run. |
|
arguments |
string Required field. A JSON string of the arguments passed to the tool. |
|
output |
Any of string | null |
|
error |
Any of string | null |
|
status |
enum
|
|
approval_request_id |
Any of string | null |
CustomToolCall
A call to a custom tool created by the model.
|
Field |
Description |
|
type |
enum Required field. The type of the custom tool call. Always
|
|
id |
string The unique ID of the custom tool call in the Yandex Cloud AI Studio platform. |
|
call_id |
string Required field. An identifier used to map this custom tool call to a tool call output. |
|
name |
string Required field. The name of the custom tool being called. |
|
input |
string Required field. The input for the custom tool call generated by the model. |
CustomToolCallOutput
The output of a custom tool call from your code, being sent back to the model.
|
Field |
Description |
|
type |
enum Required field. The type of the custom tool call output. Always
|
|
id |
string The unique ID of the custom tool call output in the Yandex Cloud AI Studio platform. |
|
call_id |
string Required field. The call ID, used to map this custom tool call output to a custom tool call. |
|
output |
Any of string | unknown |
Response
HTTP Code: 200
OK