Skip to content
Primary navigation

Conversations

Manage conversations and conversation items.

resource openai_conversation

optional Expand Collapse
items?: List[Attributes]

Initial items to include in the conversation context. You may add up to 20 items at a time.

content?: String

Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.

role?: String

The role of the message input. One of user, assistant, system, or developer.

phase?: String

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.

type?: String

The type of the message input. Always message.

status?: String

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

id?: String

The unique ID of the output message.

queries?: List[String]

The queries used to search for files.

results?: List[Attributes]

The results of the file search tool call.

attributes?: Dynamic

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

file_id?: String

The unique ID of the file.

filename?: String

The name of the file.

score?: Float64

The relevance score of the file - a value between 0 and 1.

text?: String

The text that was retrieved from the file.

call_id?: String

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

pending_safety_checks?: List[Attributes]

The pending safety checks for the computer call.

id: String

The ID of the pending safety check.

code?: String

The type of the pending safety check.

message?: String

Details about the pending safety check.

action?: Attributes

A click action.

button?: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

type?: String

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

x?: Int64

The x-coordinate where the click occurred.

y?: Int64

The y-coordinate where the click occurred.

keys?: List[String]

The keys being held while clicking.

path?: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x?: Int64

The horizontal scroll distance.

scroll_y?: Int64

The vertical scroll distance.

text?: String

The text to type.

query?: String

[DEPRECATED] The search query.

queries?: List[String]

The search queries.

sources?: List[Attributes]

The sources used in the search.

type: String

The type of source. Always url.

url: String

The URL of the source.

url?: String

The URL opened by the model.

pattern?: String

The pattern or text to search for within the page.

command?: List[String]

The command to run.

env?: Map[String]

Environment variables to set for the command.

timeout_ms?: Int64

Optional timeout in milliseconds for the command.

user?: String

Optional user to run the command as.

working_directory?: String

Optional working directory to run the command in.

commands?: List[String]

Ordered shell commands for the execution environment to run.

max_output_length?: Int64

Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

actions?: List[Attributes]

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

button?: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

type?: String

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

x?: Int64

The x-coordinate where the click occurred.

y?: Int64

The y-coordinate where the click occurred.

keys?: List[String]

The keys being held while clicking.

path?: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x?: Int64

The horizontal scroll distance.

scroll_y?: Int64

The vertical scroll distance.

text?: String

The text to type.

output?: Attributes

A computer screenshot image used with the computer use tool.

type?: String

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

file_id?: String

The identifier of an uploaded file that contains the screenshot.

image_url?: String

The URL of the screenshot image.

acknowledged_safety_checks?: List[Attributes]

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

id: String

The ID of the pending safety check.

code?: String

The type of the pending safety check.

message?: String

Details about the pending safety check.

arguments?: String

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

name?: String

The name of the function to run.

namespace?: String

The namespace of the function to run.

execution?: String

Whether tool search was executed by the server or by the client.

tools?: List[Attributes]

The loaded tool definitions returned by the tool search output.

name?: String

The name of the function to call.

parameters?: Map[JSON]

A JSON schema object describing the parameters of the function.

strict?: Bool

Whether to enforce strict parameter validation. Default true.

type?: String

The type of the function tool. Always function.

defer_loading?: Bool

Whether this function is deferred and loaded via tool search.

description?: String

A description of the function. Used by the model to determine whether or not to call the function.

vector_store_ids?: List[String]

The IDs of the vector stores to search.

filters?: Attributes

A filter to apply.

key?: String

The key to compare against the value.

type?: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value?: String

The value to compare against the attribute key; supports string, number, or boolean types.

filters?: List[Attributes]

Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.

key: String

The key to compare against the value.

type?: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value: String

The value to compare against the attribute key; supports string, number, or boolean types.

allowed_domains?: List[String]

Allowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well.

Example: ["pubmed.ncbi.nlm.nih.gov"]

max_num_results?: Int64

The maximum number of results to return. This number should be between 1 and 50 inclusive.

ranking_options?: Attributes

Ranking options for search.

ranker?: String

The ranker to use for the file search.

score_threshold?: Float64

The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

display_height?: Int64

The height of the computer display.

display_width?: Int64

The width of the computer display.

environment?: String

The type of computer environment to control.

search_context_size?: String

High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.

user_location?: Attributes

The approximate location of the user.

city?: String

Free text input for the city of the user, e.g. San Francisco.

country?: String

The two-letter ISO country code of the user, e.g. US.

region?: String

Free text input for the region of the user, e.g. California.

timezone?: String

The IANA timezone of the user, e.g. America/Los_Angeles.

type?: String

The type of location approximation. Always approximate.

server_label?: String

A label for this MCP server, used to identify it in tool calls.

allowed_tools?: List[String]

List of allowed tool names or a filter object.

authorization?: String

An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.

connector_id?: String

Identifier for service connectors, like those available in ChatGPT. One of server_url or connector_id must be provided. Learn more about service connectors here.

Currently supported connector_id values are:

  • Dropbox: connector_dropbox
  • Gmail: connector_gmail
  • Google Calendar: connector_googlecalendar
  • Google Drive: connector_googledrive
  • Microsoft Teams: connector_microsoftteams
  • Outlook Calendar: connector_outlookcalendar
  • Outlook Email: connector_outlookemail
  • SharePoint: connector_sharepoint
headers?: Map[String]

Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.

require_approval?: Attributes

Specify which of the MCP server’s tools require approval.

always?: Attributes

A filter object to specify which tools are allowed.

read_only?: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names?: List[String]

List of allowed tool names.

never?: Attributes

A filter object to specify which tools are allowed.

read_only?: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names?: List[String]

List of allowed tool names.

server_description?: String

Optional description of the MCP server, used to provide more context.

server_url?: String

The URL for the MCP server. One of server_url or connector_id must be provided.

container?: String

The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional memory_limit setting.

action?: String

Whether to generate a new image or edit an existing image. Default: auto.

background?: String

Background type for the generated image. One of transparent, opaque, or auto. Default: auto.

input_fidelity?: String

Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for gpt-image-1 and gpt-image-1.5 and later models, unsupported for gpt-image-1-mini. Supports high and low. Defaults to low.

input_image_mask?: Attributes

Optional mask for inpainting. Contains image_url (string, optional) and file_id (string, optional).

file_id?: String

File ID for the mask image.

image_url?: String

Base64-encoded mask image.

model?: String

The image generation model to use. Default: gpt-image-1.

moderation?: String

Moderation level for the generated image. Default: auto.

output_compression?: Int64

Compression level for the output image. Default: 100.

output_format?: String

The output format of the generated image. One of png, webp, or jpeg. Default: png.

partial_images?: Int64

Number of partial images to generate in streaming mode, from 0 (default value) to 3.

quality?: String

The quality of the generated image. One of low, medium, high, or auto. Default: auto.

size?: String

The size of the generated image. One of 1024x1024, 1024x1536, 1536x1024, or auto. Default: auto.

format?: Attributes

The input format for the custom tool. Default is unconstrained text.

type?: String

Unconstrained text format. Always text.

definition?: String

The grammar definition.

syntax?: String

The syntax of the grammar definition. One of lark or regex.

tools?: List[Attributes]

The function/custom tools available inside this namespace.

name: String
type?: String
defer_loading?: Bool

Whether this function should be deferred and discovered via tool search.

description?: String
parameters?: JSON
strict?: Bool
format?: Attributes

The input format for the custom tool. Default is unconstrained text.

type?: String

Unconstrained text format. Always text.

definition?: String

The grammar definition.

syntax?: String

The syntax of the grammar definition. One of lark or regex.

execution?: String

Whether tool search is executed by the server or by the client.

search_content_types?: List[String]
input_schema?: JSON

The JSON schema describing the tool’s input.

annotations?: JSON

Additional annotations about the tool.

summary?: List[Attributes]

Reasoning summary content.

text: String

A summary of the reasoning output from the model so far.

type?: String

The type of the object. Always summary_text.

encrypted_content?: String

The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter.

result?: String

The generated image encoded in base64.

code?: String

The code to run, or null if not available.

container_id?: String

The ID of the container used to run the code.

outputs?: List[Attributes]

The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.

logs?: String

The logs output from the code interpreter.

type?: String

The type of the output. Always logs.

url?: String

The URL of the image output from the code interpreter.

environment?: Attributes

The environment to execute the shell commands in.

type?: String

Use a local computer environment.

skills?: List[Attributes]

An optional list of skills.

description: String

The description of the skill.

name: String

The name of the skill.

path: String

The path to the directory containing the skill.

container_id?: String

The ID of the referenced container.

max_output_length?: Int64

The maximum number of UTF-8 characters captured for this shell call’s combined output.

operation?: Attributes

The specific create, delete, or update instruction for the apply_patch tool call.

diff?: String

Unified diff content to apply when creating the file.

path: String

Path of the file to create relative to the workspace root.

type?: String

The operation type. Always create_file.

server_label?: String

The label of the MCP server.

error?: String

Error message if the server could not list tools.

approval_request_id?: String

The ID of the approval request being answered.

approve?: Bool

Whether the request was approved.

reason?: String

Optional reason for the decision.

input?: String

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

metadata?: Map[String]

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

computed Expand Collapse
id: String

The unique ID of the conversation.

created_at: Int64

The time at which the conversation was created, measured in seconds since the Unix epoch.

object: String

The object type, which is always conversation.

openai_conversation

resource "openai_conversation" "example_conversation" {
  items = [{
    content = "string"
    role = "user"
    phase = "commentary"
    type = "message"
  }]
  metadata = {
    foo = "string"
  }
}

data openai_conversation

required Expand Collapse
conversation_id: String
computed Expand Collapse
id: String
created_at: Int64

The time at which the conversation was created, measured in seconds since the Unix epoch.

object: String

The object type, which is always conversation.

metadata: JSON

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

openai_conversation

data "openai_conversation" "example_conversation" {
  conversation_id = "conv_123"
}

ConversationsItems

Manage conversations and conversation items.

resource openai_conversation_item

required Expand Collapse
conversation_id: String
items: List[Attributes]

The items to add to the conversation. You may add up to 20 items at a time.

content?: String

Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.

role?: String

The role of the message input. One of user, assistant, system, or developer.

phase?: String

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.

type?: String

The type of the message input. Always message.

status?: String

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

id?: String

The unique ID of the output message.

queries?: List[String]

The queries used to search for files.

results?: List[Attributes]

The results of the file search tool call.

attributes?: Dynamic

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

file_id?: String

The unique ID of the file.

filename?: String

The name of the file.

score?: Float64

The relevance score of the file - a value between 0 and 1.

text?: String

The text that was retrieved from the file.

call_id?: String

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

pending_safety_checks?: List[Attributes]

The pending safety checks for the computer call.

id: String

The ID of the pending safety check.

code?: String

The type of the pending safety check.

message?: String

Details about the pending safety check.

action?: Attributes

A click action.

button?: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

type?: String

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

x?: Int64

The x-coordinate where the click occurred.

y?: Int64

The y-coordinate where the click occurred.

keys?: List[String]

The keys being held while clicking.

path?: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x?: Int64

The horizontal scroll distance.

scroll_y?: Int64

The vertical scroll distance.

text?: String

The text to type.

query?: String

[DEPRECATED] The search query.

queries?: List[String]

The search queries.

sources?: List[Attributes]

The sources used in the search.

type: String

The type of source. Always url.

url: String

The URL of the source.

url?: String

The URL opened by the model.

pattern?: String

The pattern or text to search for within the page.

command?: List[String]

The command to run.

env?: Map[String]

Environment variables to set for the command.

timeout_ms?: Int64

Optional timeout in milliseconds for the command.

user?: String

Optional user to run the command as.

working_directory?: String

Optional working directory to run the command in.

commands?: List[String]

Ordered shell commands for the execution environment to run.

max_output_length?: Int64

Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

actions?: List[Attributes]

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

button?: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

type?: String

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

x?: Int64

The x-coordinate where the click occurred.

y?: Int64

The y-coordinate where the click occurred.

keys?: List[String]

The keys being held while clicking.

path?: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x?: Int64

The horizontal scroll distance.

scroll_y?: Int64

The vertical scroll distance.

text?: String

The text to type.

output?: Attributes

A computer screenshot image used with the computer use tool.

type?: String

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

file_id?: String

The identifier of an uploaded file that contains the screenshot.

image_url?: String

The URL of the screenshot image.

acknowledged_safety_checks?: List[Attributes]

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

id: String

The ID of the pending safety check.

code?: String

The type of the pending safety check.

message?: String

Details about the pending safety check.

arguments?: String

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

name?: String

The name of the function to run.

namespace?: String

The namespace of the function to run.

execution?: String

Whether tool search was executed by the server or by the client.

tools?: List[Attributes]

The loaded tool definitions returned by the tool search output.

name?: String

The name of the function to call.

parameters?: Map[JSON]

A JSON schema object describing the parameters of the function.

strict?: Bool

Whether to enforce strict parameter validation. Default true.

type?: String

The type of the function tool. Always function.

defer_loading?: Bool

Whether this function is deferred and loaded via tool search.

description?: String

A description of the function. Used by the model to determine whether or not to call the function.

vector_store_ids?: List[String]

The IDs of the vector stores to search.

filters?: Attributes

A filter to apply.

key?: String

The key to compare against the value.

type?: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value?: String

The value to compare against the attribute key; supports string, number, or boolean types.

filters?: List[Attributes]

Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.

key: String

The key to compare against the value.

type?: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value: String

The value to compare against the attribute key; supports string, number, or boolean types.

allowed_domains?: List[String]

Allowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well.

Example: ["pubmed.ncbi.nlm.nih.gov"]

max_num_results?: Int64

The maximum number of results to return. This number should be between 1 and 50 inclusive.

ranking_options?: Attributes

Ranking options for search.

ranker?: String

The ranker to use for the file search.

score_threshold?: Float64

The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

display_height?: Int64

The height of the computer display.

display_width?: Int64

The width of the computer display.

environment?: String

The type of computer environment to control.

search_context_size?: String

High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.

user_location?: Attributes

The approximate location of the user.

city?: String

Free text input for the city of the user, e.g. San Francisco.

country?: String

The two-letter ISO country code of the user, e.g. US.

region?: String

Free text input for the region of the user, e.g. California.

timezone?: String

The IANA timezone of the user, e.g. America/Los_Angeles.

type?: String

The type of location approximation. Always approximate.

server_label?: String

A label for this MCP server, used to identify it in tool calls.

allowed_tools?: List[String]

List of allowed tool names or a filter object.

authorization?: String

An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.

connector_id?: String

Identifier for service connectors, like those available in ChatGPT. One of server_url or connector_id must be provided. Learn more about service connectors here.

Currently supported connector_id values are:

  • Dropbox: connector_dropbox
  • Gmail: connector_gmail
  • Google Calendar: connector_googlecalendar
  • Google Drive: connector_googledrive
  • Microsoft Teams: connector_microsoftteams
  • Outlook Calendar: connector_outlookcalendar
  • Outlook Email: connector_outlookemail
  • SharePoint: connector_sharepoint
headers?: Map[String]

Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.

require_approval?: Attributes

Specify which of the MCP server’s tools require approval.

always?: Attributes

A filter object to specify which tools are allowed.

read_only?: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names?: List[String]

List of allowed tool names.

never?: Attributes

A filter object to specify which tools are allowed.

read_only?: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names?: List[String]

List of allowed tool names.

server_description?: String

Optional description of the MCP server, used to provide more context.

server_url?: String

The URL for the MCP server. One of server_url or connector_id must be provided.

container?: String

The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional memory_limit setting.

action?: String

Whether to generate a new image or edit an existing image. Default: auto.

background?: String

Background type for the generated image. One of transparent, opaque, or auto. Default: auto.

input_fidelity?: String

Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for gpt-image-1 and gpt-image-1.5 and later models, unsupported for gpt-image-1-mini. Supports high and low. Defaults to low.

input_image_mask?: Attributes

Optional mask for inpainting. Contains image_url (string, optional) and file_id (string, optional).

file_id?: String

File ID for the mask image.

image_url?: String

Base64-encoded mask image.

model?: String

The image generation model to use. Default: gpt-image-1.

moderation?: String

Moderation level for the generated image. Default: auto.

output_compression?: Int64

Compression level for the output image. Default: 100.

output_format?: String

The output format of the generated image. One of png, webp, or jpeg. Default: png.

partial_images?: Int64

Number of partial images to generate in streaming mode, from 0 (default value) to 3.

quality?: String

The quality of the generated image. One of low, medium, high, or auto. Default: auto.

size?: String

The size of the generated image. One of 1024x1024, 1024x1536, 1536x1024, or auto. Default: auto.

format?: Attributes

The input format for the custom tool. Default is unconstrained text.

type?: String

Unconstrained text format. Always text.

definition?: String

The grammar definition.

syntax?: String

The syntax of the grammar definition. One of lark or regex.

tools?: List[Attributes]

The function/custom tools available inside this namespace.

name: String
type?: String
defer_loading?: Bool

Whether this function should be deferred and discovered via tool search.

description?: String
parameters?: JSON
strict?: Bool
format?: Attributes

The input format for the custom tool. Default is unconstrained text.

type?: String

Unconstrained text format. Always text.

definition?: String

The grammar definition.

syntax?: String

The syntax of the grammar definition. One of lark or regex.

execution?: String

Whether tool search is executed by the server or by the client.

search_content_types?: List[String]
input_schema?: JSON

The JSON schema describing the tool’s input.

annotations?: JSON

Additional annotations about the tool.

summary?: List[Attributes]

Reasoning summary content.

text: String

A summary of the reasoning output from the model so far.

type?: String

The type of the object. Always summary_text.

encrypted_content?: String

The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter.

result?: String

The generated image encoded in base64.

code?: String

The code to run, or null if not available.

container_id?: String

The ID of the container used to run the code.

outputs?: List[Attributes]

The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.

logs?: String

The logs output from the code interpreter.

type?: String

The type of the output. Always logs.

url?: String

The URL of the image output from the code interpreter.

environment?: Attributes

The environment to execute the shell commands in.

type?: String

Use a local computer environment.

skills?: List[Attributes]

An optional list of skills.

description: String

The description of the skill.

name: String

The name of the skill.

path: String

The path to the directory containing the skill.

container_id?: String

The ID of the referenced container.

max_output_length?: Int64

The maximum number of UTF-8 characters captured for this shell call’s combined output.

operation?: Attributes

The specific create, delete, or update instruction for the apply_patch tool call.

diff?: String

Unified diff content to apply when creating the file.

path: String

Path of the file to create relative to the workspace root.

type?: String

The operation type. Always create_file.

server_label?: String

The label of the MCP server.

error?: String

Error message if the server could not list tools.

approval_request_id?: String

The ID of the approval request being answered.

approve?: Bool

Whether the request was approved.

reason?: String

Optional reason for the decision.

input?: String

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

optional Expand Collapse
item_id?: String
computed Expand Collapse
approval_request_id: String

The ID of the approval request being answered.

approve: Bool

Whether the request was approved.

arguments: String

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

call_id: String

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

code: String

The code to run, or null if not available.

container_id: String

The ID of the container used to run the code.

created_by: String

The identifier of the actor that created the item.

encrypted_content: String

The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter.

error: String

Error message if the server could not list tools.

execution: String

Whether tool search was executed by the server or by the client.

first_id: String

The ID of the first item in the list.

has_more: Bool

Whether there are more items available.

id: String

The unique ID of the message.

input: String

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

last_id: String

The ID of the last item in the list.

max_output_length: Int64

The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

name: String

The name of the function to run.

namespace: String

The namespace of the function to run.

object: String

The type of object returned, must be list.

output: String

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

phase: String

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.

reason: String

Optional reason for the decision.

result: String

The generated image encoded in base64.

role: String

The role of the message. One of unknown, user, assistant, system, critic, discriminator, developer, or tool.

server_label: String

The label of the MCP server.

status: String

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

type: String

The type of the message. Always set to message.

queries: List[String]

The queries used to search for files.

acknowledged_safety_checks: List[Attributes]

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

id: String

The ID of the pending safety check.

code: String

The type of the pending safety check.

message: String

Details about the pending safety check.

action: Attributes

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).

query: String

[DEPRECATED] The search query.

type: String

The action type.

queries: List[String]

The search queries.

sources: List[Attributes]

The sources used in the search.

type: String

The type of source. Always url.

url: String

The URL of the source.

url: String

The URL opened by the model.

pattern: String

The pattern or text to search for within the page.

button: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

x: Int64

The x-coordinate where the click occurred.

y: Int64

The y-coordinate where the click occurred.

keys: List[String]

The keys being held while clicking.

path: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x: Int64

The horizontal scroll distance.

scroll_y: Int64

The vertical scroll distance.

text: String

The text to type.

command: List[String]

The command to run.

env: Map[String]

Environment variables to set for the command.

timeout_ms: Int64

Optional timeout in milliseconds for the command.

user: String

Optional user to run the command as.

working_directory: String

Optional working directory to run the command in.

commands: List[String]
max_output_length: Int64

Optional maximum number of characters to return from each command.

actions: List[Attributes]

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

button: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

type: String

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

x: Int64

The x-coordinate where the click occurred.

y: Int64

The y-coordinate where the click occurred.

keys: List[String]

The keys being held while clicking.

path: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x: Int64

The horizontal scroll distance.

scroll_y: Int64

The vertical scroll distance.

text: String

The text to type.

content: List[Attributes]

The content of the message

text: String

The text input to the model.

type: String

The type of the input item. Always input_text.

annotations: List[Attributes]

The annotations of the text output.

file_id: String

The ID of the file.

filename: String

The filename of the file cited.

index: Int64

The index of the file in the list of files.

type: String

The type of the file citation. Always file_citation.

end_index: Int64

The index of the last character of the URL citation in the message.

start_index: Int64

The index of the first character of the URL citation in the message.

title: String

The title of the web resource.

url: String

The URL of the web resource.

container_id: String

The ID of the container file.

logprobs: List[Attributes]
token: String
bytes: List[Int64]
logprob: Float64
top_logprobs: List[Attributes]
token: String
bytes: List[Int64]
logprob: Float64
refusal: String

The refusal explanation from the model.

detail: String

The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

file_id: String

The ID of the file to be sent to the model.

image_url: String

The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

file_data: String

The content of the file to be sent to the model.

file_url: String

The URL of the file to be sent to the model.

filename: String

The name of the file to be sent to the model.

data: List[Attributes]

A list of conversation items.

id: String

The unique ID of the message.

content: List[Attributes]

The content of the message

text: String

The text input to the model.

type: String

The type of the input item. Always input_text.

annotations: List[Attributes]

The annotations of the text output.

file_id: String

The ID of the file.

filename: String

The filename of the file cited.

index: Int64

The index of the file in the list of files.

type: String

The type of the file citation. Always file_citation.

end_index: Int64

The index of the last character of the URL citation in the message.

start_index: Int64

The index of the first character of the URL citation in the message.

title: String

The title of the web resource.

url: String

The URL of the web resource.

container_id: String

The ID of the container file.

logprobs: List[Attributes]
token: String
bytes: List[Int64]
logprob: Float64
top_logprobs: List[Attributes]
token: String
bytes: List[Int64]
logprob: Float64
refusal: String

The refusal explanation from the model.

detail: String

The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

file_id: String

The ID of the file to be sent to the model.

image_url: String

The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

file_data: String

The content of the file to be sent to the model.

file_url: String

The URL of the file to be sent to the model.

filename: String

The name of the file to be sent to the model.

role: String

The role of the message. One of unknown, user, assistant, system, critic, discriminator, developer, or tool.

status: String

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

type: String

The type of the message. Always set to message.

phase: String

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.

arguments: String

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

call_id: String

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

name: String

The name of the function to run.

namespace: String

The namespace of the function to run.

created_by: String

The identifier of the actor that created the item.

output: String

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

queries: List[String]

The queries used to search for files.

results: List[Attributes]

The results of the file search tool call.

attributes: Dynamic

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

file_id: String

The unique ID of the file.

filename: String

The name of the file.

score: Float64

The relevance score of the file - a value between 0 and 1.

text: String

The text that was retrieved from the file.

action: Attributes

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).

query: String

[DEPRECATED] The search query.

type: String

The action type.

queries: List[String]

The search queries.

sources: List[Attributes]

The sources used in the search.

type: String

The type of source. Always url.

url: String

The URL of the source.

url: String

The URL opened by the model.

pattern: String

The pattern or text to search for within the page.

button: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

x: Int64

The x-coordinate where the click occurred.

y: Int64

The y-coordinate where the click occurred.

keys: List[String]

The keys being held while clicking.

path: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x: Int64

The horizontal scroll distance.

scroll_y: Int64

The vertical scroll distance.

text: String

The text to type.

command: List[String]

The command to run.

env: Map[String]

Environment variables to set for the command.

timeout_ms: Int64

Optional timeout in milliseconds for the command.

user: String

Optional user to run the command as.

working_directory: String

Optional working directory to run the command in.

commands: List[String]
max_output_length: Int64

Optional maximum number of characters to return from each command.

result: String

The generated image encoded in base64.

pending_safety_checks: List[Attributes]

The pending safety checks for the computer call.

id: String

The ID of the pending safety check.

code: String

The type of the pending safety check.

message: String

Details about the pending safety check.

actions: List[Attributes]

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

button: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

type: String

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

x: Int64

The x-coordinate where the click occurred.

y: Int64

The y-coordinate where the click occurred.

keys: List[String]

The keys being held while clicking.

path: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x: Int64

The horizontal scroll distance.

scroll_y: Int64

The vertical scroll distance.

text: String

The text to type.

acknowledged_safety_checks: List[Attributes]

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

id: String

The ID of the pending safety check.

code: String

The type of the pending safety check.

message: String

Details about the pending safety check.

execution: String

Whether tool search was executed by the server or by the client.

tools: List[Attributes]

The loaded tool definitions returned by tool search.

name: String

The name of the function to call.

parameters: Map[JSON]

A JSON schema object describing the parameters of the function.

strict: Bool

Whether to enforce strict parameter validation. Default true.

type: String

The type of the function tool. Always function.

defer_loading: Bool

Whether this function is deferred and loaded via tool search.

description: String

A description of the function. Used by the model to determine whether or not to call the function.

vector_store_ids: List[String]

The IDs of the vector stores to search.

filters: Attributes

A filter to apply.

key: String

The key to compare against the value.

type: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value: String

The value to compare against the attribute key; supports string, number, or boolean types.

filters: List[Attributes]

Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.

key: String

The key to compare against the value.

type: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value: String

The value to compare against the attribute key; supports string, number, or boolean types.

allowed_domains: List[String]

Allowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well.

Example: ["pubmed.ncbi.nlm.nih.gov"]

max_num_results: Int64

The maximum number of results to return. This number should be between 1 and 50 inclusive.

ranking_options: Attributes

Ranking options for search.

ranker: String

The ranker to use for the file search.

score_threshold: Float64

The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

display_height: Int64

The height of the computer display.

display_width: Int64

The width of the computer display.

environment: String

The type of computer environment to control.

search_context_size: String

High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.

user_location: Attributes

The approximate location of the user.

city: String

Free text input for the city of the user, e.g. San Francisco.

country: String

The two-letter ISO country code of the user, e.g. US.

region: String

Free text input for the region of the user, e.g. California.

timezone: String

The IANA timezone of the user, e.g. America/Los_Angeles.

type: String

The type of location approximation. Always approximate.

server_label: String

A label for this MCP server, used to identify it in tool calls.

allowed_tools: List[String]

List of allowed tool names or a filter object.

authorization: String

An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.

connector_id: String

Identifier for service connectors, like those available in ChatGPT. One of server_url or connector_id must be provided. Learn more about service connectors here.

Currently supported connector_id values are:

  • Dropbox: connector_dropbox
  • Gmail: connector_gmail
  • Google Calendar: connector_googlecalendar
  • Google Drive: connector_googledrive
  • Microsoft Teams: connector_microsoftteams
  • Outlook Calendar: connector_outlookcalendar
  • Outlook Email: connector_outlookemail
  • SharePoint: connector_sharepoint
headers: Map[String]

Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.

require_approval: Attributes

Specify which of the MCP server’s tools require approval.

always: Attributes

A filter object to specify which tools are allowed.

read_only: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names: List[String]

List of allowed tool names.

never: Attributes

A filter object to specify which tools are allowed.

read_only: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names: List[String]

List of allowed tool names.

server_description: String

Optional description of the MCP server, used to provide more context.

server_url: String

The URL for the MCP server. One of server_url or connector_id must be provided.

container: String

The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional memory_limit setting.

action: String

Whether to generate a new image or edit an existing image. Default: auto.

background: String

Background type for the generated image. One of transparent, opaque, or auto. Default: auto.

input_fidelity: String

Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for gpt-image-1 and gpt-image-1.5 and later models, unsupported for gpt-image-1-mini. Supports high and low. Defaults to low.

input_image_mask: Attributes

Optional mask for inpainting. Contains image_url (string, optional) and file_id (string, optional).

file_id: String

File ID for the mask image.

image_url: String

Base64-encoded mask image.

model: String

The image generation model to use. Default: gpt-image-1.

moderation: String

Moderation level for the generated image. Default: auto.

output_compression: Int64

Compression level for the output image. Default: 100.

output_format: String

The output format of the generated image. One of png, webp, or jpeg. Default: png.

partial_images: Int64

Number of partial images to generate in streaming mode, from 0 (default value) to 3.

quality: String

The quality of the generated image. One of low, medium, high, or auto. Default: auto.

size: String

The size of the generated image. One of 1024x1024, 1024x1536, 1536x1024, or auto. Default: auto.

format: Attributes

The input format for the custom tool. Default is unconstrained text.

type: String

Unconstrained text format. Always text.

definition: String

The grammar definition.

syntax: String

The syntax of the grammar definition. One of lark or regex.

tools: List[Attributes]

The function/custom tools available inside this namespace.

name: String
type: String
defer_loading: Bool

Whether this function should be deferred and discovered via tool search.

description: String
parameters: JSON
strict: Bool
format: Attributes

The input format for the custom tool. Default is unconstrained text.

type: String

Unconstrained text format. Always text.

definition: String

The grammar definition.

syntax: String

The syntax of the grammar definition. One of lark or regex.

execution: String

Whether tool search is executed by the server or by the client.

search_content_types: List[String]
input_schema: JSON

The JSON schema describing the tool’s input.

annotations: JSON

Additional annotations about the tool.

summary: List[Attributes]

Reasoning summary content.

text: String

A summary of the reasoning output from the model so far.

type: String

The type of the object. Always summary_text.

encrypted_content: String

The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter.

code: String

The code to run, or null if not available.

container_id: String

The ID of the container used to run the code.

outputs: List[Attributes]

The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.

logs: String

The logs output from the code interpreter.

type: String

The type of the output. Always logs.

url: String

The URL of the image output from the code interpreter.

environment: Attributes

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

type: String

The environment type. Always local.

container_id: String
max_output_length: Int64

The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

operation: Attributes

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

diff: String

Diff to apply.

path: String

Path of the file to create.

type: String

Create a new file with the provided diff.

server_label: String

The label of the MCP server.

error: String

Error message if the server could not list tools.

approval_request_id: String

The ID of the approval request being answered.

approve: Bool

Whether the request was approved.

reason: String

Optional reason for the decision.

input: String

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

environment: Attributes

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

type: String

The environment type. Always local.

container_id: String
operation: Attributes

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

diff: String

Diff to apply.

path: String

Path of the file to create.

type: String

Create a new file with the provided diff.

outputs: List[Attributes]

The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.

logs: String

The logs output from the code interpreter.

type: String

The type of the output. Always logs.

url: String

The URL of the image output from the code interpreter.

pending_safety_checks: List[Attributes]

The pending safety checks for the computer call.

id: String

The ID of the pending safety check.

code: String

The type of the pending safety check.

message: String

Details about the pending safety check.

results: List[Attributes]

The results of the file search tool call.

attributes: Dynamic

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

file_id: String

The unique ID of the file.

filename: String

The name of the file.

score: Float64

The relevance score of the file - a value between 0 and 1.

text: String

The text that was retrieved from the file.

summary: List[Attributes]

Reasoning summary content.

text: String

A summary of the reasoning output from the model so far.

type: String

The type of the object. Always summary_text.

tools: List[Attributes]

The loaded tool definitions returned by tool search.

name: String

The name of the function to call.

parameters: Map[JSON]

A JSON schema object describing the parameters of the function.

strict: Bool

Whether to enforce strict parameter validation. Default true.

type: String

The type of the function tool. Always function.

defer_loading: Bool

Whether this function is deferred and loaded via tool search.

description: String

A description of the function. Used by the model to determine whether or not to call the function.

vector_store_ids: List[String]

The IDs of the vector stores to search.

filters: Attributes

A filter to apply.

key: String

The key to compare against the value.

type: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value: String

The value to compare against the attribute key; supports string, number, or boolean types.

filters: List[Attributes]

Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.

key: String

The key to compare against the value.

type: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value: String

The value to compare against the attribute key; supports string, number, or boolean types.

allowed_domains: List[String]

Allowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well.

Example: ["pubmed.ncbi.nlm.nih.gov"]

max_num_results: Int64

The maximum number of results to return. This number should be between 1 and 50 inclusive.

ranking_options: Attributes

Ranking options for search.

ranker: String

The ranker to use for the file search.

score_threshold: Float64

The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

display_height: Int64

The height of the computer display.

display_width: Int64

The width of the computer display.

environment: String

The type of computer environment to control.

search_context_size: String

High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.

user_location: Attributes

The approximate location of the user.

city: String

Free text input for the city of the user, e.g. San Francisco.

country: String

The two-letter ISO country code of the user, e.g. US.

region: String

Free text input for the region of the user, e.g. California.

timezone: String

The IANA timezone of the user, e.g. America/Los_Angeles.

type: String

The type of location approximation. Always approximate.

server_label: String

A label for this MCP server, used to identify it in tool calls.

allowed_tools: List[String]

List of allowed tool names or a filter object.

authorization: String

An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.

connector_id: String

Identifier for service connectors, like those available in ChatGPT. One of server_url or connector_id must be provided. Learn more about service connectors here.

Currently supported connector_id values are:

  • Dropbox: connector_dropbox
  • Gmail: connector_gmail
  • Google Calendar: connector_googlecalendar
  • Google Drive: connector_googledrive
  • Microsoft Teams: connector_microsoftteams
  • Outlook Calendar: connector_outlookcalendar
  • Outlook Email: connector_outlookemail
  • SharePoint: connector_sharepoint
headers: Map[String]

Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.

require_approval: Attributes

Specify which of the MCP server’s tools require approval.

always: Attributes

A filter object to specify which tools are allowed.

read_only: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names: List[String]

List of allowed tool names.

never: Attributes

A filter object to specify which tools are allowed.

read_only: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names: List[String]

List of allowed tool names.

server_description: String

Optional description of the MCP server, used to provide more context.

server_url: String

The URL for the MCP server. One of server_url or connector_id must be provided.

container: String

The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional memory_limit setting.

action: String

Whether to generate a new image or edit an existing image. Default: auto.

background: String

Background type for the generated image. One of transparent, opaque, or auto. Default: auto.

input_fidelity: String

Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for gpt-image-1 and gpt-image-1.5 and later models, unsupported for gpt-image-1-mini. Supports high and low. Defaults to low.

input_image_mask: Attributes

Optional mask for inpainting. Contains image_url (string, optional) and file_id (string, optional).

file_id: String

File ID for the mask image.

image_url: String

Base64-encoded mask image.

model: String

The image generation model to use. Default: gpt-image-1.

moderation: String

Moderation level for the generated image. Default: auto.

output_compression: Int64

Compression level for the output image. Default: 100.

output_format: String

The output format of the generated image. One of png, webp, or jpeg. Default: png.

partial_images: Int64

Number of partial images to generate in streaming mode, from 0 (default value) to 3.

quality: String

The quality of the generated image. One of low, medium, high, or auto. Default: auto.

size: String

The size of the generated image. One of 1024x1024, 1024x1536, 1536x1024, or auto. Default: auto.

format: Attributes

The input format for the custom tool. Default is unconstrained text.

type: String

Unconstrained text format. Always text.

definition: String

The grammar definition.

syntax: String

The syntax of the grammar definition. One of lark or regex.

tools: List[Attributes]

The function/custom tools available inside this namespace.

name: String
type: String
defer_loading: Bool

Whether this function should be deferred and discovered via tool search.

description: String
parameters: JSON
strict: Bool
format: Attributes

The input format for the custom tool. Default is unconstrained text.

type: String

Unconstrained text format. Always text.

definition: String

The grammar definition.

syntax: String

The syntax of the grammar definition. One of lark or regex.

execution: String

Whether tool search is executed by the server or by the client.

search_content_types: List[String]
input_schema: JSON

The JSON schema describing the tool’s input.

annotations: JSON

Additional annotations about the tool.

openai_conversation_item

resource "openai_conversation_item" "example_conversation_item" {
  conversation_id = "conv_123"
  items = [{
    content = "string"
    role = "user"
    phase = "commentary"
    type = "message"
  }]
}

data openai_conversation_item

required Expand Collapse
conversation_id: String
item_id: String
optional Expand Collapse
include?: List[String]

Additional fields to include in the response. See the include parameter for listing Conversation items above for more information.

computed Expand Collapse
approval_request_id: String

The ID of the approval request being answered.

approve: Bool

Whether the request was approved.

arguments: String

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

call_id: String

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

code: String

The code to run, or null if not available.

container_id: String

The ID of the container used to run the code.

created_by: String

The identifier of the actor that created the item.

encrypted_content: String

The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter.

error: String

Error message if the server could not list tools.

execution: String

Whether tool search was executed by the server or by the client.

id: String

The unique ID of the message.

input: String

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

max_output_length: Int64

The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

name: String

The name of the function to run.

namespace: String

The namespace of the function to run.

output: String

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

phase: String

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.

reason: String

Optional reason for the decision.

result: String

The generated image encoded in base64.

role: String

The role of the message. One of unknown, user, assistant, system, critic, discriminator, developer, or tool.

server_label: String

The label of the MCP server.

status: String

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

type: String

The type of the message. Always set to message.

queries: List[String]

The queries used to search for files.

acknowledged_safety_checks: List[Attributes]

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

id: String

The ID of the pending safety check.

code: String

The type of the pending safety check.

message: String

Details about the pending safety check.

action: Attributes

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).

query: String

[DEPRECATED] The search query.

type: String

The action type.

queries: List[String]

The search queries.

sources: List[Attributes]

The sources used in the search.

type: String

The type of source. Always url.

url: String

The URL of the source.

url: String

The URL opened by the model.

pattern: String

The pattern or text to search for within the page.

button: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

x: Int64

The x-coordinate where the click occurred.

y: Int64

The y-coordinate where the click occurred.

keys: List[String]

The keys being held while clicking.

path: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x: Int64

The horizontal scroll distance.

scroll_y: Int64

The vertical scroll distance.

text: String

The text to type.

command: List[String]

The command to run.

env: Map[String]

Environment variables to set for the command.

timeout_ms: Int64

Optional timeout in milliseconds for the command.

user: String

Optional user to run the command as.

working_directory: String

Optional working directory to run the command in.

commands: List[String]
max_output_length: Int64

Optional maximum number of characters to return from each command.

actions: List[Attributes]

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

button: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

type: String

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

x: Int64

The x-coordinate where the click occurred.

y: Int64

The y-coordinate where the click occurred.

keys: List[String]

The keys being held while clicking.

path: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x: Int64

The horizontal scroll distance.

scroll_y: Int64

The vertical scroll distance.

text: String

The text to type.

content: List[Attributes]

The content of the message

text: String

The text input to the model.

type: String

The type of the input item. Always input_text.

annotations: List[Attributes]

The annotations of the text output.

file_id: String

The ID of the file.

filename: String

The filename of the file cited.

index: Int64

The index of the file in the list of files.

type: String

The type of the file citation. Always file_citation.

end_index: Int64

The index of the last character of the URL citation in the message.

start_index: Int64

The index of the first character of the URL citation in the message.

title: String

The title of the web resource.

url: String

The URL of the web resource.

container_id: String

The ID of the container file.

logprobs: List[Attributes]
token: String
bytes: List[Int64]
logprob: Float64
top_logprobs: List[Attributes]
token: String
bytes: List[Int64]
logprob: Float64
refusal: String

The refusal explanation from the model.

detail: String

The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

file_id: String

The ID of the file to be sent to the model.

image_url: String

The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

file_data: String

The content of the file to be sent to the model.

file_url: String

The URL of the file to be sent to the model.

filename: String

The name of the file to be sent to the model.

environment: Attributes

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

type: String

The environment type. Always local.

container_id: String
operation: Attributes

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

diff: String

Diff to apply.

path: String

Path of the file to create.

type: String

Create a new file with the provided diff.

outputs: List[Attributes]

The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.

logs: String

The logs output from the code interpreter.

type: String

The type of the output. Always logs.

url: String

The URL of the image output from the code interpreter.

pending_safety_checks: List[Attributes]

The pending safety checks for the computer call.

id: String

The ID of the pending safety check.

code: String

The type of the pending safety check.

message: String

Details about the pending safety check.

results: List[Attributes]

The results of the file search tool call.

attributes: Dynamic

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

file_id: String

The unique ID of the file.

filename: String

The name of the file.

score: Float64

The relevance score of the file - a value between 0 and 1.

text: String

The text that was retrieved from the file.

summary: List[Attributes]

Reasoning summary content.

text: String

A summary of the reasoning output from the model so far.

type: String

The type of the object. Always summary_text.

tools: List[Attributes]

The loaded tool definitions returned by tool search.

name: String

The name of the function to call.

parameters: Map[JSON]

A JSON schema object describing the parameters of the function.

strict: Bool

Whether to enforce strict parameter validation. Default true.

type: String

The type of the function tool. Always function.

defer_loading: Bool

Whether this function is deferred and loaded via tool search.

description: String

A description of the function. Used by the model to determine whether or not to call the function.

vector_store_ids: List[String]

The IDs of the vector stores to search.

filters: Attributes

A filter to apply.

key: String

The key to compare against the value.

type: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value: String

The value to compare against the attribute key; supports string, number, or boolean types.

filters: List[Attributes]

Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.

key: String

The key to compare against the value.

type: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value: String

The value to compare against the attribute key; supports string, number, or boolean types.

allowed_domains: List[String]

Allowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well.

Example: ["pubmed.ncbi.nlm.nih.gov"]

max_num_results: Int64

The maximum number of results to return. This number should be between 1 and 50 inclusive.

ranking_options: Attributes

Ranking options for search.

ranker: String

The ranker to use for the file search.

score_threshold: Float64

The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

display_height: Int64

The height of the computer display.

display_width: Int64

The width of the computer display.

environment: String

The type of computer environment to control.

search_context_size: String

High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.

user_location: Attributes

The approximate location of the user.

city: String

Free text input for the city of the user, e.g. San Francisco.

country: String

The two-letter ISO country code of the user, e.g. US.

region: String

Free text input for the region of the user, e.g. California.

timezone: String

The IANA timezone of the user, e.g. America/Los_Angeles.

type: String

The type of location approximation. Always approximate.

server_label: String

A label for this MCP server, used to identify it in tool calls.

allowed_tools: List[String]

List of allowed tool names or a filter object.

authorization: String

An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.

connector_id: String

Identifier for service connectors, like those available in ChatGPT. One of server_url or connector_id must be provided. Learn more about service connectors here.

Currently supported connector_id values are:

  • Dropbox: connector_dropbox
  • Gmail: connector_gmail
  • Google Calendar: connector_googlecalendar
  • Google Drive: connector_googledrive
  • Microsoft Teams: connector_microsoftteams
  • Outlook Calendar: connector_outlookcalendar
  • Outlook Email: connector_outlookemail
  • SharePoint: connector_sharepoint
headers: Map[String]

Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.

require_approval: Attributes

Specify which of the MCP server’s tools require approval.

always: Attributes

A filter object to specify which tools are allowed.

read_only: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names: List[String]

List of allowed tool names.

never: Attributes

A filter object to specify which tools are allowed.

read_only: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names: List[String]

List of allowed tool names.

server_description: String

Optional description of the MCP server, used to provide more context.

server_url: String

The URL for the MCP server. One of server_url or connector_id must be provided.

container: String

The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional memory_limit setting.

action: String

Whether to generate a new image or edit an existing image. Default: auto.

background: String

Background type for the generated image. One of transparent, opaque, or auto. Default: auto.

input_fidelity: String

Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for gpt-image-1 and gpt-image-1.5 and later models, unsupported for gpt-image-1-mini. Supports high and low. Defaults to low.

input_image_mask: Attributes

Optional mask for inpainting. Contains image_url (string, optional) and file_id (string, optional).

file_id: String

File ID for the mask image.

image_url: String

Base64-encoded mask image.

model: String

The image generation model to use. Default: gpt-image-1.

moderation: String

Moderation level for the generated image. Default: auto.

output_compression: Int64

Compression level for the output image. Default: 100.

output_format: String

The output format of the generated image. One of png, webp, or jpeg. Default: png.

partial_images: Int64

Number of partial images to generate in streaming mode, from 0 (default value) to 3.

quality: String

The quality of the generated image. One of low, medium, high, or auto. Default: auto.

size: String

The size of the generated image. One of 1024x1024, 1024x1536, 1536x1024, or auto. Default: auto.

format: Attributes

The input format for the custom tool. Default is unconstrained text.

type: String

Unconstrained text format. Always text.

definition: String

The grammar definition.

syntax: String

The syntax of the grammar definition. One of lark or regex.

tools: List[Attributes]

The function/custom tools available inside this namespace.

name: String
type: String
defer_loading: Bool

Whether this function should be deferred and discovered via tool search.

description: String
parameters: JSON
strict: Bool
format: Attributes

The input format for the custom tool. Default is unconstrained text.

type: String

Unconstrained text format. Always text.

definition: String

The grammar definition.

syntax: String

The syntax of the grammar definition. One of lark or regex.

execution: String

Whether tool search is executed by the server or by the client.

search_content_types: List[String]
input_schema: JSON

The JSON schema describing the tool’s input.

annotations: JSON

Additional annotations about the tool.

openai_conversation_item

data "openai_conversation_item" "example_conversation_item" {
  conversation_id = "conv_123"
  item_id = "msg_abc"
  include = ["file_search_call.results"]
}

data openai_conversation_items

required Expand Collapse
conversation_id: String
optional Expand Collapse
order?: String

The order to return the input items in. Default is desc.

  • asc: Return the input items in ascending order.
  • desc: Return the input items in descending order.
include?: List[String]

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

  • 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).
max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
items: List[Attributes]

The items returned by the data source

id: String

The unique ID of the message.

content: List[Attributes]

The content of the message

text: String

The text input to the model.

type: String

The type of the input item. Always input_text.

annotations: List[Attributes]

The annotations of the text output.

file_id: String

The ID of the file.

filename: String

The filename of the file cited.

index: Int64

The index of the file in the list of files.

type: String

The type of the file citation. Always file_citation.

end_index: Int64

The index of the last character of the URL citation in the message.

start_index: Int64

The index of the first character of the URL citation in the message.

title: String

The title of the web resource.

url: String

The URL of the web resource.

container_id: String

The ID of the container file.

logprobs: List[Attributes]
token: String
bytes: List[Int64]
logprob: Float64
top_logprobs: List[Attributes]
token: String
bytes: List[Int64]
logprob: Float64
refusal: String

The refusal explanation from the model.

detail: String

The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

file_id: String

The ID of the file to be sent to the model.

image_url: String

The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

file_data: String

The content of the file to be sent to the model.

file_url: String

The URL of the file to be sent to the model.

filename: String

The name of the file to be sent to the model.

role: String

The role of the message. One of unknown, user, assistant, system, critic, discriminator, developer, or tool.

status: String

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

type: String

The type of the message. Always set to message.

phase: String

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.

arguments: String

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

call_id: String

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

name: String

The name of the function to run.

namespace: String

The namespace of the function to run.

created_by: String

The identifier of the actor that created the item.

output: String

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

queries: List[String]

The queries used to search for files.

results: List[Attributes]

The results of the file search tool call.

attributes: Dynamic

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

file_id: String

The unique ID of the file.

filename: String

The name of the file.

score: Float64

The relevance score of the file - a value between 0 and 1.

text: String

The text that was retrieved from the file.

action: Attributes

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).

query: String

[DEPRECATED] The search query.

type: String

The action type.

queries: List[String]

The search queries.

sources: List[Attributes]

The sources used in the search.

type: String

The type of source. Always url.

url: String

The URL of the source.

url: String

The URL opened by the model.

pattern: String

The pattern or text to search for within the page.

button: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

x: Int64

The x-coordinate where the click occurred.

y: Int64

The y-coordinate where the click occurred.

keys: List[String]

The keys being held while clicking.

path: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x: Int64

The horizontal scroll distance.

scroll_y: Int64

The vertical scroll distance.

text: String

The text to type.

command: List[String]

The command to run.

env: Map[String]

Environment variables to set for the command.

timeout_ms: Int64

Optional timeout in milliseconds for the command.

user: String

Optional user to run the command as.

working_directory: String

Optional working directory to run the command in.

commands: List[String]
max_output_length: Int64

Optional maximum number of characters to return from each command.

result: String

The generated image encoded in base64.

pending_safety_checks: List[Attributes]

The pending safety checks for the computer call.

id: String

The ID of the pending safety check.

code: String

The type of the pending safety check.

message: String

Details about the pending safety check.

actions: List[Attributes]

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

button: String

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

type: String

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

x: Int64

The x-coordinate where the click occurred.

y: Int64

The y-coordinate where the click occurred.

keys: List[String]

The keys being held while clicking.

path: List[Attributes]

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 }
]
x: Int64

The x-coordinate.

y: Int64

The y-coordinate.

scroll_x: Int64

The horizontal scroll distance.

scroll_y: Int64

The vertical scroll distance.

text: String

The text to type.

acknowledged_safety_checks: List[Attributes]

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

id: String

The ID of the pending safety check.

code: String

The type of the pending safety check.

message: String

Details about the pending safety check.

execution: String

Whether tool search was executed by the server or by the client.

tools: List[Attributes]

The loaded tool definitions returned by tool search.

name: String

The name of the function to call.

parameters: Map[JSON]

A JSON schema object describing the parameters of the function.

strict: Bool

Whether to enforce strict parameter validation. Default true.

type: String

The type of the function tool. Always function.

defer_loading: Bool

Whether this function is deferred and loaded via tool search.

description: String

A description of the function. Used by the model to determine whether or not to call the function.

vector_store_ids: List[String]

The IDs of the vector stores to search.

filters: Attributes

A filter to apply.

key: String

The key to compare against the value.

type: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value: String

The value to compare against the attribute key; supports string, number, or boolean types.

filters: List[Attributes]

Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.

key: String

The key to compare against the value.

type: String

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
value: String

The value to compare against the attribute key; supports string, number, or boolean types.

allowed_domains: List[String]

Allowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well.

Example: ["pubmed.ncbi.nlm.nih.gov"]

max_num_results: Int64

The maximum number of results to return. This number should be between 1 and 50 inclusive.

ranking_options: Attributes

Ranking options for search.

ranker: String

The ranker to use for the file search.

score_threshold: Float64

The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

display_height: Int64

The height of the computer display.

display_width: Int64

The width of the computer display.

environment: String

The type of computer environment to control.

search_context_size: String

High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.

user_location: Attributes

The approximate location of the user.

city: String

Free text input for the city of the user, e.g. San Francisco.

country: String

The two-letter ISO country code of the user, e.g. US.

region: String

Free text input for the region of the user, e.g. California.

timezone: String

The IANA timezone of the user, e.g. America/Los_Angeles.

type: String

The type of location approximation. Always approximate.

server_label: String

A label for this MCP server, used to identify it in tool calls.

allowed_tools: List[String]

List of allowed tool names or a filter object.

authorization: String

An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.

connector_id: String

Identifier for service connectors, like those available in ChatGPT. One of server_url or connector_id must be provided. Learn more about service connectors here.

Currently supported connector_id values are:

  • Dropbox: connector_dropbox
  • Gmail: connector_gmail
  • Google Calendar: connector_googlecalendar
  • Google Drive: connector_googledrive
  • Microsoft Teams: connector_microsoftteams
  • Outlook Calendar: connector_outlookcalendar
  • Outlook Email: connector_outlookemail
  • SharePoint: connector_sharepoint
headers: Map[String]

Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.

require_approval: Attributes

Specify which of the MCP server’s tools require approval.

always: Attributes

A filter object to specify which tools are allowed.

read_only: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names: List[String]

List of allowed tool names.

never: Attributes

A filter object to specify which tools are allowed.

read_only: Bool

Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with readOnlyHint, it will match this filter.

tool_names: List[String]

List of allowed tool names.

server_description: String

Optional description of the MCP server, used to provide more context.

server_url: String

The URL for the MCP server. One of server_url or connector_id must be provided.

container: String

The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional memory_limit setting.

action: String

Whether to generate a new image or edit an existing image. Default: auto.

background: String

Background type for the generated image. One of transparent, opaque, or auto. Default: auto.

input_fidelity: String

Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for gpt-image-1 and gpt-image-1.5 and later models, unsupported for gpt-image-1-mini. Supports high and low. Defaults to low.

input_image_mask: Attributes

Optional mask for inpainting. Contains image_url (string, optional) and file_id (string, optional).

file_id: String

File ID for the mask image.

image_url: String

Base64-encoded mask image.

model: String

The image generation model to use. Default: gpt-image-1.

moderation: String

Moderation level for the generated image. Default: auto.

output_compression: Int64

Compression level for the output image. Default: 100.

output_format: String

The output format of the generated image. One of png, webp, or jpeg. Default: png.

partial_images: Int64

Number of partial images to generate in streaming mode, from 0 (default value) to 3.

quality: String

The quality of the generated image. One of low, medium, high, or auto. Default: auto.

size: String

The size of the generated image. One of 1024x1024, 1024x1536, 1536x1024, or auto. Default: auto.

format: Attributes

The input format for the custom tool. Default is unconstrained text.

type: String

Unconstrained text format. Always text.

definition: String

The grammar definition.

syntax: String

The syntax of the grammar definition. One of lark or regex.

tools: List[Attributes]

The function/custom tools available inside this namespace.

name: String
type: String
defer_loading: Bool

Whether this function should be deferred and discovered via tool search.

description: String
parameters: JSON
strict: Bool
format: Attributes

The input format for the custom tool. Default is unconstrained text.

type: String

Unconstrained text format. Always text.

definition: String

The grammar definition.

syntax: String

The syntax of the grammar definition. One of lark or regex.

execution: String

Whether tool search is executed by the server or by the client.

search_content_types: List[String]
input_schema: JSON

The JSON schema describing the tool’s input.

annotations: JSON

Additional annotations about the tool.

summary: List[Attributes]

Reasoning summary content.

text: String

A summary of the reasoning output from the model so far.

type: String

The type of the object. Always summary_text.

encrypted_content: String

The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter.

code: String

The code to run, or null if not available.

container_id: String

The ID of the container used to run the code.

outputs: List[Attributes]

The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.

logs: String

The logs output from the code interpreter.

type: String

The type of the output. Always logs.

url: String

The URL of the image output from the code interpreter.

environment: Attributes

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

type: String

The environment type. Always local.

container_id: String
max_output_length: Int64

The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

operation: Attributes

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

diff: String

Diff to apply.

path: String

Path of the file to create.

type: String

Create a new file with the provided diff.

server_label: String

The label of the MCP server.

error: String

Error message if the server could not list tools.

approval_request_id: String

The ID of the approval request being answered.

approve: Bool

Whether the request was approved.

reason: String

Optional reason for the decision.

input: String

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

openai_conversation_items

data "openai_conversation_items" "example_conversation_items" {
  conversation_id = "conv_123"
  include = ["file_search_call.results"]
  order = "asc"
}