Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Beta

BetaAgents

Create an agent
client.beta.agents.create(AgentCreateParams { model, instructions, metadata, 6 more } body, RequestOptionsoptions?): Agent { id, created_at, instructions, 10 more }
POST/agents
Delete an agent
client.beta.agents.delete(stringagentID, RequestOptionsoptions?): AgentDeleted { id, deleted, object }
DELETE/agents/{agent_id}
List agents
client.beta.agents.list(AgentListParams { after, limit, order } query?, RequestOptionsoptions?): CursorPage<Agent { id, created_at, instructions, 10 more } >
GET/agents
Retrieve an agent
client.beta.agents.retrieve(stringagentID, RequestOptionsoptions?): Agent { id, created_at, instructions, 10 more }
GET/agents/{agent_id}
Update an agent
client.beta.agents.update(stringagentID, AgentUpdateParams { instructions, metadata, model, 6 more } body?, RequestOptionsoptions?): Agent { id, created_at, instructions, 10 more }
POST/agents/{agent_id}
ModelsExpand Collapse
Agent { id, created_at, instructions, 10 more }

A reusable agent scoped to the caller’s project.

AgentCloseSubagentCallItem { id, recipient_agent_id, sender_agent_id, 3 more }

A request to close a subagent.

AgentCommandExecutionItem { id, command, cwd, 6 more }

A command execution produced by the agent.

AgentContent = OutputText { text, type } | EncryptedContentResource { encrypted_content, type }

A plaintext or encrypted content part exchanged between agents.

AgentCreateSubagentCallItem { id, agent_id, content, 5 more }

A request to spawn a subagent.

AgentDeleted { id, deleted, object }

A deleted reusable agent.

AgentFunctionCallItem { id, arguments, call_id, 4 more }

A function call produced by the agent.

AgentFunctionCallOutput = string | Array<InputContent>

The text or model-input content supplied as a function result.

AgentFunctionCallOutputParam = string | Array<InputContentParam>

A function result represented as text or supported model-input content.

AgentFunctionCallStatus = "in_progress" | "completed" | "failed" | "incomplete"

The status of a tool call.

  • in_progress - The call is in progress.
  • completed - The call completed successfully.
  • failed - The call failed.
  • incomplete - The call stopped before completing.
AgentInterruptSubagentCallItem { id, recipient_agent_id, sender_agent_id, 3 more }

A request to interrupt a subagent’s current turn. The subagent remains available.

AgentMcpCallItem { id, arguments, error, 6 more }

A call to a tool on an MCP server.

AgentOutputCommandExecutionOutputDeltaEvent { delta, event_id, item_id, 4 more }

Emitted when command execution produces an output delta.

AgentOutputItem = AgentSessionAssistantMessage { id, content, phase, 4 more } | AgentReasoningItem { id, status, summary, 2 more } | AgentFunctionCallItem { id, arguments, call_id, 4 more } | 9 more

An output item produced by an agent.

AgentOutputItemStatus = "in_progress" | "completed" | "incomplete"

The status of an agent output item.

  • in_progress - The item is in progress.
  • completed - The item is complete.
  • incomplete - The item stopped before completing.
AgentReasoning { effort, summary }

The reasoning configuration used by an agent.

AgentReasoningItem { id, status, summary, 2 more }

A reasoning item produced by the agent.

AgentReasoningParam { effort, summary }

Reasoning configuration for the agent.

AgentResumeSubagentCallItem { id, recipient_agent_id, sender_agent_id, 3 more }

A request to resume a subagent.

AgentSendSubagentInputCallItem { id, content, recipient_agent_id, 4 more }

A request to send input to another agent.

AgentSession { id, agent, created_at, 9 more }

A Managed Agents session.

AgentSessionAssistantMessage { id, content, phase, 4 more }

An assistant message produced by the agent.

AgentSessionCreatedEvent { event_id, session, type }

Emitted when a session is created.

AgentSessionDeleted { id, deleted, object }

A Managed Agents session removed from the public API. Physical cleanup may continue asynchronously.

AgentSessionEnvironmentConnectedEvent { environment, event_id, session_id, 2 more }

Emitted when a session environment connects.

AgentSessionEnvironmentDisconnectedEvent { environment, event_id, session_id, 2 more }

Emitted when a session environment disconnects.

AgentSessionEnvironmentFailedEvent { environment, event_id, session_id, 2 more }

Emitted when a session environment fails.

AgentSessionEnvironmentPendingEvent { environment, event_id, session_id, 2 more }

Emitted while a session environment is being prepared.

AgentSessionEnvironmentReadyEvent { environment, event_id, session_id, 2 more }

Emitted when a hosted session environment is ready to connect.

AgentSessionEnvironmentState { id, error, status, type }

The current state of a session environment.

AgentSessionErrorEvent { error, event_id, session_id, type }

Emitted when a turn or session fails.

AgentSessionEvent = AgentSessionErrorEvent { error, event_id, session_id, type } | AgentSessionEnvironmentReadyEvent { environment, event_id, session_id, 2 more } | AgentOutputCommandExecutionOutputDeltaEvent { delta, event_id, item_id, 4 more } | 27 more

An event emitted by a Managed Agents session.

AgentSessionFailedEvent { event_id, session, type }

Emitted when a session fails.

AgentSessionIdleEvent { event_id, session, type }

Emitted when a session becomes idle.

AgentSessionInProgressEvent { event_id, session, type }

Emitted when a session starts processing a turn.

AgentSessionInputMessageParam { content, role, type }

A user message submitted to a session.

AgentSessionInputParam = SessionInputParamAgentSessionInputMessage { input, type } | SessionInputParamAgentSessionInputCancel { type } | SessionInputParamAgentSessionInputToolResult { call_id, success, turn_id, 3 more }

Input submitted to an existing session.

AgentSessionItem = AgentSessionMessage { id, content, phase, 4 more } | AgentReasoningItem { id, status, summary, 2 more } | AgentFunctionCallItem { id, arguments, call_id, 4 more } | 11 more

An item associated with a session turn.

AgentSessionMessage { id, content, phase, 4 more }

A user or assistant message recorded in a session.

AgentSessionMessageContent = MessageContentResourceInputText { text, type } | MessageContentResourceInputImage { image_url, type } | MessageContentResourceOutputText { text, type }

A content part in a session message.

AgentSessionRequiresActionEvent { event_id, session, type }

Emitted when a session is waiting for one or more required actions.

AgentSessionSubagentActiveEvent { event_id, subagent, type }

Emitted when a closed subagent successfully resumes.

AgentSessionSubagentClosedEvent { event_id, subagent, type }

Emitted when a subagent is closed.

AgentSessionSubagentCreatedEvent { event_id, subagent, type }

Emitted when a subagent is created.

AgentSessionTurnCancelledEvent { event_id, session_id, turn, 3 more }

Emitted when a turn is cancelled.

AgentSessionTurnCompletedEvent { event_id, session_id, turn, 3 more }

Emitted when a turn completes.

AgentSessionTurnContentPartAddedEvent { content_index, event_id, item_id, 5 more }

Emitted when an output text content part is added.

AgentSessionTurnContentPartDoneEvent { content_index, event_id, item_id, 5 more }

Emitted when an output content part is complete.

AgentSessionTurnCreatedEvent { event_id, session_id, turn, 2 more }

Emitted when a turn is created.

AgentSessionTurnFailedEvent { event_id, session_id, turn, 3 more }

Emitted when a turn fails.

AgentSessionTurnInProgressEvent { event_id, session_id, turn, 2 more }

Emitted when a turn starts running.

AgentSessionTurnItemAddedEvent { event_id, item, output_index, 3 more }

Emitted when an item is added to a turn.

AgentSessionTurnItemDoneEvent { event_id, item, output_index, 3 more }

Emitted when an output item is complete.

AgentSessionTurnOutputTextDeltaEvent { content_index, delta, event_id, 5 more }

Emitted when text is appended to an output text content part.

AgentSessionTurnOutputTextDoneEvent { content_index, event_id, item_id, 5 more }

Emitted when an output text content part is complete.

AgentSessionTurnReasoningSummaryPartAddedEvent { event_id, item_id, output_index, 5 more }

Emitted when a reasoning summary content part is added.

AgentSessionTurnReasoningSummaryPartDoneEvent { event_id, item_id, output_index, 6 more }

Emitted when a reasoning summary part is complete.

AgentSessionTurnReasoningSummaryTextDeltaEvent { delta, event_id, item_id, 5 more }

Emitted when text is appended to a reasoning summary.

AgentSessionTurnReasoningSummaryTextDoneEvent { event_id, item_id, output_index, 5 more }

Emitted when a reasoning summary content part is complete.

AgentText { format, verbosity }

The text configuration used by an agent.

AgentTextParam { format, verbosity }

Configuration for text generated by the agent.

AgentTool = AgentToolResourceFunction { defer_loading, description, name, 2 more } | AgentToolResourceProgrammaticToolCalling { enabled, type } | AgentToolResourceMcp { allowed_tools, connection_origin, credential_id, 5 more } | AgentToolResourceWebSearch { allowed_domains, context_size, location, 2 more }

A tool available to the agent.

AgentToolParam = AgentToolConfigParamFunction { description, name, parameters, 2 more } | AgentToolConfigParamToolSearch { type } | AgentToolConfigParamProgrammaticToolCalling { type, enabled } | 2 more

A tool available to the agent.

AgentWaitForSubagentsCallItem { id, recipient_agent_ids, sender_agent_id, 3 more }

A request to wait for one or more subagents.

AgentWebSearchCallItem { id, action, status, 2 more }

A web search call produced by the agent.

Environment = EnvironmentResourceNone { type } | EnvironmentResourceOpenAIHosted { id, capability_directories, files, 5 more } | EnvironmentResourceSelfHosted { id, capability_directories, remote_url, 2 more }

The execution environment for a session.

EnvironmentParam = EnvironmentParamNone { type } | EnvironmentParamOpenAIHosted { type, capability_directories, env, 7 more } | EnvironmentParamSelfHosted { type, workspace_directory, capability_directories }

The execution environment and optional reusable template for a session.

HostedEnvironmentFile = HostedEnvironmentFileID { id, file_id, path, 2 more } | HostedEnvironmentFileResourceInline { id, path, size_bytes, type }

Metadata for a file materialized in an OpenAI-hosted execution environment.

HostedEnvironmentFileID { id, file_id, path, 2 more }

A file copied from the OpenAI Files API.

HostedEnvironmentFileParam = HostedEnvironmentFileParamFileID { file_id, path, type } | HostedEnvironmentFileParamInline { data, path, type }

A file materialized in an OpenAI-hosted execution environment.

HostedPlugin { description, name, type }

A plugin installed from an inline ZIP archive.

HostedPluginParam { description, name, source, type }

Supplies a plugin ZIP directly in the session request.

HostedSkill = HostedSkillReference { description, name, skill_id, 2 more } | HostedSkillResourceInline { description, name, type }

A skill installed in an OpenAI-hosted environment.

HostedSkillParam = HostedSkillParamSkillReference { skill_id, type, version } | HostedSkillParamInline { description, name, source, type }

A skill installed in an OpenAI-hosted environment.

HostedSkillReference { description, name, skill_id, 2 more }

A skill installed from the Skills API.

InlineCapabilitySourceParam { data, media_type, type }

Provides ZIP bytes encoded with standard base64.

InputContent = InputContentResourceInputText { text, type } | InputContentResourceInputImage { image_url, type }

User-provided content recorded in a session item.

InputContentParam = InputContentParamInputText { text, type } | InputContentParamInputImage { image_url, type }

Content included in an input message.

McpTransport = McpTransportResourceHTTP { server_url, type } | McpTransportResourceStdio { args, command, cwd, 2 more }

The transport used to connect to an MCP server.

McpTransportParam = McpTransportConfigParamHTTP { server_url, type, authorization, headers } | McpTransportConfigParamStdio { command, cwd, type, 3 more }

The transport used to connect to an MCP server.

MultiAgentConfig { enabled, max_concurrent_subagents }

The resolved configuration for creating and coordinating subagents.

MultiAgentConfigParam { enabled, max_concurrent_subagents }

Explicit configuration for creating and coordinating subagents.

OutputText { text, type }

A text content part produced by the agent.

PersistedAgentTool = PersistedAgentToolResourceFunction { defer_loading, description, name, 2 more } | PersistedAgentToolResourceToolSearch { type } | PersistedAgentToolResourceProgrammaticToolCalling { enabled, type } | 2 more

A credential-free tool available to a reusable agent.

PersistedAgentToolParam = PersistedAgentToolConfigParamFunction { description, name, parameters, 2 more } | PersistedAgentToolConfigParamToolSearch { type } | PersistedAgentToolConfigParamProgrammaticToolCalling { type, enabled } | 2 more

A tool that can be stored on a reusable agent without session credentials.

PersistedMcpTransport = PersistedMcpTransportResourceHTTP { headers, server_url, type } | PersistedMcpTransportResourceStdio { args, command, cwd, 2 more }

A credential-free transport used to connect to an MCP server.

PersistedMcpTransportParam = PersistedMcpTransportConfigParamHTTP { server_url, type, headers } | PersistedMcpTransportConfigParamStdio { command, cwd, type, 2 more }

A credential-free transport used to connect to an MCP server.

SessionError { code, message, param, type }

An error payload with the same public fields as Responses API streaming errors.

SessionTurnError { code, message }

A customer-safe error describing why a session request failed.

SetupCommandParam { command, cwd }

A confidential setup command executed before the hosted agent starts.

Subagent { id, closed_at, instructions, 6 more }

A subagent created within a session.

SummaryText { text, type }

A reasoning summary content part.

TextFormat = TextFormatResourceText { type } | TextFormatResourceJSONSchema { schema, type }

The effective output format for generated text.

TextFormatParam = TextFormatParamText { type } | TextFormatParamJSONSchema { schema, type }

The output format for generated text.

TokenUsage { input_tokens, input_tokens_details, output_tokens, 2 more }

Recorded token usage for a session or turn. Usage is best effort and may change.

WebSearchAction = WebSearchActionResourceSearch { queries, query, type } | WebSearchActionResourceOpenPage { type, url } | WebSearchActionResourceFindInPage { pattern, type, url } | WebSearchActionResourceOther { type }

An action performed by the web search tool.

BetaAgentsEnvironments

Retrieve an agent environment
client.beta.agents.environments.retrieve(stringenvironmentID, RequestOptionsoptions?): EnvironmentInfo { id, files, object, 4 more }
GET/agents/environments/{environment_id}
ModelsExpand Collapse
EnvironmentInfo { id, files, object, 4 more }

Safe metadata for a first-class execution environment.

BetaAgentsEnvironmentsFiles

Create an agent environment file
client.beta.agents.environments.files.create(stringenvironmentID, FileCreateParamsbody, RequestOptionsoptions?): EnvironmentFile { environment_id, object, path, size_bytes }
POST/agents/environments/{environment_id}/files
List agent environment files
client.beta.agents.environments.files.list(stringenvironmentID, FileListParams { limit, order, page, path_ } query?, RequestOptionsoptions?): TokenPage<EnvironmentFile { environment_id, object, path, size_bytes } >
GET/agents/environments/{environment_id}/files
ModelsExpand Collapse
EnvironmentFile { environment_id, object, path, size_bytes }

A live file in an execution environment.

BetaAgentsEnvironmentsTemplates

Create an agent environment template
client.beta.agents.environments.templates.create(TemplateCreateParams { capability_directories, env, files, 6 more } body?, RequestOptionsoptions?): EnvironmentTemplate { id, capability_directories, created_at, 8 more }
POST/agents/environments/templates
Delete an agent environment template
client.beta.agents.environments.templates.delete(stringenvironmentTemplateID, RequestOptionsoptions?): EnvironmentTemplateDeleted { id, deleted, object }
DELETE/agents/environments/templates/{environment_template_id}
List agent environment templates
client.beta.agents.environments.templates.list(TemplateListParams { after, limit, order } query?, RequestOptionsoptions?): CursorPage<EnvironmentTemplate { id, capability_directories, created_at, 8 more } >
GET/agents/environments/templates
Retrieve an agent environment template
client.beta.agents.environments.templates.retrieve(stringenvironmentTemplateID, RequestOptionsoptions?): EnvironmentTemplate { id, capability_directories, created_at, 8 more }
GET/agents/environments/templates/{environment_template_id}
Update an agent environment template
client.beta.agents.environments.templates.update(stringenvironmentTemplateID, TemplateUpdateParams { capability_directories, env, files, 6 more } body?, RequestOptionsoptions?): EnvironmentTemplate { id, capability_directories, created_at, 8 more }
POST/agents/environments/templates/{environment_template_id}
ModelsExpand Collapse
EnvironmentTemplate { id, capability_directories, created_at, 8 more }

Reusable configuration that provisions a fresh OpenAI-hosted environment for each session.

EnvironmentTemplateDeleted { id, deleted, object }

A deleted reusable environment template.

BetaAgentsSessions

Create an agent session
client.beta.agents.sessions.create(SessionCreateParamsbody, RequestOptionsoptions?): AgentSession { id, agent, created_at, 9 more } | Stream<AgentSessionEvent>
POST/agents/sessions
Delete an agent session
client.beta.agents.sessions.delete(stringsessionID, RequestOptionsoptions?): AgentSessionDeleted { id, deleted, object }
DELETE/agents/sessions/{session_id}
List agent sessions
client.beta.agents.sessions.list(SessionListParams { after, agent_id, limit, order } query?, RequestOptionsoptions?): CursorPage<AgentSession { id, agent, created_at, 9 more } >
GET/agents/sessions
Retrieve an agent session
client.beta.agents.sessions.retrieve(stringsessionID, RequestOptionsoptions?): AgentSession { id, agent, created_at, 9 more }
GET/agents/sessions/{session_id}
Update an agent session
client.beta.agents.sessions.update(stringsessionID, SessionUpdateParams { agent, metadata } body?, RequestOptionsoptions?): AgentSession { id, agent, created_at, 9 more }
POST/agents/sessions/{session_id}

BetaAgentsSessionsArtifacts

Retrieve agent session artifact content
client.beta.agents.sessions.artifacts.content(stringartifactID, ArtifactContentParams { session_id } params, RequestOptionsoptions?): Response
GET/agents/sessions/{session_id}/artifacts/{artifact_id}/content
Delete an agent session artifact
client.beta.agents.sessions.artifacts.delete(stringartifactID, ArtifactDeleteParams { session_id } params, RequestOptionsoptions?): SessionArtifactDeleted { id, deleted, object }
DELETE/agents/sessions/{session_id}/artifacts/{artifact_id}
List agent session artifacts
client.beta.agents.sessions.artifacts.list(stringsessionID, ArtifactListParams { after, environment_id, limit, order } query?, RequestOptionsoptions?): CursorPage<SessionArtifact { id, created_at, environment_id, 5 more } >
GET/agents/sessions/{session_id}/artifacts
Retrieve an agent session artifact
client.beta.agents.sessions.artifacts.retrieve(stringartifactID, ArtifactRetrieveParams { session_id } params, RequestOptionsoptions?): SessionArtifact { id, created_at, environment_id, 5 more }
GET/agents/sessions/{session_id}/artifacts/{artifact_id}
ModelsExpand Collapse
SessionArtifact { id, created_at, environment_id, 5 more }

An immutable file published by a completed hosted session turn.

SessionArtifactDeleted { id, deleted, object }

Confirmation that an immutable session artifact was deleted.

BetaAgentsSessionsEvents

Create agent session input events
client.beta.agents.sessions.events.create(stringsessionID, EventCreateParams { events, idempotencyKey } params, RequestOptionsoptions?): void
POST/agents/sessions/{session_id}/events
Stream agent session events
client.beta.agents.sessions.events.stream(stringsessionID, RequestOptionsoptions?): AgentSessionEvent | Stream<AgentSessionEvent>
GET/agents/sessions/{session_id}/events

BetaAgentsSessionsItems

List agent session items
client.beta.agents.sessions.items.list(stringsessionID, ItemListParams { after, limit, order } query?, RequestOptionsoptions?): CursorPage<AgentSessionItem>
GET/agents/sessions/{session_id}/items

BetaAgentsSessionsSubagents

List session subagents
client.beta.agents.sessions.subagents.list(stringsessionID, SubagentListParams { after, limit, order } query?, RequestOptionsoptions?): CursorPage<Subagent { id, closed_at, instructions, 6 more } >
GET/agents/sessions/{session_id}/subagents
Retrieve a session subagent
client.beta.agents.sessions.subagents.retrieve(stringsubagentID, SubagentRetrieveParams { session_id } params, RequestOptionsoptions?): Subagent { id, closed_at, instructions, 6 more }
GET/agents/sessions/{session_id}/subagents/{subagent_id}

BetaAgentsSessionsSubagentsItems

List subagent items
client.beta.agents.sessions.subagents.items.list(stringsubagentID, ItemListParams { session_id, after, limit, order } params, RequestOptionsoptions?): CursorPage<AgentSessionItem>
GET/agents/sessions/{session_id}/subagents/{subagent_id}/items

BetaAgentsSessionsSubagentsTurns

List subagent turns
client.beta.agents.sessions.subagents.turns.list(stringsubagentID, TurnListParams { session_id, after, limit, order } params, RequestOptionsoptions?): CursorPage<Turn { id, agent_id, completed_at, 8 more } >
GET/agents/sessions/{session_id}/subagents/{subagent_id}/turns
Retrieve a subagent turn
client.beta.agents.sessions.subagents.turns.retrieve(stringturnID, TurnRetrieveParams { session_id, subagent_id } params, RequestOptionsoptions?): Turn { id, agent_id, completed_at, 8 more }
GET/agents/sessions/{session_id}/subagents/{subagent_id}/turns/{turn_id}

BetaAgentsSessionsSubagentsTurnsItems

List subagent turn items
client.beta.agents.sessions.subagents.turns.items.list(stringturnID, ItemListParams { session_id, subagent_id, after, 2 more } params, RequestOptionsoptions?): CursorPage<AgentSessionItem>
GET/agents/sessions/{session_id}/subagents/{subagent_id}/turns/{turn_id}/items

BetaAgentsSessionsTurns

List agent session turns
client.beta.agents.sessions.turns.list(stringsessionID, TurnListParams { after, limit, order } query?, RequestOptionsoptions?): CursorPage<Turn { id, agent_id, completed_at, 8 more } >
GET/agents/sessions/{session_id}/turns
Retrieve an agent session turn
client.beta.agents.sessions.turns.retrieve(stringturnID, TurnRetrieveParams { session_id } params, RequestOptionsoptions?): Turn { id, agent_id, completed_at, 8 more }
GET/agents/sessions/{session_id}/turns/{turn_id}
ModelsExpand Collapse
Turn { id, agent_id, completed_at, 8 more }

The canonical public representation of a session turn.

BetaAgentsVaults

Create a vault
client.beta.agents.vaults.create(VaultCreateParams { metadata, name } body?, RequestOptionsoptions?): Vault { id, created_at, metadata, 2 more }
POST/vaults
Delete a vault
client.beta.agents.vaults.delete(stringvaultID, RequestOptionsoptions?): VaultDeleted { id, deleted, object }
DELETE/vaults/{vault_id}
List vaults
client.beta.agents.vaults.list(VaultListParams { after, limit, order, status } query?, RequestOptionsoptions?): CursorPage<Vault { id, created_at, metadata, 2 more } >
GET/vaults
Retrieve a vault
client.beta.agents.vaults.retrieve(stringvaultID, RequestOptionsoptions?): Vault { id, created_at, metadata, 2 more }
GET/vaults/{vault_id}
ModelsExpand Collapse
Vault { id, created_at, metadata, 2 more }

A collection of credentials that agent tools can use to authenticate to MCP servers.

VaultDeleted { id, deleted, object }

Confirmation that a vault was deleted.

VaultStatus = "active" | "archived"

Whether a vault or credential is active or archived.

VaultStatusFilter = VaultStatus | Array<VaultStatus>

One or more lifecycle statuses to include when listing vaults or credentials.

BetaAgentsVaultsCredentials

Create a vault credential
client.beta.agents.vaults.credentials.create(stringvaultID, CredentialCreateParams { auth, name } body, RequestOptionsoptions?): Credential { id, auth, created_at, 4 more }
POST/vaults/{vault_id}/credentials
Delete a vault credential
client.beta.agents.vaults.credentials.delete(stringcredentialID, CredentialDeleteParams { vault_id } params, RequestOptionsoptions?): CredentialDeleted { id, deleted, object }
DELETE/vaults/{vault_id}/credentials/{credential_id}
List vault credentials
client.beta.agents.vaults.credentials.list(stringvaultID, CredentialListParams { after, limit, order, status } query?, RequestOptionsoptions?): CursorPage<Credential { id, auth, created_at, 4 more } >
GET/vaults/{vault_id}/credentials
Retrieve a vault credential
client.beta.agents.vaults.credentials.retrieve(stringcredentialID, CredentialRetrieveParams { vault_id } params, RequestOptionsoptions?): Credential { id, auth, created_at, 4 more }
GET/vaults/{vault_id}/credentials/{credential_id}
Rotate a vault credential
client.beta.agents.vaults.credentials.update(stringcredentialID, CredentialUpdateParams { vault_id, auth } params, RequestOptionsoptions?): Credential { id, auth, created_at, 4 more }
POST/vaults/{vault_id}/credentials/{credential_id}
ModelsExpand Collapse
Credential { id, auth, created_at, 4 more }

Metadata for a stored MCP server credential. Secret values are never returned.

CredentialAuth = VaultCredentialAuthResourceMcpOauth { expires_at, mcp_server_url, refresh, type } | VaultCredentialAuthResourceStaticBearer { mcp_server_url, type }

The MCP server and authentication configuration of a vault credential, excluding secrets.

CredentialAuthCreateParam = CreateVaultCredentialAuthParamMcpOauth { access_token, mcp_server_url, type, 2 more } | CreateVaultCredentialAuthParamStaticBearer { token, mcp_server_url, type }

Authentication credentials for an MCP server used by agent tools.

CredentialAuthRotateParam = RotateVaultCredentialAuthParamMcpOauth { type, access_token, expires_at, refresh } | RotateVaultCredentialAuthParamStaticBearer { token, type }

Updates to a vault credential without changing its authentication method or MCP server.

CredentialDeleted { id, deleted, object }

Confirmation that a vault credential was deleted.

McpOauthTokenEndpointAuth = McpOauthTokenEndpointAuthResourceNone { type } | McpOauthTokenEndpointAuthResourceClientSecretBasic { type } | McpOauthTokenEndpointAuthResourceClientSecretPost { type }

The client authentication method used for OAuth token refresh.

McpOauthTokenEndpointAuthCreateParam = CreateMcpOauthTokenEndpointAuthParamNone { type } | CreateMcpOauthTokenEndpointAuthParamClientSecretBasic { client_secret, type } | CreateMcpOauthTokenEndpointAuthParamClientSecretPost { client_secret, type }

Client authentication credentials for OAuth token refresh.

McpOauthTokenEndpointAuthRotateParam = RotateMcpOauthTokenEndpointAuthParamClientSecretBasic { type, client_secret } | RotateMcpOauthTokenEndpointAuthParamClientSecretPost { type, client_secret }

Client-secret updates that preserve the credential’s OAuth authentication method.

BetaAssistants

Build Assistants that can call models and use tools.

Create assistant
Deprecated
client.beta.assistants.create(AssistantCreateParams { model, description, instructions, 8 more } body, RequestOptionsoptions?): Assistant { id, created_at, description, 10 more }
POST/assistants
Delete assistant
Deprecated
client.beta.assistants.delete(stringassistantID, RequestOptionsoptions?): AssistantDeleted { id, deleted, object }
DELETE/assistants/{assistant_id}
List assistants
Deprecated
client.beta.assistants.list(AssistantListParams { after, before, limit, order } query?, RequestOptionsoptions?): CursorPage<Assistant { id, created_at, description, 10 more } >
GET/assistants
Retrieve assistant
Deprecated
client.beta.assistants.retrieve(stringassistantID, RequestOptionsoptions?): Assistant { id, created_at, description, 10 more }
GET/assistants/{assistant_id}
Modify assistant
Deprecated
client.beta.assistants.update(stringassistantID, AssistantUpdateParams { description, instructions, metadata, 8 more } body, RequestOptionsoptions?): Assistant { id, created_at, description, 10 more }
POST/assistants/{assistant_id}
ModelsExpand Collapse
Assistant { id, created_at, description, 10 more }

Represents an assistant that can call the model and use tools.

AssistantDeleted { id, deleted, object }
AssistantStreamEvent = ThreadCreated { data, event, enabled } | ThreadRunCreated { data, event } | ThreadRunQueued { data, event } | 21 more

Represents an event emitted when streaming a Run.

Each event in a server-sent events stream has an event and data property:

event: thread.created
data: {"id": "thread_123", "object": "thread", ...}

We emit events whenever a new object is created, transitions to a new state, or is being streamed in parts (deltas). For example, we emit thread.run.created when a new run is created, thread.run.completed when a run completes, and so on. When an Assistant chooses to create a message during a run, we emit a thread.message.created event, a thread.message.in_progress event, many thread.message.delta events, and finally a thread.message.completed event.

We may add additional events over time, so we recommend handling unknown events gracefully in your code. See the Assistants API quickstart to learn how to integrate the Assistants API with streaming.

AssistantTool = CodeInterpreterTool { type } | FileSearchTool { type, file_search } | FunctionTool { function, type }
CodeInterpreterTool { type }
FileSearchTool { type, file_search }
FunctionTool { function, type }
MessageStreamEvent = ThreadMessageCreated { data, event } | ThreadMessageInProgress { data, event } | ThreadMessageDelta { data, event } | 2 more

Occurs when a message is created.

RunStepStreamEvent = ThreadRunStepCreated { data, event } | ThreadRunStepInProgress { data, event } | ThreadRunStepDelta { data, event } | 4 more

Occurs when a run step is created.

RunStreamEvent = ThreadRunCreated { data, event } | ThreadRunQueued { data, event } | ThreadRunInProgress { data, event } | 7 more

Occurs when a new run is created.

ThreadStreamEvent { data, event, enabled }

Occurs when a new thread is created.

BetaChatKit

ModelsExpand Collapse
ChatKitWorkflow { id, state_variables, tracing, version }

Workflow metadata and state returned for the session.

BetaChatKitSessions

Cancel a ChatKit session
client.beta.chatkit.sessions.cancel(stringsessionID, RequestOptionsoptions?): ChatSession { id, chatkit_configuration, client_secret, 7 more }
POST/chatkit/sessions/{session_id}/cancel
Create a ChatKit session
client.beta.chatkit.sessions.create(SessionCreateParams { user, workflow, chatkit_configuration, 2 more } body, RequestOptionsoptions?): ChatSession { id, chatkit_configuration, client_secret, 7 more }
POST/chatkit/sessions

BetaChatKitThreads

Delete a ChatKit thread
client.beta.chatkit.threads.delete(stringthreadID, RequestOptionsoptions?): ThreadDeleteResponse { id, deleted, object }
DELETE/chatkit/threads/{thread_id}
List ChatKit threads
client.beta.chatkit.threads.list(ThreadListParams { after, before, limit, 2 more } query?, RequestOptionsoptions?): ConversationCursorPage<ChatKitThread { id, created_at, object, 3 more } >
GET/chatkit/threads
List ChatKit thread items
client.beta.chatkit.threads.listItems(stringthreadID, ThreadListItemsParams { after, before, limit, order } query?, RequestOptionsoptions?): ConversationCursorPage<ChatKitThreadUserMessageItem { id, attachments, content, 5 more } | ChatKitThreadAssistantMessageItem { id, content, created_at, 3 more } | ChatKitWidgetItem { id, created_at, object, 3 more } | 3 more>
GET/chatkit/threads/{thread_id}/items
Retrieve a ChatKit thread
client.beta.chatkit.threads.retrieve(stringthreadID, RequestOptionsoptions?): ChatKitThread { id, created_at, object, 3 more }
GET/chatkit/threads/{thread_id}
ModelsExpand Collapse
ChatSession { id, chatkit_configuration, client_secret, 7 more }

Represents a ChatKit session and its resolved configuration.

ChatSessionAutomaticThreadTitling { enabled }

Automatic thread title preferences for the session.

ChatSessionChatKitConfiguration { automatic_thread_titling, file_upload, history }

ChatKit configuration for the session.

ChatSessionChatKitConfigurationParam { automatic_thread_titling, file_upload, history }

Optional per-session configuration settings for ChatKit behavior.

ChatSessionExpiresAfterParam { anchor, seconds }

Controls when the session expires relative to an anchor timestamp.

ChatSessionFileUpload { enabled, max_file_size, max_files }

Upload permissions and limits applied to the session.

ChatSessionHistory { enabled, recent_threads }

History retention preferences returned for the session.

ChatSessionRateLimits { max_requests_per_1_minute }

Active per-minute request limit for the session.

ChatSessionRateLimitsParam { max_requests_per_1_minute }

Controls request rate limits for the session.

ChatSessionStatus = "active" | "expired" | "cancelled"
ChatSessionWorkflowParam { id, state_variables, tracing, version }

Workflow reference and overrides applied to the chat session.

ChatKitAttachment { id, mime_type, name, 2 more }

Attachment metadata included on thread items.

ChatKitResponseOutputText { annotations, text, type }

Assistant response text accompanied by optional annotations.

ChatKitThread { id, created_at, object, 3 more }

Represents a ChatKit thread and its current status.

ChatKitThreadAssistantMessageItem { id, content, created_at, 3 more }

Assistant-authored message within a thread.

ChatKitThreadItemList { data, first_id, has_more, 2 more }

A paginated list of thread items rendered for the ChatKit API.

ChatKitThreadUserMessageItem { id, attachments, content, 5 more }

User-authored messages within a thread.

ChatKitWidgetItem { id, created_at, object, 3 more }

Thread item that renders a widget payload.

ThreadDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a thread.

BetaResponses

Cancel a response
client.beta.responses.cancel(stringresponseID, ResponseCancelParams { betas } params?, RequestOptionsoptions?): BetaResponse { id, created_at, error, 32 more }
POST/responses/{response_id}/cancel
Compact conversation
client.beta.responses.compact(ResponseCompactParams { model, input, instructions, 6 more } params, RequestOptionsoptions?): BetaCompactedResponse { id, created_at, object, 2 more }
POST/responses/compact
Connect
client.beta.responses.connect(RequestOptionsoptions?): void
Function
Create a model response
client.beta.responses.create(ResponseCreateParamsparams, RequestOptionsoptions?): BetaResponse { id, created_at, error, 32 more } | Stream<BetaResponseStreamEvent>
POST/responses
Delete a model response
client.beta.responses.delete(stringresponseID, ResponseDeleteParams { betas } params?, RequestOptionsoptions?): void
DELETE/responses/{response_id}
Get a model response
client.beta.responses.retrieve(stringresponseID, ResponseRetrieveParamsparams?, RequestOptionsoptions?): BetaResponse { id, created_at, error, 32 more } | Stream<BetaResponseStreamEvent>
GET/responses/{response_id}
ModelsExpand Collapse
BetaApplyPatchTool { type, allowed_callers }

Allows the assistant to create, delete, or update files using unified diffs.

BetaCompactedResponse { id, created_at, object, 2 more }
BetaComputerAction = Click { button, type, x, 2 more } | DoubleClick { keys, type, x, y } | Drag { path, type, keys } | 6 more

A click action.

BetaComputerActionList = Array<BetaComputerAction>

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

BetaComputerTool { type }

A tool that controls a virtual computer. Learn more about the computer tool.

BetaComputerUsePreviewTool { display_height, display_width, environment, type }

A tool that controls a virtual computer. Learn more about the computer tool.

BetaContainerAuto { type, file_ids, memory_limit, 2 more }
BetaContainerNetworkPolicyAllowlist { allowed_domains, type, domain_secrets }
BetaContainerNetworkPolicyDisabled { type }
BetaContainerNetworkPolicyDomainSecret { domain, name, value }
BetaContainerReference { container_id, type }
BetaCustomTool { name, type, allowed_callers, 4 more }

A custom tool that processes input using a specified format. Learn more about custom tools

BetaEasyInputMessage { content, role, phase, type }

A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions.

BetaFileSearchTool { type, vector_store_ids, filters, 2 more }

A tool that searches for relevant content from uploaded files. Learn more about the file search tool.

BetaFunctionShellTool { type, allowed_callers, environment }

A tool that allows the model to execute shell commands.

BetaFunctionTool { name, parameters, strict, 6 more }

Defines a function in your own code the model can choose to call. Learn more about function calling.

BetaImageDetail = "low" | "high" | "auto" | "original"
BetaInlineSkill { description, name, source, type }
BetaInlineSkillSource { data, media_type, type }

Inline skill payload

BetaLocalEnvironment { type, skills }
BetaLocalSkill { description, name, path }
BetaMcpToolCallError = McpProtocolError { code, message, type } | McpToolExecutionError { content, type } | HTTPError { code, message, type }
BetaNamespaceTool { description, name, tools, type }

Groups function/custom tools under a shared namespace.

BetaResponse { id, created_at, error, 32 more }
BetaResponseApplyPatchToolCall { id, call_id, operation, 5 more }

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

BetaResponseApplyPatchToolCallOutput { id, call_id, status, 5 more }

The output emitted by an apply patch tool call.

BetaResponseAudioDeltaEvent { delta, sequence_number, type, agent }

Emitted when there is a partial audio response.

BetaResponseAudioDoneEvent { sequence_number, type, agent }

Emitted when the audio response is complete.

BetaResponseAudioTranscriptDeltaEvent { delta, sequence_number, type, agent }

Emitted when there is a partial transcript of audio.

BetaResponseAudioTranscriptDoneEvent { sequence_number, type, agent }

Emitted when the full audio transcript is completed.

BetaResponseCodeInterpreterCallCodeDeltaEvent { delta, item_id, output_index, 3 more }

Emitted when a partial code snippet is streamed by the code interpreter.

BetaResponseCodeInterpreterCallCodeDoneEvent { code, item_id, output_index, 3 more }

Emitted when the code snippet is finalized by the code interpreter.

BetaResponseCodeInterpreterCallCompletedEvent { item_id, output_index, sequence_number, 2 more }

Emitted when the code interpreter call is completed.

BetaResponseCodeInterpreterCallInProgressEvent { item_id, output_index, sequence_number, 2 more }

Emitted when a code interpreter call is in progress.

BetaResponseCodeInterpreterCallInterpretingEvent { item_id, output_index, sequence_number, 2 more }

Emitted when the code interpreter is actively interpreting the code snippet.

BetaResponseCodeInterpreterToolCall { id, code, container_id, 4 more }

A tool call to run code.

BetaResponseCompactionCompactingEvent { item_id, output_index, sequence_number, 2 more }

Emitted when new summary content is sampled for a compaction trigger. Contains no summary content.

BetaResponseCompactionItem { id, encrypted_content, type, 2 more }

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

BetaResponseCompactionItemParam { encrypted_content, type, id, agent }

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

BetaResponseCompletedEvent { response, sequence_number, type, agent }

Emitted when the model response is complete.

BetaResponseComputerToolCall { id, call_id, pending_safety_checks, 5 more }

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

BetaResponseComputerToolCallOutputItem { id, call_id, output, 5 more }
BetaResponseComputerToolCallOutputScreenshot { type, file_id, image_url }

A computer screenshot image used with the computer use tool.

BetaResponseConfigurationUpdateItem { id, type, agent, reasoning }

A configuration update that applies to subsequent responses until it is replaced by another configuration update.

BetaResponseConfigurationUpdateItemParam { type, id, agent, reasoning }

An update to the conversation’s response configuration. The configuration remains in effect for subsequent responses until it is replaced by another configuration update.

BetaResponseContainerReference { container_id, type }

Represents a container created with /v1/containers.

BetaResponseContent = BetaResponseInputText { text, type, prompt_cache_breakpoint } | BetaResponseInputImage { detail, type, file_id, 2 more } | BetaResponseInputFile { type, detail, file_data, 4 more } | 3 more

Multi-modal input and output contents.

BetaResponseContentPartAddedEvent { content_index, item_id, output_index, 4 more }

Emitted when a new content part is added.

BetaResponseContentPartDoneEvent { content_index, item_id, output_index, 4 more }

Emitted when a content part is done.

BetaResponseConversationParam { id }

The conversation that this response belongs to.

BetaResponseCreatedEvent { response, sequence_number, type, agent }

An event that is emitted when a response is created.

BetaResponseCustomToolCall { call_id, input, name, 6 more }

A call to a custom tool created by the model.

BetaResponseCustomToolCallInputDeltaEvent { delta, item_id, output_index, 3 more }

Event representing a delta (partial update) to the input of a custom tool call.

BetaResponseCustomToolCallInputDoneEvent { input, item_id, output_index, 3 more }

Event indicating that input for a custom tool call is complete.

BetaResponseCustomToolCallItem extends BetaResponseCustomToolCall { call_id, input, name, 6 more } { id, status, created_by }

A call to a custom tool created by the model.

BetaResponseCustomToolCallOutput { call_id, output, type, 3 more }

The output of a custom tool call from your code, being sent back to the model.

BetaResponseCustomToolCallOutputItem extends BetaResponseCustomToolCallOutput { call_id, output, type, 3 more } { id, status, created_by }

The output of a custom tool call from your code, being sent back to the model.

BetaResponseError { code, message, misalignment }

An error object returned when the model fails to generate a Response.

BetaResponseErrorEvent { code, message, param, 3 more }

Emitted when an error occurs.

BetaResponseFailedEvent { response, sequence_number, type, agent }

An event that is emitted when a response fails.

BetaResponseFileSearchCallCompletedEvent { item_id, output_index, sequence_number, 2 more }

Emitted when a file search call is completed (results found).

BetaResponseFileSearchCallInProgressEvent { item_id, output_index, sequence_number, 2 more }

Emitted when a file search call is initiated.

BetaResponseFileSearchCallSearchingEvent { item_id, output_index, sequence_number, 2 more }

Emitted when a file search is currently searching.

BetaResponseFileSearchToolCall { id, queries, status, 3 more }

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

BetaResponseFormatTextConfig = Text { type } | BetaResponseFormatTextJSONSchemaConfig { name, schema, type, 2 more } | JSONObject { type }

An object specifying the format that the model must output.

Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.

The default format is { "type": "text" } with no additional options.

Not recommended for gpt-4o and newer models:

Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.

BetaResponseFormatTextJSONSchemaConfig { name, schema, type, 2 more }

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

BetaResponseFunctionCallArgumentsDeltaEvent { delta, item_id, output_index, 3 more }

Emitted when there is a partial function-call arguments delta.

BetaResponseFunctionCallArgumentsDoneEvent { arguments, item_id, output_index, 3 more }

Emitted when function-call arguments are finalized.

BetaResponseFunctionCallOutputItem = BetaResponseInputTextContent { text, type, prompt_cache_breakpoint } | BetaResponseInputImageContent { type, detail, file_id, 2 more } | BetaResponseInputFileContent { type, detail, file_data, 4 more }

A piece of message content, such as text, an image, or a file.

BetaResponseFunctionCallOutputItemList = Array<BetaResponseFunctionCallOutputItem>

An array of content outputs (text, image, file) for the function tool call.

BetaResponseFunctionShellCallOutputContent { outcome, stderr, stdout }

Captured stdout and stderr for a portion of a shell tool call output.

BetaResponseFunctionShellToolCall { id, action, call_id, 6 more }

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

BetaResponseFunctionShellToolCallOutput { id, call_id, max_output_length, 6 more }

The output of a shell tool call that was emitted.

BetaResponseFunctionToolCall { arguments, call_id, name, 7 more }

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

BetaResponseFunctionToolCallItem extends BetaResponseFunctionToolCall { arguments, call_id, name, 7 more } { id, status, created_by }

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

BetaResponseFunctionToolCallOutputItem { id, output, status, 7 more }
BetaResponseImageGenCallCompletedEvent { item_id, output_index, sequence_number, 2 more }

Emitted when an image generation tool call has completed and the final image is available.

BetaResponseImageGenCallGeneratingEvent { item_id, output_index, sequence_number, 2 more }

Emitted when an image generation tool call is actively generating an image (intermediate state).

BetaResponseImageGenCallInProgressEvent { item_id, output_index, sequence_number, 2 more }

Emitted when an image generation tool call is in progress.

BetaResponseImageGenCallPartialImageEvent { item_id, output_index, partial_image_b64, 8 more }

Emitted when a partial image is available during image generation streaming.

BetaResponseInProgressEvent { response, sequence_number, type, agent }

Emitted when the response is in progress.

BetaResponseIncludable = "file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | 5 more

Specify additional output data to include in the model response. Currently supported values are:

  • web_search_call.results: Include the search results of the web search tool call.
  • web_search_call.action.sources: Include the sources of the web search tool call.
  • code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items.
  • computer_call_output.output.image_url: Include image urls from the computer call output.
  • file_search_call.results: Include the search results of the file search tool call.
  • message.input_image.image_url: Include image urls from the input message.
  • message.output_text.logprobs: Include logprobs with assistant messages.
  • reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program).
BetaResponseIncompleteEvent { response, sequence_number, type, agent }

An event that is emitted when a response finishes as incomplete.

Over WebSocket, steering can finish a response with response.incomplete_details.reason set to steered, followed automatically by a successor response.created that commits the queued steering input.

BetaResponseInjectCreatedEvent { response_id, sequence_number, type, stream_id }

Emitted when all injected input items were validated and committed to the active response.

BetaResponseInjectEvent { input, response_id, type }

Injects input items into an active response over a WebSocket connection. The items are validated and committed atomically. Currently, the server accepts client-owned tool outputs that resume a waiting agent.

BetaResponseInjectFailedEvent { error, input, response_id, 3 more }

Emitted when injected input could not be committed to a response. The event returns the uncommitted raw input so the client can retry it in another response when appropriate.

BetaResponseInput = Array<BetaResponseInputItem>

A list of one or many input items to the model, containing different content types.

BetaResponseInputAudio { input_audio, type }

An audio input to the model.

BetaResponseInputContent = BetaResponseInputText { text, type, prompt_cache_breakpoint } | BetaResponseInputImage { detail, type, file_id, 2 more } | BetaResponseInputFile { type, detail, file_data, 4 more }

A text input to the model.

BetaResponseInputFile { type, detail, file_data, 4 more }

A file input to the model.

BetaResponseInputFileContent { type, detail, file_data, 4 more }

A file input to the model.

BetaResponseInputImage { detail, type, file_id, 2 more }

An image input to the model. Learn about image inputs.

BetaResponseInputImageContent { type, detail, file_id, 2 more }

An image input to the model. Learn about image inputs

BetaResponseInputItem = BetaEasyInputMessage { content, role, phase, type } | Message { content, role, agent, 2 more } | BetaResponseOutputMessage { id, content, role, 4 more } | 33 more

A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions.

BetaResponseInputMessageContentList = Array<BetaResponseInputContent>

A list of one or many input items to the model, containing different content types.

BetaResponseInputMessageItem { id, content, role, 3 more }
BetaResponseInputText { text, type, prompt_cache_breakpoint }

A text input to the model.

BetaResponseInputTextContent { text, type, prompt_cache_breakpoint }

A text input to the model.

BetaResponseItem = BetaResponseInputMessageItem { id, content, role, 3 more } | BetaResponseOutputMessage { id, content, role, 4 more } | BetaResponseFileSearchToolCall { id, queries, status, 3 more } | 30 more

Content item used to generate a response.

BetaResponseLocalEnvironment { type }

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

BetaResponseMcpCallArgumentsDeltaEvent { delta, item_id, output_index, 3 more }

Emitted when there is a delta (partial update) to the arguments of an MCP tool call.

BetaResponseMcpCallArgumentsDoneEvent { arguments, item_id, output_index, 3 more }

Emitted when the arguments for an MCP tool call are finalized.

BetaResponseMcpCallCompletedEvent { item_id, output_index, sequence_number, 2 more }

Emitted when an MCP tool call has completed successfully.

BetaResponseMcpCallFailedEvent { item_id, output_index, sequence_number, 2 more }

Emitted when an MCP tool call has failed.

BetaResponseMcpCallInProgressEvent { item_id, output_index, sequence_number, 2 more }

Emitted when an MCP tool call is in progress.

BetaResponseMcpListToolsCompletedEvent { item_id, output_index, sequence_number, 2 more }

Emitted when the list of available MCP tools has been successfully retrieved.

BetaResponseMcpListToolsFailedEvent { item_id, output_index, sequence_number, 2 more }

Emitted when the attempt to list available MCP tools has failed.

BetaResponseMcpListToolsInProgressEvent { item_id, output_index, sequence_number, 2 more }

Emitted when the system is in the process of retrieving the list of available MCP tools.

BetaResponseOutputAudio { data, transcript, type }

An audio output from the model.

BetaResponseOutputItem = BetaResponseOutputMessage { id, content, role, 4 more } | BetaResponseFileSearchToolCall { id, queries, status, 3 more } | BetaResponseFunctionToolCall { arguments, call_id, name, 7 more } | 28 more

An output message from the model.

BetaResponseOutputItemAddedEvent { item, output_index, sequence_number, 2 more }

Emitted when a new output item is added.

BetaResponseOutputItemDoneEvent { item, output_index, sequence_number, 2 more }

Emitted when an output item is marked done.

BetaResponseOutputMessage { id, content, role, 4 more }

An output message from the model.

BetaResponseOutputRefusal { refusal, type }

A refusal from the model.

BetaResponseOutputText { annotations, text, type, logprobs }

A text output from the model.

BetaResponseOutputTextAnnotationAddedEvent { annotation, annotation_index, content_index, 5 more }

Emitted when an annotation is added to output text content.

BetaResponsePrompt { id, variables, version }

Reference to a prompt template and its variables. Learn more.

BetaResponseQueuedEvent { response, sequence_number, type, agent }

Emitted when a response is queued and waiting to be processed.

BetaResponseReasoningItem { id, summary, type, 4 more }

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.

BetaResponseReasoningSummaryPartAddedEvent { item_id, output_index, part, 4 more }

Emitted when a new reasoning summary part is added.

BetaResponseReasoningSummaryPartDoneEvent { item_id, output_index, part, 5 more }

Emitted when a reasoning summary part is completed.

BetaResponseReasoningSummaryTextDeltaEvent { delta, item_id, output_index, 4 more }

Emitted when a delta is added to a reasoning summary text.

BetaResponseReasoningSummaryTextDoneEvent { item_id, output_index, sequence_number, 4 more }

Emitted when a reasoning summary text is completed.

BetaResponseReasoningTextDeltaEvent { content_index, delta, item_id, 4 more }

Emitted when a delta is added to a reasoning text.

BetaResponseReasoningTextDoneEvent { content_index, item_id, output_index, 4 more }

Emitted when a reasoning text is completed.

BetaResponseRefusalDeltaEvent { content_index, delta, item_id, 4 more }

Emitted when there is a partial refusal text.

BetaResponseRefusalDoneEvent { content_index, item_id, output_index, 4 more }

Emitted when refusal text is finalized.

BetaResponseShellCallCommandAddedEvent { command, command_index, output_index, 3 more }

A streaming event that indicated a shell command was added to a tool call.

BetaResponseShellCallCommandDeltaEvent { command_index, delta, output_index, 4 more }

A streaming event that indicated a shell command was incrementally updated.

BetaResponseShellCallCommandDoneEvent { command, command_index, output_index, 3 more }

A streaming event that indicated a shell command was completed.

BetaResponseShellCallOutputContentDeltaEvent { command_index, delta, item_id, 4 more }

A streaming event that indicated shell call output was incrementally added.

BetaResponseShellCallOutputContentDoneEvent { command_index, item_id, output, 4 more }

A streaming event that indicated shell call output was completed.

BetaResponseStatus = "completed" | "failed" | "in_progress" | 3 more

The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.

BetaResponseSteerAcceptedEvent { sequence_number, steer, type, stream_id }

Emitted when steering input has been validated and queued. Acceptance means the server owns the input, not that it has been applied. The successor’s response.created event is the commit point. If accepted input cannot be committed, response.steer.failed returns it with the same steering ID.

When the response stops for client-owned tool output or approval, the input remains queued and response.steer.pending is emitted after response.completed. Fill the pending event’s required_input stubs with saved results and send one matching explicit response.create per parent. Do not resend accepted input while it is still queued.

BetaResponseSteerErrorCode = "response_not_found" | "invalid_input" | "steering_not_supported" | 4 more | (string & {})

A machine-readable steering error code. Clients should handle unknown values because additional codes may be introduced. Known values include:

  • response_not_found: The target response is not available on this connection.
  • invalid_input: The event or input failed validation.
  • steering_not_supported: The model or response execution mode does not support steering.
  • too_many_pending_steers: Too much steering input is pending for the response.
  • response_already_completed: The response completed and is no longer accepting steering input.
  • response_not_active: The response is no longer accepting steering input.
  • successor_creation_failed: The successor response could not be created.
BetaResponseSteerEvent { input, previous_response_id, type }

Queues user input to steer a response on this WebSocket connection. Input can contain text, images, and files. Steering is supported only for single-agent responses on models and execution modes that support steering. Responses bound to a conversation or using automatic compaction do not support steering.

A response.steer.accepted event acknowledges that the server owns the queued input, not that it has been applied. The successor’s response.created event is the commit point. Input that cannot be committed is returned in response.steer.failed.

Steering may cause the active response to finish at a safe output boundary with response.incomplete and incomplete_details.reason set to steered, followed automatically by a successor response.created. Normal completion can also be followed by an automatic successor. Automatic successors inherit the previous response’s settings and continue from it with the queued input.

If the response stops for client-owned tool output or approval, accepted steering input remains queued and response.steer.pending is emitted after response.completed. Fill the required_input stubs from that event with saved tool results or approval decisions, and send one explicit response.create per parent with the same previous_response_id and WebSocket lane. Do not rerun tools or resend accepted steering input. The queued input is prepended in submission order to that request’s input, and the explicit request retains its own settings.

This event accepts only type, previous_response_id, and input. Do not send stream_id; the target response determines the WebSocket lane.

BetaResponseSteerFailedEvent { error, sequence_number, steer, 2 more }

Emitted when steering input is rejected or cannot be committed to a successor response. Returns the original, uncommitted input so the client can carry it into response.create when appropriate. Invalid input must be corrected before retrying.

Failures after acceptance include the same steering ID. Failures before an ID is allocated omit steer.id. A lost connection or missing acknowledgement leaves the outcome unknown; it is not proof that the input was rejected.

BetaResponseSteerInput = string | Array<Message { content, role, type, 3 more } | FunctionCallOutput { output, type, id, 6 more } >

Input to queue for a continuation of the response. Uses the same string or input-item shape as response.create.input, with a non-empty array when supplying input items.

Steering accepts only messages with the user role. Each message may contain only type, role, and content, with content as a string or an array of input_text, input_image, and input_file parts. The optional type must be message. Other roles, tool outputs, and item types are not supported for steering.

BetaResponseSteerInputContent = BetaResponseInputTextContent { text, type, prompt_cache_breakpoint } | BetaResponseInputImageContent { type, detail, file_id, 2 more } | BetaResponseInputFileContent { type, detail, file_data, 4 more }

A piece of message content, such as text, an image, or a file.

BetaResponseSteerPendingEvent { reason, required_input, sequence_number, 3 more }

Emitted when accepted steering input remains queued after the target response completes. The server still owns the input. Do not resend it. The successor’s response.created event is the commit point.

When reason is waiting_for_required_input, this event follows response.completed while the response waits for the tool results or approval decisions identified by required_input. Copy those stubs, fill their result fields using the ordinary response.create input schemas, and submit one continuation per parent with the same previous_response_id and WebSocket lane. Use saved results without rerunning tools. The queued steering input is prepended in submission order to the continuation’s input. That explicit request retains its own settings.

This notification is emitted at most once per steering submission. Multiple submissions for the same parent can report the same required inputs; they do not each require a separate continuation.

BetaResponseSteerPendingReason = "waiting_for_required_input" | (string & {})

An extensible enum describing why accepted steering input is still queued. Clients should handle unknown values because additional reasons may be introduced. Known values include:

  • waiting_for_required_input: The response is waiting for the tool results or approval decisions identified by required_input.
BetaResponseSteerRequiredInput = FunctionCallOutput { call_id, name, type } | CustomToolCallOutput { call_id, type } | ComputerCallOutput { call_id, type } | 4 more

An input stub identifying an outstanding client-owned tool result or approval decision. Copy the stub and fill the result fields using the corresponding response.create input schema. Use saved results without rerunning the tool. The server does not supply results, approval decisions, or safety acknowledgements in these stubs.

BetaResponseStreamEvent = BetaResponseAudioDeltaEvent { delta, sequence_number, type, agent } | BetaResponseAudioDoneEvent { sequence_number, type, agent } | BetaResponseAudioTranscriptDeltaEvent { delta, sequence_number, type, agent } | 56 more

Event emitted while a response is streamed.

BetaResponseTextConfig { format, verbosity }

Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:

BetaResponseTextDeltaEvent { content_index, delta, item_id, 5 more }

Emitted when there is an additional text delta.

BetaResponseTextDoneEvent { content_index, item_id, logprobs, 5 more }

Emitted when text content is finalized.

BetaResponseToolSearchCall { id, arguments, call_id, 5 more }
BetaResponseToolSearchOutputItem { id, call_id, execution, 5 more }
BetaResponseToolSearchOutputItemParam { tools, type, id, 4 more }
BetaResponseUsage { input_tokens, input_tokens_details, output_tokens, 2 more }

Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.

BetaResponseWebSearchCallCompletedEvent { item_id, output_index, sequence_number, 2 more }

Emitted when a web search call is completed.

BetaResponseWebSearchCallInProgressEvent { item_id, output_index, sequence_number, 2 more }

Emitted when a web search call is initiated.

BetaResponseWebSearchCallSearchingEvent { item_id, output_index, sequence_number, 2 more }

Emitted when a web search call is executing.

BetaResponsesClientEvent = ResponseCreate { type, background, context_management, 31 more } | BetaResponseSteerEvent { input, previous_response_id, type } | BetaResponseInjectEvent { input, response_id, type }

Client events accepted by the Responses WebSocket server.

BetaResponsesServerEvent = BetaResponseAudioWsDelta { stream_id } | BetaResponseAudioWsDone { stream_id } | BetaResponseAudioTranscriptWsDelta { stream_id } | 61 more

Server events emitted by the Responses WebSocket server.

BetaServiceTier = "auto" | "default" | "flex" | 4 more | null

Specifies the processing type used for serving the request.

  • If set to ‘auto’, then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use ‘default’.
  • If set to ‘default’, then the request will be processed with the standard pricing and performance for the selected model.
  • If set to ‘flex’, then the request will be processed with the Flex Processing service tier.
  • To opt-in to Fast mode at the request level, include the service_tier=fast or service_tier=priority parameter for Responses or Chat Completions. The response will show service_tier=priority regardless of if you specify service_tier=fast or priority in your request.
  • If set to ‘ultrafast’, then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for gpt-5.6-sol; a response served through it will show service_tier=ultrafast.
  • When not set, the default behavior is ‘auto’.

When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

BetaSkillReference { skill_id, type, version }
BetaTool = BetaFunctionTool { name, parameters, strict, 6 more } | BetaFileSearchTool { type, vector_store_ids, filters, 2 more } | BetaComputerTool { type } | 13 more

A tool that can be used to generate a response.

BetaToolChoiceAllowed { mode, tools, type }

Constrains the tools available to the model to a pre-defined set.

BetaToolChoiceApplyPatch { type }

Forces the model to call the apply_patch tool when executing a tool call.

BetaToolChoiceCustom { name, type }

Use this option to force the model to call a specific custom tool.

BetaToolChoiceFunction { name, type }

Use this option to force the model to call a specific function.

BetaToolChoiceMcp { server_label, type, name }

Use this option to force the model to call a specific tool on a remote MCP server.

BetaToolChoiceOptions = "none" | "auto" | "required"

Controls which (if any) tool is called by the model.

none means the model will not call any tool and instead generates a message.

auto means the model can pick between generating a message or calling one or more tools.

required means the model must call one or more tools.

BetaToolChoiceShell { type }

Forces the model to call the shell tool when a tool call is required.

BetaToolChoiceTypes { type }

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

BetaToolSearchTool { type, description, execution, parameters }

Hosted or BYOT tool search configuration for deferred tools.

BetaWebSearchPreviewTool { type, search_content_types, search_context_size, user_location }

This tool searches the web for relevant results to use in a response. Learn more about the web search tool.

BetaWebSearchTool { type, external_web_access, filters, 2 more }

Search the Internet for sources related to the prompt. Learn more about the web search tool.

BetaResponsesInput Items

List input items
client.beta.responses.inputItems.list(stringresponseID, InputItemListParams { after, include, limit, 2 more } params?, RequestOptionsoptions?): CursorPage<BetaResponseItem>
GET/responses/{response_id}/input_items
ModelsExpand Collapse
BetaResponseItemList { data, first_id, has_more, 2 more }

A list of Response items.

BetaResponsesInput Tokens

Get input token counts
client.beta.responses.inputTokens.count(InputTokenCountParams { conversation, input, instructions, 10 more } params?, RequestOptionsoptions?): InputTokenCountResponse { input_tokens, object }
POST/responses/input_tokens
ModelsExpand Collapse
InputTokenCountResponse { input_tokens, object }

BetaThreads

Build Assistants that can call models and use tools.

Create thread
Deprecated
client.beta.threads.create(ThreadCreateParams { messages, metadata, tool_resources } body?, RequestOptionsoptions?): Thread { id, created_at, metadata, 2 more }
POST/threads
Create thread and run
Deprecated
client.beta.threads.createAndRun(ThreadCreateAndRunParamsbody, RequestOptionsoptions?): Run { id, assistant_id, cancelled_at, 24 more } | Stream<AssistantStreamEvent>
POST/threads/runs
Delete thread
Deprecated
client.beta.threads.delete(stringthreadID, RequestOptionsoptions?): ThreadDeleted { id, deleted, object }
DELETE/threads/{thread_id}
Retrieve thread
Deprecated
client.beta.threads.retrieve(stringthreadID, RequestOptionsoptions?): Thread { id, created_at, metadata, 2 more }
GET/threads/{thread_id}
Modify thread
Deprecated
client.beta.threads.update(stringthreadID, ThreadUpdateParams { metadata, tool_resources } body, RequestOptionsoptions?): Thread { id, created_at, metadata, 2 more }
POST/threads/{thread_id}
ModelsExpand Collapse
AssistantResponseFormatOption = "auto" | ResponseFormatText { type } | ResponseFormatJSONObject { type } | ResponseFormatJSONSchema { json_schema, type }

Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106.

Setting to { "type": "json_schema", "json_schema": {...} } enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.

Setting to { "type": "json_object" } enables JSON mode, which ensures the message the model generates is valid JSON.

Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly “stuck” request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.

AssistantToolChoice { type, function }

Specifies a tool the model should use. Use to force the model to call a specific tool.

AssistantToolChoiceFunction { name }
AssistantToolChoiceOption = "none" | "auto" | "required" | AssistantToolChoice { type, function }

Controls which (if any) tool is called by the model. none means the model will not call any tools and instead generates a message. auto is the default value and means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools before responding to the user. Specifying a particular tool like {"type": "file_search"} or {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool.

Thread { id, created_at, metadata, 2 more }

Represents a thread that contains messages.

ThreadDeleted { id, deleted, object }

BetaThreadsMessages

Build Assistants that can call models and use tools.

Create message
Deprecated
client.beta.threads.messages.create(stringthreadID, MessageCreateParams { content, role, attachments, metadata } body, RequestOptionsoptions?): Message { id, assistant_id, attachments, 11 more }
POST/threads/{thread_id}/messages
Delete message
Deprecated
client.beta.threads.messages.delete(stringmessageID, MessageDeleteParams { thread_id } params, RequestOptionsoptions?): MessageDeleted { id, deleted, object }
DELETE/threads/{thread_id}/messages/{message_id}
List messages
Deprecated
client.beta.threads.messages.list(stringthreadID, MessageListParams { after, before, limit, 2 more } query?, RequestOptionsoptions?): CursorPage<Message { id, assistant_id, attachments, 11 more } >
GET/threads/{thread_id}/messages
Retrieve message
Deprecated
client.beta.threads.messages.retrieve(stringmessageID, MessageRetrieveParams { thread_id } params, RequestOptionsoptions?): Message { id, assistant_id, attachments, 11 more }
GET/threads/{thread_id}/messages/{message_id}
Modify message
Deprecated
client.beta.threads.messages.update(stringmessageID, MessageUpdateParams { thread_id, metadata } params, RequestOptionsoptions?): Message { id, assistant_id, attachments, 11 more }
POST/threads/{thread_id}/messages/{message_id}
ModelsExpand Collapse
Annotation = FileCitationAnnotation { end_index, file_citation, start_index, 2 more } | FilePathAnnotation { end_index, file_path, start_index, 2 more }

A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.

AnnotationDelta = FileCitationDeltaAnnotation { index, type, end_index, 3 more } | FilePathDeltaAnnotation { index, type, end_index, 3 more }

A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.

FileCitationAnnotation { end_index, file_citation, start_index, 2 more }

A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.

FileCitationDeltaAnnotation { index, type, end_index, 3 more }

A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.

FilePathAnnotation { end_index, file_path, start_index, 2 more }

A URL for the file that’s generated when the assistant used the code_interpreter tool to generate a file.

FilePathDeltaAnnotation { index, type, end_index, 3 more }

A URL for the file that’s generated when the assistant used the code_interpreter tool to generate a file.

ImageFile { file_id, detail }
ImageFileContentBlock { image_file, type }

References an image File in the content of a message.

ImageFileDelta { detail, file_id }
ImageFileDeltaBlock { index, type, image_file }

References an image File in the content of a message.

ImageURL { url, detail }
ImageURLContentBlock { image_url, type }

References an image URL in the content of a message.

ImageURLDelta { detail, url }
ImageURLDeltaBlock { index, type, image_url }

References an image URL in the content of a message.

Message { id, assistant_id, attachments, 11 more }

Represents a message within a thread.

MessageContent = ImageFileContentBlock { image_file, type } | ImageURLContentBlock { image_url, type } | TextContentBlock { text, type } | RefusalContentBlock { refusal, type }

References an image File in the content of a message.

MessageContentDelta = ImageFileDeltaBlock { index, type, image_file } | TextDeltaBlock { index, type, text } | RefusalDeltaBlock { index, type, refusal } | ImageURLDeltaBlock { index, type, image_url }

References an image File in the content of a message.

MessageContentPartParam = ImageFileContentBlock { image_file, type } | ImageURLContentBlock { image_url, type } | TextContentBlockParam { text, type }

References an image File in the content of a message.

MessageDeleted { id, deleted, object }
MessageDelta { content, role }

The delta containing the fields that have changed on the Message.

MessageDeltaEvent { id, delta, object }

Represents a message delta i.e. any changed fields on a message during streaming.

RefusalContentBlock { refusal, type }

The refusal content generated by the assistant.

RefusalDeltaBlock { index, type, refusal }

The refusal content that is part of a message.

Text { annotations, value }
TextContentBlock { text, type }

The text content that is part of a message.

TextContentBlockParam { text, type }

The text content that is part of a message.

TextDelta { annotations, value }
TextDeltaBlock { index, type, text }

The text content that is part of a message.

BetaThreadsRuns

Build Assistants that can call models and use tools.

Cancel a run
Deprecated
client.beta.threads.runs.cancel(stringrunID, RunCancelParams { thread_id } params, RequestOptionsoptions?): Run { id, assistant_id, cancelled_at, 24 more }
POST/threads/{thread_id}/runs/{run_id}/cancel
Create run
Deprecated
client.beta.threads.runs.create(stringthreadID, RunCreateParamsparams, RequestOptionsoptions?): Run { id, assistant_id, cancelled_at, 24 more } | Stream<AssistantStreamEvent>
POST/threads/{thread_id}/runs
List runs
Deprecated
client.beta.threads.runs.list(stringthreadID, RunListParams { after, before, limit, order } query?, RequestOptionsoptions?): CursorPage<Run { id, assistant_id, cancelled_at, 24 more } >
GET/threads/{thread_id}/runs
Retrieve run
Deprecated
client.beta.threads.runs.retrieve(stringrunID, RunRetrieveParams { thread_id } params, RequestOptionsoptions?): Run { id, assistant_id, cancelled_at, 24 more }
GET/threads/{thread_id}/runs/{run_id}
Submit tool outputs to run
Deprecated
client.beta.threads.runs.submitToolOutputs(stringrunID, RunSubmitToolOutputsParamsparams, RequestOptionsoptions?): Run { id, assistant_id, cancelled_at, 24 more } | Stream<AssistantStreamEvent>
POST/threads/{thread_id}/runs/{run_id}/submit_tool_outputs
Modify run
Deprecated
client.beta.threads.runs.update(stringrunID, RunUpdateParams { thread_id, metadata } params, RequestOptionsoptions?): Run { id, assistant_id, cancelled_at, 24 more }
POST/threads/{thread_id}/runs/{run_id}
ModelsExpand Collapse
RequiredActionFunctionToolCall { id, function, type }

Tool call objects

Run { id, assistant_id, cancelled_at, 24 more }

Represents an execution run on a thread.

RunStatus = "queued" | "in_progress" | "requires_action" | 6 more

The status of the run, which can be either queued, in_progress, requires_action, cancelling, cancelled, failed, completed, incomplete, or expired.

BetaThreadsRunsSteps

Build Assistants that can call models and use tools.

List run steps
Deprecated
client.beta.threads.runs.steps.list(stringrunID, StepListParams { thread_id, after, before, 3 more } params, RequestOptionsoptions?): CursorPage<RunStep { id, assistant_id, cancelled_at, 13 more } >
GET/threads/{thread_id}/runs/{run_id}/steps
Retrieve run step
Deprecated
client.beta.threads.runs.steps.retrieve(stringstepID, StepRetrieveParams { thread_id, run_id, include } params, RequestOptionsoptions?): RunStep { id, assistant_id, cancelled_at, 13 more }
GET/threads/{thread_id}/runs/{run_id}/steps/{step_id}
ModelsExpand Collapse
CodeInterpreterLogs { index, type, logs }

Text output from the Code Interpreter tool call as part of a run step.

CodeInterpreterOutputImage { index, type, image }
CodeInterpreterToolCall { id, code_interpreter, type }

Details of the Code Interpreter tool call the run step was involved in.

CodeInterpreterToolCallDelta { index, type, id, code_interpreter }

Details of the Code Interpreter tool call the run step was involved in.

FileSearchToolCall { id, file_search, type }
FileSearchToolCallDelta { file_search, index, type, id }
FunctionToolCall { id, function, type }
FunctionToolCallDelta { index, type, id, function }
MessageCreationStepDetails { message_creation, type }

Details of the message creation by the run step.

RunStep { id, assistant_id, cancelled_at, 13 more }

Represents a step in execution of a run.

RunStepDelta { step_details }

The delta containing the fields that have changed on the run step.

RunStepDeltaEvent { id, delta, object }

Represents a run step delta i.e. any changed fields on a run step during streaming.

RunStepDeltaMessageDelta { type, message_creation }

Details of the message creation by the run step.

RunStepInclude = "step_details.tool_calls[*].file_search.results[*].content"
ToolCall = CodeInterpreterToolCall { id, code_interpreter, type } | FileSearchToolCall { id, file_search, type } | FunctionToolCall { id, function, type }

Details of the Code Interpreter tool call the run step was involved in.

ToolCallDelta = CodeInterpreterToolCallDelta { index, type, id, code_interpreter } | FileSearchToolCallDelta { file_search, index, type, id } | FunctionToolCallDelta { index, type, id, function }

Details of the Code Interpreter tool call the run step was involved in.

ToolCallDeltaObject { type, tool_calls }

Details of the tool call.

ToolCallsStepDetails { tool_calls, type }

Details of the tool call.