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.
Initial items to include in the conversation context. You may add up to 20 items at a time.
Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.
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.
The status of item. One of in_progress, completed, or
incomplete. Populated when items are returned via API.
results?: List[Attributes]The results of the file search tool call.
The results of the file search tool call.
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.
action?: AttributesA click action.
A click action.
Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.
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 }
]
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 }
]actions?: List[Attributes]Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.
acknowledged_safety_checks?: List[Attributes]The safety checks reported by the API that have been acknowledged by the developer.
The safety checks reported by the API that have been acknowledged by the developer.
tools?: List[Attributes]The loaded tool definitions returned by the tool search output.
The loaded tool definitions returned by the tool search output.
A description of the function. Used by the model to determine whether or not to call the function.
filters?: AttributesA filter to apply.
A filter to apply.
Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.
eq: equalsne: not equalgt: greater thangte: greater than or equallt: less thanlte: less than or equalin: innin: not in
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.
Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.
The maximum number of results to return. This number should be between 1 and 50 inclusive.
ranking_options?: AttributesRanking options for search.
Ranking options for search.
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?: AttributesThe approximate location of the user.
The approximate location of the user.
The two-letter ISO country code of the user, e.g. US.
The IANA timezone of the user, e.g. America/Los_Angeles.
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.
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
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
require_approval?: AttributesSpecify which of the MCP server’s tools require approval.
Specify which of the MCP server’s tools require approval.
always?: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
never?: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
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.
Background type for the generated image. One of transparent,
opaque, or auto. Default: auto.
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?: AttributesOptional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
Optional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
The output format of the generated image. One of png, webp, or
jpeg. Default: png.
Number of partial images to generate in streaming mode, from 0 (default value) to 3.
The quality of the generated image. One of low, medium, high,
or auto. Default: auto.
The size of the generated image. One of 1024x1024, 1024x1536,
1536x1024, or auto. Default: auto.
The encrypted content of the reasoning item - populated when a response is
generated with reasoning.encrypted_content in the include parameter.
outputs?: List[Attributes]The outputs generated by the code interpreter, such as logs or images.
Can be null if no outputs are available.
The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.
The maximum number of UTF-8 characters captured for this shell call’s combined output.
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
resource "openai_conversation" "example_conversation" {
items = [{
content = "string"
role = "user"
phase = "commentary"
type = "message"
}]
metadata = {
foo = "string"
}
}
data openai_conversation
computed Expand Collapse
The time at which the conversation was created, measured in seconds since the Unix epoch.
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
items: List[Attributes]The items to add to the conversation. You may add up to 20 items at a time.
The items to add to the conversation. You may add up to 20 items at a time.
Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.
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.
The status of item. One of in_progress, completed, or
incomplete. Populated when items are returned via API.
results?: List[Attributes]The results of the file search tool call.
The results of the file search tool call.
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.
action?: AttributesA click action.
A click action.
Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.
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 }
]
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 }
]actions?: List[Attributes]Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.
acknowledged_safety_checks?: List[Attributes]The safety checks reported by the API that have been acknowledged by the developer.
The safety checks reported by the API that have been acknowledged by the developer.
tools?: List[Attributes]The loaded tool definitions returned by the tool search output.
The loaded tool definitions returned by the tool search output.
A description of the function. Used by the model to determine whether or not to call the function.
filters?: AttributesA filter to apply.
A filter to apply.
Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.
eq: equalsne: not equalgt: greater thangte: greater than or equallt: less thanlte: less than or equalin: innin: not in
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.
Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.
The maximum number of results to return. This number should be between 1 and 50 inclusive.
ranking_options?: AttributesRanking options for search.
Ranking options for search.
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?: AttributesThe approximate location of the user.
The approximate location of the user.
The two-letter ISO country code of the user, e.g. US.
The IANA timezone of the user, e.g. America/Los_Angeles.
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.
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
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
require_approval?: AttributesSpecify which of the MCP server’s tools require approval.
Specify which of the MCP server’s tools require approval.
always?: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
never?: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
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.
Background type for the generated image. One of transparent,
opaque, or auto. Default: auto.
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?: AttributesOptional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
Optional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
The output format of the generated image. One of png, webp, or
jpeg. Default: png.
Number of partial images to generate in streaming mode, from 0 (default value) to 3.
The quality of the generated image. One of low, medium, high,
or auto. Default: auto.
The size of the generated image. One of 1024x1024, 1024x1536,
1536x1024, or auto. Default: auto.
The encrypted content of the reasoning item - populated when a response is
generated with reasoning.encrypted_content in the include parameter.
outputs?: List[Attributes]The outputs generated by the code interpreter, such as logs or images.
Can be null if no outputs are available.
The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.
The maximum number of UTF-8 characters captured for this shell call’s combined output.
computed Expand Collapse
The encrypted content of the reasoning item - populated when a response is
generated with reasoning.encrypted_content in the include parameter.
The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.
The output from the function call generated by your code. Can be a string or an list of output content.
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.
The role of the message. One of unknown, user, assistant, system, critic, discriminator, developer, or tool.
The status of item. One of in_progress, completed, or incomplete. Populated when items are returned via API.
acknowledged_safety_checks: List[Attributes]The safety checks reported by the API that have been acknowledged by the
developer.
The safety checks reported by the API that have been acknowledged by the developer.
action: AttributesAn 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).
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).
Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.
actions: List[Attributes]Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
content: List[Attributes]The content of the message
The content of the message
The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.
data: List[Attributes]A list of conversation items.
A list of conversation items.
content: List[Attributes]The content of the message
The content of the message
The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.
The role of the message. One of unknown, user, assistant, system, critic, discriminator, developer, or tool.
The status of item. One of in_progress, completed, or incomplete. Populated when items are returned via API.
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.
The output from the function call generated by your code. Can be a string or an list of output content.
results: List[Attributes]The results of the file search tool call.
The results of the file search tool call.
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.
action: AttributesAn 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).
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).
Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.
actions: List[Attributes]Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
acknowledged_safety_checks: List[Attributes]The safety checks reported by the API that have been acknowledged by the
developer.
The safety checks reported by the API that have been acknowledged by the developer.
tools: List[Attributes]The loaded tool definitions returned by tool search.
The loaded tool definitions returned by tool search.
A description of the function. Used by the model to determine whether or not to call the function.
filters: AttributesA filter to apply.
A filter to apply.
Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.
eq: equalsne: not equalgt: greater thangte: greater than or equallt: less thanlte: less than or equalin: innin: not in
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.
Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.
The maximum number of results to return. This number should be between 1 and 50 inclusive.
ranking_options: AttributesRanking options for search.
Ranking options for search.
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: AttributesThe approximate location of the user.
The approximate location of the user.
The two-letter ISO country code of the user, e.g. US.
The IANA timezone of the user, e.g. America/Los_Angeles.
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.
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
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
require_approval: AttributesSpecify which of the MCP server’s tools require approval.
Specify which of the MCP server’s tools require approval.
always: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
never: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
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.
Background type for the generated image. One of transparent,
opaque, or auto. Default: auto.
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: AttributesOptional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
Optional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
The output format of the generated image. One of png, webp, or
jpeg. Default: png.
Number of partial images to generate in streaming mode, from 0 (default value) to 3.
The quality of the generated image. One of low, medium, high,
or auto. Default: auto.
The size of the generated image. One of 1024x1024, 1024x1536,
1536x1024, or auto. Default: auto.
The encrypted content of the reasoning item - populated when a response is
generated with reasoning.encrypted_content in the include parameter.
outputs: List[Attributes]The outputs generated by the code interpreter, such as logs or images.
Can be null if no outputs are available.
The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.
The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.
operation: AttributesOne of the create_file, delete_file, or update_file operations applied via apply_patch.
One of the create_file, delete_file, or update_file operations applied via apply_patch.
outputs: List[Attributes]The outputs generated by the code interpreter, such as logs or images.
Can be null if no outputs are available.
The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.
results: List[Attributes]The results of the file search tool call.
The results of the file search tool call.
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.
tools: List[Attributes]The loaded tool definitions returned by tool search.
The loaded tool definitions returned by tool search.
A description of the function. Used by the model to determine whether or not to call the function.
filters: AttributesA filter to apply.
A filter to apply.
Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.
eq: equalsne: not equalgt: greater thangte: greater than or equallt: less thanlte: less than or equalin: innin: not in
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.
Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.
The maximum number of results to return. This number should be between 1 and 50 inclusive.
ranking_options: AttributesRanking options for search.
Ranking options for search.
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: AttributesThe approximate location of the user.
The approximate location of the user.
The two-letter ISO country code of the user, e.g. US.
The IANA timezone of the user, e.g. America/Los_Angeles.
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.
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
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
require_approval: AttributesSpecify which of the MCP server’s tools require approval.
Specify which of the MCP server’s tools require approval.
always: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
never: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
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.
Background type for the generated image. One of transparent,
opaque, or auto. Default: auto.
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: AttributesOptional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
Optional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
The output format of the generated image. One of png, webp, or
jpeg. Default: png.
Number of partial images to generate in streaming mode, from 0 (default value) to 3.
The quality of the generated image. One of low, medium, high,
or auto. Default: auto.
The size of the generated image. One of 1024x1024, 1024x1536,
1536x1024, or auto. Default: auto.
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
optional Expand Collapse
Additional fields to include in the response. See the include
parameter for listing Conversation items above for more information.
computed Expand Collapse
The encrypted content of the reasoning item - populated when a response is
generated with reasoning.encrypted_content in the include parameter.
The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.
The output from the function call generated by your code. Can be a string or an list of output content.
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.
The role of the message. One of unknown, user, assistant, system, critic, discriminator, developer, or tool.
The status of item. One of in_progress, completed, or incomplete. Populated when items are returned via API.
acknowledged_safety_checks: List[Attributes]The safety checks reported by the API that have been acknowledged by the
developer.
The safety checks reported by the API that have been acknowledged by the developer.
action: AttributesAn 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).
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).
Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.
actions: List[Attributes]Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
content: List[Attributes]The content of the message
The content of the message
The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.
operation: AttributesOne of the create_file, delete_file, or update_file operations applied via apply_patch.
One of the create_file, delete_file, or update_file operations applied via apply_patch.
outputs: List[Attributes]The outputs generated by the code interpreter, such as logs or images.
Can be null if no outputs are available.
The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.
results: List[Attributes]The results of the file search tool call.
The results of the file search tool call.
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.
tools: List[Attributes]The loaded tool definitions returned by tool search.
The loaded tool definitions returned by tool search.
A description of the function. Used by the model to determine whether or not to call the function.
filters: AttributesA filter to apply.
A filter to apply.
Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.
eq: equalsne: not equalgt: greater thangte: greater than or equallt: less thanlte: less than or equalin: innin: not in
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.
Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.
The maximum number of results to return. This number should be between 1 and 50 inclusive.
ranking_options: AttributesRanking options for search.
Ranking options for search.
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: AttributesThe approximate location of the user.
The approximate location of the user.
The two-letter ISO country code of the user, e.g. US.
The IANA timezone of the user, e.g. America/Los_Angeles.
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.
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
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
require_approval: AttributesSpecify which of the MCP server’s tools require approval.
Specify which of the MCP server’s tools require approval.
always: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
never: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
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.
Background type for the generated image. One of transparent,
opaque, or auto. Default: auto.
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: AttributesOptional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
Optional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
The output format of the generated image. One of png, webp, or
jpeg. Default: png.
Number of partial images to generate in streaming mode, from 0 (default value) to 3.
The quality of the generated image. One of low, medium, high,
or auto. Default: auto.
The size of the generated image. One of 1024x1024, 1024x1536,
1536x1024, or auto. Default: auto.
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
optional Expand Collapse
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.
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 thestoreparameter is set tofalse, or when an organization is enrolled in the zero data retention program).
computed Expand Collapse
items: List[Attributes]The items returned by the data source
The items returned by the data source
content: List[Attributes]The content of the message
The content of the message
The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.
The role of the message. One of unknown, user, assistant, system, critic, discriminator, developer, or tool.
The status of item. One of in_progress, completed, or incomplete. Populated when items are returned via API.
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.
The output from the function call generated by your code. Can be a string or an list of output content.
results: List[Attributes]The results of the file search tool call.
The results of the file search tool call.
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.
action: AttributesAn 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).
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).
Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.
actions: List[Attributes]Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
Flattened batched actions for computer_use. Each action includes an
type discriminator and action-specific fields.
acknowledged_safety_checks: List[Attributes]The safety checks reported by the API that have been acknowledged by the
developer.
The safety checks reported by the API that have been acknowledged by the developer.
tools: List[Attributes]The loaded tool definitions returned by tool search.
The loaded tool definitions returned by tool search.
A description of the function. Used by the model to determine whether or not to call the function.
filters: AttributesA filter to apply.
A filter to apply.
Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.
eq: equalsne: not equalgt: greater thangte: greater than or equallt: less thanlte: less than or equalin: innin: not in
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.
Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.
The maximum number of results to return. This number should be between 1 and 50 inclusive.
ranking_options: AttributesRanking options for search.
Ranking options for search.
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: AttributesThe approximate location of the user.
The approximate location of the user.
The two-letter ISO country code of the user, e.g. US.
The IANA timezone of the user, e.g. America/Los_Angeles.
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.
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
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
require_approval: AttributesSpecify which of the MCP server’s tools require approval.
Specify which of the MCP server’s tools require approval.
always: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
never: AttributesA filter object to specify which tools are allowed.
A filter object to specify which tools are allowed.
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.
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.
Background type for the generated image. One of transparent,
opaque, or auto. Default: auto.
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: AttributesOptional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
Optional mask for inpainting. Contains image_url
(string, optional) and file_id (string, optional).
The output format of the generated image. One of png, webp, or
jpeg. Default: png.
Number of partial images to generate in streaming mode, from 0 (default value) to 3.
The quality of the generated image. One of low, medium, high,
or auto. Default: auto.
The size of the generated image. One of 1024x1024, 1024x1536,
1536x1024, or auto. Default: auto.
The encrypted content of the reasoning item - populated when a response is
generated with reasoning.encrypted_content in the include parameter.
outputs: List[Attributes]The outputs generated by the code interpreter, such as logs or images.
Can be null if no outputs are available.
The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.
The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.
openai_conversation_items
data "openai_conversation_items" "example_conversation_items" {
conversation_id = "conv_123"
include = ["file_search_call.results"]
order = "asc"
}