Zu Hauptinhalt wechseln

Dieser Browser wird nicht mehr unterstützt.

Führen Sie ein Upgrade auf Microsoft Edge durch, um die neuesten Features, Sicherheitsupdates und den technischen Support zu nutzen.

Microsoft Edge herunterladen Weitere Informationen zu Internet Explorer und Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Conversations

Get a conversation item

GET /openai/v1/conversations/{conversation_id}/items/{item_id}

Retrieves a specific item from the specified conversation.

Pfadparameter

conversation_id string Erforderlich

The ID of the conversation that contains the item.

item_id string Erforderlich

The id of the conversation item to retrieve.

Headerparameter

x-ms-user-identity string

Opaque per-user identity string used to scope endpoint-scoped data to a specific end user. The caller must have the agents/endpoints/UserIdentityImpersonation/action RBAC permission.

Antworten

The request has succeeded.

Text

Content-Type: application/json
Eins der folgenden:
structured_outputs StructuredOutputsOutputItem
type enum Erforderlich
structured_outputs
output StructuredOutputsOutputItem Erforderlich

The structured output captured during the response.

workflow_action WorkflowActionOutputItem
type enum Erforderlich
workflow_action
kind string Erforderlich

The kind of CSDL action (e.g., 'SetVariable', 'InvokeAzureAgent').

action_id string Erforderlich

Unique identifier for the action.

parent_action_id string

ID of the parent action if this is a nested action.

previous_action_id string

ID of the previous action if this action follows another.

status enum Erforderlich

Status of the action (e.g., 'in_progress', 'completed', 'failed', 'cancelled').

completedfailedin_progresscancelled
oauth_consent_request OAuthConsentRequestOutputItem

Request from the service for the user to perform OAuth consent.

id string Erforderlich
type enum Erforderlich
oauth_consent_request
consent_link string Erforderlich

The link the user can use to perform OAuth consent.

server_label string Erforderlich

The server label for the OAuth consent request.

bing_grounding_call BingGroundingToolCall

A Bing grounding tool call.

type enum Erforderlich
bing_grounding_call
call_id string Erforderlich

The unique ID of the tool call generated by the model.

arguments string Erforderlich

A JSON string of the arguments to pass to the tool.

status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
bing_grounding_call_output BingGroundingToolCallOutput

The output of a Bing grounding tool call.

type enum Erforderlich
bing_grounding_call_output
call_id string Erforderlich

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Eines der folgenden Elemente:
object
string
any[]
status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
sharepoint_grounding_preview_call SharepointGroundingToolCall

A SharePoint grounding tool call.

type enum Erforderlich
sharepoint_grounding_preview_call
call_id string Erforderlich

The unique ID of the tool call generated by the model.

arguments string Erforderlich

A JSON string of the arguments to pass to the tool.

status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
sharepoint_grounding_preview_call_output SharepointGroundingToolCallOutput

The output of a SharePoint grounding tool call.

type enum Erforderlich
sharepoint_grounding_preview_call_output
call_id string Erforderlich

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Eines der folgenden Elemente:
object
string
any[]
status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
azure_ai_search_call AzureAISearchToolCall

An Azure AI Search tool call.

type enum Erforderlich
azure_ai_search_call
call_id string Erforderlich

The unique ID of the tool call generated by the model.

arguments string Erforderlich

A JSON string of the arguments to pass to the tool.

status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
azure_ai_search_call_output AzureAISearchToolCallOutput

The output of an Azure AI Search tool call.

type enum Erforderlich
azure_ai_search_call_output
call_id string Erforderlich

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Eines der folgenden Elemente:
object
string
any[]
status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
bing_custom_search_preview_call BingCustomSearchToolCall

A Bing custom search tool call.

type enum Erforderlich
bing_custom_search_preview_call
call_id string Erforderlich

The unique ID of the tool call generated by the model.

arguments string Erforderlich

A JSON string of the arguments to pass to the tool.

status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
bing_custom_search_preview_call_output BingCustomSearchToolCallOutput

The output of a Bing custom search tool call.

type enum Erforderlich
bing_custom_search_preview_call_output
call_id string Erforderlich

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Eines der folgenden Elemente:
object
string
any[]
status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
openapi_call OpenApiToolCall

An OpenAPI tool call.

type enum Erforderlich
openapi_call
call_id string Erforderlich

The unique ID of the tool call generated by the model.

name string Erforderlich

The name of the OpenAPI operation being called.

arguments string Erforderlich

A JSON string of the arguments to pass to the tool.

status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
openapi_call_output OpenApiToolCallOutput

The output of an OpenAPI tool call.

type enum Erforderlich
openapi_call_output
call_id string Erforderlich

The unique ID of the tool call generated by the model.

name string Erforderlich

The name of the OpenAPI operation that was called.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Eines der folgenden Elemente:
object
string
any[]
status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
browser_automation_preview_call BrowserAutomationToolCall

A browser automation tool call.

type enum Erforderlich
browser_automation_preview_call
call_id string Erforderlich

The unique ID of the tool call generated by the model.

arguments string Erforderlich

A JSON string of the arguments to pass to the tool.

status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
browser_automation_preview_call_output BrowserAutomationToolCallOutput

The output of a browser automation tool call.

type enum Erforderlich
browser_automation_preview_call_output
call_id string Erforderlich

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Eines der folgenden Elemente:
object
string
any[]
status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
fabric_dataagent_preview_call FabricDataAgentToolCall

A Fabric data agent tool call.

type enum Erforderlich
fabric_dataagent_preview_call
call_id string Erforderlich

The unique ID of the tool call generated by the model.

arguments string Erforderlich

A JSON string of the arguments to pass to the tool.

status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
fabric_dataagent_preview_call_output FabricDataAgentToolCallOutput

The output of a Fabric data agent tool call.

type enum Erforderlich
fabric_dataagent_preview_call_output
call_id string Erforderlich

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Eines der folgenden Elemente:
object
string
any[]
status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
azure_function_call AzureFunctionToolCall

An Azure Function tool call.

type enum Erforderlich
azure_function_call
call_id string Erforderlich

The unique ID of the tool call generated by the model.

name string Erforderlich

The name of the Azure Function being called.

arguments string Erforderlich

A JSON string of the arguments to pass to the tool.

status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
azure_function_call_output AzureFunctionToolCallOutput

The output of an Azure Function tool call.

type enum Erforderlich
azure_function_call_output
call_id string Erforderlich

The unique ID of the tool call generated by the model.

name string Erforderlich

The name of the Azure Function that was called.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Eines der folgenden Elemente:
object
string
any[]
status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
a2a_preview_call A2AToolCall

An A2A (Agent-to-Agent) tool call.

type enum Erforderlich
a2a_preview_call
call_id string Erforderlich

The unique ID of the tool call generated by the model.

name string Erforderlich

The name of the A2A agent card being called.

arguments string Erforderlich

A JSON string of the arguments to pass to the tool.

status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
a2a_preview_call_output A2AToolCallOutput

The output of an A2A (Agent-to-Agent) tool call.

type enum Erforderlich
a2a_preview_call_output
call_id string Erforderlich

The unique ID of the tool call generated by the model.

name string Erforderlich

The name of the A2A agent card that was called.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Eines der folgenden Elemente:
object
string
any[]
status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
memory_search_call MemorySearchToolCall

A memory search tool call.

type enum Erforderlich
memory_search_call
status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
memories MemoryItem[] | null

The results returned from the memory search.

memory_command_preview_call MemoryCommandToolCall

A memory command tool call.

type enum Erforderlich
memory_command_preview_call
call_id string Erforderlich

The unique ID of the tool call generated by the model.

arguments string Erforderlich

A JSON string of the arguments to pass to the tool, including action (remember or forget) and content.

status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
memory_command_preview_call_output MemoryCommandToolCallOutput

The output of a memory command tool call.

type enum Erforderlich
memory_command_preview_call_output
call_id string Erforderlich

The unique ID of the tool call generated by the model.

status enum Erforderlich

The status of a tool call.

in_progresscompletedincompletefailed
output_message OpenAI.OutputItemOutputMessage

An output message from the model.

id string Erforderlich

The unique ID of the output message.

type enum Erforderlich

The type of the output message. Always message.

output_message
role enum Erforderlich

The role of the output message. Always assistant.

assistant
content OpenAI.OutputMessageContent[] Erforderlich

The content of the output message.

phase enum

Labels an assistant message as intermediate commentary (commentary) or the final answer (final_answer). For models like gpt-5.3-codex and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.

commentaryfinal_answer
status enum Erforderlich

The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.

in_progresscompletedincomplete
file_search_call OpenAI.OutputItemFileSearchToolCall

The results of a file search tool call. See the file search guide for more information.

id string Erforderlich

The unique ID of the file search tool call.

type enum Erforderlich

The type of the file search tool call. Always file_search_call.

file_search_call
status enum Erforderlich

The status of the file search tool call. One of in_progress, searching, incomplete or failed,

in_progresssearchingcompletedincompletefailed
queries string[] Erforderlich

The queries used to search for files.

results OpenAI.FileSearchToolCallResults[] | null
function_call OpenAI.OutputItemFunctionToolCall

A tool call to run a function. See the function calling guide for more information.

id string Erforderlich

The unique ID of the function tool call.

type enum Erforderlich

The type of the function tool call. Always function_call.

function_call
call_id string Erforderlich

The unique ID of the function tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Eins der folgenden:
direct OpenAI.DirectToolCallCaller
type enum Erforderlich
direct
program OpenAI.ProgramToolCallCaller
type enum Erforderlich
program
caller_id string Erforderlich

The call ID of the program item that produced this tool call.

namespace string

The namespace of the function to run.

name string Erforderlich

The name of the function to run.

arguments string Erforderlich

A JSON string of the arguments to pass to the function.

status enum

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
async boolean

Whether the function tool call runs asynchronously.

function_call_output OpenAI.OutputItemFunctionToolCallOutput

The output of a function tool call.

id string Erforderlich

The unique ID of the function tool call output. Populated when this item is returned via API.

type enum Erforderlich

The type of the function tool call output. Always function_call_output.

function_call_output
call_id string

The unique ID of the function tool call generated by the model.

name string

The name of the tool that produced the output.

namespace string

The namespace of the tool that produced the output.

caller direct | program | null

The execution context that produced this tool call.

Eins der folgenden:
direct OpenAI.DirectToolCallCallerParam
type enum Erforderlich

The caller type. Always direct.

direct
program OpenAI.ProgramToolCallCallerParam
type enum Erforderlich

The caller type. Always program.

program
caller_id string Erforderlich

The call ID of the program item that produced this tool call.

output string | OpenAI.FunctionAndCustomToolCallOutput[] Erforderlich

The output from the function call generated by your code. Can be a string or an list of output content.

Eins der folgenden:
string
OpenAI.FunctionAndCustomToolCallOutput[]
status enum

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
web_search_call OpenAI.OutputItemWebSearchToolCall

The results of a web search tool call. See the web search guide for more information.

id string Erforderlich

The unique ID of the web search tool call.

type enum Erforderlich

The type of the web search tool call. Always web_search_call.

web_search_call
status enum Erforderlich
in_progresssearchingcompletedfailedincomplete
action OpenAI.WebSearchActionSearch | OpenAI.WebSearchActionOpenPage | OpenAI.WebSearchActionFind

An object describing the specific action taken in this web search call. Includes details on how the model used the web (search, open_page, find_in_page).

Eins der folgenden:
type enum Erforderlich

The action type.

search
query string

The search query.

queries string[]

The search queries.

sources OpenAI.WebSearchActionSearchSources[]

The sources used in the search.

type enum Erforderlich

The action type.

open_page
url string | null

The URL opened by the model.

type enum Erforderlich

The action type.

find_in_page
url string | null

The URL of the page searched for the pattern, when available.

pattern string Erforderlich

The pattern or text to search for within the page.

computer_call OpenAI.OutputItemComputerToolCall

A tool call to a computer use tool. See the computer use guide for more information.

type enum Erforderlich

The type of the computer call. Always computer_call.

computer_call
id string Erforderlich

The unique ID of the computer call.

call_id string Erforderlich

An identifier used when responding to the tool call with output.

action click | double_click | drag | keypress | move | screenshot | scroll | type | wait
Eins der folgenden:
click OpenAI.ClickParam

A click action.

type enum Erforderlich

Specifies the event type. For a click action, this property is always click.

click
button enum Erforderlich
leftrightwheelbackforward
x integer Erforderlich
y integer Erforderlich
keys string[] | null
double_click OpenAI.DoubleClickAction

A double click action.

type enum Erforderlich

Specifies the event type. For a double click action, this property is always set to double_click.

double_click
x integer Erforderlich
y integer Erforderlich
keys string[] | null Erforderlich
drag OpenAI.DragParam

A drag action.

type enum Erforderlich

Specifies the event type. For a drag action, this property is always set to drag.

drag
path OpenAI.CoordParam[] Erforderlich

An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg [ { x: 100, y: 200 }, { x: 200, y: 300 } ]

keys string[] | null
keypress OpenAI.KeyPressAction

A collection of keypresses the model would like to perform.

type enum Erforderlich

Specifies the event type. For a keypress action, this property is always set to keypress.

keypress
keys string[] Erforderlich

The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.

move OpenAI.MoveParam

A mouse move action.

type enum Erforderlich

Specifies the event type. For a move action, this property is always set to move.

move
x integer Erforderlich
y integer Erforderlich
keys string[] | null
screenshot OpenAI.ScreenshotParam

A screenshot action.

type enum Erforderlich

Specifies the event type. For a screenshot action, this property is always set to screenshot.

screenshot
scroll OpenAI.ScrollParam

A scroll action.

type enum Erforderlich

Specifies the event type. For a scroll action, this property is always set to scroll.

scroll
x integer Erforderlich
y integer Erforderlich
scroll_x integer Erforderlich
scroll_y integer Erforderlich
keys string[] | null
type OpenAI.TypeParam

An action to type in text.

type enum Erforderlich

Specifies the event type. For a type action, this property is always set to type.

type
text string Erforderlich

The text to type.

wait OpenAI.WaitParam

A wait action.

type enum Erforderlich

Specifies the event type. For a wait action, this property is always set to wait.

wait
actions OpenAI.ComputerAction[]

Flattened batched actions for computer_use. Each action includes an type discriminator and action-specific fields.

pending_safety_checks OpenAI.ComputerCallSafetyCheckParam[] Erforderlich

The pending safety checks for the computer call.

status enum Erforderlich

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
computer_call_output OpenAI.OutputItemComputerToolCallOutput

The output of a computer tool call.

type enum Erforderlich

The type of the computer tool call output. Always computer_call_output.

computer_call_output
id string Erforderlich

The ID of the computer tool call output.

call_id string Erforderlich

The ID of the computer tool call that produced the output.

acknowledged_safety_checks OpenAI.ComputerCallSafetyCheckParam[]

The safety checks reported by the API that have been acknowledged by the developer.

output OpenAI.ComputerScreenshotImage Erforderlich

A computer screenshot image used with the computer use tool.

type enum Erforderlich

Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot.

computer_screenshot
image_url string

The URL of the screenshot image.

file_id string

The identifier of an uploaded file that contains the screenshot.

status enum

The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.

in_progresscompletedincomplete
reasoning OpenAI.OutputItemReasoningItem

A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your input to the Responses API for subsequent turns of a conversation if you are manually managing context.

type enum Erforderlich

The type of the object. Always reasoning.

reasoning
id string Erforderlich

The unique identifier of the reasoning content.

encrypted_content string | null
summary OpenAI.SummaryTextContent[] Erforderlich

Reasoning summary content.

content OpenAI.ReasoningTextContent[]

Reasoning text content.

status enum

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
program OpenAI.OutputItemProgram
type enum Erforderlich

The type of the item. Always program.

program
id string Erforderlich

The unique ID of the program item.

call_id string Erforderlich

The stable call ID of the program item.

code string Erforderlich

The JavaScript source executed by programmatic tool calling.

fingerprint string Erforderlich

Opaque program replay fingerprint that must be round-tripped.

program_output OpenAI.OutputItemProgramOutput
type enum Erforderlich

The type of the item. Always program_output.

program_output
id string Erforderlich

The unique ID of the program output item.

call_id string Erforderlich

The call ID of the program item.

result string Erforderlich

The result produced by the program item.

status enum Erforderlich
completedincomplete
tool_search_call OpenAI.OutputItemToolSearchCall
type enum Erforderlich

The type of the item. Always tool_search_call.

tool_search_call
id string Erforderlich

The unique ID of the tool search call item.

call_id string | null Erforderlich
execution enum Erforderlich
serverclient
arguments OpenAI.OutputItemToolSearchCall Erforderlich

Arguments used for the tool search call.

status enum Erforderlich
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

tool_search_output OpenAI.OutputItemToolSearchOutput
type enum Erforderlich

The type of the item. Always tool_search_output.

tool_search_output
id string Erforderlich

The unique ID of the tool search output item.

call_id string | null Erforderlich
execution enum Erforderlich
serverclient
tools OpenAI.Tool[] Erforderlich

The loaded tool definitions returned by tool search.

status enum Erforderlich
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

additional_tools OpenAI.OutputItemAdditionalTools
type enum Erforderlich

The type of the item. Always additional_tools.

additional_tools
id string Erforderlich

The unique ID of the additional tools item.

role enum Erforderlich
unknownuserassistantsystemcriticdiscriminatordevelopertool
tools OpenAI.Tool[] Erforderlich

The additional tool definitions made available at this item.

compaction OpenAI.OutputItemCompactionBody

A compaction item generated by the v1/responses/compact API.

type enum Erforderlich

The type of the item. Always compaction.

compaction
id string Erforderlich

The unique ID of the compaction item.

encrypted_content string Erforderlich

The encrypted content that was produced by compaction.

created_by string

The identifier of the actor that created the item.

image_generation_call OpenAI.OutputItemImageGenToolCall

An image generation request made by the model.

type enum Erforderlich

The type of the image generation call. Always image_generation_call.

image_generation_call
id string Erforderlich

The unique ID of the image generation call.

status enum Erforderlich

The status of the image generation call.

in_progresscompletedgeneratingfailed
result string | null Erforderlich
error OpenAI.ImageGenToolCallError
code string | null Erforderlich
type string Erforderlich

The error type.

message string Erforderlich

A description of the error.

param string | null Erforderlich
moderation_details OpenAI.ImageGenToolCallModerationDetails
moderation_stage enum Erforderlich

The stage where moderation blocked the image generation call.

inputoutputunknown
categories string[] Erforderlich

Public moderation categories. New category values may be added over time.

size string | enum | null
Eines der folgenden Elemente:
string
enum
1024x10241024x15361536x1024
quality enum
lowmediumhighxhighmaxauto
action enum
generateeditauto
background enum
transparentopaqueauto
output_format enum
pngwebpjpeg
revised_prompt string | null
code_interpreter_call OpenAI.OutputItemCodeInterpreterToolCall

A tool call to run code.

type enum Erforderlich

The type of the code interpreter tool call. Always code_interpreter_call.

code_interpreter_call
id string Erforderlich

The unique ID of the code interpreter tool call.

status enum Erforderlich

The status of the code interpreter tool call. Valid values are in_progress, completed, incomplete, interpreting, and failed.

in_progresscompletedincompleteinterpretingfailed
container_id string Erforderlich

The ID of the container used to run the code.

code string | null Erforderlich
outputs (OpenAI.CodeInterpreterOutputLogs | OpenAI.CodeInterpreterOutputImage)[] | null Erforderlich
local_shell_call OpenAI.OutputItemLocalShellToolCall

A tool call to run a command on the local shell.

type enum Erforderlich

The type of the local shell call. Always local_shell_call.

local_shell_call
id string Erforderlich

The unique ID of the local shell call.

call_id string Erforderlich

The unique ID of the local shell tool call generated by the model.

action OpenAI.LocalShellExecAction Erforderlich

Execute a shell command on the server.

type enum Erforderlich

The type of the local shell action. Always exec.

exec
command string[] Erforderlich

The command to run.

timeout_ms integer | null
working_directory string | null
env object Erforderlich

Environment variables to set for the command.

[key: string] string
user string | null
status enum Erforderlich

The status of the local shell call.

in_progresscompletedincomplete
local_shell_call_output OpenAI.OutputItemLocalShellToolCallOutput

The output of a local shell tool call.

type enum Erforderlich

The type of the local shell tool call output. Always local_shell_call_output.

local_shell_call_output
id string Erforderlich

The unique ID of the local shell tool call generated by the model.

output string Erforderlich

A JSON string of the output of the local shell tool call.

status enum
in_progresscompletedincomplete
shell_call OpenAI.OutputItemFunctionShellCall

A tool call that executes one or more shell commands in a managed environment.

type enum Erforderlich

The type of the item. Always shell_call.

shell_call
id string Erforderlich

The unique ID of the shell tool call. Populated when this item is returned via API.

call_id string Erforderlich

The unique ID of the shell tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Eins der folgenden:
direct OpenAI.DirectToolCallCaller
type enum Erforderlich
direct
program OpenAI.ProgramToolCallCaller
type enum Erforderlich
program
caller_id string Erforderlich

The call ID of the program item that produced this tool call.

action OpenAI.FunctionShellAction Erforderlich

Execute a shell command.

commands string[] Erforderlich
timeout_ms integer | null Erforderlich
max_output_length integer | null Erforderlich
status enum Erforderlich
in_progresscompletedincomplete
environment local | container_reference | null Erforderlich
Eins der folgenden:
local OpenAI.LocalEnvironmentResource

Represents the use of a local environment to perform shell actions.

type enum Erforderlich

The environment type. Always local.

local
container_reference OpenAI.ContainerReferenceResource

Represents a container created with /v1/containers.

type enum Erforderlich

The environment type. Always container_reference.

container_reference
container_id string Erforderlich
created_by string

The ID of the entity that created this tool call.

shell_call_output OpenAI.OutputItemFunctionShellCallOutput

The output of a shell tool call that was emitted.

type enum Erforderlich

The type of the shell call output. Always shell_call_output.

shell_call_output
id string Erforderlich

The unique ID of the shell call output. Populated when this item is returned via API.

call_id string Erforderlich

The unique ID of the shell tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Eins der folgenden:
direct OpenAI.DirectToolCallCaller
type enum Erforderlich
direct
program OpenAI.ProgramToolCallCaller
type enum Erforderlich
program
caller_id string Erforderlich

The call ID of the program item that produced this tool call.

status enum Erforderlich
in_progresscompletedincomplete
output OpenAI.FunctionShellCallOutputContent[] Erforderlich

An array of shell call output contents

max_output_length integer | null Erforderlich
created_by string

The identifier of the actor that created the item.

apply_patch_call OpenAI.OutputItemApplyPatchToolCall

A tool call that applies file diffs by creating, deleting, or updating files.

type enum Erforderlich

The type of the item. Always apply_patch_call.

apply_patch_call
id string Erforderlich

The unique ID of the apply patch tool call. Populated when this item is returned via API.

call_id string Erforderlich

The unique ID of the apply patch tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Eins der folgenden:
direct OpenAI.DirectToolCallCaller
type enum Erforderlich
direct
program OpenAI.ProgramToolCallCaller
type enum Erforderlich
program
caller_id string Erforderlich

The call ID of the program item that produced this tool call.

status enum Erforderlich
in_progresscompleted
operation create_file | delete_file | update_file Erforderlich

One of the create_file, delete_file, or update_file operations applied via apply_patch.

Eins der folgenden:
create_file OpenAI.ApplyPatchCreateFileOperation

Instruction describing how to create a file via the apply_patch tool.

type enum Erforderlich

Create a new file with the provided diff.

create_file
path string Erforderlich

Path of the file to create.

diff string Erforderlich

Diff to apply.

delete_file OpenAI.ApplyPatchDeleteFileOperation

Instruction describing how to delete a file via the apply_patch tool.

type enum Erforderlich

Delete the specified file.

delete_file
path string Erforderlich

Path of the file to delete.

update_file OpenAI.ApplyPatchUpdateFileOperation

Instruction describing how to update a file via the apply_patch tool.

type enum Erforderlich

Update an existing file with the provided diff.

update_file
path string Erforderlich

Path of the file to update.

diff string Erforderlich

Diff to apply.

created_by string

The ID of the entity that created this tool call.

apply_patch_call_output OpenAI.OutputItemApplyPatchToolCallOutput

The output emitted by an apply patch tool call.

type enum Erforderlich

The type of the item. Always apply_patch_call_output.

apply_patch_call_output
id string Erforderlich

The unique ID of the apply patch tool call output. Populated when this item is returned via API.

call_id string Erforderlich

The unique ID of the apply patch tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Eins der folgenden:
direct OpenAI.DirectToolCallCaller
type enum Erforderlich
direct
program OpenAI.ProgramToolCallCaller
type enum Erforderlich
program
caller_id string Erforderlich

The call ID of the program item that produced this tool call.

status enum Erforderlich
completedfailed
output string | null
created_by string

The ID of the entity that created this tool call output.

mcp_call OpenAI.OutputItemMcpToolCall

An invocation of a tool on an MCP server.

type enum Erforderlich

The type of the item. Always mcp_call.

mcp_call
id string Erforderlich

The unique ID of the tool call.

server_label string Erforderlich

The label of the MCP server running the tool.

name string Erforderlich

The name of the tool that was run.

arguments string Erforderlich

A JSON string of the arguments passed to the tool.

output string | null
error object

The error from the tool call, if any.

status enum
in_progresscompletedincompletecallingfailed
approval_request_id string | null
mcp_list_tools OpenAI.OutputItemMcpListTools

A list of tools available on an MCP server.

type enum Erforderlich

The type of the item. Always mcp_list_tools.

mcp_list_tools
id string Erforderlich

The unique ID of the list.

server_label string Erforderlich

The label of the MCP server.

tools OpenAI.MCPListToolsTool[] Erforderlich

The tools available on the server.

error protocol_error | tool_execution_error | http_error
Eins der folgenden:
protocol_error OpenAI.RealtimeMCPProtocolError
type enum Erforderlich
protocol_error
code integer Erforderlich
message string Erforderlich
tool_execution_error OpenAI.RealtimeMCPToolExecutionError
type enum Erforderlich
tool_execution_error
message string Erforderlich
http_error OpenAI.RealtimeMCPHTTPError
type enum Erforderlich
http_error
code integer Erforderlich
message string Erforderlich
mcp_approval_request OpenAI.OutputItemMcpApprovalRequest

A request for human approval of a tool invocation.

type enum Erforderlich

The type of the item. Always mcp_approval_request.

mcp_approval_request
id string Erforderlich

The unique ID of the approval request.

server_label string Erforderlich

The label of the MCP server making the request.

name string Erforderlich

The name of the tool to run.

arguments string Erforderlich

A JSON string of arguments for the tool.

mcp_approval_response OpenAI.OutputItemMcpApprovalResponseResource

A response to an MCP approval request.

type enum Erforderlich

The type of the item. Always mcp_approval_response.

mcp_approval_response
id string Erforderlich

The unique ID of the approval response

approval_request_id string Erforderlich

The ID of the approval request being answered.

approve boolean Erforderlich

Whether the request was approved.

reason string | null
custom_tool_call OpenAI.OutputItemCustomToolCallResource
type enum Erforderlich

The type of the custom tool call. Always custom_tool_call.

custom_tool_call
id string

The unique ID of the custom tool call in the OpenAI platform.

call_id string Erforderlich

An identifier used to map this custom tool call to a tool call output.

caller direct | program | null

The execution context that produced this tool call.

Eins der folgenden:
direct OpenAI.DirectToolCallCaller
type enum Erforderlich
direct
program OpenAI.ProgramToolCallCaller
type enum Erforderlich
program
caller_id string Erforderlich

The call ID of the program item that produced this tool call.

namespace string

The namespace of the custom tool being called.

name string Erforderlich

The name of the custom tool being called.

input string Erforderlich

The input for the custom tool call generated by the model.

async boolean

Whether the custom tool call runs asynchronously.

status enum Erforderlich
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

custom_tool_call_output OpenAI.OutputItemCustomToolCallOutputResource
type enum Erforderlich

The type of the custom tool call output. Always custom_tool_call_output.

custom_tool_call_output
id string

The unique ID of the custom tool call output in the OpenAI platform.

call_id string Erforderlich

The call ID, used to map this custom tool call output to a custom tool call.

caller direct | program | null

The execution context that produced this tool call.

Eins der folgenden:
direct OpenAI.DirectToolCallCallerParam
type enum Erforderlich

The caller type. Always direct.

direct
program OpenAI.ProgramToolCallCallerParam
type enum Erforderlich

The caller type. Always program.

program
caller_id string Erforderlich

The call ID of the program item that produced this tool call.

output string | OpenAI.FunctionAndCustomToolCallOutput[] Erforderlich

The output from the custom tool call generated by your code. Can be a string or an list of output content.

Eins der folgenden:
string
OpenAI.FunctionAndCustomToolCallOutput[]
status enum Erforderlich
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

Client error

Text

Content-Type: application/json
error OpenAI.Error Erforderlich
code string | null Erforderlich
message string Erforderlich
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Eines der folgenden Elemente:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string Erforderlich

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Text

Content-Type: application/json
error OpenAI.Error Erforderlich
code string | null Erforderlich
message string Erforderlich
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Eines der folgenden Elemente:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string Erforderlich

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Anfordern

curl https://api.openai.com/v1/conversations/conv_123/items/msg_abc \
  -H "Authorization: Bearer $OPENAI_API_KEY"
import OpenAI from "openai";
const client = new OpenAI();

const item = await client.conversations.items.retrieve(
  "conv_123",
  "msg_abc"
);
console.log(item);
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
conversation_item = client.conversations.items.retrieve(
    item_id="msg_abc",
    conversation_id="conv_123",
)
print(conversation_item)
using System;
using OpenAI.Conversations;

OpenAIConversationClient client = new(
    apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY")
);

ConversationItem item = client.ConversationItems.Get(
    conversationId: "conv_123",
    itemId: "msg_abc"
);
Console.WriteLine(item.Id);
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

const conversationItem = await client.conversations.items.retrieve('msg_abc', {
  conversation_id: 'conv_123',
});

console.log(conversationItem);
package main

import (
    "context"
    "fmt"

    "github.com/openai/openai-go"
    "github.com/openai/openai-go/conversations"
    "github.com/openai/openai-go/option"
)

func main() {
    client := openai.NewClient(
        option.WithAPIKey("My API Key"),
    )
    conversationItem, err := client.Conversations.Items.Get(
        context.TODO(),
        "conv_123",
        "msg_abc",
        conversations.ItemGetParams{},
    )
    if err != nil {
        panic(err.Error())
    }
    fmt.Printf("%+v
", conversationItem)
}
package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.conversations.items.ConversationItem;
import com.openai.models.conversations.items.ItemRetrieveParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        ItemRetrieveParams params = ItemRetrieveParams.builder()
            .conversationId("conv_123")
            .itemId("msg_abc")
            .build();
        ConversationItem conversationItem = client.conversations().items().retrieve(params);
    }
}
require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

conversation_item = openai.conversations.items.retrieve("msg_abc", conversation_id: "conv_123")

puts(conversation_item)

Antwort

{
  "type": "message",
  "id": "msg_abc",
  "status": "completed",
  "role": "user",
  "content": [
    {"type": "input_text", "text": "Hello!"}
  ]
}
de-de
Ihre Datenschutzoptionen
  • KI-Haftungsausschluss
  • Frühere Versionen
  • Blog
  • Mitwirken
  • Datenschutz
  • Consumer Health Privacy
  • Nutzungsbedingungen
  • Impressum
  • Marken
  • © Microsoft 2026