SpyBara
Go Premium

Reference 2026-05-27 06:42 UTC to 2026-06-02 06:51 UTC

14 files changed +57,132 −15,026. View all changes and history on the product overview
2026
Wed 24 00:02 Tue 23 22:00 Wed 17 18:02 Tue 16 21:57 Fri 12 00:01 Wed 10 15:48 Tue 9 06:34 Fri 5 06:45 Thu 4 06:52 Tue 2 06:51
Details

46 46 

47 Return only events whose `effective_at` (Unix seconds) is less than or equal to this value.47 Return only events whose `effective_at` (Unix seconds) is less than or equal to this value.

48 48 

49- `event_types: optional array of "api_key.created" or "api_key.updated" or "api_key.deleted" or 48 more`49- `event_types: optional array of "api_key.created" or "api_key.updated" or "api_key.deleted" or 54 more`

50 50 

51 Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](/docs/api-reference/audit-logs/object).51 Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](/docs/api-reference/audit-logs/object).

52 52 


126 126 

127 - `"tunnel.deleted"`127 - `"tunnel.deleted"`

128 128 

129 - `"workload_identity_provider.created"`

130 

131 - `"workload_identity_provider.updated"`

132 

133 - `"workload_identity_provider.deleted"`

134 

135 - `"workload_identity_provider_mapping.created"`

136 

137 - `"workload_identity_provider_mapping.updated"`

138 

139 - `"workload_identity_provider_mapping.deleted"`

140 

129 - `"role.created"`141 - `"role.created"`

130 142 

131 - `"role.updated"`143 - `"role.updated"`


166 178 

167### Returns179### Returns

168 180 

169- `data: array of object { id, effective_at, type, 49 more }`181- `data: array of object { id, effective_at, type, 55 more }`

170 182 

171 - `id: string`183 - `id: string`

172 184 


176 188 

177 The Unix timestamp (in seconds) of the event.189 The Unix timestamp (in seconds) of the event.

178 190 

179 - `type: "api_key.created" or "api_key.updated" or "api_key.deleted" or 48 more`191 - `type: "api_key.created" or "api_key.updated" or "api_key.deleted" or 54 more`

180 192 

181 The event type.193 The event type.

182 194 


256 268 

257 - `"tunnel.deleted"`269 - `"tunnel.deleted"`

258 270 

271 - `"workload_identity_provider.created"`

272 

273 - `"workload_identity_provider.updated"`

274 

275 - `"workload_identity_provider.deleted"`

276 

277 - `"workload_identity_provider_mapping.created"`

278 

279 - `"workload_identity_provider_mapping.updated"`

280 

281 - `"workload_identity_provider_mapping.deleted"`

282 

259 - `"role.created"`283 - `"role.created"`

260 284 

261 - `"role.updated"`285 - `"role.updated"`


1054 1078 

1055 The role of the user. Is either `owner` or `member`.1079 The role of the user. Is either `owner` or `member`.

1056 1080 

1081 - `"workload_identity_provider_mapping.created": optional object { id, data, identity_provider_id }`

1082 

1083 The details for events with this `type`.

1084 

1085 - `id: optional string`

1086 

1087 The workload identity provider mapping ID.

1088 

1089 - `data: optional unknown`

1090 

1091 The payload used to create the workload identity provider mapping.

1092 

1093 - `identity_provider_id: optional string`

1094 

1095 The workload identity provider ID.

1096 

1097 - `"workload_identity_provider_mapping.deleted": optional object { id, identity_provider_id, project_id, service_account_id }`

1098 

1099 The details for events with this `type`.

1100 

1101 - `id: optional string`

1102 

1103 The workload identity provider mapping ID.

1104 

1105 - `identity_provider_id: optional string`

1106 

1107 The workload identity provider ID.

1108 

1109 - `project_id: optional string`

1110 

1111 The project ID.

1112 

1113 - `service_account_id: optional string`

1114 

1115 The mapped service account ID.

1116 

1117 - `"workload_identity_provider_mapping.updated": optional object { id, changes_requested, identity_provider_id }`

1118 

1119 The details for events with this `type`.

1120 

1121 - `id: optional string`

1122 

1123 The workload identity provider mapping ID.

1124 

1125 - `changes_requested: optional unknown`

1126 

1127 The payload used to update the workload identity provider mapping.

1128 

1129 - `identity_provider_id: optional string`

1130 

1131 The workload identity provider ID.

1132 

1133 - `"workload_identity_provider.created": optional object { id, data }`

1134 

1135 The details for events with this `type`.

1136 

1137 - `id: optional string`

1138 

1139 The workload identity provider ID.

1140 

1141 - `data: optional unknown`

1142 

1143 The payload used to create the workload identity provider.

1144 

1145 - `"workload_identity_provider.deleted": optional object { id, name }`

1146 

1147 The details for events with this `type`.

1148 

1149 - `id: optional string`

1150 

1151 The workload identity provider ID.

1152 

1153 - `name: optional string`

1154 

1155 The workload identity provider name.

1156 

1157 - `"workload_identity_provider.updated": optional object { id, changes_requested }`

1158 

1159 The details for events with this `type`.

1160 

1161 - `id: optional string`

1162 

1163 The workload identity provider ID.

1164 

1165 - `changes_requested: optional unknown`

1166 

1167 The payload used to update the workload identity provider.

1168 

1057- `has_more: boolean`1169- `has_more: boolean`

1058 1170 

1059- `object: "list"`1171- `object: "list"`


1366 "changes_requested": {1478 "changes_requested": {

1367 "role": "role"1479 "role": "role"

1368 }1480 }

1481 },

1482 "workload_identity_provider_mapping.created": {

1483 "id": "id",

1484 "data": {},

1485 "identity_provider_id": "identity_provider_id"

1486 },

1487 "workload_identity_provider_mapping.deleted": {

1488 "id": "id",

1489 "identity_provider_id": "identity_provider_id",

1490 "project_id": "project_id",

1491 "service_account_id": "service_account_id"

1492 },

1493 "workload_identity_provider_mapping.updated": {

1494 "id": "id",

1495 "changes_requested": {},

1496 "identity_provider_id": "identity_provider_id"

1497 },

1498 "workload_identity_provider.created": {

1499 "id": "id",

1500 "data": {}

1501 },

1502 "workload_identity_provider.deleted": {

1503 "id": "id",

1504 "name": "name"

1505 },

1506 "workload_identity_provider.updated": {

1507 "id": "id",

1508 "changes_requested": {}

1369 }1509 }

1370 }1510 }

1371 ],1511 ],


1452 1592 

1453### Audit Log List Response1593### Audit Log List Response

1454 1594 

1455- `AuditLogListResponse object { id, effective_at, type, 49 more }`1595- `AuditLogListResponse object { id, effective_at, type, 55 more }`

1456 1596 

1457 A log of a user action or configuration change within this organization.1597 A log of a user action or configuration change within this organization.

1458 1598 


1464 1604 

1465 The Unix timestamp (in seconds) of the event.1605 The Unix timestamp (in seconds) of the event.

1466 1606 

1467 - `type: "api_key.created" or "api_key.updated" or "api_key.deleted" or 48 more`1607 - `type: "api_key.created" or "api_key.updated" or "api_key.deleted" or 54 more`

1468 1608 

1469 The event type.1609 The event type.

1470 1610 


1544 1684 

1545 - `"tunnel.deleted"`1685 - `"tunnel.deleted"`

1546 1686 

1687 - `"workload_identity_provider.created"`

1688 

1689 - `"workload_identity_provider.updated"`

1690 

1691 - `"workload_identity_provider.deleted"`

1692 

1693 - `"workload_identity_provider_mapping.created"`

1694 

1695 - `"workload_identity_provider_mapping.updated"`

1696 

1697 - `"workload_identity_provider_mapping.deleted"`

1698 

1547 - `"role.created"`1699 - `"role.created"`

1548 1700 

1549 - `"role.updated"`1701 - `"role.updated"`


2342 2494 

2343 The role of the user. Is either `owner` or `member`.2495 The role of the user. Is either `owner` or `member`.

2344 2496 

2497 - `"workload_identity_provider_mapping.created": optional object { id, data, identity_provider_id }`

2498 

2499 The details for events with this `type`.

2500 

2501 - `id: optional string`

2502 

2503 The workload identity provider mapping ID.

2504 

2505 - `data: optional unknown`

2506 

2507 The payload used to create the workload identity provider mapping.

2508 

2509 - `identity_provider_id: optional string`

2510 

2511 The workload identity provider ID.

2512 

2513 - `"workload_identity_provider_mapping.deleted": optional object { id, identity_provider_id, project_id, service_account_id }`

2514 

2515 The details for events with this `type`.

2516 

2517 - `id: optional string`

2518 

2519 The workload identity provider mapping ID.

2520 

2521 - `identity_provider_id: optional string`

2522 

2523 The workload identity provider ID.

2524 

2525 - `project_id: optional string`

2526 

2527 The project ID.

2528 

2529 - `service_account_id: optional string`

2530 

2531 The mapped service account ID.

2532 

2533 - `"workload_identity_provider_mapping.updated": optional object { id, changes_requested, identity_provider_id }`

2534 

2535 The details for events with this `type`.

2536 

2537 - `id: optional string`

2538 

2539 The workload identity provider mapping ID.

2540 

2541 - `changes_requested: optional unknown`

2542 

2543 The payload used to update the workload identity provider mapping.

2544 

2545 - `identity_provider_id: optional string`

2546 

2547 The workload identity provider ID.

2548 

2549 - `"workload_identity_provider.created": optional object { id, data }`

2550 

2551 The details for events with this `type`.

2552 

2553 - `id: optional string`

2554 

2555 The workload identity provider ID.

2556 

2557 - `data: optional unknown`

2558 

2559 The payload used to create the workload identity provider.

2560 

2561 - `"workload_identity_provider.deleted": optional object { id, name }`

2562 

2563 The details for events with this `type`.

2564 

2565 - `id: optional string`

2566 

2567 The workload identity provider ID.

2568 

2569 - `name: optional string`

2570 

2571 The workload identity provider name.

2572 

2573 - `"workload_identity_provider.updated": optional object { id, changes_requested }`

2574 

2575 The details for events with this `type`.

2576 

2577 - `id: optional string`

2578 

2579 The workload identity provider ID.

2580 

2581 - `changes_requested: optional unknown`

2582 

2583 The payload used to update the workload identity provider.

2584 

2345# Admin API Keys2585# Admin API Keys

2346 2586 

2347## List all organization and project API keys.2587## List all organization and project API keys.

Details

44 44 

45 Return only events whose `effective_at` (Unix seconds) is less than or equal to this value.45 Return only events whose `effective_at` (Unix seconds) is less than or equal to this value.

46 46 

47- `event_types: optional array of "api_key.created" or "api_key.updated" or "api_key.deleted" or 48 more`47- `event_types: optional array of "api_key.created" or "api_key.updated" or "api_key.deleted" or 54 more`

48 48 

49 Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](/docs/api-reference/audit-logs/object).49 Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](/docs/api-reference/audit-logs/object).

50 50 


124 124 

125 - `"tunnel.deleted"`125 - `"tunnel.deleted"`

126 126 

127 - `"workload_identity_provider.created"`

128 

129 - `"workload_identity_provider.updated"`

130 

131 - `"workload_identity_provider.deleted"`

132 

133 - `"workload_identity_provider_mapping.created"`

134 

135 - `"workload_identity_provider_mapping.updated"`

136 

137 - `"workload_identity_provider_mapping.deleted"`

138 

127 - `"role.created"`139 - `"role.created"`

128 140 

129 - `"role.updated"`141 - `"role.updated"`


164 176 

165### Returns177### Returns

166 178 

167- `data: array of object { id, effective_at, type, 49 more }`179- `data: array of object { id, effective_at, type, 55 more }`

168 180 

169 - `id: string`181 - `id: string`

170 182 


174 186 

175 The Unix timestamp (in seconds) of the event.187 The Unix timestamp (in seconds) of the event.

176 188 

177 - `type: "api_key.created" or "api_key.updated" or "api_key.deleted" or 48 more`189 - `type: "api_key.created" or "api_key.updated" or "api_key.deleted" or 54 more`

178 190 

179 The event type.191 The event type.

180 192 


254 266 

255 - `"tunnel.deleted"`267 - `"tunnel.deleted"`

256 268 

269 - `"workload_identity_provider.created"`

270 

271 - `"workload_identity_provider.updated"`

272 

273 - `"workload_identity_provider.deleted"`

274 

275 - `"workload_identity_provider_mapping.created"`

276 

277 - `"workload_identity_provider_mapping.updated"`

278 

279 - `"workload_identity_provider_mapping.deleted"`

280 

257 - `"role.created"`281 - `"role.created"`

258 282 

259 - `"role.updated"`283 - `"role.updated"`


1052 1076 

1053 The role of the user. Is either `owner` or `member`.1077 The role of the user. Is either `owner` or `member`.

1054 1078 

1079 - `"workload_identity_provider_mapping.created": optional object { id, data, identity_provider_id }`

1080 

1081 The details for events with this `type`.

1082 

1083 - `id: optional string`

1084 

1085 The workload identity provider mapping ID.

1086 

1087 - `data: optional unknown`

1088 

1089 The payload used to create the workload identity provider mapping.

1090 

1091 - `identity_provider_id: optional string`

1092 

1093 The workload identity provider ID.

1094 

1095 - `"workload_identity_provider_mapping.deleted": optional object { id, identity_provider_id, project_id, service_account_id }`

1096 

1097 The details for events with this `type`.

1098 

1099 - `id: optional string`

1100 

1101 The workload identity provider mapping ID.

1102 

1103 - `identity_provider_id: optional string`

1104 

1105 The workload identity provider ID.

1106 

1107 - `project_id: optional string`

1108 

1109 The project ID.

1110 

1111 - `service_account_id: optional string`

1112 

1113 The mapped service account ID.

1114 

1115 - `"workload_identity_provider_mapping.updated": optional object { id, changes_requested, identity_provider_id }`

1116 

1117 The details for events with this `type`.

1118 

1119 - `id: optional string`

1120 

1121 The workload identity provider mapping ID.

1122 

1123 - `changes_requested: optional unknown`

1124 

1125 The payload used to update the workload identity provider mapping.

1126 

1127 - `identity_provider_id: optional string`

1128 

1129 The workload identity provider ID.

1130 

1131 - `"workload_identity_provider.created": optional object { id, data }`

1132 

1133 The details for events with this `type`.

1134 

1135 - `id: optional string`

1136 

1137 The workload identity provider ID.

1138 

1139 - `data: optional unknown`

1140 

1141 The payload used to create the workload identity provider.

1142 

1143 - `"workload_identity_provider.deleted": optional object { id, name }`

1144 

1145 The details for events with this `type`.

1146 

1147 - `id: optional string`

1148 

1149 The workload identity provider ID.

1150 

1151 - `name: optional string`

1152 

1153 The workload identity provider name.

1154 

1155 - `"workload_identity_provider.updated": optional object { id, changes_requested }`

1156 

1157 The details for events with this `type`.

1158 

1159 - `id: optional string`

1160 

1161 The workload identity provider ID.

1162 

1163 - `changes_requested: optional unknown`

1164 

1165 The payload used to update the workload identity provider.

1166 

1055- `has_more: boolean`1167- `has_more: boolean`

1056 1168 

1057- `object: "list"`1169- `object: "list"`


1364 "changes_requested": {1476 "changes_requested": {

1365 "role": "role"1477 "role": "role"

1366 }1478 }

1479 },

1480 "workload_identity_provider_mapping.created": {

1481 "id": "id",

1482 "data": {},

1483 "identity_provider_id": "identity_provider_id"

1484 },

1485 "workload_identity_provider_mapping.deleted": {

1486 "id": "id",

1487 "identity_provider_id": "identity_provider_id",

1488 "project_id": "project_id",

1489 "service_account_id": "service_account_id"

1490 },

1491 "workload_identity_provider_mapping.updated": {

1492 "id": "id",

1493 "changes_requested": {},

1494 "identity_provider_id": "identity_provider_id"

1495 },

1496 "workload_identity_provider.created": {

1497 "id": "id",

1498 "data": {}

1499 },

1500 "workload_identity_provider.deleted": {

1501 "id": "id",

1502 "name": "name"

1503 },

1504 "workload_identity_provider.updated": {

1505 "id": "id",

1506 "changes_requested": {}

1367 }1507 }

1368 }1508 }

1369 ],1509 ],


1450 1590 

1451### Audit Log List Response1591### Audit Log List Response

1452 1592 

1453- `AuditLogListResponse object { id, effective_at, type, 49 more }`1593- `AuditLogListResponse object { id, effective_at, type, 55 more }`

1454 1594 

1455 A log of a user action or configuration change within this organization.1595 A log of a user action or configuration change within this organization.

1456 1596 


1462 1602 

1463 The Unix timestamp (in seconds) of the event.1603 The Unix timestamp (in seconds) of the event.

1464 1604 

1465 - `type: "api_key.created" or "api_key.updated" or "api_key.deleted" or 48 more`1605 - `type: "api_key.created" or "api_key.updated" or "api_key.deleted" or 54 more`

1466 1606 

1467 The event type.1607 The event type.

1468 1608 


1542 1682 

1543 - `"tunnel.deleted"`1683 - `"tunnel.deleted"`

1544 1684 

1685 - `"workload_identity_provider.created"`

1686 

1687 - `"workload_identity_provider.updated"`

1688 

1689 - `"workload_identity_provider.deleted"`

1690 

1691 - `"workload_identity_provider_mapping.created"`

1692 

1693 - `"workload_identity_provider_mapping.updated"`

1694 

1695 - `"workload_identity_provider_mapping.deleted"`

1696 

1545 - `"role.created"`1697 - `"role.created"`

1546 1698 

1547 - `"role.updated"`1699 - `"role.updated"`


2339 - `role: optional string`2491 - `role: optional string`

2340 2492 

2341 The role of the user. Is either `owner` or `member`.2493 The role of the user. Is either `owner` or `member`.

2494 

2495 - `"workload_identity_provider_mapping.created": optional object { id, data, identity_provider_id }`

2496 

2497 The details for events with this `type`.

2498 

2499 - `id: optional string`

2500 

2501 The workload identity provider mapping ID.

2502 

2503 - `data: optional unknown`

2504 

2505 The payload used to create the workload identity provider mapping.

2506 

2507 - `identity_provider_id: optional string`

2508 

2509 The workload identity provider ID.

2510 

2511 - `"workload_identity_provider_mapping.deleted": optional object { id, identity_provider_id, project_id, service_account_id }`

2512 

2513 The details for events with this `type`.

2514 

2515 - `id: optional string`

2516 

2517 The workload identity provider mapping ID.

2518 

2519 - `identity_provider_id: optional string`

2520 

2521 The workload identity provider ID.

2522 

2523 - `project_id: optional string`

2524 

2525 The project ID.

2526 

2527 - `service_account_id: optional string`

2528 

2529 The mapped service account ID.

2530 

2531 - `"workload_identity_provider_mapping.updated": optional object { id, changes_requested, identity_provider_id }`

2532 

2533 The details for events with this `type`.

2534 

2535 - `id: optional string`

2536 

2537 The workload identity provider mapping ID.

2538 

2539 - `changes_requested: optional unknown`

2540 

2541 The payload used to update the workload identity provider mapping.

2542 

2543 - `identity_provider_id: optional string`

2544 

2545 The workload identity provider ID.

2546 

2547 - `"workload_identity_provider.created": optional object { id, data }`

2548 

2549 The details for events with this `type`.

2550 

2551 - `id: optional string`

2552 

2553 The workload identity provider ID.

2554 

2555 - `data: optional unknown`

2556 

2557 The payload used to create the workload identity provider.

2558 

2559 - `"workload_identity_provider.deleted": optional object { id, name }`

2560 

2561 The details for events with this `type`.

2562 

2563 - `id: optional string`

2564 

2565 The workload identity provider ID.

2566 

2567 - `name: optional string`

2568 

2569 The workload identity provider name.

2570 

2571 - `"workload_identity_provider.updated": optional object { id, changes_requested }`

2572 

2573 The details for events with this `type`.

2574 

2575 - `id: optional string`

2576 

2577 The workload identity provider ID.

2578 

2579 - `changes_requested: optional unknown`

2580 

2581 The payload used to update the workload identity provider.

Details

42 42 

43 Return only events whose `effective_at` (Unix seconds) is less than or equal to this value.43 Return only events whose `effective_at` (Unix seconds) is less than or equal to this value.

44 44 

45- `event_types: optional array of "api_key.created" or "api_key.updated" or "api_key.deleted" or 48 more`45- `event_types: optional array of "api_key.created" or "api_key.updated" or "api_key.deleted" or 54 more`

46 46 

47 Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](/docs/api-reference/audit-logs/object).47 Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](/docs/api-reference/audit-logs/object).

48 48 


122 122 

123 - `"tunnel.deleted"`123 - `"tunnel.deleted"`

124 124 

125 - `"workload_identity_provider.created"`

126 

127 - `"workload_identity_provider.updated"`

128 

129 - `"workload_identity_provider.deleted"`

130 

131 - `"workload_identity_provider_mapping.created"`

132 

133 - `"workload_identity_provider_mapping.updated"`

134 

135 - `"workload_identity_provider_mapping.deleted"`

136 

125 - `"role.created"`137 - `"role.created"`

126 138 

127 - `"role.updated"`139 - `"role.updated"`


162 174 

163### Returns175### Returns

164 176 

165- `data: array of object { id, effective_at, type, 49 more }`177- `data: array of object { id, effective_at, type, 55 more }`

166 178 

167 - `id: string`179 - `id: string`

168 180 


172 184 

173 The Unix timestamp (in seconds) of the event.185 The Unix timestamp (in seconds) of the event.

174 186 

175 - `type: "api_key.created" or "api_key.updated" or "api_key.deleted" or 48 more`187 - `type: "api_key.created" or "api_key.updated" or "api_key.deleted" or 54 more`

176 188 

177 The event type.189 The event type.

178 190 


252 264 

253 - `"tunnel.deleted"`265 - `"tunnel.deleted"`

254 266 

267 - `"workload_identity_provider.created"`

268 

269 - `"workload_identity_provider.updated"`

270 

271 - `"workload_identity_provider.deleted"`

272 

273 - `"workload_identity_provider_mapping.created"`

274 

275 - `"workload_identity_provider_mapping.updated"`

276 

277 - `"workload_identity_provider_mapping.deleted"`

278 

255 - `"role.created"`279 - `"role.created"`

256 280 

257 - `"role.updated"`281 - `"role.updated"`


1050 1074 

1051 The role of the user. Is either `owner` or `member`.1075 The role of the user. Is either `owner` or `member`.

1052 1076 

1077 - `"workload_identity_provider_mapping.created": optional object { id, data, identity_provider_id }`

1078 

1079 The details for events with this `type`.

1080 

1081 - `id: optional string`

1082 

1083 The workload identity provider mapping ID.

1084 

1085 - `data: optional unknown`

1086 

1087 The payload used to create the workload identity provider mapping.

1088 

1089 - `identity_provider_id: optional string`

1090 

1091 The workload identity provider ID.

1092 

1093 - `"workload_identity_provider_mapping.deleted": optional object { id, identity_provider_id, project_id, service_account_id }`

1094 

1095 The details for events with this `type`.

1096 

1097 - `id: optional string`

1098 

1099 The workload identity provider mapping ID.

1100 

1101 - `identity_provider_id: optional string`

1102 

1103 The workload identity provider ID.

1104 

1105 - `project_id: optional string`

1106 

1107 The project ID.

1108 

1109 - `service_account_id: optional string`

1110 

1111 The mapped service account ID.

1112 

1113 - `"workload_identity_provider_mapping.updated": optional object { id, changes_requested, identity_provider_id }`

1114 

1115 The details for events with this `type`.

1116 

1117 - `id: optional string`

1118 

1119 The workload identity provider mapping ID.

1120 

1121 - `changes_requested: optional unknown`

1122 

1123 The payload used to update the workload identity provider mapping.

1124 

1125 - `identity_provider_id: optional string`

1126 

1127 The workload identity provider ID.

1128 

1129 - `"workload_identity_provider.created": optional object { id, data }`

1130 

1131 The details for events with this `type`.

1132 

1133 - `id: optional string`

1134 

1135 The workload identity provider ID.

1136 

1137 - `data: optional unknown`

1138 

1139 The payload used to create the workload identity provider.

1140 

1141 - `"workload_identity_provider.deleted": optional object { id, name }`

1142 

1143 The details for events with this `type`.

1144 

1145 - `id: optional string`

1146 

1147 The workload identity provider ID.

1148 

1149 - `name: optional string`

1150 

1151 The workload identity provider name.

1152 

1153 - `"workload_identity_provider.updated": optional object { id, changes_requested }`

1154 

1155 The details for events with this `type`.

1156 

1157 - `id: optional string`

1158 

1159 The workload identity provider ID.

1160 

1161 - `changes_requested: optional unknown`

1162 

1163 The payload used to update the workload identity provider.

1164 

1053- `has_more: boolean`1165- `has_more: boolean`

1054 1166 

1055- `object: "list"`1167- `object: "list"`


1362 "changes_requested": {1474 "changes_requested": {

1363 "role": "role"1475 "role": "role"

1364 }1476 }

1477 },

1478 "workload_identity_provider_mapping.created": {

1479 "id": "id",

1480 "data": {},

1481 "identity_provider_id": "identity_provider_id"

1482 },

1483 "workload_identity_provider_mapping.deleted": {

1484 "id": "id",

1485 "identity_provider_id": "identity_provider_id",

1486 "project_id": "project_id",

1487 "service_account_id": "service_account_id"

1488 },

1489 "workload_identity_provider_mapping.updated": {

1490 "id": "id",

1491 "changes_requested": {},

1492 "identity_provider_id": "identity_provider_id"

1493 },

1494 "workload_identity_provider.created": {

1495 "id": "id",

1496 "data": {}

1497 },

1498 "workload_identity_provider.deleted": {

1499 "id": "id",

1500 "name": "name"

1501 },

1502 "workload_identity_provider.updated": {

1503 "id": "id",

1504 "changes_requested": {}

1365 }1505 }

1366 }1506 }

1367 ],1507 ],

Details

799- `prompt_cache_retention: optional "in_memory" or "24h"`799- `prompt_cache_retention: optional "in_memory" or "24h"`

800 800 

801 The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention).801 The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention).

802 For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

803 

804 For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

805 

806 - Organizations without ZDR enabled default to `24h`.

807 - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

802 808 

803 - `"in_memory"`809 - `"in_memory"`

804 810 

Details

6 6 

7### Body Parameters7### Body Parameters

8 8 

9- `items: optional array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 26 more`9- `items: optional array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 27 more`

10 10 

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

12 12 


788 788 

789 The unique ID of the web search tool call.789 The unique ID of the web search tool call.

790 790 

791 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`791 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`

792 792 

793 An object describing the specific action taken in this web search call.793 An object describing the specific action taken in this web search call.

794 Includes details on how the model used the web (search, open_page, find_in_page).794 Includes details on how the model used the web (search, open_page, find_in_page).

795 795 

796 - `Search object { query, type, queries, sources }`796 - `Search object { type, queries, query, sources }`

797 797 

798 Action type "search" - Performs a web search query.798 Action type "search" - Performs a web search query.

799 799 

800 - `query: string`

801 

802 [DEPRECATED] The search query.

803 

804 - `type: "search"`800 - `type: "search"`

805 801 

806 The action type.802 The action type.


811 807 

812 The search queries.808 The search queries.

813 809 

810 - `query: optional string`

811 

812 The search query.

813 

814 - `sources: optional array of object { type, url }`814 - `sources: optional array of object { type, url }`

815 815 

816 The sources used in the search.816 The sources used in the search.


2082 2082 

2083 - `"incomplete"`2083 - `"incomplete"`

2084 2084 

2085 - `AdditionalTools object { role, tools, type, id }`

2086 

2087 - `role: "developer"`

2088 

2089 The role that provided the additional tools. Only `developer` is supported.

2090 

2091 - `"developer"`

2092 

2093 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

2094 

2095 A list of additional tools made available at this item.

2096 

2097 - `Function object { name, parameters, strict, 3 more }`

2098 

2099 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

2100 

2101 - `name: string`

2102 

2103 The name of the function to call.

2104 

2105 - `parameters: map[unknown]`

2106 

2107 A JSON schema object describing the parameters of the function.

2108 

2109 - `strict: boolean`

2110 

2111 Whether to enforce strict parameter validation. Default `true`.

2112 

2113 - `type: "function"`

2114 

2115 The type of the function tool. Always `function`.

2116 

2117 - `"function"`

2118 

2119 - `defer_loading: optional boolean`

2120 

2121 Whether this function is deferred and loaded via tool search.

2122 

2123 - `description: optional string`

2124 

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

2126 

2127 - `FileSearch object { type, vector_store_ids, filters, 2 more }`

2128 

2129 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

2130 

2131 - `type: "file_search"`

2132 

2133 The type of the file search tool. Always `file_search`.

2134 

2135 - `"file_search"`

2136 

2137 - `vector_store_ids: array of string`

2138 

2139 The IDs of the vector stores to search.

2140 

2141 - `filters: optional ComparisonFilter or CompoundFilter`

2142 

2143 A filter to apply.

2144 

2145 - `ComparisonFilter object { key, type, value }`

2146 

2147 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

2148 

2149 - `CompoundFilter object { filters, type }`

2150 

2151 Combine multiple filters using `and` or `or`.

2152 

2153 - `max_num_results: optional number`

2154 

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

2156 

2157 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`

2158 

2159 Ranking options for search.

2160 

2161 - `hybrid_search: optional object { embedding_weight, text_weight }`

2162 

2163 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

2164 

2165 - `embedding_weight: number`

2166 

2167 The weight of the embedding in the reciprocal ranking fusion.

2168 

2169 - `text_weight: number`

2170 

2171 The weight of the text in the reciprocal ranking fusion.

2172 

2173 - `ranker: optional "auto" or "default-2024-11-15"`

2174 

2175 The ranker to use for the file search.

2176 

2177 - `"auto"`

2178 

2179 - `"default-2024-11-15"`

2180 

2181 - `score_threshold: optional number`

2182 

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

2184 

2185 - `Computer object { type }`

2186 

2187 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2188 

2189 - `type: "computer"`

2190 

2191 The type of the computer tool. Always `computer`.

2192 

2193 - `"computer"`

2194 

2195 - `ComputerUsePreview object { display_height, display_width, environment, type }`

2196 

2197 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2198 

2199 - `display_height: number`

2200 

2201 The height of the computer display.

2202 

2203 - `display_width: number`

2204 

2205 The width of the computer display.

2206 

2207 - `environment: "windows" or "mac" or "linux" or 2 more`

2208 

2209 The type of computer environment to control.

2210 

2211 - `"windows"`

2212 

2213 - `"mac"`

2214 

2215 - `"linux"`

2216 

2217 - `"ubuntu"`

2218 

2219 - `"browser"`

2220 

2221 - `type: "computer_use_preview"`

2222 

2223 The type of the computer use tool. Always `computer_use_preview`.

2224 

2225 - `"computer_use_preview"`

2226 

2227 - `WebSearch object { type, filters, search_context_size, user_location }`

2228 

2229 Search the Internet for sources related to the prompt. Learn more about the

2230 [web search tool](/docs/guides/tools-web-search).

2231 

2232 - `type: "web_search" or "web_search_2025_08_26"`

2233 

2234 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

2235 

2236 - `"web_search"`

2237 

2238 - `"web_search_2025_08_26"`

2239 

2240 - `filters: optional object { allowed_domains }`

2241 

2242 Filters for the search.

2243 

2244 - `allowed_domains: optional array of string`

2245 

2246 Allowed domains for the search. If not provided, all domains are allowed.

2247 Subdomains of the provided domains are allowed as well.

2248 

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

2250 

2251 - `search_context_size: optional "low" or "medium" or "high"`

2252 

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

2254 

2255 - `"low"`

2256 

2257 - `"medium"`

2258 

2259 - `"high"`

2260 

2261 - `user_location: optional object { city, country, region, 2 more }`

2262 

2263 The approximate location of the user.

2264 

2265 - `city: optional string`

2266 

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

2268 

2269 - `country: optional string`

2270 

2271 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2272 

2273 - `region: optional string`

2274 

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

2276 

2277 - `timezone: optional string`

2278 

2279 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2280 

2281 - `type: optional "approximate"`

2282 

2283 The type of location approximation. Always `approximate`.

2284 

2285 - `"approximate"`

2286 

2287 - `Mcp object { server_label, type, allowed_tools, 7 more }`

2288 

2289 Give the model access to additional tools via remote Model Context Protocol

2290 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

2291 

2292 - `server_label: string`

2293 

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

2295 

2296 - `type: "mcp"`

2297 

2298 The type of the MCP tool. Always `mcp`.

2299 

2300 - `"mcp"`

2301 

2302 - `allowed_tools: optional array of string or object { read_only, tool_names }`

2303 

2304 List of allowed tool names or a filter object.

2305 

2306 - `McpAllowedTools = array of string`

2307 

2308 A string array of allowed tool names

2309 

2310 - `McpToolFilter object { read_only, tool_names }`

2311 

2312 A filter object to specify which tools are allowed.

2313 

2314 - `read_only: optional boolean`

2315 

2316 Indicates whether or not a tool modifies data or is read-only. If an

2317 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2318 it will match this filter.

2319 

2320 - `tool_names: optional array of string`

2321 

2322 List of allowed tool names.

2323 

2324 - `authorization: optional string`

2325 

2326 An OAuth access token that can be used with a remote MCP server, either

2327 with a custom MCP server URL or a service connector. Your application

2328 must handle the OAuth authorization flow and provide the token here.

2329 

2330 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`

2331 

2332 Identifier for service connectors, like those available in ChatGPT. One of

2333 `server_url` or `connector_id` must be provided. Learn more about service

2334 connectors [here](/docs/guides/tools-remote-mcp#connectors).

2335 

2336 Currently supported `connector_id` values are:

2337 

2338 - Dropbox: `connector_dropbox`

2339 - Gmail: `connector_gmail`

2340 - Google Calendar: `connector_googlecalendar`

2341 - Google Drive: `connector_googledrive`

2342 - Microsoft Teams: `connector_microsoftteams`

2343 - Outlook Calendar: `connector_outlookcalendar`

2344 - Outlook Email: `connector_outlookemail`

2345 - SharePoint: `connector_sharepoint`

2346 

2347 - `"connector_dropbox"`

2348 

2349 - `"connector_gmail"`

2350 

2351 - `"connector_googlecalendar"`

2352 

2353 - `"connector_googledrive"`

2354 

2355 - `"connector_microsoftteams"`

2356 

2357 - `"connector_outlookcalendar"`

2358 

2359 - `"connector_outlookemail"`

2360 

2361 - `"connector_sharepoint"`

2362 

2363 - `defer_loading: optional boolean`

2364 

2365 Whether this MCP tool is deferred and discovered via tool search.

2366 

2367 - `headers: optional map[string]`

2368 

2369 Optional HTTP headers to send to the MCP server. Use for authentication

2370 or other purposes.

2371 

2372 - `require_approval: optional object { always, never } or "always" or "never"`

2373 

2374 Specify which of the MCP server's tools require approval.

2375 

2376 - `McpToolApprovalFilter object { always, never }`

2377 

2378 Specify which of the MCP server's tools require approval. Can be

2379 `always`, `never`, or a filter object associated with tools

2380 that require approval.

2381 

2382 - `always: optional object { read_only, tool_names }`

2383 

2384 A filter object to specify which tools are allowed.

2385 

2386 - `read_only: optional boolean`

2387 

2388 Indicates whether or not a tool modifies data or is read-only. If an

2389 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2390 it will match this filter.

2391 

2392 - `tool_names: optional array of string`

2393 

2394 List of allowed tool names.

2395 

2396 - `never: optional object { read_only, tool_names }`

2397 

2398 A filter object to specify which tools are allowed.

2399 

2400 - `read_only: optional boolean`

2401 

2402 Indicates whether or not a tool modifies data or is read-only. If an

2403 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2404 it will match this filter.

2405 

2406 - `tool_names: optional array of string`

2407 

2408 List of allowed tool names.

2409 

2410 - `McpToolApprovalSetting = "always" or "never"`

2411 

2412 Specify a single approval policy for all tools. One of `always` or

2413 `never`. When set to `always`, all tools will require approval. When

2414 set to `never`, all tools will not require approval.

2415 

2416 - `"always"`

2417 

2418 - `"never"`

2419 

2420 - `server_description: optional string`

2421 

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

2423 

2424 - `server_url: optional string`

2425 

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

2427 provided.

2428 

2429 - `CodeInterpreter object { container, type }`

2430 

2431 A tool that runs Python code to help generate a response to a prompt.

2432 

2433 - `container: string or object { type, file_ids, memory_limit, network_policy }`

2434 

2435 The code interpreter container. Can be a container ID or an object that

2436 specifies uploaded file IDs to make available to your code, along with an

2437 optional `memory_limit` setting.

2438 

2439 - `string`

2440 

2441 The container ID.

2442 

2443 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`

2444 

2445 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

2446 

2447 - `type: "auto"`

2448 

2449 Always `auto`.

2450 

2451 - `"auto"`

2452 

2453 - `file_ids: optional array of string`

2454 

2455 An optional list of uploaded files to make available to your code.

2456 

2457 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

2458 

2459 The memory limit for the code interpreter container.

2460 

2461 - `"1g"`

2462 

2463 - `"4g"`

2464 

2465 - `"16g"`

2466 

2467 - `"64g"`

2468 

2469 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

2470 

2471 Network access policy for the container.

2472 

2473 - `ContainerNetworkPolicyDisabled object { type }`

2474 

2475 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

2476 

2477 - `type: "code_interpreter"`

2478 

2479 The type of the code interpreter tool. Always `code_interpreter`.

2480 

2481 - `"code_interpreter"`

2482 

2483 - `ImageGeneration object { type, action, background, 9 more }`

2484 

2485 A tool that generates images using the GPT image models.

2486 

2487 - `type: "image_generation"`

2488 

2489 The type of the image generation tool. Always `image_generation`.

2490 

2491 - `"image_generation"`

2492 

2493 - `action: optional "generate" or "edit" or "auto"`

2494 

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

2496 

2497 - `"generate"`

2498 

2499 - `"edit"`

2500 

2501 - `"auto"`

2502 

2503 - `background: optional "transparent" or "opaque" or "auto"`

2504 

2505 Background type for the generated image. One of `transparent`,

2506 `opaque`, or `auto`. Default: `auto`.

2507 

2508 - `"transparent"`

2509 

2510 - `"opaque"`

2511 

2512 - `"auto"`

2513 

2514 - `input_fidelity: optional "high" or "low"`

2515 

2516 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`.

2517 

2518 - `"high"`

2519 

2520 - `"low"`

2521 

2522 - `input_image_mask: optional object { file_id, image_url }`

2523 

2524 Optional mask for inpainting. Contains `image_url`

2525 (string, optional) and `file_id` (string, optional).

2526 

2527 - `file_id: optional string`

2528 

2529 File ID for the mask image.

2530 

2531 - `image_url: optional string`

2532 

2533 Base64-encoded mask image.

2534 

2535 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2536 

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

2538 

2539 - `string`

2540 

2541 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2542 

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

2544 

2545 - `"gpt-image-1"`

2546 

2547 - `"gpt-image-1-mini"`

2548 

2549 - `"gpt-image-1.5"`

2550 

2551 - `moderation: optional "auto" or "low"`

2552 

2553 Moderation level for the generated image. Default: `auto`.

2554 

2555 - `"auto"`

2556 

2557 - `"low"`

2558 

2559 - `output_compression: optional number`

2560 

2561 Compression level for the output image. Default: 100.

2562 

2563 - `output_format: optional "png" or "webp" or "jpeg"`

2564 

2565 The output format of the generated image. One of `png`, `webp`, or

2566 `jpeg`. Default: `png`.

2567 

2568 - `"png"`

2569 

2570 - `"webp"`

2571 

2572 - `"jpeg"`

2573 

2574 - `partial_images: optional number`

2575 

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

2577 

2578 - `quality: optional "low" or "medium" or "high" or "auto"`

2579 

2580 The quality of the generated image. One of `low`, `medium`, `high`,

2581 or `auto`. Default: `auto`.

2582 

2583 - `"low"`

2584 

2585 - `"medium"`

2586 

2587 - `"high"`

2588 

2589 - `"auto"`

2590 

2591 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2592 

2593 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2594 

2595 - `string`

2596 

2597 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2598 

2599 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2600 

2601 - `"1024x1024"`

2602 

2603 - `"1024x1536"`

2604 

2605 - `"1536x1024"`

2606 

2607 - `"auto"`

2608 

2609 - `LocalShell object { type }`

2610 

2611 A tool that allows the model to execute shell commands in a local environment.

2612 

2613 - `type: "local_shell"`

2614 

2615 The type of the local shell tool. Always `local_shell`.

2616 

2617 - `"local_shell"`

2618 

2619 - `Shell object { type, environment }`

2620 

2621 A tool that allows the model to execute shell commands.

2622 

2623 - `type: "shell"`

2624 

2625 The type of the shell tool. Always `shell`.

2626 

2627 - `"shell"`

2628 

2629 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`

2630 

2631 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

2632 

2633 - `LocalEnvironment object { type, skills }`

2634 

2635 - `ContainerReference object { container_id, type }`

2636 

2637 - `Custom object { name, type, defer_loading, 2 more }`

2638 

2639 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2640 

2641 - `name: string`

2642 

2643 The name of the custom tool, used to identify it in tool calls.

2644 

2645 - `type: "custom"`

2646 

2647 The type of the custom tool. Always `custom`.

2648 

2649 - `"custom"`

2650 

2651 - `defer_loading: optional boolean`

2652 

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

2654 

2655 - `description: optional string`

2656 

2657 Optional description of the custom tool, used to provide more context.

2658 

2659 - `format: optional CustomToolInputFormat`

2660 

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

2662 

2663 - `Namespace object { description, name, tools, type }`

2664 

2665 Groups function/custom tools under a shared namespace.

2666 

2667 - `description: string`

2668 

2669 A description of the namespace shown to the model.

2670 

2671 - `name: string`

2672 

2673 The namespace name used in tool calls (for example, `crm`).

2674 

2675 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`

2676 

2677 The function/custom tools available inside this namespace.

2678 

2679 - `Function object { name, type, defer_loading, 3 more }`

2680 

2681 - `name: string`

2682 

2683 - `type: "function"`

2684 

2685 - `"function"`

2686 

2687 - `defer_loading: optional boolean`

2688 

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

2690 

2691 - `description: optional string`

2692 

2693 - `parameters: optional unknown`

2694 

2695 - `strict: optional boolean`

2696 

2697 - `Custom object { name, type, defer_loading, 2 more }`

2698 

2699 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2700 

2701 - `name: string`

2702 

2703 The name of the custom tool, used to identify it in tool calls.

2704 

2705 - `type: "custom"`

2706 

2707 The type of the custom tool. Always `custom`.

2708 

2709 - `"custom"`

2710 

2711 - `defer_loading: optional boolean`

2712 

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

2714 

2715 - `description: optional string`

2716 

2717 Optional description of the custom tool, used to provide more context.

2718 

2719 - `format: optional CustomToolInputFormat`

2720 

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

2722 

2723 - `type: "namespace"`

2724 

2725 The type of the tool. Always `namespace`.

2726 

2727 - `"namespace"`

2728 

2729 - `ToolSearch object { type, description, execution, parameters }`

2730 

2731 Hosted or BYOT tool search configuration for deferred tools.

2732 

2733 - `type: "tool_search"`

2734 

2735 The type of the tool. Always `tool_search`.

2736 

2737 - `"tool_search"`

2738 

2739 - `description: optional string`

2740 

2741 Description shown to the model for a client-executed tool search tool.

2742 

2743 - `execution: optional "server" or "client"`

2744 

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

2746 

2747 - `"server"`

2748 

2749 - `"client"`

2750 

2751 - `parameters: optional unknown`

2752 

2753 Parameter schema for a client-executed tool search tool.

2754 

2755 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`

2756 

2757 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

2758 

2759 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`

2760 

2761 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

2762 

2763 - `"web_search_preview"`

2764 

2765 - `"web_search_preview_2025_03_11"`

2766 

2767 - `search_content_types: optional array of "text" or "image"`

2768 

2769 - `"text"`

2770 

2771 - `"image"`

2772 

2773 - `search_context_size: optional "low" or "medium" or "high"`

2774 

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

2776 

2777 - `"low"`

2778 

2779 - `"medium"`

2780 

2781 - `"high"`

2782 

2783 - `user_location: optional object { type, city, country, 2 more }`

2784 

2785 The user's location.

2786 

2787 - `type: "approximate"`

2788 

2789 The type of location approximation. Always `approximate`.

2790 

2791 - `"approximate"`

2792 

2793 - `city: optional string`

2794 

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

2796 

2797 - `country: optional string`

2798 

2799 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2800 

2801 - `region: optional string`

2802 

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

2804 

2805 - `timezone: optional string`

2806 

2807 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2808 

2809 - `ApplyPatch object { type }`

2810 

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

2812 

2813 - `type: "apply_patch"`

2814 

2815 The type of the tool. Always `apply_patch`.

2816 

2817 - `"apply_patch"`

2818 

2819 - `type: "additional_tools"`

2820 

2821 The item type. Always `additional_tools`.

2822 

2823 - `"additional_tools"`

2824 

2825 - `id: optional string`

2826 

2827 The unique ID of this additional tools item.

2828 

2085 - `Reasoning object { id, summary, type, 3 more }`2829 - `Reasoning object { id, summary, type, 3 more }`

2086 2830 

2087 A description of the chain of thought used by a reasoning model while generating2831 A description of the chain of thought used by a reasoning model while generating

Details

590 590 

591 The unique ID of the web search tool call.591 The unique ID of the web search tool call.

592 592 

593 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`593 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`

594 594 

595 An object describing the specific action taken in this web search call.595 An object describing the specific action taken in this web search call.

596 Includes details on how the model used the web (search, open_page, find_in_page).596 Includes details on how the model used the web (search, open_page, find_in_page).

597 597 

598 - `Search object { query, type, queries, sources }`598 - `Search object { type, queries, query, sources }`

599 599 

600 Action type "search" - Performs a web search query.600 Action type "search" - Performs a web search query.

601 601 

602 - `query: string`

603 

604 [DEPRECATED] The search query.

605 

606 - `type: "search"`602 - `type: "search"`

607 603 

608 The action type.604 The action type.


613 609 

614 The search queries.610 The search queries.

615 611 

612 - `query: optional string`

613 

614 The search query.

615 

616 - `sources: optional array of object { type, url }`616 - `sources: optional array of object { type, url }`

617 617 

618 The sources used in the search.618 The sources used in the search.


2113 2113 

2114 The identifier of the actor that created the item.2114 The identifier of the actor that created the item.

2115 2115 

2116 - `AdditionalTools object { id, role, tools, type }`

2117 

2118 - `id: string`

2119 

2120 The unique ID of the additional tools item.

2121 

2122 - `role: "unknown" or "user" or "assistant" or 5 more`

2123 

2124 The role that provided the additional tools.

2125 

2126 - `"unknown"`

2127 

2128 - `"user"`

2129 

2130 - `"assistant"`

2131 

2132 - `"system"`

2133 

2134 - `"critic"`

2135 

2136 - `"discriminator"`

2137 

2138 - `"developer"`

2139 

2140 - `"tool"`

2141 

2142 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

2143 

2144 The additional tool definitions made available at this item.

2145 

2146 - `Function object { name, parameters, strict, 3 more }`

2147 

2148 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

2149 

2150 - `name: string`

2151 

2152 The name of the function to call.

2153 

2154 - `parameters: map[unknown]`

2155 

2156 A JSON schema object describing the parameters of the function.

2157 

2158 - `strict: boolean`

2159 

2160 Whether to enforce strict parameter validation. Default `true`.

2161 

2162 - `type: "function"`

2163 

2164 The type of the function tool. Always `function`.

2165 

2166 - `"function"`

2167 

2168 - `defer_loading: optional boolean`

2169 

2170 Whether this function is deferred and loaded via tool search.

2171 

2172 - `description: optional string`

2173 

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

2175 

2176 - `FileSearch object { type, vector_store_ids, filters, 2 more }`

2177 

2178 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

2179 

2180 - `type: "file_search"`

2181 

2182 The type of the file search tool. Always `file_search`.

2183 

2184 - `"file_search"`

2185 

2186 - `vector_store_ids: array of string`

2187 

2188 The IDs of the vector stores to search.

2189 

2190 - `filters: optional ComparisonFilter or CompoundFilter`

2191 

2192 A filter to apply.

2193 

2194 - `ComparisonFilter object { key, type, value }`

2195 

2196 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

2197 

2198 - `CompoundFilter object { filters, type }`

2199 

2200 Combine multiple filters using `and` or `or`.

2201 

2202 - `max_num_results: optional number`

2203 

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

2205 

2206 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`

2207 

2208 Ranking options for search.

2209 

2210 - `hybrid_search: optional object { embedding_weight, text_weight }`

2211 

2212 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

2213 

2214 - `embedding_weight: number`

2215 

2216 The weight of the embedding in the reciprocal ranking fusion.

2217 

2218 - `text_weight: number`

2219 

2220 The weight of the text in the reciprocal ranking fusion.

2221 

2222 - `ranker: optional "auto" or "default-2024-11-15"`

2223 

2224 The ranker to use for the file search.

2225 

2226 - `"auto"`

2227 

2228 - `"default-2024-11-15"`

2229 

2230 - `score_threshold: optional number`

2231 

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

2233 

2234 - `Computer object { type }`

2235 

2236 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2237 

2238 - `type: "computer"`

2239 

2240 The type of the computer tool. Always `computer`.

2241 

2242 - `"computer"`

2243 

2244 - `ComputerUsePreview object { display_height, display_width, environment, type }`

2245 

2246 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2247 

2248 - `display_height: number`

2249 

2250 The height of the computer display.

2251 

2252 - `display_width: number`

2253 

2254 The width of the computer display.

2255 

2256 - `environment: "windows" or "mac" or "linux" or 2 more`

2257 

2258 The type of computer environment to control.

2259 

2260 - `"windows"`

2261 

2262 - `"mac"`

2263 

2264 - `"linux"`

2265 

2266 - `"ubuntu"`

2267 

2268 - `"browser"`

2269 

2270 - `type: "computer_use_preview"`

2271 

2272 The type of the computer use tool. Always `computer_use_preview`.

2273 

2274 - `"computer_use_preview"`

2275 

2276 - `WebSearch object { type, filters, search_context_size, user_location }`

2277 

2278 Search the Internet for sources related to the prompt. Learn more about the

2279 [web search tool](/docs/guides/tools-web-search).

2280 

2281 - `type: "web_search" or "web_search_2025_08_26"`

2282 

2283 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

2284 

2285 - `"web_search"`

2286 

2287 - `"web_search_2025_08_26"`

2288 

2289 - `filters: optional object { allowed_domains }`

2290 

2291 Filters for the search.

2292 

2293 - `allowed_domains: optional array of string`

2294 

2295 Allowed domains for the search. If not provided, all domains are allowed.

2296 Subdomains of the provided domains are allowed as well.

2297 

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

2299 

2300 - `search_context_size: optional "low" or "medium" or "high"`

2301 

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

2303 

2304 - `"low"`

2305 

2306 - `"medium"`

2307 

2308 - `"high"`

2309 

2310 - `user_location: optional object { city, country, region, 2 more }`

2311 

2312 The approximate location of the user.

2313 

2314 - `city: optional string`

2315 

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

2317 

2318 - `country: optional string`

2319 

2320 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2321 

2322 - `region: optional string`

2323 

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

2325 

2326 - `timezone: optional string`

2327 

2328 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2329 

2330 - `type: optional "approximate"`

2331 

2332 The type of location approximation. Always `approximate`.

2333 

2334 - `"approximate"`

2335 

2336 - `Mcp object { server_label, type, allowed_tools, 7 more }`

2337 

2338 Give the model access to additional tools via remote Model Context Protocol

2339 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

2340 

2341 - `server_label: string`

2342 

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

2344 

2345 - `type: "mcp"`

2346 

2347 The type of the MCP tool. Always `mcp`.

2348 

2349 - `"mcp"`

2350 

2351 - `allowed_tools: optional array of string or object { read_only, tool_names }`

2352 

2353 List of allowed tool names or a filter object.

2354 

2355 - `McpAllowedTools = array of string`

2356 

2357 A string array of allowed tool names

2358 

2359 - `McpToolFilter object { read_only, tool_names }`

2360 

2361 A filter object to specify which tools are allowed.

2362 

2363 - `read_only: optional boolean`

2364 

2365 Indicates whether or not a tool modifies data or is read-only. If an

2366 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2367 it will match this filter.

2368 

2369 - `tool_names: optional array of string`

2370 

2371 List of allowed tool names.

2372 

2373 - `authorization: optional string`

2374 

2375 An OAuth access token that can be used with a remote MCP server, either

2376 with a custom MCP server URL or a service connector. Your application

2377 must handle the OAuth authorization flow and provide the token here.

2378 

2379 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`

2380 

2381 Identifier for service connectors, like those available in ChatGPT. One of

2382 `server_url` or `connector_id` must be provided. Learn more about service

2383 connectors [here](/docs/guides/tools-remote-mcp#connectors).

2384 

2385 Currently supported `connector_id` values are:

2386 

2387 - Dropbox: `connector_dropbox`

2388 - Gmail: `connector_gmail`

2389 - Google Calendar: `connector_googlecalendar`

2390 - Google Drive: `connector_googledrive`

2391 - Microsoft Teams: `connector_microsoftteams`

2392 - Outlook Calendar: `connector_outlookcalendar`

2393 - Outlook Email: `connector_outlookemail`

2394 - SharePoint: `connector_sharepoint`

2395 

2396 - `"connector_dropbox"`

2397 

2398 - `"connector_gmail"`

2399 

2400 - `"connector_googlecalendar"`

2401 

2402 - `"connector_googledrive"`

2403 

2404 - `"connector_microsoftteams"`

2405 

2406 - `"connector_outlookcalendar"`

2407 

2408 - `"connector_outlookemail"`

2409 

2410 - `"connector_sharepoint"`

2411 

2412 - `defer_loading: optional boolean`

2413 

2414 Whether this MCP tool is deferred and discovered via tool search.

2415 

2416 - `headers: optional map[string]`

2417 

2418 Optional HTTP headers to send to the MCP server. Use for authentication

2419 or other purposes.

2420 

2421 - `require_approval: optional object { always, never } or "always" or "never"`

2422 

2423 Specify which of the MCP server's tools require approval.

2424 

2425 - `McpToolApprovalFilter object { always, never }`

2426 

2427 Specify which of the MCP server's tools require approval. Can be

2428 `always`, `never`, or a filter object associated with tools

2429 that require approval.

2430 

2431 - `always: optional object { read_only, tool_names }`

2432 

2433 A filter object to specify which tools are allowed.

2434 

2435 - `read_only: optional boolean`

2436 

2437 Indicates whether or not a tool modifies data or is read-only. If an

2438 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2439 it will match this filter.

2440 

2441 - `tool_names: optional array of string`

2442 

2443 List of allowed tool names.

2444 

2445 - `never: optional object { read_only, tool_names }`

2446 

2447 A filter object to specify which tools are allowed.

2448 

2449 - `read_only: optional boolean`

2450 

2451 Indicates whether or not a tool modifies data or is read-only. If an

2452 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2453 it will match this filter.

2454 

2455 - `tool_names: optional array of string`

2456 

2457 List of allowed tool names.

2458 

2459 - `McpToolApprovalSetting = "always" or "never"`

2460 

2461 Specify a single approval policy for all tools. One of `always` or

2462 `never`. When set to `always`, all tools will require approval. When

2463 set to `never`, all tools will not require approval.

2464 

2465 - `"always"`

2466 

2467 - `"never"`

2468 

2469 - `server_description: optional string`

2470 

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

2472 

2473 - `server_url: optional string`

2474 

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

2476 provided.

2477 

2478 - `CodeInterpreter object { container, type }`

2479 

2480 A tool that runs Python code to help generate a response to a prompt.

2481 

2482 - `container: string or object { type, file_ids, memory_limit, network_policy }`

2483 

2484 The code interpreter container. Can be a container ID or an object that

2485 specifies uploaded file IDs to make available to your code, along with an

2486 optional `memory_limit` setting.

2487 

2488 - `string`

2489 

2490 The container ID.

2491 

2492 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`

2493 

2494 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

2495 

2496 - `type: "auto"`

2497 

2498 Always `auto`.

2499 

2500 - `"auto"`

2501 

2502 - `file_ids: optional array of string`

2503 

2504 An optional list of uploaded files to make available to your code.

2505 

2506 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

2507 

2508 The memory limit for the code interpreter container.

2509 

2510 - `"1g"`

2511 

2512 - `"4g"`

2513 

2514 - `"16g"`

2515 

2516 - `"64g"`

2517 

2518 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

2519 

2520 Network access policy for the container.

2521 

2522 - `ContainerNetworkPolicyDisabled object { type }`

2523 

2524 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

2525 

2526 - `type: "code_interpreter"`

2527 

2528 The type of the code interpreter tool. Always `code_interpreter`.

2529 

2530 - `"code_interpreter"`

2531 

2532 - `ImageGeneration object { type, action, background, 9 more }`

2533 

2534 A tool that generates images using the GPT image models.

2535 

2536 - `type: "image_generation"`

2537 

2538 The type of the image generation tool. Always `image_generation`.

2539 

2540 - `"image_generation"`

2541 

2542 - `action: optional "generate" or "edit" or "auto"`

2543 

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

2545 

2546 - `"generate"`

2547 

2548 - `"edit"`

2549 

2550 - `"auto"`

2551 

2552 - `background: optional "transparent" or "opaque" or "auto"`

2553 

2554 Background type for the generated image. One of `transparent`,

2555 `opaque`, or `auto`. Default: `auto`.

2556 

2557 - `"transparent"`

2558 

2559 - `"opaque"`

2560 

2561 - `"auto"`

2562 

2563 - `input_fidelity: optional "high" or "low"`

2564 

2565 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`.

2566 

2567 - `"high"`

2568 

2569 - `"low"`

2570 

2571 - `input_image_mask: optional object { file_id, image_url }`

2572 

2573 Optional mask for inpainting. Contains `image_url`

2574 (string, optional) and `file_id` (string, optional).

2575 

2576 - `file_id: optional string`

2577 

2578 File ID for the mask image.

2579 

2580 - `image_url: optional string`

2581 

2582 Base64-encoded mask image.

2583 

2584 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2585 

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

2587 

2588 - `string`

2589 

2590 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2591 

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

2593 

2594 - `"gpt-image-1"`

2595 

2596 - `"gpt-image-1-mini"`

2597 

2598 - `"gpt-image-1.5"`

2599 

2600 - `moderation: optional "auto" or "low"`

2601 

2602 Moderation level for the generated image. Default: `auto`.

2603 

2604 - `"auto"`

2605 

2606 - `"low"`

2607 

2608 - `output_compression: optional number`

2609 

2610 Compression level for the output image. Default: 100.

2611 

2612 - `output_format: optional "png" or "webp" or "jpeg"`

2613 

2614 The output format of the generated image. One of `png`, `webp`, or

2615 `jpeg`. Default: `png`.

2616 

2617 - `"png"`

2618 

2619 - `"webp"`

2620 

2621 - `"jpeg"`

2622 

2623 - `partial_images: optional number`

2624 

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

2626 

2627 - `quality: optional "low" or "medium" or "high" or "auto"`

2628 

2629 The quality of the generated image. One of `low`, `medium`, `high`,

2630 or `auto`. Default: `auto`.

2631 

2632 - `"low"`

2633 

2634 - `"medium"`

2635 

2636 - `"high"`

2637 

2638 - `"auto"`

2639 

2640 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2641 

2642 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2643 

2644 - `string`

2645 

2646 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2647 

2648 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2649 

2650 - `"1024x1024"`

2651 

2652 - `"1024x1536"`

2653 

2654 - `"1536x1024"`

2655 

2656 - `"auto"`

2657 

2658 - `LocalShell object { type }`

2659 

2660 A tool that allows the model to execute shell commands in a local environment.

2661 

2662 - `type: "local_shell"`

2663 

2664 The type of the local shell tool. Always `local_shell`.

2665 

2666 - `"local_shell"`

2667 

2668 - `Shell object { type, environment }`

2669 

2670 A tool that allows the model to execute shell commands.

2671 

2672 - `type: "shell"`

2673 

2674 The type of the shell tool. Always `shell`.

2675 

2676 - `"shell"`

2677 

2678 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`

2679 

2680 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

2681 

2682 - `LocalEnvironment object { type, skills }`

2683 

2684 - `ContainerReference object { container_id, type }`

2685 

2686 - `Custom object { name, type, defer_loading, 2 more }`

2687 

2688 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2689 

2690 - `name: string`

2691 

2692 The name of the custom tool, used to identify it in tool calls.

2693 

2694 - `type: "custom"`

2695 

2696 The type of the custom tool. Always `custom`.

2697 

2698 - `"custom"`

2699 

2700 - `defer_loading: optional boolean`

2701 

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

2703 

2704 - `description: optional string`

2705 

2706 Optional description of the custom tool, used to provide more context.

2707 

2708 - `format: optional CustomToolInputFormat`

2709 

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

2711 

2712 - `Namespace object { description, name, tools, type }`

2713 

2714 Groups function/custom tools under a shared namespace.

2715 

2716 - `description: string`

2717 

2718 A description of the namespace shown to the model.

2719 

2720 - `name: string`

2721 

2722 The namespace name used in tool calls (for example, `crm`).

2723 

2724 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`

2725 

2726 The function/custom tools available inside this namespace.

2727 

2728 - `Function object { name, type, defer_loading, 3 more }`

2729 

2730 - `name: string`

2731 

2732 - `type: "function"`

2733 

2734 - `"function"`

2735 

2736 - `defer_loading: optional boolean`

2737 

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

2739 

2740 - `description: optional string`

2741 

2742 - `parameters: optional unknown`

2743 

2744 - `strict: optional boolean`

2745 

2746 - `Custom object { name, type, defer_loading, 2 more }`

2747 

2748 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2749 

2750 - `name: string`

2751 

2752 The name of the custom tool, used to identify it in tool calls.

2753 

2754 - `type: "custom"`

2755 

2756 The type of the custom tool. Always `custom`.

2757 

2758 - `"custom"`

2759 

2760 - `defer_loading: optional boolean`

2761 

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

2763 

2764 - `description: optional string`

2765 

2766 Optional description of the custom tool, used to provide more context.

2767 

2768 - `format: optional CustomToolInputFormat`

2769 

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

2771 

2772 - `type: "namespace"`

2773 

2774 The type of the tool. Always `namespace`.

2775 

2776 - `"namespace"`

2777 

2778 - `ToolSearch object { type, description, execution, parameters }`

2779 

2780 Hosted or BYOT tool search configuration for deferred tools.

2781 

2782 - `type: "tool_search"`

2783 

2784 The type of the tool. Always `tool_search`.

2785 

2786 - `"tool_search"`

2787 

2788 - `description: optional string`

2789 

2790 Description shown to the model for a client-executed tool search tool.

2791 

2792 - `execution: optional "server" or "client"`

2793 

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

2795 

2796 - `"server"`

2797 

2798 - `"client"`

2799 

2800 - `parameters: optional unknown`

2801 

2802 Parameter schema for a client-executed tool search tool.

2803 

2804 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`

2805 

2806 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

2807 

2808 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`

2809 

2810 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

2811 

2812 - `"web_search_preview"`

2813 

2814 - `"web_search_preview_2025_03_11"`

2815 

2816 - `search_content_types: optional array of "text" or "image"`

2817 

2818 - `"text"`

2819 

2820 - `"image"`

2821 

2822 - `search_context_size: optional "low" or "medium" or "high"`

2823 

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

2825 

2826 - `"low"`

2827 

2828 - `"medium"`

2829 

2830 - `"high"`

2831 

2832 - `user_location: optional object { type, city, country, 2 more }`

2833 

2834 The user's location.

2835 

2836 - `type: "approximate"`

2837 

2838 The type of location approximation. Always `approximate`.

2839 

2840 - `"approximate"`

2841 

2842 - `city: optional string`

2843 

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

2845 

2846 - `country: optional string`

2847 

2848 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2849 

2850 - `region: optional string`

2851 

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

2853 

2854 - `timezone: optional string`

2855 

2856 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2857 

2858 - `ApplyPatch object { type }`

2859 

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

2861 

2862 - `type: "apply_patch"`

2863 

2864 The type of the tool. Always `apply_patch`.

2865 

2866 - `"apply_patch"`

2867 

2868 - `type: "additional_tools"`

2869 

2870 The type of the item. Always `additional_tools`.

2871 

2872 - `"additional_tools"`

2873 

2116 - `Reasoning object { id, summary, type, 3 more }`2874 - `Reasoning object { id, summary, type, 3 more }`

2117 2875 

2118 A description of the chain of thought used by a reasoning model while generating2876 A description of the chain of thought used by a reasoning model while generating

Details

82 82 

83 - `"content_filter"`83 - `"content_filter"`

84 84 

85 - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 26 more`85 - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 27 more`

86 86 

87 A system (or developer) message inserted into the model's context.87 A system (or developer) message inserted into the model's context.

88 88 


95 A text input to the model, equivalent to a text input with the95 A text input to the model, equivalent to a text input with the

96 `developer` role.96 `developer` role.

97 97 

98 - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 26 more`98 - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 27 more`

99 99 

100 A list of one or many input items to the model, containing100 A list of one or many input items to the model, containing

101 different content types.101 different content types.


878 878 

879 The unique ID of the web search tool call.879 The unique ID of the web search tool call.

880 880 

881 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`881 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`

882 882 

883 An object describing the specific action taken in this web search call.883 An object describing the specific action taken in this web search call.

884 Includes details on how the model used the web (search, open_page, find_in_page).884 Includes details on how the model used the web (search, open_page, find_in_page).

885 885 

886 - `Search object { query, type, queries, sources }`886 - `Search object { type, queries, query, sources }`

887 887 

888 Action type "search" - Performs a web search query.888 Action type "search" - Performs a web search query.

889 889 

890 - `query: string`

891 

892 [DEPRECATED] The search query.

893 

894 - `type: "search"`890 - `type: "search"`

895 891 

896 The action type.892 The action type.


901 897 

902 The search queries.898 The search queries.

903 899 

900 - `query: optional string`

901 

902 The search query.

903 

904 - `sources: optional array of object { type, url }`904 - `sources: optional array of object { type, url }`

905 905 

906 The sources used in the search.906 The sources used in the search.


2172 2172 

2173 - `"incomplete"`2173 - `"incomplete"`

2174 2174 

2175 - `Reasoning object { id, summary, type, 3 more }`2175 - `AdditionalTools object { role, tools, type, id }`

2176 

2177 A description of the chain of thought used by a reasoning model while generating

2178 a response. Be sure to include these items in your `input` to the Responses API

2179 for subsequent turns of a conversation if you are manually

2180 [managing context](/docs/guides/conversation-state).

2181 2176 

2182 - `id: string`2177 - `role: "developer"`

2183 2178 

2184 The unique identifier of the reasoning content.2179 The role that provided the additional tools. Only `developer` is supported.

2185 2180 

2186 - `summary: array of SummaryTextContent`2181 - `"developer"`

2187 2182 

2188 Reasoning summary content.2183 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

2189 2184 

2190 - `text: string`2185 A list of additional tools made available at this item.

2191 2186 

2192 A summary of the reasoning output from the model so far.2187 - `Function object { name, parameters, strict, 3 more }`

2193 2188 

2194 - `type: "summary_text"`2189 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

2195 2190 

2196 The type of the object. Always `summary_text`.2191 - `name: string`

2197 2192 

2198 - `"summary_text"`2193 The name of the function to call.

2199 2194 

2200 - `type: "reasoning"`2195 - `parameters: map[unknown]`

2201 2196 

2202 The type of the object. Always `reasoning`.2197 A JSON schema object describing the parameters of the function.

2203 2198 

2204 - `"reasoning"`2199 - `strict: boolean`

2205 2200 

2206 - `content: optional array of object { text, type }`2201 Whether to enforce strict parameter validation. Default `true`.

2207 2202 

2208 Reasoning text content.2203 - `type: "function"`

2209 2204 

2210 - `text: string`2205 The type of the function tool. Always `function`.

2211 2206 

2212 The reasoning text from the model.2207 - `"function"`

2213 2208 

2214 - `type: "reasoning_text"`2209 - `defer_loading: optional boolean`

2215 2210 

2216 The type of the reasoning text. Always `reasoning_text`.2211 Whether this function is deferred and loaded via tool search.

2217 2212 

2218 - `"reasoning_text"`2213 - `description: optional string`

2219 2214 

2220 - `encrypted_content: optional string`2215 A description of the function. Used by the model to determine whether or not to call the function.

2221 2216 

2222 The encrypted content of the reasoning item - populated when a response is2217 - `FileSearch object { type, vector_store_ids, filters, 2 more }`

2223 generated with `reasoning.encrypted_content` in the `include` parameter.

2224 2218 

2225 - `status: optional "in_progress" or "completed" or "incomplete"`2219 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

2226 2220 

2227 The status of the item. One of `in_progress`, `completed`, or2221 - `type: "file_search"`

2228 `incomplete`. Populated when items are returned via API.

2229 2222 

2230 - `"in_progress"`2223 The type of the file search tool. Always `file_search`.

2231 2224 

2232 - `"completed"`2225 - `"file_search"`

2233 2226 

2234 - `"incomplete"`2227 - `vector_store_ids: array of string`

2235 2228 

2236 - `Compaction object { encrypted_content, type, id }`2229 The IDs of the vector stores to search.

2237 2230 

2238 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).2231 - `filters: optional ComparisonFilter or CompoundFilter`

2239 2232 

2240 - `encrypted_content: string`2233 A filter to apply.

2241 2234 

2242 The encrypted content of the compaction summary.2235 - `ComparisonFilter object { key, type, value }`

2243 2236 

2244 - `type: "compaction"`2237 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

2245 2238 

2246 The type of the item. Always `compaction`.2239 - `CompoundFilter object { filters, type }`

2247 2240 

2248 - `"compaction"`2241 Combine multiple filters using `and` or `or`.

2249 2242 

2250 - `id: optional string`2243 - `max_num_results: optional number`

2251 2244 

2252 The ID of the compaction item.2245 The maximum number of results to return. This number should be between 1 and 50 inclusive.

2253 2246 

2254 - `ImageGenerationCall object { id, result, status, type }`2247 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`

2255 2248 

2256 An image generation request made by the model.2249 Ranking options for search.

2257 2250 

2258 - `id: string`2251 - `hybrid_search: optional object { embedding_weight, text_weight }`

2259 2252 

2260 The unique ID of the image generation call.2253 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

2261 2254 

2262 - `result: string`2255 - `embedding_weight: number`

2263 2256 

2264 The generated image encoded in base64.2257 The weight of the embedding in the reciprocal ranking fusion.

2265 2258 

2266 - `status: "in_progress" or "completed" or "generating" or "failed"`2259 - `text_weight: number`

2267 2260 

2268 The status of the image generation call.2261 The weight of the text in the reciprocal ranking fusion.

2269 2262 

2270 - `"in_progress"`2263 - `ranker: optional "auto" or "default-2024-11-15"`

2271 2264 

2272 - `"completed"`2265 The ranker to use for the file search.

2273 2266 

2274 - `"generating"`2267 - `"auto"`

2275 2268 

2276 - `"failed"`2269 - `"default-2024-11-15"`

2277 2270 

2278 - `type: "image_generation_call"`2271 - `score_threshold: optional number`

2279 2272 

2280 The type of the image generation call. Always `image_generation_call`.2273 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.

2281 2274 

2282 - `"image_generation_call"`2275 - `Computer object { type }`

2283 2276 

2284 - `CodeInterpreterCall object { id, code, container_id, 3 more }`2277 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2285 2278 

2286 A tool call to run code.2279 - `type: "computer"`

2287 2280 

2288 - `id: string`2281 The type of the computer tool. Always `computer`.

2289 2282 

2290 The unique ID of the code interpreter tool call.2283 - `"computer"`

2291 2284 

2292 - `code: string`2285 - `ComputerUsePreview object { display_height, display_width, environment, type }`

2293 2286 

2294 The code to run, or null if not available.2287 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2295 2288 

2296 - `container_id: string`2289 - `display_height: number`

2297 2290 

2298 The ID of the container used to run the code.2291 The height of the computer display.

2299 2292 

2300 - `outputs: array of object { logs, type } or object { type, url }`2293 - `display_width: number`

2301 2294 

2302 The outputs generated by the code interpreter, such as logs or images.2295 The width of the computer display.

2303 Can be null if no outputs are available.

2304 2296 

2305 - `Logs object { logs, type }`2297 - `environment: "windows" or "mac" or "linux" or 2 more`

2306 2298 

2307 The logs output from the code interpreter.2299 The type of computer environment to control.

2308 2300 

2309 - `logs: string`2301 - `"windows"`

2310 2302 

2311 The logs output from the code interpreter.2303 - `"mac"`

2312 2304 

2313 - `type: "logs"`2305 - `"linux"`

2314 2306 

2315 The type of the output. Always `logs`.2307 - `"ubuntu"`

2316 2308 

2317 - `"logs"`2309 - `"browser"`

2318 2310 

2319 - `Image object { type, url }`2311 - `type: "computer_use_preview"`

2320 2312 

2321 The image output from the code interpreter.2313 The type of the computer use tool. Always `computer_use_preview`.

2322 2314 

2323 - `type: "image"`2315 - `"computer_use_preview"`

2324 2316 

2325 The type of the output. Always `image`.2317 - `WebSearch object { type, filters, search_context_size, user_location }`

2326 2318 

2327 - `"image"`2319 Search the Internet for sources related to the prompt. Learn more about the

2320 [web search tool](/docs/guides/tools-web-search).

2328 2321 

2329 - `url: string`2322 - `type: "web_search" or "web_search_2025_08_26"`

2330 2323 

2331 The URL of the image output from the code interpreter.2324 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

2332 2325 

2333 - `status: "in_progress" or "completed" or "incomplete" or 2 more`2326 - `"web_search"`

2334 2327 

2335 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.2328 - `"web_search_2025_08_26"`

2336 2329 

2337 - `"in_progress"`2330 - `filters: optional object { allowed_domains }`

2338 2331 

2339 - `"completed"`2332 Filters for the search.

2340 2333 

2341 - `"incomplete"`2334 - `allowed_domains: optional array of string`

2342 2335 

2343 - `"interpreting"`2336 Allowed domains for the search. If not provided, all domains are allowed.

2337 Subdomains of the provided domains are allowed as well.

2344 2338 

2345 - `"failed"`2339 Example: `["pubmed.ncbi.nlm.nih.gov"]`

2346 2340 

2347 - `type: "code_interpreter_call"`2341 - `search_context_size: optional "low" or "medium" or "high"`

2348 2342 

2349 The type of the code interpreter tool call. Always `code_interpreter_call`.2343 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.

2350 2344 

2351 - `"code_interpreter_call"`2345 - `"low"`

2352 2346 

2353 - `LocalShellCall object { id, action, call_id, 2 more }`2347 - `"medium"`

2354 2348 

2355 A tool call to run a command on the local shell.2349 - `"high"`

2356 2350 

2357 - `id: string`2351 - `user_location: optional object { city, country, region, 2 more }`

2358 2352 

2359 The unique ID of the local shell call.2353 The approximate location of the user.

2360 2354 

2361 - `action: object { command, env, type, 3 more }`2355 - `city: optional string`

2362 2356 

2363 Execute a shell command on the server.2357 Free text input for the city of the user, e.g. `San Francisco`.

2364 2358 

2365 - `command: array of string`2359 - `country: optional string`

2366 2360 

2367 The command to run.2361 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2368 2362 

2369 - `env: map[string]`2363 - `region: optional string`

2370 2364 

2371 Environment variables to set for the command.2365 Free text input for the region of the user, e.g. `California`.

2372 2366 

2373 - `type: "exec"`2367 - `timezone: optional string`

2374 2368 

2375 The type of the local shell action. Always `exec`.2369 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2376 2370 

2377 - `"exec"`2371 - `type: optional "approximate"`

2378 2372 

2379 - `timeout_ms: optional number`2373 The type of location approximation. Always `approximate`.

2380 2374 

2381 Optional timeout in milliseconds for the command.2375 - `"approximate"`

2382 2376 

2383 - `user: optional string`2377 - `Mcp object { server_label, type, allowed_tools, 7 more }`

2384 2378 

2385 Optional user to run the command as.2379 Give the model access to additional tools via remote Model Context Protocol

2380 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

2386 2381 

2387 - `working_directory: optional string`2382 - `server_label: string`

2388 2383 

2389 Optional working directory to run the command in.2384 A label for this MCP server, used to identify it in tool calls.

2390 2385 

2391 - `call_id: string`2386 - `type: "mcp"`

2392 2387 

2393 The unique ID of the local shell tool call generated by the model.2388 The type of the MCP tool. Always `mcp`.

2394 2389 

2395 - `status: "in_progress" or "completed" or "incomplete"`2390 - `"mcp"`

2396 2391 

2397 The status of the local shell call.2392 - `allowed_tools: optional array of string or object { read_only, tool_names }`

2398 2393 

2399 - `"in_progress"`2394 List of allowed tool names or a filter object.

2400 2395 

2401 - `"completed"`2396 - `McpAllowedTools = array of string`

2402 2397 

2403 - `"incomplete"`2398 A string array of allowed tool names

2404 2399 

2405 - `type: "local_shell_call"`2400 - `McpToolFilter object { read_only, tool_names }`

2406 2401 

2407 The type of the local shell call. Always `local_shell_call`.2402 A filter object to specify which tools are allowed.

2408 2403 

2409 - `"local_shell_call"`2404 - `read_only: optional boolean`

2410 2405 

2411 - `LocalShellCallOutput object { id, output, type, status }`2406 Indicates whether or not a tool modifies data or is read-only. If an

2407 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2408 it will match this filter.

2412 2409 

2413 The output of a local shell tool call.2410 - `tool_names: optional array of string`

2414 2411 

2415 - `id: string`2412 List of allowed tool names.

2416 2413 

2417 The unique ID of the local shell tool call generated by the model.2414 - `authorization: optional string`

2418 2415 

2419 - `output: string`2416 An OAuth access token that can be used with a remote MCP server, either

2417 with a custom MCP server URL or a service connector. Your application

2418 must handle the OAuth authorization flow and provide the token here.

2420 2419 

2421 A JSON string of the output of the local shell tool call.2420 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`

2422 2421 

2423 - `type: "local_shell_call_output"`2422 Identifier for service connectors, like those available in ChatGPT. One of

2423 `server_url` or `connector_id` must be provided. Learn more about service

2424 connectors [here](/docs/guides/tools-remote-mcp#connectors).

2424 2425 

2425 The type of the local shell tool call output. Always `local_shell_call_output`.2426 Currently supported `connector_id` values are:

2426 2427 

2427 - `"local_shell_call_output"`2428 - Dropbox: `connector_dropbox`

2429 - Gmail: `connector_gmail`

2430 - Google Calendar: `connector_googlecalendar`

2431 - Google Drive: `connector_googledrive`

2432 - Microsoft Teams: `connector_microsoftteams`

2433 - Outlook Calendar: `connector_outlookcalendar`

2434 - Outlook Email: `connector_outlookemail`

2435 - SharePoint: `connector_sharepoint`

2428 2436 

2429 - `status: optional "in_progress" or "completed" or "incomplete"`2437 - `"connector_dropbox"`

2430 2438 

2431 The status of the item. One of `in_progress`, `completed`, or `incomplete`.2439 - `"connector_gmail"`

2432 2440 

2433 - `"in_progress"`2441 - `"connector_googlecalendar"`

2434 2442 

2435 - `"completed"`2443 - `"connector_googledrive"`

2436 2444 

2437 - `"incomplete"`2445 - `"connector_microsoftteams"`

2438 2446 

2439 - `ShellCall object { action, call_id, type, 3 more }`2447 - `"connector_outlookcalendar"`

2440 2448 

2441 A tool representing a request to execute one or more shell commands.2449 - `"connector_outlookemail"`

2442 2450 

2443 - `action: object { commands, max_output_length, timeout_ms }`2451 - `"connector_sharepoint"`

2444 2452 

2445 The shell commands and limits that describe how to run the tool call.2453 - `defer_loading: optional boolean`

2446 2454 

2447 - `commands: array of string`2455 Whether this MCP tool is deferred and discovered via tool search.

2448 2456 

2449 Ordered shell commands for the execution environment to run.2457 - `headers: optional map[string]`

2450 2458 

2451 - `max_output_length: optional number`2459 Optional HTTP headers to send to the MCP server. Use for authentication

2460 or other purposes.

2452 2461 

2453 Maximum number of UTF-8 characters to capture from combined stdout and stderr output.2462 - `require_approval: optional object { always, never } or "always" or "never"`

2454 2463 

2455 - `timeout_ms: optional number`2464 Specify which of the MCP server's tools require approval.

2456 2465 

2457 Maximum wall-clock time in milliseconds to allow the shell commands to run.2466 - `McpToolApprovalFilter object { always, never }`

2458 2467 

2459 - `call_id: string`2468 Specify which of the MCP server's tools require approval. Can be

2469 `always`, `never`, or a filter object associated with tools

2470 that require approval.

2460 2471 

2461 The unique ID of the shell tool call generated by the model.2472 - `always: optional object { read_only, tool_names }`

2462 2473 

2463 - `type: "shell_call"`2474 A filter object to specify which tools are allowed.

2464 2475 

2465 The type of the item. Always `shell_call`.2476 - `read_only: optional boolean`

2466 2477 

2467 - `"shell_call"`2478 Indicates whether or not a tool modifies data or is read-only. If an

2479 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2480 it will match this filter.

2468 2481 

2469 - `id: optional string`2482 - `tool_names: optional array of string`

2470 2483 

2471 The unique ID of the shell tool call. Populated when this item is returned via API.2484 List of allowed tool names.

2472 2485 

2473 - `environment: optional LocalEnvironment or ContainerReference`2486 - `never: optional object { read_only, tool_names }`

2474 2487 

2475 The environment to execute the shell commands in.2488 A filter object to specify which tools are allowed.

2476 2489 

2477 - `LocalEnvironment object { type, skills }`2490 - `read_only: optional boolean`

2478 2491 

2479 - `ContainerReference object { container_id, type }`2492 Indicates whether or not a tool modifies data or is read-only. If an

2493 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2494 it will match this filter.

2480 2495 

2481 - `status: optional "in_progress" or "completed" or "incomplete"`2496 - `tool_names: optional array of string`

2482 2497 

2483 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.2498 List of allowed tool names.

2484 2499 

2485 - `"in_progress"`2500 - `McpToolApprovalSetting = "always" or "never"`

2486 2501 

2487 - `"completed"`2502 Specify a single approval policy for all tools. One of `always` or

2503 `never`. When set to `always`, all tools will require approval. When

2504 set to `never`, all tools will not require approval.

2488 2505 

2489 - `"incomplete"`2506 - `"always"`

2490 2507 

2491 - `ShellCallOutput object { call_id, output, type, 3 more }`2508 - `"never"`

2492 2509 

2493 The streamed output items emitted by a shell tool call.2510 - `server_description: optional string`

2494 2511 

2495 - `call_id: string`2512 Optional description of the MCP server, used to provide more context.

2496 2513 

2497 The unique ID of the shell tool call generated by the model.2514 - `server_url: optional string`

2498 2515 

2499 - `output: array of ResponseFunctionShellCallOutputContent`2516 The URL for the MCP server. One of `server_url` or `connector_id` must be

2517 provided.

2500 2518 

2501 Captured chunks of stdout and stderr output, along with their associated outcomes.2519 - `CodeInterpreter object { container, type }`

2502 2520 

2503 - `outcome: object { type } or object { exit_code, type }`2521 A tool that runs Python code to help generate a response to a prompt.

2504 2522 

2505 The exit or timeout outcome associated with this shell call.2523 - `container: string or object { type, file_ids, memory_limit, network_policy }`

2506 2524 

2507 - `Timeout object { type }`2525 The code interpreter container. Can be a container ID or an object that

2526 specifies uploaded file IDs to make available to your code, along with an

2527 optional `memory_limit` setting.

2508 2528 

2509 Indicates that the shell call exceeded its configured time limit.2529 - `string`

2510 2530 

2511 - `type: "timeout"`2531 The container ID.

2512 2532 

2513 The outcome type. Always `timeout`.2533 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`

2514 2534 

2515 - `"timeout"`2535 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

2516 2536 

2517 - `Exit object { exit_code, type }`2537 - `type: "auto"`

2518 2538 

2519 Indicates that the shell commands finished and returned an exit code.2539 Always `auto`.

2520 2540 

2521 - `exit_code: number`2541 - `"auto"`

2522 2542 

2523 The exit code returned by the shell process.2543 - `file_ids: optional array of string`

2524 2544 

2525 - `type: "exit"`2545 An optional list of uploaded files to make available to your code.

2526 2546 

2527 The outcome type. Always `exit`.2547 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

2528 2548 

2529 - `"exit"`2549 The memory limit for the code interpreter container.

2530 2550 

2531 - `stderr: string`2551 - `"1g"`

2532 2552 

2533 Captured stderr output for the shell call.2553 - `"4g"`

2534 2554 

2535 - `stdout: string`2555 - `"16g"`

2536 2556 

2537 Captured stdout output for the shell call.2557 - `"64g"`

2538 2558 

2539 - `type: "shell_call_output"`2559 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

2540 2560 

2541 The type of the item. Always `shell_call_output`.2561 Network access policy for the container.

2542 2562 

2543 - `"shell_call_output"`2563 - `ContainerNetworkPolicyDisabled object { type }`

2544 2564 

2545 - `id: optional string`2565 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

2546 2566 

2547 The unique ID of the shell tool call output. Populated when this item is returned via API.2567 - `type: "code_interpreter"`

2548 2568 

2549 - `max_output_length: optional number`2569 The type of the code interpreter tool. Always `code_interpreter`.

2550 2570 

2551 The maximum number of UTF-8 characters captured for this shell call's combined output.2571 - `"code_interpreter"`

2552 2572 

2553 - `status: optional "in_progress" or "completed" or "incomplete"`2573 - `ImageGeneration object { type, action, background, 9 more }`

2554 2574 

2555 The status of the shell call output.2575 A tool that generates images using the GPT image models.

2556 2576 

2557 - `"in_progress"`2577 - `type: "image_generation"`

2558 2578 

2559 - `"completed"`2579 The type of the image generation tool. Always `image_generation`.

2560 2580 

2561 - `"incomplete"`2581 - `"image_generation"`

2562 2582 

2563 - `ApplyPatchCall object { call_id, operation, status, 2 more }`2583 - `action: optional "generate" or "edit" or "auto"`

2564 2584 

2565 A tool call representing a request to create, delete, or update files using diff patches.2585 Whether to generate a new image or edit an existing image. Default: `auto`.

2566 2586 

2567 - `call_id: string`2587 - `"generate"`

2568 2588 

2569 The unique ID of the apply patch tool call generated by the model.2589 - `"edit"`

2570 2590 

2571 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`2591 - `"auto"`

2572 2592 

2573 The specific create, delete, or update instruction for the apply_patch tool call.2593 - `background: optional "transparent" or "opaque" or "auto"`

2574 2594 

2575 - `CreateFile object { diff, path, type }`2595 Background type for the generated image. One of `transparent`,

2596 `opaque`, or `auto`. Default: `auto`.

2576 2597 

2577 Instruction for creating a new file via the apply_patch tool.2598 - `"transparent"`

2578 2599 

2579 - `diff: string`2600 - `"opaque"`

2580 2601 

2581 Unified diff content to apply when creating the file.2602 - `"auto"`

2582 2603 

2583 - `path: string`2604 - `input_fidelity: optional "high" or "low"`

2584 2605 

2585 Path of the file to create relative to the workspace root.2606 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`.

2586 2607 

2587 - `type: "create_file"`2608 - `"high"`

2588 2609 

2589 The operation type. Always `create_file`.2610 - `"low"`

2590 2611 

2591 - `"create_file"`2612 - `input_image_mask: optional object { file_id, image_url }`

2592 2613 

2593 - `DeleteFile object { path, type }`2614 Optional mask for inpainting. Contains `image_url`

2615 (string, optional) and `file_id` (string, optional).

2594 2616 

2595 Instruction for deleting an existing file via the apply_patch tool.2617 - `file_id: optional string`

2596 2618 

2597 - `path: string`2619 File ID for the mask image.

2598 2620 

2599 Path of the file to delete relative to the workspace root.2621 - `image_url: optional string`

2600 2622 

2601 - `type: "delete_file"`2623 Base64-encoded mask image.

2602 2624 

2603 The operation type. Always `delete_file`.2625 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2604 2626 

2605 - `"delete_file"`2627 The image generation model to use. Default: `gpt-image-1`.

2606 2628 

2607 - `UpdateFile object { diff, path, type }`2629 - `string`

2608 2630 

2609 Instruction for updating an existing file via the apply_patch tool.2631 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2610 2632 

2611 - `diff: string`2633 The image generation model to use. Default: `gpt-image-1`.

2612 2634 

2613 Unified diff content to apply to the existing file.2635 - `"gpt-image-1"`

2614 2636 

2615 - `path: string`2637 - `"gpt-image-1-mini"`

2616 2638 

2617 Path of the file to update relative to the workspace root.2639 - `"gpt-image-1.5"`

2618 2640 

2619 - `type: "update_file"`2641 - `moderation: optional "auto" or "low"`

2620 2642 

2621 The operation type. Always `update_file`.2643 Moderation level for the generated image. Default: `auto`.

2622 2644 

2623 - `"update_file"`2645 - `"auto"`

2624 2646 

2625 - `status: "in_progress" or "completed"`2647 - `"low"`

2626 2648 

2627 The status of the apply patch tool call. One of `in_progress` or `completed`.2649 - `output_compression: optional number`

2628 2650 

2629 - `"in_progress"`2651 Compression level for the output image. Default: 100.

2630 2652 

2631 - `"completed"`2653 - `output_format: optional "png" or "webp" or "jpeg"`

2632 2654 

2633 - `type: "apply_patch_call"`2655 The output format of the generated image. One of `png`, `webp`, or

2656 `jpeg`. Default: `png`.

2634 2657 

2635 The type of the item. Always `apply_patch_call`.2658 - `"png"`

2636 2659 

2637 - `"apply_patch_call"`2660 - `"webp"`

2638 2661 

2639 - `id: optional string`2662 - `"jpeg"`

2640 2663 

2641 The unique ID of the apply patch tool call. Populated when this item is returned via API.2664 - `partial_images: optional number`

2642 2665 

2643 - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`2666 Number of partial images to generate in streaming mode, from 0 (default value) to 3.

2644 2667 

2645 The streamed output emitted by an apply patch tool call.2668 - `quality: optional "low" or "medium" or "high" or "auto"`

2646 2669 

2647 - `call_id: string`2670 The quality of the generated image. One of `low`, `medium`, `high`,

2671 or `auto`. Default: `auto`.

2648 2672 

2649 The unique ID of the apply patch tool call generated by the model.2673 - `"low"`

2650 2674 

2651 - `status: "completed" or "failed"`2675 - `"medium"`

2652 2676 

2653 The status of the apply patch tool call output. One of `completed` or `failed`.2677 - `"high"`

2654 2678 

2655 - `"completed"`2679 - `"auto"`

2656 2680 

2657 - `"failed"`2681 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2658 2682 

2659 - `type: "apply_patch_call_output"`2683 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2660 2684 

2661 The type of the item. Always `apply_patch_call_output`.2685 - `string`

2662 2686 

2663 - `"apply_patch_call_output"`2687 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2664 2688 

2665 - `id: optional string`2689 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2666 2690 

2667 The unique ID of the apply patch tool call output. Populated when this item is returned via API.2691 - `"1024x1024"`

2668 2692 

2669 - `output: optional string`2693 - `"1024x1536"`

2670 2694 

2671 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).2695 - `"1536x1024"`

2672 2696 

2673 - `McpListTools object { id, server_label, tools, 2 more }`2697 - `"auto"`

2674 2698 

2675 A list of tools available on an MCP server.2699 - `LocalShell object { type }`

2676 2700 

2677 - `id: string`2701 A tool that allows the model to execute shell commands in a local environment.

2678 2702 

2679 The unique ID of the list.2703 - `type: "local_shell"`

2680 2704 

2681 - `server_label: string`2705 The type of the local shell tool. Always `local_shell`.

2682 2706 

2683 The label of the MCP server.2707 - `"local_shell"`

2684 2708 

2685 - `tools: array of object { input_schema, name, annotations, description }`2709 - `Shell object { type, environment }`

2686 2710 

2687 The tools available on the server.2711 A tool that allows the model to execute shell commands.

2688 2712 

2689 - `input_schema: unknown`2713 - `type: "shell"`

2690 2714 

2691 The JSON schema describing the tool's input.2715 The type of the shell tool. Always `shell`.

2692 2716 

2693 - `name: string`2717 - `"shell"`

2694 2718 

2695 The name of the tool.2719 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`

2696 2720 

2697 - `annotations: optional unknown`2721 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

2698 2722 

2699 Additional annotations about the tool.2723 - `LocalEnvironment object { type, skills }`

2700 2724 

2701 - `description: optional string`2725 - `ContainerReference object { container_id, type }`

2702 2726 

2703 The description of the tool.2727 - `Custom object { name, type, defer_loading, 2 more }`

2704 2728 

2705 - `type: "mcp_list_tools"`2729 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2706 2730 

2707 The type of the item. Always `mcp_list_tools`.2731 - `name: string`

2708 2732 

2709 - `"mcp_list_tools"`2733 The name of the custom tool, used to identify it in tool calls.

2710 2734 

2711 - `error: optional string`2735 - `type: "custom"`

2712 2736 

2713 Error message if the server could not list tools.2737 The type of the custom tool. Always `custom`.

2714 2738 

2715 - `McpApprovalRequest object { id, arguments, name, 2 more }`2739 - `"custom"`

2716 2740 

2717 A request for human approval of a tool invocation.2741 - `defer_loading: optional boolean`

2718 2742 

2719 - `id: string`2743 Whether this tool should be deferred and discovered via tool search.

2720 2744 

2721 The unique ID of the approval request.2745 - `description: optional string`

2722 2746 

2723 - `arguments: string`2747 Optional description of the custom tool, used to provide more context.

2724 2748 

2725 A JSON string of arguments for the tool.2749 - `format: optional CustomToolInputFormat`

2726 2750 

2727 - `name: string`2751 The input format for the custom tool. Default is unconstrained text.

2728 2752 

2729 The name of the tool to run.2753 - `Namespace object { description, name, tools, type }`

2730 2754 

2731 - `server_label: string`2755 Groups function/custom tools under a shared namespace.

2732 2756 

2733 The label of the MCP server making the request.2757 - `description: string`

2734 2758 

2735 - `type: "mcp_approval_request"`2759 A description of the namespace shown to the model.

2736 2760 

2737 The type of the item. Always `mcp_approval_request`.2761 - `name: string`

2738 2762 

2739 - `"mcp_approval_request"`2763 The namespace name used in tool calls (for example, `crm`).

2740 2764 

2741 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`2765 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`

2742 2766 

2743 A response to an MCP approval request.2767 The function/custom tools available inside this namespace.

2744 2768 

2745 - `approval_request_id: string`2769 - `Function object { name, type, defer_loading, 3 more }`

2746 2770 

2747 The ID of the approval request being answered.2771 - `name: string`

2748 2772 

2749 - `approve: boolean`2773 - `type: "function"`

2750 2774 

2751 Whether the request was approved.2775 - `"function"`

2752 2776 

2753 - `type: "mcp_approval_response"`2777 - `defer_loading: optional boolean`

2754 2778 

2755 The type of the item. Always `mcp_approval_response`.2779 Whether this function should be deferred and discovered via tool search.

2756 2780 

2757 - `"mcp_approval_response"`2781 - `description: optional string`

2758 2782 

2759 - `id: optional string`2783 - `parameters: optional unknown`

2760 2784 

2761 The unique ID of the approval response2785 - `strict: optional boolean`

2762 2786 

2763 - `reason: optional string`2787 - `Custom object { name, type, defer_loading, 2 more }`

2764 2788 

2765 Optional reason for the decision.2789 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2766 2790 

2767 - `McpCall object { id, arguments, name, 6 more }`2791 - `name: string`

2768 2792 

2769 An invocation of a tool on an MCP server.2793 The name of the custom tool, used to identify it in tool calls.

2770 2794 

2771 - `id: string`2795 - `type: "custom"`

2772 2796 

2773 The unique ID of the tool call.2797 The type of the custom tool. Always `custom`.

2774 2798 

2775 - `arguments: string`2799 - `"custom"`

2776 2800 

2777 A JSON string of the arguments passed to the tool.2801 - `defer_loading: optional boolean`

2778 2802 

2779 - `name: string`2803 Whether this tool should be deferred and discovered via tool search.

2780 2804 

2781 The name of the tool that was run.2805 - `description: optional string`

2782 2806 

2783 - `server_label: string`2807 Optional description of the custom tool, used to provide more context.

2784 2808 

2785 The label of the MCP server running the tool.2809 - `format: optional CustomToolInputFormat`

2786 2810 

2787 - `type: "mcp_call"`2811 The input format for the custom tool. Default is unconstrained text.

2788 2812 

2789 The type of the item. Always `mcp_call`.2813 - `type: "namespace"`

2790 2814 

2791 - `"mcp_call"`2815 The type of the tool. Always `namespace`.

2792 2816 

2793 - `approval_request_id: optional string`2817 - `"namespace"`

2794 2818 

2795 Unique identifier for the MCP tool call approval request.2819 - `ToolSearch object { type, description, execution, parameters }`

2796 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

2797 2820 

2798 - `error: optional string`2821 Hosted or BYOT tool search configuration for deferred tools.

2799 2822 

2800 The error from the tool call, if any.2823 - `type: "tool_search"`

2801 2824 

2802 - `output: optional string`2825 The type of the tool. Always `tool_search`.

2803 2826 

2804 The output from the tool call.2827 - `"tool_search"`

2805 2828 

2806 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`2829 - `description: optional string`

2807 2830 

2808 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.2831 Description shown to the model for a client-executed tool search tool.

2809 2832 

2810 - `"in_progress"`2833 - `execution: optional "server" or "client"`

2811 2834 

2812 - `"completed"`2835 Whether tool search is executed by the server or by the client.

2813 2836 

2814 - `"incomplete"`2837 - `"server"`

2815 2838 

2816 - `"calling"`2839 - `"client"`

2817 2840 

2818 - `"failed"`2841 - `parameters: optional unknown`

2819 2842 

2820 - `CustomToolCallOutput object { call_id, output, type, id }`2843 Parameter schema for a client-executed tool search tool.

2821 2844 

2822 The output of a custom tool call from your code, being sent back to the model.2845 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`

2823 2846 

2824 - `call_id: string`2847 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

2825 2848 

2826 The call ID, used to map this custom tool call output to a custom tool call.2849 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`

2827 2850 

2828 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`2851 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

2829 2852 

2830 The output from the custom tool call generated by your code.2853 - `"web_search_preview"`

2831 Can be a string or an list of output content.

2832 2854 

2833 - `StringOutput = string`2855 - `"web_search_preview_2025_03_11"`

2834 2856 

2835 A string of the output of the custom tool call.2857 - `search_content_types: optional array of "text" or "image"`

2836 2858 

2837 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`2859 - `"text"`

2838 2860 

2839 Text, image, or file output of the custom tool call.2861 - `"image"`

2840 2862 

2841 - `ResponseInputText object { text, type }`2863 - `search_context_size: optional "low" or "medium" or "high"`

2842 2864 

2843 A text input to the model.2865 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.

2844 2866 

2845 - `ResponseInputImage object { detail, type, file_id, image_url }`2867 - `"low"`

2846 2868 

2847 An image input to the model. Learn about [image inputs](/docs/guides/vision).2869 - `"medium"`

2848 2870 

2849 - `ResponseInputFile object { type, detail, file_data, 3 more }`2871 - `"high"`

2850 2872 

2851 A file input to the model.2873 - `user_location: optional object { type, city, country, 2 more }`

2852 2874 

2853 - `type: "custom_tool_call_output"`2875 The user's location.

2854 2876 

2855 The type of the custom tool call output. Always `custom_tool_call_output`.2877 - `type: "approximate"`

2856 2878 

2857 - `"custom_tool_call_output"`2879 The type of location approximation. Always `approximate`.

2858 2880 

2859 - `id: optional string`2881 - `"approximate"`

2860 2882 

2861 The unique ID of the custom tool call output in the OpenAI platform.2883 - `city: optional string`

2862 2884 

2863 - `CustomToolCall object { call_id, input, name, 3 more }`2885 Free text input for the city of the user, e.g. `San Francisco`.

2864 2886 

2865 A call to a custom tool created by the model.2887 - `country: optional string`

2866 2888 

2867 - `call_id: string`2889 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2868 2890 

2869 An identifier used to map this custom tool call to a tool call output.2891 - `region: optional string`

2870 2892 

2871 - `input: string`2893 Free text input for the region of the user, e.g. `California`.

2872 2894 

2873 The input for the custom tool call generated by the model.2895 - `timezone: optional string`

2874 2896 

2875 - `name: string`2897 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2876 2898 

2877 The name of the custom tool being called.2899 - `ApplyPatch object { type }`

2878 2900 

2879 - `type: "custom_tool_call"`2901 Allows the assistant to create, delete, or update files using unified diffs.

2880 2902 

2881 The type of the custom tool call. Always `custom_tool_call`.2903 - `type: "apply_patch"`

2882 2904 

2883 - `"custom_tool_call"`2905 The type of the tool. Always `apply_patch`.

2884 2906 

2885 - `id: optional string`2907 - `"apply_patch"`

2886 2908 

2887 The unique ID of the custom tool call in the OpenAI platform.2909 - `type: "additional_tools"`

2888 2910 

2889 - `namespace: optional string`2911 The item type. Always `additional_tools`.

2890 2912 

2891 The namespace of the custom tool being called.2913 - `"additional_tools"`

2892 2914 

2893 - `CompactionTrigger object { type }`2915 - `id: optional string`

2894 2916 

2895 Compacts the current context. Must be the final input item.2917 The unique ID of this additional tools item.

2896 2918 

2897 - `type: "compaction_trigger"`2919 - `Reasoning object { id, summary, type, 3 more }`

2898 2920 

2899 The type of the item. Always `compaction_trigger`.2921 A description of the chain of thought used by a reasoning model while generating

2922 a response. Be sure to include these items in your `input` to the Responses API

2923 for subsequent turns of a conversation if you are manually

2924 [managing context](/docs/guides/conversation-state).

2900 2925 

2901 - `"compaction_trigger"`2926 - `id: string`

2902 2927 

2903 - `ItemReference object { id, type }`2928 The unique identifier of the reasoning content.

2904 2929 

2905 An internal identifier for an item to reference.2930 - `summary: array of SummaryTextContent`

2906 2931 

2907 - `id: string`2932 Reasoning summary content.

2908 2933 

2909 The ID of the item to reference.2934 - `text: string`

2910 2935 

2911 - `type: optional "item_reference"`2936 A summary of the reasoning output from the model so far.

2937 

2938 - `type: "summary_text"`

2939 

2940 The type of the object. Always `summary_text`.

2941 

2942 - `"summary_text"`

2943 

2944 - `type: "reasoning"`

2945 

2946 The type of the object. Always `reasoning`.

2947 

2948 - `"reasoning"`

2949 

2950 - `content: optional array of object { text, type }`

2951 

2952 Reasoning text content.

2953 

2954 - `text: string`

2955 

2956 The reasoning text from the model.

2957 

2958 - `type: "reasoning_text"`

2959 

2960 The type of the reasoning text. Always `reasoning_text`.

2961 

2962 - `"reasoning_text"`

2963 

2964 - `encrypted_content: optional string`

2965 

2966 The encrypted content of the reasoning item - populated when a response is

2967 generated with `reasoning.encrypted_content` in the `include` parameter.

2968 

2969 - `status: optional "in_progress" or "completed" or "incomplete"`

2970 

2971 The status of the item. One of `in_progress`, `completed`, or

2972 `incomplete`. Populated when items are returned via API.

2973 

2974 - `"in_progress"`

2975 

2976 - `"completed"`

2977 

2978 - `"incomplete"`

2979 

2980 - `Compaction object { encrypted_content, type, id }`

2981 

2982 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).

2983 

2984 - `encrypted_content: string`

2985 

2986 The encrypted content of the compaction summary.

2987 

2988 - `type: "compaction"`

2989 

2990 The type of the item. Always `compaction`.

2991 

2992 - `"compaction"`

2993 

2994 - `id: optional string`

2995 

2996 The ID of the compaction item.

2997 

2998 - `ImageGenerationCall object { id, result, status, type }`

2999 

3000 An image generation request made by the model.

3001 

3002 - `id: string`

3003 

3004 The unique ID of the image generation call.

3005 

3006 - `result: string`

3007 

3008 The generated image encoded in base64.

3009 

3010 - `status: "in_progress" or "completed" or "generating" or "failed"`

3011 

3012 The status of the image generation call.

3013 

3014 - `"in_progress"`

3015 

3016 - `"completed"`

3017 

3018 - `"generating"`

3019 

3020 - `"failed"`

3021 

3022 - `type: "image_generation_call"`

3023 

3024 The type of the image generation call. Always `image_generation_call`.

3025 

3026 - `"image_generation_call"`

3027 

3028 - `CodeInterpreterCall object { id, code, container_id, 3 more }`

3029 

3030 A tool call to run code.

3031 

3032 - `id: string`

3033 

3034 The unique ID of the code interpreter tool call.

3035 

3036 - `code: string`

3037 

3038 The code to run, or null if not available.

3039 

3040 - `container_id: string`

3041 

3042 The ID of the container used to run the code.

3043 

3044 - `outputs: array of object { logs, type } or object { type, url }`

3045 

3046 The outputs generated by the code interpreter, such as logs or images.

3047 Can be null if no outputs are available.

3048 

3049 - `Logs object { logs, type }`

3050 

3051 The logs output from the code interpreter.

3052 

3053 - `logs: string`

3054 

3055 The logs output from the code interpreter.

3056 

3057 - `type: "logs"`

3058 

3059 The type of the output. Always `logs`.

3060 

3061 - `"logs"`

3062 

3063 - `Image object { type, url }`

3064 

3065 The image output from the code interpreter.

3066 

3067 - `type: "image"`

3068 

3069 The type of the output. Always `image`.

3070 

3071 - `"image"`

3072 

3073 - `url: string`

3074 

3075 The URL of the image output from the code interpreter.

3076 

3077 - `status: "in_progress" or "completed" or "incomplete" or 2 more`

3078 

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

3080 

3081 - `"in_progress"`

3082 

3083 - `"completed"`

3084 

3085 - `"incomplete"`

3086 

3087 - `"interpreting"`

3088 

3089 - `"failed"`

3090 

3091 - `type: "code_interpreter_call"`

3092 

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

3094 

3095 - `"code_interpreter_call"`

3096 

3097 - `LocalShellCall object { id, action, call_id, 2 more }`

3098 

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

3100 

3101 - `id: string`

3102 

3103 The unique ID of the local shell call.

3104 

3105 - `action: object { command, env, type, 3 more }`

3106 

3107 Execute a shell command on the server.

3108 

3109 - `command: array of string`

3110 

3111 The command to run.

3112 

3113 - `env: map[string]`

3114 

3115 Environment variables to set for the command.

3116 

3117 - `type: "exec"`

3118 

3119 The type of the local shell action. Always `exec`.

3120 

3121 - `"exec"`

3122 

3123 - `timeout_ms: optional number`

3124 

3125 Optional timeout in milliseconds for the command.

3126 

3127 - `user: optional string`

3128 

3129 Optional user to run the command as.

3130 

3131 - `working_directory: optional string`

3132 

3133 Optional working directory to run the command in.

3134 

3135 - `call_id: string`

3136 

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

3138 

3139 - `status: "in_progress" or "completed" or "incomplete"`

3140 

3141 The status of the local shell call.

3142 

3143 - `"in_progress"`

3144 

3145 - `"completed"`

3146 

3147 - `"incomplete"`

3148 

3149 - `type: "local_shell_call"`

3150 

3151 The type of the local shell call. Always `local_shell_call`.

3152 

3153 - `"local_shell_call"`

3154 

3155 - `LocalShellCallOutput object { id, output, type, status }`

3156 

3157 The output of a local shell tool call.

3158 

3159 - `id: string`

3160 

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

3162 

3163 - `output: string`

3164 

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

3166 

3167 - `type: "local_shell_call_output"`

3168 

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

3170 

3171 - `"local_shell_call_output"`

3172 

3173 - `status: optional "in_progress" or "completed" or "incomplete"`

3174 

3175 The status of the item. One of `in_progress`, `completed`, or `incomplete`.

3176 

3177 - `"in_progress"`

3178 

3179 - `"completed"`

3180 

3181 - `"incomplete"`

3182 

3183 - `ShellCall object { action, call_id, type, 3 more }`

3184 

3185 A tool representing a request to execute one or more shell commands.

3186 

3187 - `action: object { commands, max_output_length, timeout_ms }`

3188 

3189 The shell commands and limits that describe how to run the tool call.

3190 

3191 - `commands: array of string`

3192 

3193 Ordered shell commands for the execution environment to run.

3194 

3195 - `max_output_length: optional number`

3196 

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

3198 

3199 - `timeout_ms: optional number`

3200 

3201 Maximum wall-clock time in milliseconds to allow the shell commands to run.

3202 

3203 - `call_id: string`

3204 

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

3206 

3207 - `type: "shell_call"`

3208 

3209 The type of the item. Always `shell_call`.

3210 

3211 - `"shell_call"`

3212 

3213 - `id: optional string`

3214 

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

3216 

3217 - `environment: optional LocalEnvironment or ContainerReference`

3218 

3219 The environment to execute the shell commands in.

3220 

3221 - `LocalEnvironment object { type, skills }`

3222 

3223 - `ContainerReference object { container_id, type }`

3224 

3225 - `status: optional "in_progress" or "completed" or "incomplete"`

3226 

3227 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

3228 

3229 - `"in_progress"`

3230 

3231 - `"completed"`

3232 

3233 - `"incomplete"`

3234 

3235 - `ShellCallOutput object { call_id, output, type, 3 more }`

3236 

3237 The streamed output items emitted by a shell tool call.

3238 

3239 - `call_id: string`

3240 

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

3242 

3243 - `output: array of ResponseFunctionShellCallOutputContent`

3244 

3245 Captured chunks of stdout and stderr output, along with their associated outcomes.

3246 

3247 - `outcome: object { type } or object { exit_code, type }`

3248 

3249 The exit or timeout outcome associated with this shell call.

3250 

3251 - `Timeout object { type }`

3252 

3253 Indicates that the shell call exceeded its configured time limit.

3254 

3255 - `type: "timeout"`

3256 

3257 The outcome type. Always `timeout`.

3258 

3259 - `"timeout"`

3260 

3261 - `Exit object { exit_code, type }`

3262 

3263 Indicates that the shell commands finished and returned an exit code.

3264 

3265 - `exit_code: number`

3266 

3267 The exit code returned by the shell process.

3268 

3269 - `type: "exit"`

3270 

3271 The outcome type. Always `exit`.

3272 

3273 - `"exit"`

3274 

3275 - `stderr: string`

3276 

3277 Captured stderr output for the shell call.

3278 

3279 - `stdout: string`

3280 

3281 Captured stdout output for the shell call.

3282 

3283 - `type: "shell_call_output"`

3284 

3285 The type of the item. Always `shell_call_output`.

3286 

3287 - `"shell_call_output"`

3288 

3289 - `id: optional string`

3290 

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

3292 

3293 - `max_output_length: optional number`

3294 

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

3296 

3297 - `status: optional "in_progress" or "completed" or "incomplete"`

3298 

3299 The status of the shell call output.

3300 

3301 - `"in_progress"`

3302 

3303 - `"completed"`

3304 

3305 - `"incomplete"`

3306 

3307 - `ApplyPatchCall object { call_id, operation, status, 2 more }`

3308 

3309 A tool call representing a request to create, delete, or update files using diff patches.

3310 

3311 - `call_id: string`

3312 

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

3314 

3315 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`

3316 

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

3318 

3319 - `CreateFile object { diff, path, type }`

3320 

3321 Instruction for creating a new file via the apply_patch tool.

3322 

3323 - `diff: string`

3324 

3325 Unified diff content to apply when creating the file.

3326 

3327 - `path: string`

3328 

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

3330 

3331 - `type: "create_file"`

3332 

3333 The operation type. Always `create_file`.

3334 

3335 - `"create_file"`

3336 

3337 - `DeleteFile object { path, type }`

3338 

3339 Instruction for deleting an existing file via the apply_patch tool.

3340 

3341 - `path: string`

3342 

3343 Path of the file to delete relative to the workspace root.

3344 

3345 - `type: "delete_file"`

3346 

3347 The operation type. Always `delete_file`.

3348 

3349 - `"delete_file"`

3350 

3351 - `UpdateFile object { diff, path, type }`

3352 

3353 Instruction for updating an existing file via the apply_patch tool.

3354 

3355 - `diff: string`

3356 

3357 Unified diff content to apply to the existing file.

3358 

3359 - `path: string`

3360 

3361 Path of the file to update relative to the workspace root.

3362 

3363 - `type: "update_file"`

3364 

3365 The operation type. Always `update_file`.

3366 

3367 - `"update_file"`

3368 

3369 - `status: "in_progress" or "completed"`

3370 

3371 The status of the apply patch tool call. One of `in_progress` or `completed`.

3372 

3373 - `"in_progress"`

3374 

3375 - `"completed"`

3376 

3377 - `type: "apply_patch_call"`

3378 

3379 The type of the item. Always `apply_patch_call`.

3380 

3381 - `"apply_patch_call"`

3382 

3383 - `id: optional string`

3384 

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

3386 

3387 - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`

3388 

3389 The streamed output emitted by an apply patch tool call.

3390 

3391 - `call_id: string`

3392 

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

3394 

3395 - `status: "completed" or "failed"`

3396 

3397 The status of the apply patch tool call output. One of `completed` or `failed`.

3398 

3399 - `"completed"`

3400 

3401 - `"failed"`

3402 

3403 - `type: "apply_patch_call_output"`

3404 

3405 The type of the item. Always `apply_patch_call_output`.

3406 

3407 - `"apply_patch_call_output"`

3408 

3409 - `id: optional string`

3410 

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

3412 

3413 - `output: optional string`

3414 

3415 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

3416 

3417 - `McpListTools object { id, server_label, tools, 2 more }`

3418 

3419 A list of tools available on an MCP server.

3420 

3421 - `id: string`

3422 

3423 The unique ID of the list.

3424 

3425 - `server_label: string`

3426 

3427 The label of the MCP server.

3428 

3429 - `tools: array of object { input_schema, name, annotations, description }`

3430 

3431 The tools available on the server.

3432 

3433 - `input_schema: unknown`

3434 

3435 The JSON schema describing the tool's input.

3436 

3437 - `name: string`

3438 

3439 The name of the tool.

3440 

3441 - `annotations: optional unknown`

3442 

3443 Additional annotations about the tool.

3444 

3445 - `description: optional string`

3446 

3447 The description of the tool.

3448 

3449 - `type: "mcp_list_tools"`

3450 

3451 The type of the item. Always `mcp_list_tools`.

3452 

3453 - `"mcp_list_tools"`

3454 

3455 - `error: optional string`

3456 

3457 Error message if the server could not list tools.

3458 

3459 - `McpApprovalRequest object { id, arguments, name, 2 more }`

3460 

3461 A request for human approval of a tool invocation.

3462 

3463 - `id: string`

3464 

3465 The unique ID of the approval request.

3466 

3467 - `arguments: string`

3468 

3469 A JSON string of arguments for the tool.

3470 

3471 - `name: string`

3472 

3473 The name of the tool to run.

3474 

3475 - `server_label: string`

3476 

3477 The label of the MCP server making the request.

3478 

3479 - `type: "mcp_approval_request"`

3480 

3481 The type of the item. Always `mcp_approval_request`.

3482 

3483 - `"mcp_approval_request"`

3484 

3485 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`

3486 

3487 A response to an MCP approval request.

3488 

3489 - `approval_request_id: string`

3490 

3491 The ID of the approval request being answered.

3492 

3493 - `approve: boolean`

3494 

3495 Whether the request was approved.

3496 

3497 - `type: "mcp_approval_response"`

3498 

3499 The type of the item. Always `mcp_approval_response`.

3500 

3501 - `"mcp_approval_response"`

3502 

3503 - `id: optional string`

3504 

3505 The unique ID of the approval response

3506 

3507 - `reason: optional string`

3508 

3509 Optional reason for the decision.

3510 

3511 - `McpCall object { id, arguments, name, 6 more }`

3512 

3513 An invocation of a tool on an MCP server.

3514 

3515 - `id: string`

3516 

3517 The unique ID of the tool call.

3518 

3519 - `arguments: string`

3520 

3521 A JSON string of the arguments passed to the tool.

3522 

3523 - `name: string`

3524 

3525 The name of the tool that was run.

3526 

3527 - `server_label: string`

3528 

3529 The label of the MCP server running the tool.

3530 

3531 - `type: "mcp_call"`

3532 

3533 The type of the item. Always `mcp_call`.

3534 

3535 - `"mcp_call"`

3536 

3537 - `approval_request_id: optional string`

3538 

3539 Unique identifier for the MCP tool call approval request.

3540 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

3541 

3542 - `error: optional string`

3543 

3544 The error from the tool call, if any.

3545 

3546 - `output: optional string`

3547 

3548 The output from the tool call.

3549 

3550 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`

3551 

3552 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

3553 

3554 - `"in_progress"`

3555 

3556 - `"completed"`

3557 

3558 - `"incomplete"`

3559 

3560 - `"calling"`

3561 

3562 - `"failed"`

3563 

3564 - `CustomToolCallOutput object { call_id, output, type, id }`

3565 

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

3567 

3568 - `call_id: string`

3569 

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

3571 

3572 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`

3573 

3574 The output from the custom tool call generated by your code.

3575 Can be a string or an list of output content.

3576 

3577 - `StringOutput = string`

3578 

3579 A string of the output of the custom tool call.

3580 

3581 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`

3582 

3583 Text, image, or file output of the custom tool call.

3584 

3585 - `ResponseInputText object { text, type }`

3586 

3587 A text input to the model.

3588 

3589 - `ResponseInputImage object { detail, type, file_id, image_url }`

3590 

3591 An image input to the model. Learn about [image inputs](/docs/guides/vision).

3592 

3593 - `ResponseInputFile object { type, detail, file_data, 3 more }`

3594 

3595 A file input to the model.

3596 

3597 - `type: "custom_tool_call_output"`

3598 

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

3600 

3601 - `"custom_tool_call_output"`

3602 

3603 - `id: optional string`

3604 

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

3606 

3607 - `CustomToolCall object { call_id, input, name, 3 more }`

3608 

3609 A call to a custom tool created by the model.

3610 

3611 - `call_id: string`

3612 

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

3614 

3615 - `input: string`

3616 

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

3618 

3619 - `name: string`

3620 

3621 The name of the custom tool being called.

3622 

3623 - `type: "custom_tool_call"`

3624 

3625 The type of the custom tool call. Always `custom_tool_call`.

3626 

3627 - `"custom_tool_call"`

3628 

3629 - `id: optional string`

3630 

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

3632 

3633 - `namespace: optional string`

3634 

3635 The namespace of the custom tool being called.

3636 

3637 - `CompactionTrigger object { type }`

3638 

3639 Compacts the current context. Must be the final input item.

3640 

3641 - `type: "compaction_trigger"`

3642 

3643 The type of the item. Always `compaction_trigger`.

3644 

3645 - `"compaction_trigger"`

3646 

3647 - `ItemReference object { id, type }`

3648 

3649 An internal identifier for an item to reference.

3650 

3651 - `id: string`

3652 

3653 The ID of the item to reference.

3654 

3655 - `type: optional "item_reference"`

3656 

3657 The type of item to reference. Always `item_reference`.

3658 

3659 - `"item_reference"`

3660 

3661 - `metadata: Metadata`

3662 

3663 Set of 16 key-value pairs that can be attached to an object. This can be

3664 useful for storing additional information about the object in a structured

3665 format, and querying for objects via API or the dashboard.

3666 

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

3668 with a maximum length of 512 characters.

3669 

3670 - `model: ResponsesModel`

3671 

3672 Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI

3673 offers a wide range of models with different capabilities, performance

3674 characteristics, and price points. Refer to the [model guide](/docs/models)

3675 to browse and compare available models.

3676 

3677 - `string`

3678 

3679 - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more`

3680 

3681 - `"gpt-5.4"`

3682 

3683 - `"gpt-5.4-mini"`

3684 

3685 - `"gpt-5.4-nano"`

3686 

3687 - `"gpt-5.4-mini-2026-03-17"`

3688 

3689 - `"gpt-5.4-nano-2026-03-17"`

3690 

3691 - `"gpt-5.3-chat-latest"`

3692 

3693 - `"gpt-5.2"`

3694 

3695 - `"gpt-5.2-2025-12-11"`

3696 

3697 - `"gpt-5.2-chat-latest"`

3698 

3699 - `"gpt-5.2-pro"`

3700 

3701 - `"gpt-5.2-pro-2025-12-11"`

3702 

3703 - `"gpt-5.1"`

3704 

3705 - `"gpt-5.1-2025-11-13"`

3706 

3707 - `"gpt-5.1-codex"`

3708 

3709 - `"gpt-5.1-mini"`

3710 

3711 - `"gpt-5.1-chat-latest"`

3712 

3713 - `"gpt-5"`

3714 

3715 - `"gpt-5-mini"`

3716 

3717 - `"gpt-5-nano"`

3718 

3719 - `"gpt-5-2025-08-07"`

3720 

3721 - `"gpt-5-mini-2025-08-07"`

3722 

3723 - `"gpt-5-nano-2025-08-07"`

3724 

3725 - `"gpt-5-chat-latest"`

3726 

3727 - `"gpt-4.1"`

3728 

3729 - `"gpt-4.1-mini"`

3730 

3731 - `"gpt-4.1-nano"`

3732 

3733 - `"gpt-4.1-2025-04-14"`

3734 

3735 - `"gpt-4.1-mini-2025-04-14"`

3736 

3737 - `"gpt-4.1-nano-2025-04-14"`

3738 

3739 - `"o4-mini"`

3740 

3741 - `"o4-mini-2025-04-16"`

3742 

3743 - `"o3"`

3744 

3745 - `"o3-2025-04-16"`

3746 

3747 - `"o3-mini"`

3748 

3749 - `"o3-mini-2025-01-31"`

3750 

3751 - `"o1"`

3752 

3753 - `"o1-2024-12-17"`

3754 

3755 - `"o1-preview"`

3756 

3757 - `"o1-preview-2024-09-12"`

3758 

3759 - `"o1-mini"`

3760 

3761 - `"o1-mini-2024-09-12"`

3762 

3763 - `"gpt-4o"`

3764 

3765 - `"gpt-4o-2024-11-20"`

3766 

3767 - `"gpt-4o-2024-08-06"`

3768 

3769 - `"gpt-4o-2024-05-13"`

3770 

3771 - `"gpt-4o-audio-preview"`

3772 

3773 - `"gpt-4o-audio-preview-2024-10-01"`

3774 

3775 - `"gpt-4o-audio-preview-2024-12-17"`

3776 

3777 - `"gpt-4o-audio-preview-2025-06-03"`

3778 

3779 - `"gpt-4o-mini-audio-preview"`

3780 

3781 - `"gpt-4o-mini-audio-preview-2024-12-17"`

3782 

3783 - `"gpt-4o-search-preview"`

3784 

3785 - `"gpt-4o-mini-search-preview"`

3786 

3787 - `"gpt-4o-search-preview-2025-03-11"`

3788 

3789 - `"gpt-4o-mini-search-preview-2025-03-11"`

3790 

3791 - `"chatgpt-4o-latest"`

3792 

3793 - `"codex-mini-latest"`

3794 

3795 - `"gpt-4o-mini"`

3796 

3797 - `"gpt-4o-mini-2024-07-18"`

3798 

3799 - `"gpt-4-turbo"`

3800 

3801 - `"gpt-4-turbo-2024-04-09"`

3802 

3803 - `"gpt-4-0125-preview"`

3804 

3805 - `"gpt-4-turbo-preview"`

3806 

3807 - `"gpt-4-1106-preview"`

3808 

3809 - `"gpt-4-vision-preview"`

3810 

3811 - `"gpt-4"`

3812 

3813 - `"gpt-4-0314"`

3814 

3815 - `"gpt-4-0613"`

3816 

3817 - `"gpt-4-32k"`

3818 

3819 - `"gpt-4-32k-0314"`

3820 

3821 - `"gpt-4-32k-0613"`

3822 

3823 - `"gpt-3.5-turbo"`

3824 

3825 - `"gpt-3.5-turbo-16k"`

3826 

3827 - `"gpt-3.5-turbo-0301"`

3828 

3829 - `"gpt-3.5-turbo-0613"`

3830 

3831 - `"gpt-3.5-turbo-1106"`

3832 

3833 - `"gpt-3.5-turbo-0125"`

3834 

3835 - `"gpt-3.5-turbo-16k-0613"`

3836 

3837 - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more`

3838 

3839 - `"o1-pro"`

3840 

3841 - `"o1-pro-2025-03-19"`

3842 

3843 - `"o3-pro"`

3844 

3845 - `"o3-pro-2025-06-10"`

3846 

3847 - `"o3-deep-research"`

3848 

3849 - `"o3-deep-research-2025-06-26"`

3850 

3851 - `"o4-mini-deep-research"`

3852 

3853 - `"o4-mini-deep-research-2025-06-26"`

3854 

3855 - `"computer-use-preview"`

3856 

3857 - `"computer-use-preview-2025-03-11"`

3858 

3859 - `"gpt-5-codex"`

3860 

3861 - `"gpt-5-pro"`

3862 

3863 - `"gpt-5-pro-2025-10-06"`

3864 

3865 - `"gpt-5.1-codex-max"`

3866 

3867 - `object: "response"`

3868 

3869 The object type of this resource - always set to `response`.

3870 

3871 - `"response"`

3872 

3873 - `output: array of ResponseOutputItem`

3874 

3875 An array of content items generated by the model.

3876 

3877 - The length and order of items in the `output` array is dependent

3878 on the model's response.

3879 - Rather than accessing the first item in the `output` array and

3880 assuming it's an `assistant` message with the content generated by

3881 the model, you might consider using the `output_text` property where

3882 supported in SDKs.

3883 

3884 - `ResponseOutputMessage object { id, content, role, 3 more }`

3885 

3886 An output message from the model.

3887 

3888 - `FileSearchCall object { id, queries, status, 2 more }`

3889 

3890 The results of a file search tool call. See the

3891 [file search guide](/docs/guides/tools-file-search) for more information.

3892 

3893 - `id: string`

3894 

3895 The unique ID of the file search tool call.

3896 

3897 - `queries: array of string`

3898 

3899 The queries used to search for files.

3900 

3901 - `status: "in_progress" or "searching" or "completed" or 2 more`

3902 

3903 The status of the file search tool call. One of `in_progress`,

3904 `searching`, `incomplete` or `failed`,

3905 

3906 - `"in_progress"`

3907 

3908 - `"searching"`

3909 

3910 - `"completed"`

3911 

3912 - `"incomplete"`

3913 

3914 - `"failed"`

3915 

3916 - `type: "file_search_call"`

3917 

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

3919 

3920 - `"file_search_call"`

3921 

3922 - `results: optional array of object { attributes, file_id, filename, 2 more }`

3923 

3924 The results of the file search tool call.

3925 

3926 - `attributes: optional map[string or number or boolean]`

3927 

3928 Set of 16 key-value pairs that can be attached to an object. This can be

3929 useful for storing additional information about the object in a structured

3930 format, and querying for objects via API or the dashboard. Keys are strings

3931 with a maximum length of 64 characters. Values are strings with a maximum

3932 length of 512 characters, booleans, or numbers.

3933 

3934 - `string`

3935 

3936 - `number`

3937 

3938 - `boolean`

3939 

3940 - `file_id: optional string`

3941 

3942 The unique ID of the file.

3943 

3944 - `filename: optional string`

3945 

3946 The name of the file.

3947 

3948 - `score: optional number`

3949 

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

3951 

3952 - `text: optional string`

3953 

3954 The text that was retrieved from the file.

3955 

3956 - `FunctionCall object { arguments, call_id, name, 4 more }`

3957 

3958 A tool call to run a function. See the

3959 [function calling guide](/docs/guides/function-calling) for more information.

3960 

3961 - `arguments: string`

3962 

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

3964 

3965 - `call_id: string`

3966 

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

3968 

3969 - `name: string`

3970 

3971 The name of the function to run.

3972 

3973 - `type: "function_call"`

3974 

3975 The type of the function tool call. Always `function_call`.

3976 

3977 - `"function_call"`

3978 

3979 - `id: optional string`

3980 

3981 The unique ID of the function tool call.

3982 

3983 - `namespace: optional string`

3984 

3985 The namespace of the function to run.

3986 

3987 - `status: optional "in_progress" or "completed" or "incomplete"`

3988 

3989 The status of the item. One of `in_progress`, `completed`, or

3990 `incomplete`. Populated when items are returned via API.

3991 

3992 - `"in_progress"`

3993 

3994 - `"completed"`

3995 

3996 - `"incomplete"`

3997 

3998 - `FunctionCallOutput object { id, call_id, output, 3 more }`

3999 

4000 - `id: string`

4001 

4002 The unique ID of the function call tool output.

4003 

4004 - `call_id: string`

4005 

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

4007 

4008 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`

4009 

4010 The output from the function call generated by your code.

4011 Can be a string or an list of output content.

4012 

4013 - `StringOutput = string`

4014 

4015 A string of the output of the function call.

4016 

4017 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`

4018 

4019 Text, image, or file output of the function call.

4020 

4021 - `ResponseInputText object { text, type }`

4022 

4023 A text input to the model.

4024 

4025 - `ResponseInputImage object { detail, type, file_id, image_url }`

4026 

4027 An image input to the model. Learn about [image inputs](/docs/guides/vision).

4028 

4029 - `ResponseInputFile object { type, detail, file_data, 3 more }`

4030 

4031 A file input to the model.

4032 

4033 - `status: "in_progress" or "completed" or "incomplete"`

4034 

4035 The status of the item. One of `in_progress`, `completed`, or

4036 `incomplete`. Populated when items are returned via API.

4037 

4038 - `"in_progress"`

4039 

4040 - `"completed"`

4041 

4042 - `"incomplete"`

4043 

4044 - `type: "function_call_output"`

4045 

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

4047 

4048 - `"function_call_output"`

4049 

4050 - `created_by: optional string`

4051 

4052 The identifier of the actor that created the item.

4053 

4054 - `WebSearchCall object { id, action, status, type }`

4055 

4056 The results of a web search tool call. See the

4057 [web search guide](/docs/guides/tools-web-search) for more information.

4058 

4059 - `id: string`

4060 

4061 The unique ID of the web search tool call.

4062 

4063 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`

4064 

4065 An object describing the specific action taken in this web search call.

4066 Includes details on how the model used the web (search, open_page, find_in_page).

4067 

4068 - `Search object { type, queries, query, sources }`

4069 

4070 Action type "search" - Performs a web search query.

4071 

4072 - `type: "search"`

4073 

4074 The action type.

4075 

4076 - `"search"`

4077 

4078 - `queries: optional array of string`

4079 

4080 The search queries.

4081 

4082 - `query: optional string`

4083 

4084 The search query.

4085 

4086 - `sources: optional array of object { type, url }`

4087 

4088 The sources used in the search.

4089 

4090 - `type: "url"`

4091 

4092 The type of source. Always `url`.

4093 

4094 - `"url"`

4095 

4096 - `url: string`

4097 

4098 The URL of the source.

4099 

4100 - `OpenPage object { type, url }`

4101 

4102 Action type "open_page" - Opens a specific URL from search results.

4103 

4104 - `type: "open_page"`

4105 

4106 The action type.

4107 

4108 - `"open_page"`

4109 

4110 - `url: optional string`

4111 

4112 The URL opened by the model.

4113 

4114 - `FindInPage object { pattern, type, url }`

4115 

4116 Action type "find_in_page": Searches for a pattern within a loaded page.

4117 

4118 - `pattern: string`

4119 

4120 The pattern or text to search for within the page.

4121 

4122 - `type: "find_in_page"`

4123 

4124 The action type.

4125 

4126 - `"find_in_page"`

4127 

4128 - `url: string`

4129 

4130 The URL of the page searched for the pattern.

4131 

4132 - `status: "in_progress" or "searching" or "completed" or "failed"`

4133 

4134 The status of the web search tool call.

4135 

4136 - `"in_progress"`

4137 

4138 - `"searching"`

4139 

4140 - `"completed"`

4141 

4142 - `"failed"`

4143 

4144 - `type: "web_search_call"`

4145 

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

4147 

4148 - `"web_search_call"`

4149 

4150 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`

4151 

4152 A tool call to a computer use tool. See the

4153 [computer use guide](/docs/guides/tools-computer-use) for more information.

4154 

4155 - `id: string`

4156 

4157 The unique ID of the computer call.

4158 

4159 - `call_id: string`

4160 

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

4162 

4163 - `pending_safety_checks: array of object { id, code, message }`

4164 

4165 The pending safety checks for the computer call.

4166 

4167 - `id: string`

4168 

4169 The ID of the pending safety check.

4170 

4171 - `code: optional string`

4172 

4173 The type of the pending safety check.

4174 

4175 - `message: optional string`

4176 

4177 Details about the pending safety check.

4178 

4179 - `status: "in_progress" or "completed" or "incomplete"`

4180 

4181 The status of the item. One of `in_progress`, `completed`, or

4182 `incomplete`. Populated when items are returned via API.

4183 

4184 - `"in_progress"`

4185 

4186 - `"completed"`

4187 

4188 - `"incomplete"`

4189 

4190 - `type: "computer_call"`

4191 

4192 The type of the computer call. Always `computer_call`.

4193 

4194 - `"computer_call"`

4195 

4196 - `action: optional ComputerAction`

4197 

4198 A click action.

4199 

4200 - `actions: optional ComputerActionList`

4201 

4202 Flattened batched actions for `computer_use`. Each action includes an

4203 `type` discriminator and action-specific fields.

4204 

4205 - `ComputerCallOutput object { id, call_id, output, 4 more }`

4206 

4207 - `id: string`

4208 

4209 The unique ID of the computer call tool output.

4210 

4211 - `call_id: string`

4212 

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

4214 

4215 - `output: ResponseComputerToolCallOutputScreenshot`

4216 

4217 A computer screenshot image used with the computer use tool.

4218 

4219 - `status: "completed" or "incomplete" or "failed" or "in_progress"`

4220 

4221 The status of the message input. One of `in_progress`, `completed`, or

4222 `incomplete`. Populated when input items are returned via API.

4223 

4224 - `"completed"`

4225 

4226 - `"incomplete"`

4227 

4228 - `"failed"`

4229 

4230 - `"in_progress"`

4231 

4232 - `type: "computer_call_output"`

4233 

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

4235 

4236 - `"computer_call_output"`

4237 

4238 - `acknowledged_safety_checks: optional array of object { id, code, message }`

4239 

4240 The safety checks reported by the API that have been acknowledged by the

4241 developer.

4242 

4243 - `id: string`

4244 

4245 The ID of the pending safety check.

4246 

4247 - `code: optional string`

4248 

4249 The type of the pending safety check.

4250 

4251 - `message: optional string`

4252 

4253 Details about the pending safety check.

4254 

4255 - `created_by: optional string`

4256 

4257 The identifier of the actor that created the item.

4258 

4259 - `Reasoning object { id, summary, type, 3 more }`

4260 

4261 A description of the chain of thought used by a reasoning model while generating

4262 a response. Be sure to include these items in your `input` to the Responses API

4263 for subsequent turns of a conversation if you are manually

4264 [managing context](/docs/guides/conversation-state).

4265 

4266 - `id: string`

4267 

4268 The unique identifier of the reasoning content.

4269 

4270 - `summary: array of SummaryTextContent`

4271 

4272 Reasoning summary content.

4273 

4274 - `text: string`

4275 

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

4277 

4278 - `type: "summary_text"`

4279 

4280 The type of the object. Always `summary_text`.

4281 

4282 - `type: "reasoning"`

4283 

4284 The type of the object. Always `reasoning`.

4285 

4286 - `"reasoning"`

4287 

4288 - `content: optional array of object { text, type }`

4289 

4290 Reasoning text content.

4291 

4292 - `text: string`

4293 

4294 The reasoning text from the model.

4295 

4296 - `type: "reasoning_text"`

4297 

4298 The type of the reasoning text. Always `reasoning_text`.

4299 

4300 - `"reasoning_text"`

4301 

4302 - `encrypted_content: optional string`

4303 

4304 The encrypted content of the reasoning item - populated when a response is

4305 generated with `reasoning.encrypted_content` in the `include` parameter.

4306 

4307 - `status: optional "in_progress" or "completed" or "incomplete"`

4308 

4309 The status of the item. One of `in_progress`, `completed`, or

4310 `incomplete`. Populated when items are returned via API.

4311 

4312 - `"in_progress"`

4313 

4314 - `"completed"`

4315 

4316 - `"incomplete"`

4317 

4318 - `ToolSearchCall object { id, arguments, call_id, 4 more }`

4319 

4320 - `id: string`

4321 

4322 The unique ID of the tool search call item.

4323 

4324 - `arguments: unknown`

4325 

4326 Arguments used for the tool search call.

4327 

4328 - `call_id: string`

4329 

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

4331 

4332 - `execution: "server" or "client"`

4333 

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

4335 

4336 - `"server"`

4337 

4338 - `"client"`

4339 

4340 - `status: "in_progress" or "completed" or "incomplete"`

4341 

4342 The status of the tool search call item that was recorded.

4343 

4344 - `"in_progress"`

4345 

4346 - `"completed"`

4347 

4348 - `"incomplete"`

4349 

4350 - `type: "tool_search_call"`

4351 

4352 The type of the item. Always `tool_search_call`.

4353 

4354 - `"tool_search_call"`

4355 

4356 - `created_by: optional string`

4357 

4358 The identifier of the actor that created the item.

4359 

4360 - `ToolSearchOutput object { id, call_id, execution, 4 more }`

4361 

4362 - `id: string`

4363 

4364 The unique ID of the tool search output item.

4365 

4366 - `call_id: string`

4367 

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

4369 

4370 - `execution: "server" or "client"`

4371 

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

4373 

4374 - `"server"`

4375 

4376 - `"client"`

4377 

4378 - `status: "in_progress" or "completed" or "incomplete"`

4379 

4380 The status of the tool search output item that was recorded.

4381 

4382 - `"in_progress"`

4383 

4384 - `"completed"`

4385 

4386 - `"incomplete"`

4387 

4388 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

4389 

4390 The loaded tool definitions returned by tool search.

4391 

4392 - `Function object { name, parameters, strict, 3 more }`

4393 

4394 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

4395 

4396 - `name: string`

4397 

4398 The name of the function to call.

4399 

4400 - `parameters: map[unknown]`

4401 

4402 A JSON schema object describing the parameters of the function.

4403 

4404 - `strict: boolean`

4405 

4406 Whether to enforce strict parameter validation. Default `true`.

4407 

4408 - `type: "function"`

2912 4409 

2913 The type of item to reference. Always `item_reference`.4410 The type of the function tool. Always `function`.

2914 4411 

2915 - `"item_reference"`4412 - `"function"`

2916 4413 

2917 - `metadata: Metadata`4414 - `defer_loading: optional boolean`

2918 4415 

2919 Set of 16 key-value pairs that can be attached to an object. This can be4416 Whether this function is deferred and loaded via tool search.

2920 useful for storing additional information about the object in a structured

2921 format, and querying for objects via API or the dashboard.

2922 4417 

2923 Keys are strings with a maximum length of 64 characters. Values are strings4418 - `description: optional string`

2924 with a maximum length of 512 characters.

2925 4419 

2926 - `model: ResponsesModel`4420 A description of the function. Used by the model to determine whether or not to call the function.

2927 4421 

2928 Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI4422 - `FileSearch object { type, vector_store_ids, filters, 2 more }`

2929 offers a wide range of models with different capabilities, performance

2930 characteristics, and price points. Refer to the [model guide](/docs/models)

2931 to browse and compare available models.

2932 4423 

2933 - `string`4424 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

2934 4425 

2935 - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more`4426 - `type: "file_search"`

2936 4427 

2937 - `"gpt-5.4"`4428 The type of the file search tool. Always `file_search`.

2938 4429 

2939 - `"gpt-5.4-mini"`4430 - `"file_search"`

2940 4431 

2941 - `"gpt-5.4-nano"`4432 - `vector_store_ids: array of string`

2942 4433 

2943 - `"gpt-5.4-mini-2026-03-17"`4434 The IDs of the vector stores to search.

2944 4435 

2945 - `"gpt-5.4-nano-2026-03-17"`4436 - `filters: optional ComparisonFilter or CompoundFilter`

2946 4437 

2947 - `"gpt-5.3-chat-latest"`4438 A filter to apply.

2948 4439 

2949 - `"gpt-5.2"`4440 - `ComparisonFilter object { key, type, value }`

2950 4441 

2951 - `"gpt-5.2-2025-12-11"`4442 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

2952 4443 

2953 - `"gpt-5.2-chat-latest"`4444 - `CompoundFilter object { filters, type }`

2954 4445 

2955 - `"gpt-5.2-pro"`4446 Combine multiple filters using `and` or `or`.

2956 4447 

2957 - `"gpt-5.2-pro-2025-12-11"`4448 - `max_num_results: optional number`

2958 4449 

2959 - `"gpt-5.1"`4450 The maximum number of results to return. This number should be between 1 and 50 inclusive.

2960 4451 

2961 - `"gpt-5.1-2025-11-13"`4452 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`

2962 4453 

2963 - `"gpt-5.1-codex"`4454 Ranking options for search.

2964 4455 

2965 - `"gpt-5.1-mini"`4456 - `hybrid_search: optional object { embedding_weight, text_weight }`

2966 4457 

2967 - `"gpt-5.1-chat-latest"`4458 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

2968 4459 

2969 - `"gpt-5"`4460 - `embedding_weight: number`

2970 4461 

2971 - `"gpt-5-mini"`4462 The weight of the embedding in the reciprocal ranking fusion.

2972 4463 

2973 - `"gpt-5-nano"`4464 - `text_weight: number`

2974 4465 

2975 - `"gpt-5-2025-08-07"`4466 The weight of the text in the reciprocal ranking fusion.

2976 4467 

2977 - `"gpt-5-mini-2025-08-07"`4468 - `ranker: optional "auto" or "default-2024-11-15"`

2978 4469 

2979 - `"gpt-5-nano-2025-08-07"`4470 The ranker to use for the file search.

2980 4471 

2981 - `"gpt-5-chat-latest"`4472 - `"auto"`

2982 4473 

2983 - `"gpt-4.1"`4474 - `"default-2024-11-15"`

2984 4475 

2985 - `"gpt-4.1-mini"`4476 - `score_threshold: optional number`

2986 4477 

2987 - `"gpt-4.1-nano"`4478 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.

2988 4479 

2989 - `"gpt-4.1-2025-04-14"`4480 - `Computer object { type }`

2990 4481 

2991 - `"gpt-4.1-mini-2025-04-14"`4482 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2992 4483 

2993 - `"gpt-4.1-nano-2025-04-14"`4484 - `type: "computer"`

2994 4485 

2995 - `"o4-mini"`4486 The type of the computer tool. Always `computer`.

2996 4487 

2997 - `"o4-mini-2025-04-16"`4488 - `"computer"`

2998 4489 

2999 - `"o3"`4490 - `ComputerUsePreview object { display_height, display_width, environment, type }`

3000 4491 

3001 - `"o3-2025-04-16"`4492 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

3002 4493 

3003 - `"o3-mini"`4494 - `display_height: number`

3004 4495 

3005 - `"o3-mini-2025-01-31"`4496 The height of the computer display.

3006 4497 

3007 - `"o1"`4498 - `display_width: number`

3008 4499 

3009 - `"o1-2024-12-17"`4500 The width of the computer display.

3010 4501 

3011 - `"o1-preview"`4502 - `environment: "windows" or "mac" or "linux" or 2 more`

3012 4503 

3013 - `"o1-preview-2024-09-12"`4504 The type of computer environment to control.

3014 4505 

3015 - `"o1-mini"`4506 - `"windows"`

3016 4507 

3017 - `"o1-mini-2024-09-12"`4508 - `"mac"`

3018 4509 

3019 - `"gpt-4o"`4510 - `"linux"`

3020 4511 

3021 - `"gpt-4o-2024-11-20"`4512 - `"ubuntu"`

3022 4513 

3023 - `"gpt-4o-2024-08-06"`4514 - `"browser"`

3024 4515 

3025 - `"gpt-4o-2024-05-13"`4516 - `type: "computer_use_preview"`

3026 4517 

3027 - `"gpt-4o-audio-preview"`4518 The type of the computer use tool. Always `computer_use_preview`.

3028 4519 

3029 - `"gpt-4o-audio-preview-2024-10-01"`4520 - `"computer_use_preview"`

3030 4521 

3031 - `"gpt-4o-audio-preview-2024-12-17"`4522 - `WebSearch object { type, filters, search_context_size, user_location }`

3032 4523 

3033 - `"gpt-4o-audio-preview-2025-06-03"`4524 Search the Internet for sources related to the prompt. Learn more about the

4525 [web search tool](/docs/guides/tools-web-search).

3034 4526 

3035 - `"gpt-4o-mini-audio-preview"`4527 - `type: "web_search" or "web_search_2025_08_26"`

3036 4528 

3037 - `"gpt-4o-mini-audio-preview-2024-12-17"`4529 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

3038 4530 

3039 - `"gpt-4o-search-preview"`4531 - `"web_search"`

3040 4532 

3041 - `"gpt-4o-mini-search-preview"`4533 - `"web_search_2025_08_26"`

3042 4534 

3043 - `"gpt-4o-search-preview-2025-03-11"`4535 - `filters: optional object { allowed_domains }`

3044 4536 

3045 - `"gpt-4o-mini-search-preview-2025-03-11"`4537 Filters for the search.

3046 4538 

3047 - `"chatgpt-4o-latest"`4539 - `allowed_domains: optional array of string`

3048 4540 

3049 - `"codex-mini-latest"`4541 Allowed domains for the search. If not provided, all domains are allowed.

4542 Subdomains of the provided domains are allowed as well.

3050 4543 

3051 - `"gpt-4o-mini"`4544 Example: `["pubmed.ncbi.nlm.nih.gov"]`

3052 4545 

3053 - `"gpt-4o-mini-2024-07-18"`4546 - `search_context_size: optional "low" or "medium" or "high"`

3054 4547 

3055 - `"gpt-4-turbo"`4548 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.

3056 4549 

3057 - `"gpt-4-turbo-2024-04-09"`4550 - `"low"`

3058 4551 

3059 - `"gpt-4-0125-preview"`4552 - `"medium"`

3060 4553 

3061 - `"gpt-4-turbo-preview"`4554 - `"high"`

3062 4555 

3063 - `"gpt-4-1106-preview"`4556 - `user_location: optional object { city, country, region, 2 more }`

3064 4557 

3065 - `"gpt-4-vision-preview"`4558 The approximate location of the user.

3066 4559 

3067 - `"gpt-4"`4560 - `city: optional string`

3068 4561 

3069 - `"gpt-4-0314"`4562 Free text input for the city of the user, e.g. `San Francisco`.

3070 4563 

3071 - `"gpt-4-0613"`4564 - `country: optional string`

3072 4565 

3073 - `"gpt-4-32k"`4566 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

3074 4567 

3075 - `"gpt-4-32k-0314"`4568 - `region: optional string`

3076 4569 

3077 - `"gpt-4-32k-0613"`4570 Free text input for the region of the user, e.g. `California`.

3078 4571 

3079 - `"gpt-3.5-turbo"`4572 - `timezone: optional string`

3080 4573 

3081 - `"gpt-3.5-turbo-16k"`4574 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

3082 4575 

3083 - `"gpt-3.5-turbo-0301"`4576 - `type: optional "approximate"`

3084 4577 

3085 - `"gpt-3.5-turbo-0613"`4578 The type of location approximation. Always `approximate`.

3086 4579 

3087 - `"gpt-3.5-turbo-1106"`4580 - `"approximate"`

3088 4581 

3089 - `"gpt-3.5-turbo-0125"`4582 - `Mcp object { server_label, type, allowed_tools, 7 more }`

3090 4583 

3091 - `"gpt-3.5-turbo-16k-0613"`4584 Give the model access to additional tools via remote Model Context Protocol

4585 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

3092 4586 

3093 - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more`4587 - `server_label: string`

3094 4588 

3095 - `"o1-pro"`4589 A label for this MCP server, used to identify it in tool calls.

3096 4590 

3097 - `"o1-pro-2025-03-19"`4591 - `type: "mcp"`

3098 4592 

3099 - `"o3-pro"`4593 The type of the MCP tool. Always `mcp`.

3100 4594 

3101 - `"o3-pro-2025-06-10"`4595 - `"mcp"`

3102 4596 

3103 - `"o3-deep-research"`4597 - `allowed_tools: optional array of string or object { read_only, tool_names }`

3104 4598 

3105 - `"o3-deep-research-2025-06-26"`4599 List of allowed tool names or a filter object.

3106 4600 

3107 - `"o4-mini-deep-research"`4601 - `McpAllowedTools = array of string`

3108 4602 

3109 - `"o4-mini-deep-research-2025-06-26"`4603 A string array of allowed tool names

3110 4604 

3111 - `"computer-use-preview"`4605 - `McpToolFilter object { read_only, tool_names }`

3112 4606 

3113 - `"computer-use-preview-2025-03-11"`4607 A filter object to specify which tools are allowed.

3114 4608 

3115 - `"gpt-5-codex"`4609 - `read_only: optional boolean`

3116 4610 

3117 - `"gpt-5-pro"`4611 Indicates whether or not a tool modifies data or is read-only. If an

4612 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

4613 it will match this filter.

3118 4614 

3119 - `"gpt-5-pro-2025-10-06"`4615 - `tool_names: optional array of string`

3120 4616 

3121 - `"gpt-5.1-codex-max"`4617 List of allowed tool names.

3122 4618 

3123 - `object: "response"`4619 - `authorization: optional string`

3124 4620 

3125 The object type of this resource - always set to `response`.4621 An OAuth access token that can be used with a remote MCP server, either

4622 with a custom MCP server URL or a service connector. Your application

4623 must handle the OAuth authorization flow and provide the token here.

3126 4624 

3127 - `"response"`4625 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`

3128 4626 

3129 - `output: array of ResponseOutputItem`4627 Identifier for service connectors, like those available in ChatGPT. One of

4628 `server_url` or `connector_id` must be provided. Learn more about service

4629 connectors [here](/docs/guides/tools-remote-mcp#connectors).

3130 4630 

3131 An array of content items generated by the model.4631 Currently supported `connector_id` values are:

3132 4632 

3133 - The length and order of items in the `output` array is dependent4633 - Dropbox: `connector_dropbox`

3134 on the model's response.4634 - Gmail: `connector_gmail`

3135 - Rather than accessing the first item in the `output` array and4635 - Google Calendar: `connector_googlecalendar`

3136 assuming it's an `assistant` message with the content generated by4636 - Google Drive: `connector_googledrive`

3137 the model, you might consider using the `output_text` property where4637 - Microsoft Teams: `connector_microsoftteams`

3138 supported in SDKs.4638 - Outlook Calendar: `connector_outlookcalendar`

4639 - Outlook Email: `connector_outlookemail`

4640 - SharePoint: `connector_sharepoint`

4641 

4642 - `"connector_dropbox"`

4643 

4644 - `"connector_gmail"`

4645 

4646 - `"connector_googlecalendar"`

4647 

4648 - `"connector_googledrive"`

4649 

4650 - `"connector_microsoftteams"`

4651 

4652 - `"connector_outlookcalendar"`

3139 4653 

3140 - `ResponseOutputMessage object { id, content, role, 3 more }`4654 - `"connector_outlookemail"`

3141 4655 

3142 An output message from the model.4656 - `"connector_sharepoint"`

3143 4657 

3144 - `FileSearchCall object { id, queries, status, 2 more }`4658 - `defer_loading: optional boolean`

3145 4659 

3146 The results of a file search tool call. See the4660 Whether this MCP tool is deferred and discovered via tool search.

3147 [file search guide](/docs/guides/tools-file-search) for more information.

3148 4661 

3149 - `id: string`4662 - `headers: optional map[string]`

3150 4663 

3151 The unique ID of the file search tool call.4664 Optional HTTP headers to send to the MCP server. Use for authentication

4665 or other purposes.

3152 4666 

3153 - `queries: array of string`4667 - `require_approval: optional object { always, never } or "always" or "never"`

3154 4668 

3155 The queries used to search for files.4669 Specify which of the MCP server's tools require approval.

3156 4670 

3157 - `status: "in_progress" or "searching" or "completed" or 2 more`4671 - `McpToolApprovalFilter object { always, never }`

3158 4672 

3159 The status of the file search tool call. One of `in_progress`,4673 Specify which of the MCP server's tools require approval. Can be

3160 `searching`, `incomplete` or `failed`,4674 `always`, `never`, or a filter object associated with tools

4675 that require approval.

3161 4676 

3162 - `"in_progress"`4677 - `always: optional object { read_only, tool_names }`

3163 4678 

3164 - `"searching"`4679 A filter object to specify which tools are allowed.

3165 4680 

3166 - `"completed"`4681 - `read_only: optional boolean`

3167 4682 

3168 - `"incomplete"`4683 Indicates whether or not a tool modifies data or is read-only. If an

4684 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

4685 it will match this filter.

3169 4686 

3170 - `"failed"`4687 - `tool_names: optional array of string`

3171 4688 

3172 - `type: "file_search_call"`4689 List of allowed tool names.

3173 4690 

3174 The type of the file search tool call. Always `file_search_call`.4691 - `never: optional object { read_only, tool_names }`

3175 4692 

3176 - `"file_search_call"`4693 A filter object to specify which tools are allowed.

3177 4694 

3178 - `results: optional array of object { attributes, file_id, filename, 2 more }`4695 - `read_only: optional boolean`

3179 4696 

3180 The results of the file search tool call.4697 Indicates whether or not a tool modifies data or is read-only. If an

4698 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

4699 it will match this filter.

3181 4700 

3182 - `attributes: optional map[string or number or boolean]`4701 - `tool_names: optional array of string`

3183 4702 

3184 Set of 16 key-value pairs that can be attached to an object. This can be4703 List of allowed tool names.

3185 useful for storing additional information about the object in a structured

3186 format, and querying for objects via API or the dashboard. Keys are strings

3187 with a maximum length of 64 characters. Values are strings with a maximum

3188 length of 512 characters, booleans, or numbers.

3189 4704 

3190 - `string`4705 - `McpToolApprovalSetting = "always" or "never"`

3191 4706 

3192 - `number`4707 Specify a single approval policy for all tools. One of `always` or

4708 `never`. When set to `always`, all tools will require approval. When

4709 set to `never`, all tools will not require approval.

3193 4710 

3194 - `boolean`4711 - `"always"`

3195 4712 

3196 - `file_id: optional string`4713 - `"never"`

3197 4714 

3198 The unique ID of the file.4715 - `server_description: optional string`

3199 4716 

3200 - `filename: optional string`4717 Optional description of the MCP server, used to provide more context.

3201 4718 

3202 The name of the file.4719 - `server_url: optional string`

3203 4720 

3204 - `score: optional number`4721 The URL for the MCP server. One of `server_url` or `connector_id` must be

4722 provided.

3205 4723 

3206 The relevance score of the file - a value between 0 and 1.4724 - `CodeInterpreter object { container, type }`

3207 4725 

3208 - `text: optional string`4726 A tool that runs Python code to help generate a response to a prompt.

3209 4727 

3210 The text that was retrieved from the file.4728 - `container: string or object { type, file_ids, memory_limit, network_policy }`

3211 4729 

3212 - `FunctionCall object { arguments, call_id, name, 4 more }`4730 The code interpreter container. Can be a container ID or an object that

4731 specifies uploaded file IDs to make available to your code, along with an

4732 optional `memory_limit` setting.

3213 4733 

3214 A tool call to run a function. See the4734 - `string`

3215 [function calling guide](/docs/guides/function-calling) for more information.

3216 4735 

3217 - `arguments: string`4736 The container ID.

3218 4737 

3219 A JSON string of the arguments to pass to the function.4738 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`

3220 4739 

3221 - `call_id: string`4740 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

3222 4741 

3223 The unique ID of the function tool call generated by the model.4742 - `type: "auto"`

3224 4743 

3225 - `name: string`4744 Always `auto`.

3226 4745 

3227 The name of the function to run.4746 - `"auto"`

3228 4747 

3229 - `type: "function_call"`4748 - `file_ids: optional array of string`

3230 4749 

3231 The type of the function tool call. Always `function_call`.4750 An optional list of uploaded files to make available to your code.

3232 4751 

3233 - `"function_call"`4752 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

3234 4753 

3235 - `id: optional string`4754 The memory limit for the code interpreter container.

3236 4755 

3237 The unique ID of the function tool call.4756 - `"1g"`

3238 4757 

3239 - `namespace: optional string`4758 - `"4g"`

3240 4759 

3241 The namespace of the function to run.4760 - `"16g"`

3242 4761 

3243 - `status: optional "in_progress" or "completed" or "incomplete"`4762 - `"64g"`

3244 4763 

3245 The status of the item. One of `in_progress`, `completed`, or4764 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

3246 `incomplete`. Populated when items are returned via API.

3247 4765 

3248 - `"in_progress"`4766 Network access policy for the container.

3249 4767 

3250 - `"completed"`4768 - `ContainerNetworkPolicyDisabled object { type }`

3251 4769 

3252 - `"incomplete"`4770 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

3253 4771 

3254 - `FunctionCallOutput object { id, call_id, output, 3 more }`4772 - `type: "code_interpreter"`

3255 4773 

3256 - `id: string`4774 The type of the code interpreter tool. Always `code_interpreter`.

3257 4775 

3258 The unique ID of the function call tool output.4776 - `"code_interpreter"`

3259 4777 

3260 - `call_id: string`4778 - `ImageGeneration object { type, action, background, 9 more }`

3261 4779 

3262 The unique ID of the function tool call generated by the model.4780 A tool that generates images using the GPT image models.

3263 4781 

3264 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`4782 - `type: "image_generation"`

3265 4783 

3266 The output from the function call generated by your code.4784 The type of the image generation tool. Always `image_generation`.

3267 Can be a string or an list of output content.

3268 4785 

3269 - `StringOutput = string`4786 - `"image_generation"`

3270 4787 

3271 A string of the output of the function call.4788 - `action: optional "generate" or "edit" or "auto"`

3272 4789 

3273 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`4790 Whether to generate a new image or edit an existing image. Default: `auto`.

3274 4791 

3275 Text, image, or file output of the function call.4792 - `"generate"`

3276 4793 

3277 - `ResponseInputText object { text, type }`4794 - `"edit"`

3278 4795 

3279 A text input to the model.4796 - `"auto"`

3280 4797 

3281 - `ResponseInputImage object { detail, type, file_id, image_url }`4798 - `background: optional "transparent" or "opaque" or "auto"`

3282 4799 

3283 An image input to the model. Learn about [image inputs](/docs/guides/vision).4800 Background type for the generated image. One of `transparent`,

4801 `opaque`, or `auto`. Default: `auto`.

3284 4802 

3285 - `ResponseInputFile object { type, detail, file_data, 3 more }`4803 - `"transparent"`

3286 4804 

3287 A file input to the model.4805 - `"opaque"`

3288 4806 

3289 - `status: "in_progress" or "completed" or "incomplete"`4807 - `"auto"`

3290 4808 

3291 The status of the item. One of `in_progress`, `completed`, or4809 - `input_fidelity: optional "high" or "low"`

3292 `incomplete`. Populated when items are returned via API.

3293 4810 

3294 - `"in_progress"`4811 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`.

3295 4812 

3296 - `"completed"`4813 - `"high"`

3297 4814 

3298 - `"incomplete"`4815 - `"low"`

3299 4816 

3300 - `type: "function_call_output"`4817 - `input_image_mask: optional object { file_id, image_url }`

3301 4818 

3302 The type of the function tool call output. Always `function_call_output`.4819 Optional mask for inpainting. Contains `image_url`

4820 (string, optional) and `file_id` (string, optional).

3303 4821 

3304 - `"function_call_output"`4822 - `file_id: optional string`

3305 4823 

3306 - `created_by: optional string`4824 File ID for the mask image.

3307 4825 

3308 The identifier of the actor that created the item.4826 - `image_url: optional string`

3309 4827 

3310 - `WebSearchCall object { id, action, status, type }`4828 Base64-encoded mask image.

3311 4829 

3312 The results of a web search tool call. See the4830 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

3313 [web search guide](/docs/guides/tools-web-search) for more information.

3314 4831 

3315 - `id: string`4832 The image generation model to use. Default: `gpt-image-1`.

3316 4833 

3317 The unique ID of the web search tool call.4834 - `string`

3318 4835 

3319 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`4836 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

3320 4837 

3321 An object describing the specific action taken in this web search call.4838 The image generation model to use. Default: `gpt-image-1`.

3322 Includes details on how the model used the web (search, open_page, find_in_page).

3323 4839 

3324 - `Search object { query, type, queries, sources }`4840 - `"gpt-image-1"`

3325 4841 

3326 Action type "search" - Performs a web search query.4842 - `"gpt-image-1-mini"`

3327 4843 

3328 - `query: string`4844 - `"gpt-image-1.5"`

3329 4845 

3330 [DEPRECATED] The search query.4846 - `moderation: optional "auto" or "low"`

3331 4847 

3332 - `type: "search"`4848 Moderation level for the generated image. Default: `auto`.

3333 4849 

3334 The action type.4850 - `"auto"`

3335 4851 

3336 - `"search"`4852 - `"low"`

3337 4853 

3338 - `queries: optional array of string`4854 - `output_compression: optional number`

3339 4855 

3340 The search queries.4856 Compression level for the output image. Default: 100.

3341 4857 

3342 - `sources: optional array of object { type, url }`4858 - `output_format: optional "png" or "webp" or "jpeg"`

3343 4859 

3344 The sources used in the search.4860 The output format of the generated image. One of `png`, `webp`, or

4861 `jpeg`. Default: `png`.

3345 4862 

3346 - `type: "url"`4863 - `"png"`

3347 4864 

3348 The type of source. Always `url`.4865 - `"webp"`

3349 4866 

3350 - `"url"`4867 - `"jpeg"`

3351 4868 

3352 - `url: string`4869 - `partial_images: optional number`

3353 4870 

3354 The URL of the source.4871 Number of partial images to generate in streaming mode, from 0 (default value) to 3.

3355 4872 

3356 - `OpenPage object { type, url }`4873 - `quality: optional "low" or "medium" or "high" or "auto"`

3357 4874 

3358 Action type "open_page" - Opens a specific URL from search results.4875 The quality of the generated image. One of `low`, `medium`, `high`,

4876 or `auto`. Default: `auto`.

3359 4877 

3360 - `type: "open_page"`4878 - `"low"`

3361 4879 

3362 The action type.4880 - `"medium"`

3363 4881 

3364 - `"open_page"`4882 - `"high"`

3365 4883 

3366 - `url: optional string`4884 - `"auto"`

3367 4885 

3368 The URL opened by the model.4886 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`

3369 4887 

3370 - `FindInPage object { pattern, type, url }`4888 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

3371 4889 

3372 Action type "find_in_page": Searches for a pattern within a loaded page.4890 - `string`

3373 4891 

3374 - `pattern: string`4892 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`

3375 4893 

3376 The pattern or text to search for within the page.4894 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

3377 4895 

3378 - `type: "find_in_page"`4896 - `"1024x1024"`

3379 4897 

3380 The action type.4898 - `"1024x1536"`

3381 4899 

3382 - `"find_in_page"`4900 - `"1536x1024"`

3383 4901 

3384 - `url: string`4902 - `"auto"`

3385 4903 

3386 The URL of the page searched for the pattern.4904 - `LocalShell object { type }`

3387 4905 

3388 - `status: "in_progress" or "searching" or "completed" or "failed"`4906 A tool that allows the model to execute shell commands in a local environment.

3389 4907 

3390 The status of the web search tool call.4908 - `type: "local_shell"`

3391 4909 

3392 - `"in_progress"`4910 The type of the local shell tool. Always `local_shell`.

3393 4911 

3394 - `"searching"`4912 - `"local_shell"`

3395 4913 

3396 - `"completed"`4914 - `Shell object { type, environment }`

3397 4915 

3398 - `"failed"`4916 A tool that allows the model to execute shell commands.

3399 4917 

3400 - `type: "web_search_call"`4918 - `type: "shell"`

3401 4919 

3402 The type of the web search tool call. Always `web_search_call`.4920 The type of the shell tool. Always `shell`.

3403 4921 

3404 - `"web_search_call"`4922 - `"shell"`

3405 4923 

3406 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`4924 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`

3407 4925 

3408 A tool call to a computer use tool. See the4926 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

3409 [computer use guide](/docs/guides/tools-computer-use) for more information.

3410 4927 

3411 - `id: string`4928 - `LocalEnvironment object { type, skills }`

3412 4929 

3413 The unique ID of the computer call.4930 - `ContainerReference object { container_id, type }`

3414 4931 

3415 - `call_id: string`4932 - `Custom object { name, type, defer_loading, 2 more }`

3416 4933 

3417 An identifier used when responding to the tool call with output.4934 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

3418 4935 

3419 - `pending_safety_checks: array of object { id, code, message }`4936 - `name: string`

3420 4937 

3421 The pending safety checks for the computer call.4938 The name of the custom tool, used to identify it in tool calls.

3422 4939 

3423 - `id: string`4940 - `type: "custom"`

3424 4941 

3425 The ID of the pending safety check.4942 The type of the custom tool. Always `custom`.

3426 4943 

3427 - `code: optional string`4944 - `"custom"`

3428 4945 

3429 The type of the pending safety check.4946 - `defer_loading: optional boolean`

3430 4947 

3431 - `message: optional string`4948 Whether this tool should be deferred and discovered via tool search.

3432 4949 

3433 Details about the pending safety check.4950 - `description: optional string`

3434 4951 

3435 - `status: "in_progress" or "completed" or "incomplete"`4952 Optional description of the custom tool, used to provide more context.

3436 4953 

3437 The status of the item. One of `in_progress`, `completed`, or4954 - `format: optional CustomToolInputFormat`

3438 `incomplete`. Populated when items are returned via API.

3439 4955 

3440 - `"in_progress"`4956 The input format for the custom tool. Default is unconstrained text.

3441 4957 

3442 - `"completed"`4958 - `Namespace object { description, name, tools, type }`

3443 4959 

3444 - `"incomplete"`4960 Groups function/custom tools under a shared namespace.

3445 4961 

3446 - `type: "computer_call"`4962 - `description: string`

3447 4963 

3448 The type of the computer call. Always `computer_call`.4964 A description of the namespace shown to the model.

3449 4965 

3450 - `"computer_call"`4966 - `name: string`

3451 4967 

3452 - `action: optional ComputerAction`4968 The namespace name used in tool calls (for example, `crm`).

3453 4969 

3454 A click action.4970 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`

3455 4971 

3456 - `actions: optional ComputerActionList`4972 The function/custom tools available inside this namespace.

3457 4973 

3458 Flattened batched actions for `computer_use`. Each action includes an4974 - `Function object { name, type, defer_loading, 3 more }`

3459 `type` discriminator and action-specific fields.

3460 4975 

3461 - `ComputerCallOutput object { id, call_id, output, 4 more }`4976 - `name: string`

3462 4977 

3463 - `id: string`4978 - `type: "function"`

3464 4979 

3465 The unique ID of the computer call tool output.4980 - `"function"`

3466 4981 

3467 - `call_id: string`4982 - `defer_loading: optional boolean`

3468 4983 

3469 The ID of the computer tool call that produced the output.4984 Whether this function should be deferred and discovered via tool search.

3470 4985 

3471 - `output: ResponseComputerToolCallOutputScreenshot`4986 - `description: optional string`

3472 4987 

3473 A computer screenshot image used with the computer use tool.4988 - `parameters: optional unknown`

3474 4989 

3475 - `status: "completed" or "incomplete" or "failed" or "in_progress"`4990 - `strict: optional boolean`

3476 4991 

3477 The status of the message input. One of `in_progress`, `completed`, or4992 - `Custom object { name, type, defer_loading, 2 more }`

3478 `incomplete`. Populated when input items are returned via API.

3479 4993 

3480 - `"completed"`4994 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

3481 4995 

3482 - `"incomplete"`4996 - `name: string`

3483 4997 

3484 - `"failed"`4998 The name of the custom tool, used to identify it in tool calls.

3485 4999 

3486 - `"in_progress"`5000 - `type: "custom"`

3487 5001 

3488 - `type: "computer_call_output"`5002 The type of the custom tool. Always `custom`.

3489 5003 

3490 The type of the computer tool call output. Always `computer_call_output`.5004 - `"custom"`

3491 5005 

3492 - `"computer_call_output"`5006 - `defer_loading: optional boolean`

3493 5007 

3494 - `acknowledged_safety_checks: optional array of object { id, code, message }`5008 Whether this tool should be deferred and discovered via tool search.

3495 5009 

3496 The safety checks reported by the API that have been acknowledged by the5010 - `description: optional string`

3497 developer.

3498 5011 

3499 - `id: string`5012 Optional description of the custom tool, used to provide more context.

3500 5013 

3501 The ID of the pending safety check.5014 - `format: optional CustomToolInputFormat`

3502 5015 

3503 - `code: optional string`5016 The input format for the custom tool. Default is unconstrained text.

3504 5017 

3505 The type of the pending safety check.5018 - `type: "namespace"`

3506 5019 

3507 - `message: optional string`5020 The type of the tool. Always `namespace`.

3508 5021 

3509 Details about the pending safety check.5022 - `"namespace"`

3510 5023 

3511 - `created_by: optional string`5024 - `ToolSearch object { type, description, execution, parameters }`

3512 5025 

3513 The identifier of the actor that created the item.5026 Hosted or BYOT tool search configuration for deferred tools.

3514 5027 

3515 - `Reasoning object { id, summary, type, 3 more }`5028 - `type: "tool_search"`

3516 5029 

3517 A description of the chain of thought used by a reasoning model while generating5030 The type of the tool. Always `tool_search`.

3518 a response. Be sure to include these items in your `input` to the Responses API

3519 for subsequent turns of a conversation if you are manually

3520 [managing context](/docs/guides/conversation-state).

3521 5031 

3522 - `id: string`5032 - `"tool_search"`

3523 5033 

3524 The unique identifier of the reasoning content.5034 - `description: optional string`

3525 5035 

3526 - `summary: array of SummaryTextContent`5036 Description shown to the model for a client-executed tool search tool.

3527 5037 

3528 Reasoning summary content.5038 - `execution: optional "server" or "client"`

3529 5039 

3530 - `text: string`5040 Whether tool search is executed by the server or by the client.

3531 5041 

3532 A summary of the reasoning output from the model so far.5042 - `"server"`

3533 5043 

3534 - `type: "summary_text"`5044 - `"client"`

3535 5045 

3536 The type of the object. Always `summary_text`.5046 - `parameters: optional unknown`

3537 5047 

3538 - `type: "reasoning"`5048 Parameter schema for a client-executed tool search tool.

3539 5049 

3540 The type of the object. Always `reasoning`.5050 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`

3541 5051 

3542 - `"reasoning"`5052 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

3543 5053 

3544 - `content: optional array of object { text, type }`5054 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`

3545 5055 

3546 Reasoning text content.5056 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

3547 5057 

3548 - `text: string`5058 - `"web_search_preview"`

3549 5059 

3550 The reasoning text from the model.5060 - `"web_search_preview_2025_03_11"`

3551 5061 

3552 - `type: "reasoning_text"`5062 - `search_content_types: optional array of "text" or "image"`

3553 5063 

3554 The type of the reasoning text. Always `reasoning_text`.5064 - `"text"`

3555 5065 

3556 - `"reasoning_text"`5066 - `"image"`

3557 5067 

3558 - `encrypted_content: optional string`5068 - `search_context_size: optional "low" or "medium" or "high"`

3559 5069 

3560 The encrypted content of the reasoning item - populated when a response is5070 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.

3561 generated with `reasoning.encrypted_content` in the `include` parameter.

3562 5071 

3563 - `status: optional "in_progress" or "completed" or "incomplete"`5072 - `"low"`

3564 5073 

3565 The status of the item. One of `in_progress`, `completed`, or5074 - `"medium"`

3566 `incomplete`. Populated when items are returned via API.

3567 5075 

3568 - `"in_progress"`5076 - `"high"`

3569 5077 

3570 - `"completed"`5078 - `user_location: optional object { type, city, country, 2 more }`

3571 5079 

3572 - `"incomplete"`5080 The user's location.

3573 5081 

3574 - `ToolSearchCall object { id, arguments, call_id, 4 more }`5082 - `type: "approximate"`

3575 5083 

3576 - `id: string`5084 The type of location approximation. Always `approximate`.

3577 5085 

3578 The unique ID of the tool search call item.5086 - `"approximate"`

3579 5087 

3580 - `arguments: unknown`5088 - `city: optional string`

3581 5089 

3582 Arguments used for the tool search call.5090 Free text input for the city of the user, e.g. `San Francisco`.

3583 5091 

3584 - `call_id: string`5092 - `country: optional string`

3585 5093 

3586 The unique ID of the tool search call generated by the model.5094 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

3587 5095 

3588 - `execution: "server" or "client"`5096 - `region: optional string`

3589 5097 

3590 Whether tool search was executed by the server or by the client.5098 Free text input for the region of the user, e.g. `California`.

3591 5099 

3592 - `"server"`5100 - `timezone: optional string`

3593 5101 

3594 - `"client"`5102 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

3595 5103 

3596 - `status: "in_progress" or "completed" or "incomplete"`5104 - `ApplyPatch object { type }`

3597 5105 

3598 The status of the tool search call item that was recorded.5106 Allows the assistant to create, delete, or update files using unified diffs.

3599 5107 

3600 - `"in_progress"`5108 - `type: "apply_patch"`

3601 5109 

3602 - `"completed"`5110 The type of the tool. Always `apply_patch`.

3603 5111 

3604 - `"incomplete"`5112 - `"apply_patch"`

3605 5113 

3606 - `type: "tool_search_call"`5114 - `type: "tool_search_output"`

3607 5115 

3608 The type of the item. Always `tool_search_call`.5116 The type of the item. Always `tool_search_output`.

3609 5117 

3610 - `"tool_search_call"`5118 - `"tool_search_output"`

3611 5119 

3612 - `created_by: optional string`5120 - `created_by: optional string`

3613 5121 

3614 The identifier of the actor that created the item.5122 The identifier of the actor that created the item.

3615 5123 

3616 - `ToolSearchOutput object { id, call_id, execution, 4 more }`5124 - `AdditionalTools object { id, role, tools, type }`

3617 5125 

3618 - `id: string`5126 - `id: string`

3619 5127 

3620 The unique ID of the tool search output item.5128 The unique ID of the additional tools item.

3621 

3622 - `call_id: string`

3623 5129 

3624 The unique ID of the tool search call generated by the model.5130 - `role: "unknown" or "user" or "assistant" or 5 more`

3625 5131 

3626 - `execution: "server" or "client"`5132 The role that provided the additional tools.

3627 5133 

3628 Whether tool search was executed by the server or by the client.5134 - `"unknown"`

3629 5135 

3630 - `"server"`5136 - `"user"`

3631 5137 

3632 - `"client"`5138 - `"assistant"`

3633 5139 

3634 - `status: "in_progress" or "completed" or "incomplete"`5140 - `"system"`

3635 5141 

3636 The status of the tool search output item that was recorded.5142 - `"critic"`

3637 5143 

3638 - `"in_progress"`5144 - `"discriminator"`

3639 5145 

3640 - `"completed"`5146 - `"developer"`

3641 5147 

3642 - `"incomplete"`5148 - `"tool"`

3643 5149 

3644 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`5150 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

3645 5151 

3646 The loaded tool definitions returned by tool search.5152 The additional tool definitions made available at this item.

3647 5153 

3648 - `Function object { name, parameters, strict, 3 more }`5154 - `Function object { name, parameters, strict, 3 more }`

3649 5155 


4367 5873 

4368 - `"apply_patch"`5874 - `"apply_patch"`

4369 5875 

4370 - `type: "tool_search_output"`5876 - `type: "additional_tools"`

4371 

4372 The type of the item. Always `tool_search_output`.

4373 

4374 - `"tool_search_output"`

4375 5877 

4376 - `created_by: optional string`5878 The type of the item. Always `additional_tools`.

4377 5879 

4378 The identifier of the actor that created the item.5880 - `"additional_tools"`

4379 5881 

4380 - `Compaction object { id, encrypted_content, type, created_by }`5882 - `Compaction object { id, encrypted_content, type, created_by }`

4381 5883 


6087 - `prompt_cache_retention: optional "in_memory" or "24h"`7589 - `prompt_cache_retention: optional "in_memory" or "24h"`

6088 7590 

6089 The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention).7591 The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention).

7592 For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

7593 

7594 For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

7595 

7596 - Organizations without ZDR enabled default to `24h`.

7597 - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

6090 7598 

6091 - `"in_memory"`7599 - `"in_memory"`

6092 7600 

Details

202 202 

203 - `string`203 - `string`

204 204 

205- `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 26 more`205- `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 27 more`

206 206 

207 Text, image, or file inputs to the model, used to generate a response207 Text, image, or file inputs to the model, used to generate a response

208 208 


210 210 

211 A text input to the model, equivalent to a text input with the `user` role.211 A text input to the model, equivalent to a text input with the `user` role.

212 212 

213 - `array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 26 more`213 - `array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 27 more`

214 214 

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

216 216 


992 992 

993 The unique ID of the web search tool call.993 The unique ID of the web search tool call.

994 994 

995 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`995 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`

996 996 

997 An object describing the specific action taken in this web search call.997 An object describing the specific action taken in this web search call.

998 Includes details on how the model used the web (search, open_page, find_in_page).998 Includes details on how the model used the web (search, open_page, find_in_page).

999 999 

1000 - `Search object { query, type, queries, sources }`1000 - `Search object { type, queries, query, sources }`

1001 1001 

1002 Action type "search" - Performs a web search query.1002 Action type "search" - Performs a web search query.

1003 1003 

1004 - `query: string`

1005 

1006 [DEPRECATED] The search query.

1007 

1008 - `type: "search"`1004 - `type: "search"`

1009 1005 

1010 The action type.1006 The action type.


1015 1011 

1016 The search queries.1012 The search queries.

1017 1013 

1014 - `query: optional string`

1015 

1016 The search query.

1017 

1018 - `sources: optional array of object { type, url }`1018 - `sources: optional array of object { type, url }`

1019 1019 

1020 The sources used in the search.1020 The sources used in the search.


2286 2286 

2287 - `"incomplete"`2287 - `"incomplete"`

2288 2288 

2289 - `Reasoning object { id, summary, type, 3 more }`2289 - `AdditionalTools object { role, tools, type, id }`

2290 

2291 A description of the chain of thought used by a reasoning model while generating

2292 a response. Be sure to include these items in your `input` to the Responses API

2293 for subsequent turns of a conversation if you are manually

2294 [managing context](/docs/guides/conversation-state).

2295 2290 

2296 - `id: string`2291 - `role: "developer"`

2297 2292 

2298 The unique identifier of the reasoning content.2293 The role that provided the additional tools. Only `developer` is supported.

2299 2294 

2300 - `summary: array of SummaryTextContent`2295 - `"developer"`

2301 2296 

2302 Reasoning summary content.2297 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

2303 2298 

2304 - `text: string`2299 A list of additional tools made available at this item.

2305 2300 

2306 A summary of the reasoning output from the model so far.2301 - `Function object { name, parameters, strict, 3 more }`

2307 2302 

2308 - `type: "summary_text"`2303 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

2309 2304 

2310 The type of the object. Always `summary_text`.2305 - `name: string`

2311 2306 

2312 - `"summary_text"`2307 The name of the function to call.

2313 2308 

2314 - `type: "reasoning"`2309 - `parameters: map[unknown]`

2315 2310 

2316 The type of the object. Always `reasoning`.2311 A JSON schema object describing the parameters of the function.

2317 2312 

2318 - `"reasoning"`2313 - `strict: boolean`

2319 2314 

2320 - `content: optional array of object { text, type }`2315 Whether to enforce strict parameter validation. Default `true`.

2321 2316 

2322 Reasoning text content.2317 - `type: "function"`

2323 2318 

2324 - `text: string`2319 The type of the function tool. Always `function`.

2325 2320 

2326 The reasoning text from the model.2321 - `"function"`

2327 2322 

2328 - `type: "reasoning_text"`2323 - `defer_loading: optional boolean`

2329 2324 

2330 The type of the reasoning text. Always `reasoning_text`.2325 Whether this function is deferred and loaded via tool search.

2331 2326 

2332 - `"reasoning_text"`2327 - `description: optional string`

2333 2328 

2334 - `encrypted_content: optional string`2329 A description of the function. Used by the model to determine whether or not to call the function.

2335 2330 

2336 The encrypted content of the reasoning item - populated when a response is2331 - `FileSearch object { type, vector_store_ids, filters, 2 more }`

2337 generated with `reasoning.encrypted_content` in the `include` parameter.

2338 2332 

2339 - `status: optional "in_progress" or "completed" or "incomplete"`2333 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

2340 2334 

2341 The status of the item. One of `in_progress`, `completed`, or2335 - `type: "file_search"`

2342 `incomplete`. Populated when items are returned via API.

2343 2336 

2344 - `"in_progress"`2337 The type of the file search tool. Always `file_search`.

2345 2338 

2346 - `"completed"`2339 - `"file_search"`

2347 2340 

2348 - `"incomplete"`2341 - `vector_store_ids: array of string`

2349 2342 

2350 - `Compaction object { encrypted_content, type, id }`2343 The IDs of the vector stores to search.

2351 2344 

2352 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).2345 - `filters: optional ComparisonFilter or CompoundFilter`

2353 2346 

2354 - `encrypted_content: string`2347 A filter to apply.

2355 2348 

2356 The encrypted content of the compaction summary.2349 - `ComparisonFilter object { key, type, value }`

2357 2350 

2358 - `type: "compaction"`2351 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

2359 2352 

2360 The type of the item. Always `compaction`.2353 - `CompoundFilter object { filters, type }`

2361 2354 

2362 - `"compaction"`2355 Combine multiple filters using `and` or `or`.

2363 2356 

2364 - `id: optional string`2357 - `max_num_results: optional number`

2365 2358 

2366 The ID of the compaction item.2359 The maximum number of results to return. This number should be between 1 and 50 inclusive.

2367 2360 

2368 - `ImageGenerationCall object { id, result, status, type }`2361 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`

2369 2362 

2370 An image generation request made by the model.2363 Ranking options for search.

2371 2364 

2372 - `id: string`2365 - `hybrid_search: optional object { embedding_weight, text_weight }`

2373 2366 

2374 The unique ID of the image generation call.2367 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

2375 2368 

2376 - `result: string`2369 - `embedding_weight: number`

2377 2370 

2378 The generated image encoded in base64.2371 The weight of the embedding in the reciprocal ranking fusion.

2379 2372 

2380 - `status: "in_progress" or "completed" or "generating" or "failed"`2373 - `text_weight: number`

2381 2374 

2382 The status of the image generation call.2375 The weight of the text in the reciprocal ranking fusion.

2383 2376 

2384 - `"in_progress"`2377 - `ranker: optional "auto" or "default-2024-11-15"`

2385 2378 

2386 - `"completed"`2379 The ranker to use for the file search.

2387 2380 

2388 - `"generating"`2381 - `"auto"`

2389 2382 

2390 - `"failed"`2383 - `"default-2024-11-15"`

2391 2384 

2392 - `type: "image_generation_call"`2385 - `score_threshold: optional number`

2393 2386 

2394 The type of the image generation call. Always `image_generation_call`.2387 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.

2395 2388 

2396 - `"image_generation_call"`2389 - `Computer object { type }`

2397 2390 

2398 - `CodeInterpreterCall object { id, code, container_id, 3 more }`2391 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2399 2392 

2400 A tool call to run code.2393 - `type: "computer"`

2401 2394 

2402 - `id: string`2395 The type of the computer tool. Always `computer`.

2403 2396 

2404 The unique ID of the code interpreter tool call.2397 - `"computer"`

2405 2398 

2406 - `code: string`2399 - `ComputerUsePreview object { display_height, display_width, environment, type }`

2407 2400 

2408 The code to run, or null if not available.2401 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2409 2402 

2410 - `container_id: string`2403 - `display_height: number`

2411 2404 

2412 The ID of the container used to run the code.2405 The height of the computer display.

2413 2406 

2414 - `outputs: array of object { logs, type } or object { type, url }`2407 - `display_width: number`

2415 2408 

2416 The outputs generated by the code interpreter, such as logs or images.2409 The width of the computer display.

2417 Can be null if no outputs are available.

2418 2410 

2419 - `Logs object { logs, type }`2411 - `environment: "windows" or "mac" or "linux" or 2 more`

2420 2412 

2421 The logs output from the code interpreter.2413 The type of computer environment to control.

2422 2414 

2423 - `logs: string`2415 - `"windows"`

2424 2416 

2425 The logs output from the code interpreter.2417 - `"mac"`

2426 2418 

2427 - `type: "logs"`2419 - `"linux"`

2428 2420 

2429 The type of the output. Always `logs`.2421 - `"ubuntu"`

2430 2422 

2431 - `"logs"`2423 - `"browser"`

2432 2424 

2433 - `Image object { type, url }`2425 - `type: "computer_use_preview"`

2434 2426 

2435 The image output from the code interpreter.2427 The type of the computer use tool. Always `computer_use_preview`.

2436 2428 

2437 - `type: "image"`2429 - `"computer_use_preview"`

2438 2430 

2439 The type of the output. Always `image`.2431 - `WebSearch object { type, filters, search_context_size, user_location }`

2440 2432 

2441 - `"image"`2433 Search the Internet for sources related to the prompt. Learn more about the

2434 [web search tool](/docs/guides/tools-web-search).

2442 2435 

2443 - `url: string`2436 - `type: "web_search" or "web_search_2025_08_26"`

2444 2437 

2445 The URL of the image output from the code interpreter.2438 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

2446 2439 

2447 - `status: "in_progress" or "completed" or "incomplete" or 2 more`2440 - `"web_search"`

2448 2441 

2449 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.2442 - `"web_search_2025_08_26"`

2450 2443 

2451 - `"in_progress"`2444 - `filters: optional object { allowed_domains }`

2452 2445 

2453 - `"completed"`2446 Filters for the search.

2454 2447 

2455 - `"incomplete"`2448 - `allowed_domains: optional array of string`

2456 2449 

2457 - `"interpreting"`2450 Allowed domains for the search. If not provided, all domains are allowed.

2451 Subdomains of the provided domains are allowed as well.

2458 2452 

2459 - `"failed"`2453 Example: `["pubmed.ncbi.nlm.nih.gov"]`

2460 2454 

2461 - `type: "code_interpreter_call"`2455 - `search_context_size: optional "low" or "medium" or "high"`

2462 2456 

2463 The type of the code interpreter tool call. Always `code_interpreter_call`.2457 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.

2464 2458 

2465 - `"code_interpreter_call"`2459 - `"low"`

2466 2460 

2467 - `LocalShellCall object { id, action, call_id, 2 more }`2461 - `"medium"`

2468 2462 

2469 A tool call to run a command on the local shell.2463 - `"high"`

2470 2464 

2471 - `id: string`2465 - `user_location: optional object { city, country, region, 2 more }`

2472 2466 

2473 The unique ID of the local shell call.2467 The approximate location of the user.

2474 2468 

2475 - `action: object { command, env, type, 3 more }`2469 - `city: optional string`

2476 2470 

2477 Execute a shell command on the server.2471 Free text input for the city of the user, e.g. `San Francisco`.

2478 2472 

2479 - `command: array of string`2473 - `country: optional string`

2480 2474 

2481 The command to run.2475 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2482 2476 

2483 - `env: map[string]`2477 - `region: optional string`

2484 2478 

2485 Environment variables to set for the command.2479 Free text input for the region of the user, e.g. `California`.

2486 2480 

2487 - `type: "exec"`2481 - `timezone: optional string`

2488 2482 

2489 The type of the local shell action. Always `exec`.2483 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2490 2484 

2491 - `"exec"`2485 - `type: optional "approximate"`

2492 2486 

2493 - `timeout_ms: optional number`2487 The type of location approximation. Always `approximate`.

2494 2488 

2495 Optional timeout in milliseconds for the command.2489 - `"approximate"`

2496 2490 

2497 - `user: optional string`2491 - `Mcp object { server_label, type, allowed_tools, 7 more }`

2498 2492 

2499 Optional user to run the command as.2493 Give the model access to additional tools via remote Model Context Protocol

2494 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

2500 2495 

2501 - `working_directory: optional string`2496 - `server_label: string`

2502 2497 

2503 Optional working directory to run the command in.2498 A label for this MCP server, used to identify it in tool calls.

2504 2499 

2505 - `call_id: string`2500 - `type: "mcp"`

2506 2501 

2507 The unique ID of the local shell tool call generated by the model.2502 The type of the MCP tool. Always `mcp`.

2508 2503 

2509 - `status: "in_progress" or "completed" or "incomplete"`2504 - `"mcp"`

2510 2505 

2511 The status of the local shell call.2506 - `allowed_tools: optional array of string or object { read_only, tool_names }`

2512 2507 

2513 - `"in_progress"`2508 List of allowed tool names or a filter object.

2514 2509 

2515 - `"completed"`2510 - `McpAllowedTools = array of string`

2516 2511 

2517 - `"incomplete"`2512 A string array of allowed tool names

2518 2513 

2519 - `type: "local_shell_call"`2514 - `McpToolFilter object { read_only, tool_names }`

2520 2515 

2521 The type of the local shell call. Always `local_shell_call`.2516 A filter object to specify which tools are allowed.

2522 2517 

2523 - `"local_shell_call"`2518 - `read_only: optional boolean`

2524 2519 

2525 - `LocalShellCallOutput object { id, output, type, status }`2520 Indicates whether or not a tool modifies data or is read-only. If an

2521 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2522 it will match this filter.

2526 2523 

2527 The output of a local shell tool call.2524 - `tool_names: optional array of string`

2528 2525 

2529 - `id: string`2526 List of allowed tool names.

2530 2527 

2531 The unique ID of the local shell tool call generated by the model.2528 - `authorization: optional string`

2532 2529 

2533 - `output: string`2530 An OAuth access token that can be used with a remote MCP server, either

2531 with a custom MCP server URL or a service connector. Your application

2532 must handle the OAuth authorization flow and provide the token here.

2534 2533 

2535 A JSON string of the output of the local shell tool call.2534 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`

2536 2535 

2537 - `type: "local_shell_call_output"`2536 Identifier for service connectors, like those available in ChatGPT. One of

2537 `server_url` or `connector_id` must be provided. Learn more about service

2538 connectors [here](/docs/guides/tools-remote-mcp#connectors).

2538 2539 

2539 The type of the local shell tool call output. Always `local_shell_call_output`.2540 Currently supported `connector_id` values are:

2540 2541 

2541 - `"local_shell_call_output"`2542 - Dropbox: `connector_dropbox`

2543 - Gmail: `connector_gmail`

2544 - Google Calendar: `connector_googlecalendar`

2545 - Google Drive: `connector_googledrive`

2546 - Microsoft Teams: `connector_microsoftteams`

2547 - Outlook Calendar: `connector_outlookcalendar`

2548 - Outlook Email: `connector_outlookemail`

2549 - SharePoint: `connector_sharepoint`

2542 2550 

2543 - `status: optional "in_progress" or "completed" or "incomplete"`2551 - `"connector_dropbox"`

2544 2552 

2545 The status of the item. One of `in_progress`, `completed`, or `incomplete`.2553 - `"connector_gmail"`

2546 2554 

2547 - `"in_progress"`2555 - `"connector_googlecalendar"`

2548 2556 

2549 - `"completed"`2557 - `"connector_googledrive"`

2550 2558 

2551 - `"incomplete"`2559 - `"connector_microsoftteams"`

2552 2560 

2553 - `ShellCall object { action, call_id, type, 3 more }`2561 - `"connector_outlookcalendar"`

2554 2562 

2555 A tool representing a request to execute one or more shell commands.2563 - `"connector_outlookemail"`

2556 2564 

2557 - `action: object { commands, max_output_length, timeout_ms }`2565 - `"connector_sharepoint"`

2558 2566 

2559 The shell commands and limits that describe how to run the tool call.2567 - `defer_loading: optional boolean`

2560 2568 

2561 - `commands: array of string`2569 Whether this MCP tool is deferred and discovered via tool search.

2562 2570 

2563 Ordered shell commands for the execution environment to run.2571 - `headers: optional map[string]`

2564 2572 

2565 - `max_output_length: optional number`2573 Optional HTTP headers to send to the MCP server. Use for authentication

2574 or other purposes.

2566 2575 

2567 Maximum number of UTF-8 characters to capture from combined stdout and stderr output.2576 - `require_approval: optional object { always, never } or "always" or "never"`

2568 2577 

2569 - `timeout_ms: optional number`2578 Specify which of the MCP server's tools require approval.

2570 2579 

2571 Maximum wall-clock time in milliseconds to allow the shell commands to run.2580 - `McpToolApprovalFilter object { always, never }`

2572 2581 

2573 - `call_id: string`2582 Specify which of the MCP server's tools require approval. Can be

2583 `always`, `never`, or a filter object associated with tools

2584 that require approval.

2574 2585 

2575 The unique ID of the shell tool call generated by the model.2586 - `always: optional object { read_only, tool_names }`

2576 2587 

2577 - `type: "shell_call"`2588 A filter object to specify which tools are allowed.

2578 2589 

2579 The type of the item. Always `shell_call`.2590 - `read_only: optional boolean`

2580 2591 

2581 - `"shell_call"`2592 Indicates whether or not a tool modifies data or is read-only. If an

2593 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2594 it will match this filter.

2582 2595 

2583 - `id: optional string`2596 - `tool_names: optional array of string`

2584 2597 

2585 The unique ID of the shell tool call. Populated when this item is returned via API.2598 List of allowed tool names.

2586 2599 

2587 - `environment: optional LocalEnvironment or ContainerReference`2600 - `never: optional object { read_only, tool_names }`

2588 2601 

2589 The environment to execute the shell commands in.2602 A filter object to specify which tools are allowed.

2590 2603 

2591 - `LocalEnvironment object { type, skills }`2604 - `read_only: optional boolean`

2592 2605 

2593 - `ContainerReference object { container_id, type }`2606 Indicates whether or not a tool modifies data or is read-only. If an

2607 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2608 it will match this filter.

2594 2609 

2595 - `status: optional "in_progress" or "completed" or "incomplete"`2610 - `tool_names: optional array of string`

2596 2611 

2597 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.2612 List of allowed tool names.

2598 2613 

2599 - `"in_progress"`2614 - `McpToolApprovalSetting = "always" or "never"`

2600 2615 

2601 - `"completed"`2616 Specify a single approval policy for all tools. One of `always` or

2617 `never`. When set to `always`, all tools will require approval. When

2618 set to `never`, all tools will not require approval.

2602 2619 

2603 - `"incomplete"`2620 - `"always"`

2604 2621 

2605 - `ShellCallOutput object { call_id, output, type, 3 more }`2622 - `"never"`

2606 2623 

2607 The streamed output items emitted by a shell tool call.2624 - `server_description: optional string`

2608 2625 

2609 - `call_id: string`2626 Optional description of the MCP server, used to provide more context.

2610 2627 

2611 The unique ID of the shell tool call generated by the model.2628 - `server_url: optional string`

2612 2629 

2613 - `output: array of ResponseFunctionShellCallOutputContent`2630 The URL for the MCP server. One of `server_url` or `connector_id` must be

2631 provided.

2614 2632 

2615 Captured chunks of stdout and stderr output, along with their associated outcomes.2633 - `CodeInterpreter object { container, type }`

2616 2634 

2617 - `outcome: object { type } or object { exit_code, type }`2635 A tool that runs Python code to help generate a response to a prompt.

2618 2636 

2619 The exit or timeout outcome associated with this shell call.2637 - `container: string or object { type, file_ids, memory_limit, network_policy }`

2620 2638 

2621 - `Timeout object { type }`2639 The code interpreter container. Can be a container ID or an object that

2640 specifies uploaded file IDs to make available to your code, along with an

2641 optional `memory_limit` setting.

2622 2642 

2623 Indicates that the shell call exceeded its configured time limit.2643 - `string`

2624 2644 

2625 - `type: "timeout"`2645 The container ID.

2626 2646 

2627 The outcome type. Always `timeout`.2647 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`

2628 2648 

2629 - `"timeout"`2649 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

2630 2650 

2631 - `Exit object { exit_code, type }`2651 - `type: "auto"`

2632 2652 

2633 Indicates that the shell commands finished and returned an exit code.2653 Always `auto`.

2634 2654 

2635 - `exit_code: number`2655 - `"auto"`

2636 2656 

2637 The exit code returned by the shell process.2657 - `file_ids: optional array of string`

2638 2658 

2639 - `type: "exit"`2659 An optional list of uploaded files to make available to your code.

2640 2660 

2641 The outcome type. Always `exit`.2661 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

2642 2662 

2643 - `"exit"`2663 The memory limit for the code interpreter container.

2644 2664 

2645 - `stderr: string`2665 - `"1g"`

2646 2666 

2647 Captured stderr output for the shell call.2667 - `"4g"`

2648 2668 

2649 - `stdout: string`2669 - `"16g"`

2650 2670 

2651 Captured stdout output for the shell call.2671 - `"64g"`

2652 2672 

2653 - `type: "shell_call_output"`2673 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

2654 2674 

2655 The type of the item. Always `shell_call_output`.2675 Network access policy for the container.

2656 2676 

2657 - `"shell_call_output"`2677 - `ContainerNetworkPolicyDisabled object { type }`

2658 2678 

2659 - `id: optional string`2679 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

2660 2680 

2661 The unique ID of the shell tool call output. Populated when this item is returned via API.2681 - `type: "code_interpreter"`

2662 2682 

2663 - `max_output_length: optional number`2683 The type of the code interpreter tool. Always `code_interpreter`.

2664 2684 

2665 The maximum number of UTF-8 characters captured for this shell call's combined output.2685 - `"code_interpreter"`

2666 2686 

2667 - `status: optional "in_progress" or "completed" or "incomplete"`2687 - `ImageGeneration object { type, action, background, 9 more }`

2668 2688 

2669 The status of the shell call output.2689 A tool that generates images using the GPT image models.

2670 2690 

2671 - `"in_progress"`2691 - `type: "image_generation"`

2672 2692 

2673 - `"completed"`2693 The type of the image generation tool. Always `image_generation`.

2674 2694 

2675 - `"incomplete"`2695 - `"image_generation"`

2676 2696 

2677 - `ApplyPatchCall object { call_id, operation, status, 2 more }`2697 - `action: optional "generate" or "edit" or "auto"`

2678 2698 

2679 A tool call representing a request to create, delete, or update files using diff patches.2699 Whether to generate a new image or edit an existing image. Default: `auto`.

2680 2700 

2681 - `call_id: string`2701 - `"generate"`

2682 2702 

2683 The unique ID of the apply patch tool call generated by the model.2703 - `"edit"`

2684 2704 

2685 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`2705 - `"auto"`

2686 2706 

2687 The specific create, delete, or update instruction for the apply_patch tool call.2707 - `background: optional "transparent" or "opaque" or "auto"`

2688 2708 

2689 - `CreateFile object { diff, path, type }`2709 Background type for the generated image. One of `transparent`,

2710 `opaque`, or `auto`. Default: `auto`.

2690 2711 

2691 Instruction for creating a new file via the apply_patch tool.2712 - `"transparent"`

2692 2713 

2693 - `diff: string`2714 - `"opaque"`

2694 2715 

2695 Unified diff content to apply when creating the file.2716 - `"auto"`

2696 2717 

2697 - `path: string`2718 - `input_fidelity: optional "high" or "low"`

2698 2719 

2699 Path of the file to create relative to the workspace root.2720 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`.

2700 2721 

2701 - `type: "create_file"`2722 - `"high"`

2702 2723 

2703 The operation type. Always `create_file`.2724 - `"low"`

2704 2725 

2705 - `"create_file"`2726 - `input_image_mask: optional object { file_id, image_url }`

2706 2727 

2707 - `DeleteFile object { path, type }`2728 Optional mask for inpainting. Contains `image_url`

2729 (string, optional) and `file_id` (string, optional).

2708 2730 

2709 Instruction for deleting an existing file via the apply_patch tool.2731 - `file_id: optional string`

2710 2732 

2711 - `path: string`2733 File ID for the mask image.

2712 2734 

2713 Path of the file to delete relative to the workspace root.2735 - `image_url: optional string`

2714 2736 

2715 - `type: "delete_file"`2737 Base64-encoded mask image.

2716 2738 

2717 The operation type. Always `delete_file`.2739 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2718 2740 

2719 - `"delete_file"`2741 The image generation model to use. Default: `gpt-image-1`.

2720 2742 

2721 - `UpdateFile object { diff, path, type }`2743 - `string`

2722 2744 

2723 Instruction for updating an existing file via the apply_patch tool.2745 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2724 2746 

2725 - `diff: string`2747 The image generation model to use. Default: `gpt-image-1`.

2726 2748 

2727 Unified diff content to apply to the existing file.2749 - `"gpt-image-1"`

2728 2750 

2729 - `path: string`2751 - `"gpt-image-1-mini"`

2730 2752 

2731 Path of the file to update relative to the workspace root.2753 - `"gpt-image-1.5"`

2732 2754 

2733 - `type: "update_file"`2755 - `moderation: optional "auto" or "low"`

2734 2756 

2735 The operation type. Always `update_file`.2757 Moderation level for the generated image. Default: `auto`.

2736 2758 

2737 - `"update_file"`2759 - `"auto"`

2738 2760 

2739 - `status: "in_progress" or "completed"`2761 - `"low"`

2740 2762 

2741 The status of the apply patch tool call. One of `in_progress` or `completed`.2763 - `output_compression: optional number`

2742 2764 

2743 - `"in_progress"`2765 Compression level for the output image. Default: 100.

2744 2766 

2745 - `"completed"`2767 - `output_format: optional "png" or "webp" or "jpeg"`

2746 2768 

2747 - `type: "apply_patch_call"`2769 The output format of the generated image. One of `png`, `webp`, or

2770 `jpeg`. Default: `png`.

2748 2771 

2749 The type of the item. Always `apply_patch_call`.2772 - `"png"`

2750 2773 

2751 - `"apply_patch_call"`2774 - `"webp"`

2752 2775 

2753 - `id: optional string`2776 - `"jpeg"`

2754 2777 

2755 The unique ID of the apply patch tool call. Populated when this item is returned via API.2778 - `partial_images: optional number`

2756 2779 

2757 - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`2780 Number of partial images to generate in streaming mode, from 0 (default value) to 3.

2758 2781 

2759 The streamed output emitted by an apply patch tool call.2782 - `quality: optional "low" or "medium" or "high" or "auto"`

2760 2783 

2761 - `call_id: string`2784 The quality of the generated image. One of `low`, `medium`, `high`,

2785 or `auto`. Default: `auto`.

2762 2786 

2763 The unique ID of the apply patch tool call generated by the model.2787 - `"low"`

2764 2788 

2765 - `status: "completed" or "failed"`2789 - `"medium"`

2766 2790 

2767 The status of the apply patch tool call output. One of `completed` or `failed`.2791 - `"high"`

2768 2792 

2769 - `"completed"`2793 - `"auto"`

2770 2794 

2771 - `"failed"`2795 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2772 2796 

2773 - `type: "apply_patch_call_output"`2797 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2774 2798 

2775 The type of the item. Always `apply_patch_call_output`.2799 - `string`

2776 2800 

2777 - `"apply_patch_call_output"`2801 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2778 2802 

2779 - `id: optional string`2803 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2780 2804 

2781 The unique ID of the apply patch tool call output. Populated when this item is returned via API.2805 - `"1024x1024"`

2782 2806 

2783 - `output: optional string`2807 - `"1024x1536"`

2784 2808 

2785 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).2809 - `"1536x1024"`

2786 2810 

2787 - `McpListTools object { id, server_label, tools, 2 more }`2811 - `"auto"`

2788 2812 

2789 A list of tools available on an MCP server.2813 - `LocalShell object { type }`

2790 2814 

2791 - `id: string`2815 A tool that allows the model to execute shell commands in a local environment.

2792 2816 

2793 The unique ID of the list.2817 - `type: "local_shell"`

2794 2818 

2795 - `server_label: string`2819 The type of the local shell tool. Always `local_shell`.

2796 2820 

2797 The label of the MCP server.2821 - `"local_shell"`

2798 2822 

2799 - `tools: array of object { input_schema, name, annotations, description }`2823 - `Shell object { type, environment }`

2800 2824 

2801 The tools available on the server.2825 A tool that allows the model to execute shell commands.

2802 2826 

2803 - `input_schema: unknown`2827 - `type: "shell"`

2804 2828 

2805 The JSON schema describing the tool's input.2829 The type of the shell tool. Always `shell`.

2806 2830 

2807 - `name: string`2831 - `"shell"`

2808 2832 

2809 The name of the tool.2833 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`

2810 2834 

2811 - `annotations: optional unknown`2835 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

2812 2836 

2813 Additional annotations about the tool.2837 - `LocalEnvironment object { type, skills }`

2814 2838 

2815 - `description: optional string`2839 - `ContainerReference object { container_id, type }`

2816 2840 

2817 The description of the tool.2841 - `Custom object { name, type, defer_loading, 2 more }`

2818 2842 

2819 - `type: "mcp_list_tools"`2843 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2820 2844 

2821 The type of the item. Always `mcp_list_tools`.2845 - `name: string`

2822 2846 

2823 - `"mcp_list_tools"`2847 The name of the custom tool, used to identify it in tool calls.

2824 2848 

2825 - `error: optional string`2849 - `type: "custom"`

2826 2850 

2827 Error message if the server could not list tools.2851 The type of the custom tool. Always `custom`.

2828 2852 

2829 - `McpApprovalRequest object { id, arguments, name, 2 more }`2853 - `"custom"`

2830 2854 

2831 A request for human approval of a tool invocation.2855 - `defer_loading: optional boolean`

2832 2856 

2833 - `id: string`2857 Whether this tool should be deferred and discovered via tool search.

2834 2858 

2835 The unique ID of the approval request.2859 - `description: optional string`

2836 2860 

2837 - `arguments: string`2861 Optional description of the custom tool, used to provide more context.

2838 2862 

2839 A JSON string of arguments for the tool.2863 - `format: optional CustomToolInputFormat`

2840 2864 

2841 - `name: string`2865 The input format for the custom tool. Default is unconstrained text.

2842 2866 

2843 The name of the tool to run.2867 - `Namespace object { description, name, tools, type }`

2844 2868 

2845 - `server_label: string`2869 Groups function/custom tools under a shared namespace.

2846 2870 

2847 The label of the MCP server making the request.2871 - `description: string`

2848 2872 

2849 - `type: "mcp_approval_request"`2873 A description of the namespace shown to the model.

2850 2874 

2851 The type of the item. Always `mcp_approval_request`.2875 - `name: string`

2852 2876 

2853 - `"mcp_approval_request"`2877 The namespace name used in tool calls (for example, `crm`).

2854 2878 

2855 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`2879 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`

2856 2880 

2857 A response to an MCP approval request.2881 The function/custom tools available inside this namespace.

2858 2882 

2859 - `approval_request_id: string`2883 - `Function object { name, type, defer_loading, 3 more }`

2860 2884 

2861 The ID of the approval request being answered.2885 - `name: string`

2862 2886 

2863 - `approve: boolean`2887 - `type: "function"`

2864 2888 

2865 Whether the request was approved.2889 - `"function"`

2866 2890 

2867 - `type: "mcp_approval_response"`2891 - `defer_loading: optional boolean`

2868 2892 

2869 The type of the item. Always `mcp_approval_response`.2893 Whether this function should be deferred and discovered via tool search.

2870 2894 

2871 - `"mcp_approval_response"`2895 - `description: optional string`

2872 2896 

2873 - `id: optional string`2897 - `parameters: optional unknown`

2874 2898 

2875 The unique ID of the approval response2899 - `strict: optional boolean`

2876 2900 

2877 - `reason: optional string`2901 - `Custom object { name, type, defer_loading, 2 more }`

2878 2902 

2879 Optional reason for the decision.2903 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2880 2904 

2881 - `McpCall object { id, arguments, name, 6 more }`2905 - `name: string`

2882 2906 

2883 An invocation of a tool on an MCP server.2907 The name of the custom tool, used to identify it in tool calls.

2884 2908 

2885 - `id: string`2909 - `type: "custom"`

2886 2910 

2887 The unique ID of the tool call.2911 The type of the custom tool. Always `custom`.

2888 2912 

2889 - `arguments: string`2913 - `"custom"`

2890 2914 

2891 A JSON string of the arguments passed to the tool.2915 - `defer_loading: optional boolean`

2892 2916 

2893 - `name: string`2917 Whether this tool should be deferred and discovered via tool search.

2894 2918 

2895 The name of the tool that was run.2919 - `description: optional string`

2896 2920 

2897 - `server_label: string`2921 Optional description of the custom tool, used to provide more context.

2898 2922 

2899 The label of the MCP server running the tool.2923 - `format: optional CustomToolInputFormat`

2900 2924 

2901 - `type: "mcp_call"`2925 The input format for the custom tool. Default is unconstrained text.

2902 2926 

2903 The type of the item. Always `mcp_call`.2927 - `type: "namespace"`

2904 2928 

2905 - `"mcp_call"`2929 The type of the tool. Always `namespace`.

2906 2930 

2907 - `approval_request_id: optional string`2931 - `"namespace"`

2908 2932 

2909 Unique identifier for the MCP tool call approval request.2933 - `ToolSearch object { type, description, execution, parameters }`

2910 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

2911 2934 

2912 - `error: optional string`2935 Hosted or BYOT tool search configuration for deferred tools.

2913 2936 

2914 The error from the tool call, if any.2937 - `type: "tool_search"`

2915 2938 

2916 - `output: optional string`2939 The type of the tool. Always `tool_search`.

2917 2940 

2918 The output from the tool call.2941 - `"tool_search"`

2919 2942 

2920 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`2943 - `description: optional string`

2921 2944 

2922 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.2945 Description shown to the model for a client-executed tool search tool.

2923 2946 

2924 - `"in_progress"`2947 - `execution: optional "server" or "client"`

2925 2948 

2926 - `"completed"`2949 Whether tool search is executed by the server or by the client.

2927 2950 

2928 - `"incomplete"`2951 - `"server"`

2929 2952 

2930 - `"calling"`2953 - `"client"`

2931 2954 

2932 - `"failed"`2955 - `parameters: optional unknown`

2933 2956 

2934 - `CustomToolCallOutput object { call_id, output, type, id }`2957 Parameter schema for a client-executed tool search tool.

2935 2958 

2936 The output of a custom tool call from your code, being sent back to the model.2959 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`

2937 2960 

2938 - `call_id: string`2961 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

2939 2962 

2940 The call ID, used to map this custom tool call output to a custom tool call.2963 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`

2941 2964 

2942 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`2965 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

2943 2966 

2944 The output from the custom tool call generated by your code.2967 - `"web_search_preview"`

2945 Can be a string or an list of output content.

2946 2968 

2947 - `StringOutput = string`2969 - `"web_search_preview_2025_03_11"`

2948 2970 

2949 A string of the output of the custom tool call.2971 - `search_content_types: optional array of "text" or "image"`

2950 2972 

2951 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`2973 - `"text"`

2952 2974 

2953 Text, image, or file output of the custom tool call.2975 - `"image"`

2954 2976 

2955 - `ResponseInputText object { text, type }`2977 - `search_context_size: optional "low" or "medium" or "high"`

2956 2978 

2957 A text input to the model.2979 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.

2958 2980 

2959 - `ResponseInputImage object { detail, type, file_id, image_url }`2981 - `"low"`

2960 2982 

2961 An image input to the model. Learn about [image inputs](/docs/guides/vision).2983 - `"medium"`

2962 2984 

2963 - `ResponseInputFile object { type, detail, file_data, 3 more }`2985 - `"high"`

2964 2986 

2965 A file input to the model.2987 - `user_location: optional object { type, city, country, 2 more }`

2966 2988 

2967 - `type: "custom_tool_call_output"`2989 The user's location.

2968 2990 

2969 The type of the custom tool call output. Always `custom_tool_call_output`.2991 - `type: "approximate"`

2970 2992 

2971 - `"custom_tool_call_output"`2993 The type of location approximation. Always `approximate`.

2972 2994 

2973 - `id: optional string`2995 - `"approximate"`

2974 2996 

2975 The unique ID of the custom tool call output in the OpenAI platform.2997 - `city: optional string`

2976 2998 

2977 - `CustomToolCall object { call_id, input, name, 3 more }`2999 Free text input for the city of the user, e.g. `San Francisco`.

2978 3000 

2979 A call to a custom tool created by the model.3001 - `country: optional string`

2980 3002 

2981 - `call_id: string`3003 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2982 3004 

2983 An identifier used to map this custom tool call to a tool call output.3005 - `region: optional string`

2984 3006 

2985 - `input: string`3007 Free text input for the region of the user, e.g. `California`.

2986 3008 

2987 The input for the custom tool call generated by the model.3009 - `timezone: optional string`

2988 3010 

2989 - `name: string`3011 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2990 3012 

2991 The name of the custom tool being called.3013 - `ApplyPatch object { type }`

2992 3014 

2993 - `type: "custom_tool_call"`3015 Allows the assistant to create, delete, or update files using unified diffs.

2994 3016 

2995 The type of the custom tool call. Always `custom_tool_call`.3017 - `type: "apply_patch"`

2996 3018 

2997 - `"custom_tool_call"`3019 The type of the tool. Always `apply_patch`.

2998 3020 

2999 - `id: optional string`3021 - `"apply_patch"`

3000 3022 

3001 The unique ID of the custom tool call in the OpenAI platform.3023 - `type: "additional_tools"`

3002 3024 

3003 - `namespace: optional string`3025 The item type. Always `additional_tools`.

3004 3026 

3005 The namespace of the custom tool being called.3027 - `"additional_tools"`

3006 3028 

3007 - `CompactionTrigger object { type }`3029 - `id: optional string`

3008 3030 

3009 Compacts the current context. Must be the final input item.3031 The unique ID of this additional tools item.

3010 3032 

3011 - `type: "compaction_trigger"`3033 - `Reasoning object { id, summary, type, 3 more }`

3012 3034 

3013 The type of the item. Always `compaction_trigger`.3035 A description of the chain of thought used by a reasoning model while generating

3036 a response. Be sure to include these items in your `input` to the Responses API

3037 for subsequent turns of a conversation if you are manually

3038 [managing context](/docs/guides/conversation-state).

3014 3039 

3015 - `"compaction_trigger"`3040 - `id: string`

3016 3041 

3017 - `ItemReference object { id, type }`3042 The unique identifier of the reasoning content.

3018 3043 

3019 An internal identifier for an item to reference.3044 - `summary: array of SummaryTextContent`

3020 3045 

3021 - `id: string`3046 Reasoning summary content.

3022 3047 

3023 The ID of the item to reference.3048 - `text: string`

3024 3049 

3025 - `type: optional "item_reference"`3050 A summary of the reasoning output from the model so far.

3051 

3052 - `type: "summary_text"`

3053 

3054 The type of the object. Always `summary_text`.

3055 

3056 - `"summary_text"`

3057 

3058 - `type: "reasoning"`

3059 

3060 The type of the object. Always `reasoning`.

3061 

3062 - `"reasoning"`

3063 

3064 - `content: optional array of object { text, type }`

3065 

3066 Reasoning text content.

3067 

3068 - `text: string`

3069 

3070 The reasoning text from the model.

3071 

3072 - `type: "reasoning_text"`

3073 

3074 The type of the reasoning text. Always `reasoning_text`.

3075 

3076 - `"reasoning_text"`

3077 

3078 - `encrypted_content: optional string`

3079 

3080 The encrypted content of the reasoning item - populated when a response is

3081 generated with `reasoning.encrypted_content` in the `include` parameter.

3082 

3083 - `status: optional "in_progress" or "completed" or "incomplete"`

3084 

3085 The status of the item. One of `in_progress`, `completed`, or

3086 `incomplete`. Populated when items are returned via API.

3087 

3088 - `"in_progress"`

3089 

3090 - `"completed"`

3091 

3092 - `"incomplete"`

3093 

3094 - `Compaction object { encrypted_content, type, id }`

3095 

3096 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).

3097 

3098 - `encrypted_content: string`

3099 

3100 The encrypted content of the compaction summary.

3101 

3102 - `type: "compaction"`

3103 

3104 The type of the item. Always `compaction`.

3105 

3106 - `"compaction"`

3107 

3108 - `id: optional string`

3109 

3110 The ID of the compaction item.

3111 

3112 - `ImageGenerationCall object { id, result, status, type }`

3113 

3114 An image generation request made by the model.

3115 

3116 - `id: string`

3117 

3118 The unique ID of the image generation call.

3119 

3120 - `result: string`

3121 

3122 The generated image encoded in base64.

3123 

3124 - `status: "in_progress" or "completed" or "generating" or "failed"`

3125 

3126 The status of the image generation call.

3127 

3128 - `"in_progress"`

3129 

3130 - `"completed"`

3131 

3132 - `"generating"`

3133 

3134 - `"failed"`

3135 

3136 - `type: "image_generation_call"`

3137 

3138 The type of the image generation call. Always `image_generation_call`.

3139 

3140 - `"image_generation_call"`

3141 

3142 - `CodeInterpreterCall object { id, code, container_id, 3 more }`

3143 

3144 A tool call to run code.

3145 

3146 - `id: string`

3147 

3148 The unique ID of the code interpreter tool call.

3149 

3150 - `code: string`

3151 

3152 The code to run, or null if not available.

3153 

3154 - `container_id: string`

3155 

3156 The ID of the container used to run the code.

3157 

3158 - `outputs: array of object { logs, type } or object { type, url }`

3159 

3160 The outputs generated by the code interpreter, such as logs or images.

3161 Can be null if no outputs are available.

3162 

3163 - `Logs object { logs, type }`

3164 

3165 The logs output from the code interpreter.

3166 

3167 - `logs: string`

3168 

3169 The logs output from the code interpreter.

3170 

3171 - `type: "logs"`

3172 

3173 The type of the output. Always `logs`.

3174 

3175 - `"logs"`

3176 

3177 - `Image object { type, url }`

3178 

3179 The image output from the code interpreter.

3180 

3181 - `type: "image"`

3182 

3183 The type of the output. Always `image`.

3184 

3185 - `"image"`

3186 

3187 - `url: string`

3188 

3189 The URL of the image output from the code interpreter.

3190 

3191 - `status: "in_progress" or "completed" or "incomplete" or 2 more`

3192 

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

3194 

3195 - `"in_progress"`

3196 

3197 - `"completed"`

3198 

3199 - `"incomplete"`

3200 

3201 - `"interpreting"`

3202 

3203 - `"failed"`

3204 

3205 - `type: "code_interpreter_call"`

3206 

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

3208 

3209 - `"code_interpreter_call"`

3210 

3211 - `LocalShellCall object { id, action, call_id, 2 more }`

3212 

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

3214 

3215 - `id: string`

3216 

3217 The unique ID of the local shell call.

3218 

3219 - `action: object { command, env, type, 3 more }`

3220 

3221 Execute a shell command on the server.

3222 

3223 - `command: array of string`

3224 

3225 The command to run.

3226 

3227 - `env: map[string]`

3228 

3229 Environment variables to set for the command.

3230 

3231 - `type: "exec"`

3232 

3233 The type of the local shell action. Always `exec`.

3234 

3235 - `"exec"`

3236 

3237 - `timeout_ms: optional number`

3238 

3239 Optional timeout in milliseconds for the command.

3240 

3241 - `user: optional string`

3242 

3243 Optional user to run the command as.

3244 

3245 - `working_directory: optional string`

3246 

3247 Optional working directory to run the command in.

3248 

3249 - `call_id: string`

3250 

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

3252 

3253 - `status: "in_progress" or "completed" or "incomplete"`

3254 

3255 The status of the local shell call.

3256 

3257 - `"in_progress"`

3258 

3259 - `"completed"`

3260 

3261 - `"incomplete"`

3262 

3263 - `type: "local_shell_call"`

3264 

3265 The type of the local shell call. Always `local_shell_call`.

3266 

3267 - `"local_shell_call"`

3268 

3269 - `LocalShellCallOutput object { id, output, type, status }`

3270 

3271 The output of a local shell tool call.

3272 

3273 - `id: string`

3274 

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

3276 

3277 - `output: string`

3278 

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

3280 

3281 - `type: "local_shell_call_output"`

3282 

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

3284 

3285 - `"local_shell_call_output"`

3286 

3287 - `status: optional "in_progress" or "completed" or "incomplete"`

3288 

3289 The status of the item. One of `in_progress`, `completed`, or `incomplete`.

3290 

3291 - `"in_progress"`

3292 

3293 - `"completed"`

3294 

3295 - `"incomplete"`

3296 

3297 - `ShellCall object { action, call_id, type, 3 more }`

3298 

3299 A tool representing a request to execute one or more shell commands.

3300 

3301 - `action: object { commands, max_output_length, timeout_ms }`

3302 

3303 The shell commands and limits that describe how to run the tool call.

3304 

3305 - `commands: array of string`

3306 

3307 Ordered shell commands for the execution environment to run.

3308 

3309 - `max_output_length: optional number`

3310 

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

3312 

3313 - `timeout_ms: optional number`

3314 

3315 Maximum wall-clock time in milliseconds to allow the shell commands to run.

3316 

3317 - `call_id: string`

3318 

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

3320 

3321 - `type: "shell_call"`

3322 

3323 The type of the item. Always `shell_call`.

3324 

3325 - `"shell_call"`

3326 

3327 - `id: optional string`

3328 

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

3330 

3331 - `environment: optional LocalEnvironment or ContainerReference`

3332 

3333 The environment to execute the shell commands in.

3334 

3335 - `LocalEnvironment object { type, skills }`

3336 

3337 - `ContainerReference object { container_id, type }`

3338 

3339 - `status: optional "in_progress" or "completed" or "incomplete"`

3340 

3341 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

3342 

3343 - `"in_progress"`

3344 

3345 - `"completed"`

3346 

3347 - `"incomplete"`

3348 

3349 - `ShellCallOutput object { call_id, output, type, 3 more }`

3350 

3351 The streamed output items emitted by a shell tool call.

3352 

3353 - `call_id: string`

3354 

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

3356 

3357 - `output: array of ResponseFunctionShellCallOutputContent`

3358 

3359 Captured chunks of stdout and stderr output, along with their associated outcomes.

3360 

3361 - `outcome: object { type } or object { exit_code, type }`

3362 

3363 The exit or timeout outcome associated with this shell call.

3364 

3365 - `Timeout object { type }`

3366 

3367 Indicates that the shell call exceeded its configured time limit.

3368 

3369 - `type: "timeout"`

3370 

3371 The outcome type. Always `timeout`.

3372 

3373 - `"timeout"`

3374 

3375 - `Exit object { exit_code, type }`

3376 

3377 Indicates that the shell commands finished and returned an exit code.

3378 

3379 - `exit_code: number`

3380 

3381 The exit code returned by the shell process.

3382 

3383 - `type: "exit"`

3384 

3385 The outcome type. Always `exit`.

3386 

3387 - `"exit"`

3388 

3389 - `stderr: string`

3390 

3391 Captured stderr output for the shell call.

3392 

3393 - `stdout: string`

3394 

3395 Captured stdout output for the shell call.

3396 

3397 - `type: "shell_call_output"`

3398 

3399 The type of the item. Always `shell_call_output`.

3400 

3401 - `"shell_call_output"`

3402 

3403 - `id: optional string`

3404 

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

3406 

3407 - `max_output_length: optional number`

3408 

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

3410 

3411 - `status: optional "in_progress" or "completed" or "incomplete"`

3412 

3413 The status of the shell call output.

3414 

3415 - `"in_progress"`

3416 

3417 - `"completed"`

3418 

3419 - `"incomplete"`

3420 

3421 - `ApplyPatchCall object { call_id, operation, status, 2 more }`

3422 

3423 A tool call representing a request to create, delete, or update files using diff patches.

3424 

3425 - `call_id: string`

3426 

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

3428 

3429 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`

3430 

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

3432 

3433 - `CreateFile object { diff, path, type }`

3434 

3435 Instruction for creating a new file via the apply_patch tool.

3436 

3437 - `diff: string`

3438 

3439 Unified diff content to apply when creating the file.

3440 

3441 - `path: string`

3442 

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

3444 

3445 - `type: "create_file"`

3446 

3447 The operation type. Always `create_file`.

3448 

3449 - `"create_file"`

3450 

3451 - `DeleteFile object { path, type }`

3452 

3453 Instruction for deleting an existing file via the apply_patch tool.

3454 

3455 - `path: string`

3456 

3457 Path of the file to delete relative to the workspace root.

3458 

3459 - `type: "delete_file"`

3460 

3461 The operation type. Always `delete_file`.

3462 

3463 - `"delete_file"`

3464 

3465 - `UpdateFile object { diff, path, type }`

3466 

3467 Instruction for updating an existing file via the apply_patch tool.

3468 

3469 - `diff: string`

3470 

3471 Unified diff content to apply to the existing file.

3472 

3473 - `path: string`

3474 

3475 Path of the file to update relative to the workspace root.

3476 

3477 - `type: "update_file"`

3478 

3479 The operation type. Always `update_file`.

3480 

3481 - `"update_file"`

3482 

3483 - `status: "in_progress" or "completed"`

3484 

3485 The status of the apply patch tool call. One of `in_progress` or `completed`.

3486 

3487 - `"in_progress"`

3488 

3489 - `"completed"`

3490 

3491 - `type: "apply_patch_call"`

3492 

3493 The type of the item. Always `apply_patch_call`.

3494 

3495 - `"apply_patch_call"`

3496 

3497 - `id: optional string`

3498 

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

3500 

3501 - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`

3502 

3503 The streamed output emitted by an apply patch tool call.

3504 

3505 - `call_id: string`

3506 

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

3508 

3509 - `status: "completed" or "failed"`

3510 

3511 The status of the apply patch tool call output. One of `completed` or `failed`.

3512 

3513 - `"completed"`

3514 

3515 - `"failed"`

3516 

3517 - `type: "apply_patch_call_output"`

3518 

3519 The type of the item. Always `apply_patch_call_output`.

3520 

3521 - `"apply_patch_call_output"`

3522 

3523 - `id: optional string`

3524 

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

3526 

3527 - `output: optional string`

3528 

3529 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

3530 

3531 - `McpListTools object { id, server_label, tools, 2 more }`

3532 

3533 A list of tools available on an MCP server.

3534 

3535 - `id: string`

3536 

3537 The unique ID of the list.

3538 

3539 - `server_label: string`

3540 

3541 The label of the MCP server.

3542 

3543 - `tools: array of object { input_schema, name, annotations, description }`

3544 

3545 The tools available on the server.

3546 

3547 - `input_schema: unknown`

3548 

3549 The JSON schema describing the tool's input.

3550 

3551 - `name: string`

3552 

3553 The name of the tool.

3554 

3555 - `annotations: optional unknown`

3556 

3557 Additional annotations about the tool.

3558 

3559 - `description: optional string`

3560 

3561 The description of the tool.

3562 

3563 - `type: "mcp_list_tools"`

3564 

3565 The type of the item. Always `mcp_list_tools`.

3566 

3567 - `"mcp_list_tools"`

3568 

3569 - `error: optional string`

3570 

3571 Error message if the server could not list tools.

3572 

3573 - `McpApprovalRequest object { id, arguments, name, 2 more }`

3574 

3575 A request for human approval of a tool invocation.

3576 

3577 - `id: string`

3578 

3579 The unique ID of the approval request.

3580 

3581 - `arguments: string`

3582 

3583 A JSON string of arguments for the tool.

3584 

3585 - `name: string`

3586 

3587 The name of the tool to run.

3588 

3589 - `server_label: string`

3590 

3591 The label of the MCP server making the request.

3592 

3593 - `type: "mcp_approval_request"`

3594 

3595 The type of the item. Always `mcp_approval_request`.

3596 

3597 - `"mcp_approval_request"`

3598 

3599 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`

3600 

3601 A response to an MCP approval request.

3602 

3603 - `approval_request_id: string`

3604 

3605 The ID of the approval request being answered.

3606 

3607 - `approve: boolean`

3608 

3609 Whether the request was approved.

3610 

3611 - `type: "mcp_approval_response"`

3612 

3613 The type of the item. Always `mcp_approval_response`.

3614 

3615 - `"mcp_approval_response"`

3616 

3617 - `id: optional string`

3618 

3619 The unique ID of the approval response

3620 

3621 - `reason: optional string`

3622 

3623 Optional reason for the decision.

3624 

3625 - `McpCall object { id, arguments, name, 6 more }`

3626 

3627 An invocation of a tool on an MCP server.

3628 

3629 - `id: string`

3630 

3631 The unique ID of the tool call.

3632 

3633 - `arguments: string`

3634 

3635 A JSON string of the arguments passed to the tool.

3636 

3637 - `name: string`

3638 

3639 The name of the tool that was run.

3640 

3641 - `server_label: string`

3642 

3643 The label of the MCP server running the tool.

3644 

3645 - `type: "mcp_call"`

3646 

3647 The type of the item. Always `mcp_call`.

3648 

3649 - `"mcp_call"`

3650 

3651 - `approval_request_id: optional string`

3652 

3653 Unique identifier for the MCP tool call approval request.

3654 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

3655 

3656 - `error: optional string`

3657 

3658 The error from the tool call, if any.

3659 

3660 - `output: optional string`

3661 

3662 The output from the tool call.

3663 

3664 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`

3665 

3666 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

3667 

3668 - `"in_progress"`

3669 

3670 - `"completed"`

3671 

3672 - `"incomplete"`

3673 

3674 - `"calling"`

3675 

3676 - `"failed"`

3677 

3678 - `CustomToolCallOutput object { call_id, output, type, id }`

3679 

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

3681 

3682 - `call_id: string`

3683 

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

3685 

3686 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`

3687 

3688 The output from the custom tool call generated by your code.

3689 Can be a string or an list of output content.

3690 

3691 - `StringOutput = string`

3692 

3693 A string of the output of the custom tool call.

3694 

3695 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`

3696 

3697 Text, image, or file output of the custom tool call.

3698 

3699 - `ResponseInputText object { text, type }`

3700 

3701 A text input to the model.

3702 

3703 - `ResponseInputImage object { detail, type, file_id, image_url }`

3704 

3705 An image input to the model. Learn about [image inputs](/docs/guides/vision).

3706 

3707 - `ResponseInputFile object { type, detail, file_data, 3 more }`

3708 

3709 A file input to the model.

3710 

3711 - `type: "custom_tool_call_output"`

3712 

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

3714 

3715 - `"custom_tool_call_output"`

3716 

3717 - `id: optional string`

3718 

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

3720 

3721 - `CustomToolCall object { call_id, input, name, 3 more }`

3722 

3723 A call to a custom tool created by the model.

3724 

3725 - `call_id: string`

3726 

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

3728 

3729 - `input: string`

3730 

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

3732 

3733 - `name: string`

3734 

3735 The name of the custom tool being called.

3736 

3737 - `type: "custom_tool_call"`

3738 

3739 The type of the custom tool call. Always `custom_tool_call`.

3740 

3741 - `"custom_tool_call"`

3742 

3743 - `id: optional string`

3744 

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

3746 

3747 - `namespace: optional string`

3748 

3749 The namespace of the custom tool being called.

3750 

3751 - `CompactionTrigger object { type }`

3752 

3753 Compacts the current context. Must be the final input item.

3754 

3755 - `type: "compaction_trigger"`

3756 

3757 The type of the item. Always `compaction_trigger`.

3758 

3759 - `"compaction_trigger"`

3760 

3761 - `ItemReference object { id, type }`

3762 

3763 An internal identifier for an item to reference.

3764 

3765 - `id: string`

3766 

3767 The ID of the item to reference.

3768 

3769 - `type: optional "item_reference"`

3770 

3771 The type of item to reference. Always `item_reference`.

3772 

3773 - `"item_reference"`

3774 

3775- `instructions: optional string`

3776 

3777 A system (or developer) message inserted into the model's context.

3778 When used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.

3779 

3780- `previous_response_id: optional string`

3781 

3782 The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

3783 

3784- `prompt_cache_key: optional string`

3785 

3786 A key to use when reading from or writing to the prompt cache.

3787 

3788- `prompt_cache_retention: optional "in_memory" or "24h"`

3789 

3790 How long to retain a prompt cache entry created by this request.

3791 

3792 - `"in_memory"`

3793 

3794 - `"24h"`

3795 

3796- `service_tier: optional "auto" or "default" or "flex" or "priority"`

3797 

3798 The service tier to use for this request.

3799 

3800 - `"auto"`

3801 

3802 - `"default"`

3803 

3804 - `"flex"`

3805 

3806 - `"priority"`

3807 

3808### Returns

3809 

3810- `CompactedResponse object { id, created_at, object, 2 more }`

3811 

3812 - `id: string`

3813 

3814 The unique identifier for the compacted response.

3815 

3816 - `created_at: number`

3817 

3818 Unix timestamp (in seconds) when the compacted conversation was created.

3819 

3820 - `object: "response.compaction"`

3821 

3822 The object type. Always `response.compaction`.

3823 

3824 - `"response.compaction"`

3825 

3826 - `output: array of Message or object { arguments, call_id, name, 4 more } or object { id, arguments, call_id, 4 more } or 23 more`

3827 

3828 The compacted list of output items.

3829 

3830 - `Message object { id, content, role, 3 more }`

3831 

3832 A message to or from the model.

3833 

3834 - `id: string`

3835 

3836 The unique ID of the message.

3837 

3838 - `content: array of ResponseInputText or ResponseOutputText or TextContent or 6 more`

3839 

3840 The content of the message

3841 

3842 - `ResponseInputText object { text, type }`

3843 

3844 A text input to the model.

3845 

3846 - `text: string`

3847 

3848 The text input to the model.

3849 

3850 - `type: "input_text"`

3851 

3852 The type of the input item. Always `input_text`.

3853 

3854 - `"input_text"`

3855 

3856 - `ResponseOutputText object { annotations, logprobs, text, type }`

3857 

3858 A text output from the model.

3859 

3860 - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }`

3861 

3862 The annotations of the text output.

3863 

3864 - `FileCitation object { file_id, filename, index, type }`

3865 

3866 A citation to a file.

3867 

3868 - `file_id: string`

3869 

3870 The ID of the file.

3871 

3872 - `filename: string`

3873 

3874 The filename of the file cited.

3875 

3876 - `index: number`

3877 

3878 The index of the file in the list of files.

3879 

3880 - `type: "file_citation"`

3881 

3882 The type of the file citation. Always `file_citation`.

3883 

3884 - `"file_citation"`

3885 

3886 - `URLCitation object { end_index, start_index, title, 2 more }`

3887 

3888 A citation for a web resource used to generate a model response.

3889 

3890 - `end_index: number`

3891 

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

3893 

3894 - `start_index: number`

3895 

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

3897 

3898 - `title: string`

3899 

3900 The title of the web resource.

3901 

3902 - `type: "url_citation"`

3903 

3904 The type of the URL citation. Always `url_citation`.

3905 

3906 - `"url_citation"`

3907 

3908 - `url: string`

3909 

3910 The URL of the web resource.

3911 

3912 - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`

3913 

3914 A citation for a container file used to generate a model response.

3915 

3916 - `container_id: string`

3917 

3918 The ID of the container file.

3919 

3920 - `end_index: number`

3921 

3922 The index of the last character of the container file citation in the message.

3923 

3924 - `file_id: string`

3925 

3926 The ID of the file.

3927 

3928 - `filename: string`

3929 

3930 The filename of the container file cited.

3931 

3932 - `start_index: number`

3933 

3934 The index of the first character of the container file citation in the message.

3935 

3936 - `type: "container_file_citation"`

3937 

3938 The type of the container file citation. Always `container_file_citation`.

3939 

3940 - `"container_file_citation"`

3941 

3942 - `FilePath object { file_id, index, type }`

3943 

3944 A path to a file.

3945 

3946 - `file_id: string`

3947 

3948 The ID of the file.

3949 

3950 - `index: number`

3951 

3952 The index of the file in the list of files.

3953 

3954 - `type: "file_path"`

3955 

3956 The type of the file path. Always `file_path`.

3957 

3958 - `"file_path"`

3959 

3960 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`

3961 

3962 - `token: string`

3963 

3964 - `bytes: array of number`

3965 

3966 - `logprob: number`

3967 

3968 - `top_logprobs: array of object { token, bytes, logprob }`

3969 

3970 - `token: string`

3971 

3972 - `bytes: array of number`

3973 

3974 - `logprob: number`

3975 

3976 - `text: string`

3977 

3978 The text output from the model.

3979 

3980 - `type: "output_text"`

3981 

3982 The type of the output text. Always `output_text`.

3983 

3984 - `"output_text"`

3985 

3986 - `TextContent object { text, type }`

3987 

3988 A text content.

3989 

3990 - `text: string`

3991 

3992 - `type: "text"`

3993 

3994 - `"text"`

3995 

3996 - `SummaryTextContent object { text, type }`

3997 

3998 A summary text from the model.

3999 

4000 - `text: string`

4001 

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

4003 

4004 - `type: "summary_text"`

4005 

4006 The type of the object. Always `summary_text`.

4007 

4008 - `"summary_text"`

4009 

4010 - `ReasoningText object { text, type }`

4011 

4012 Reasoning text from the model.

4013 

4014 - `text: string`

4015 

4016 The reasoning text from the model.

4017 

4018 - `type: "reasoning_text"`

4019 

4020 The type of the reasoning text. Always `reasoning_text`.

4021 

4022 - `"reasoning_text"`

4023 

4024 - `ResponseOutputRefusal object { refusal, type }`

4025 

4026 A refusal from the model.

4027 

4028 - `refusal: string`

4029 

4030 The refusal explanation from the model.

4031 

4032 - `type: "refusal"`

4033 

4034 The type of the refusal. Always `refusal`.

4035 

4036 - `"refusal"`

4037 

4038 - `ResponseInputImage object { detail, type, file_id, image_url }`

4039 

4040 An image input to the model. Learn about [image inputs](/docs/guides/vision).

4041 

4042 - `detail: "low" or "high" or "auto" or "original"`

4043 

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

4045 

4046 - `"low"`

4047 

4048 - `"high"`

4049 

4050 - `"auto"`

4051 

4052 - `"original"`

4053 

4054 - `type: "input_image"`

4055 

4056 The type of the input item. Always `input_image`.

4057 

4058 - `"input_image"`

4059 

4060 - `file_id: optional string`

4061 

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

4063 

4064 - `image_url: optional string`

4065 

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

4067 

4068 - `ComputerScreenshotContent object { detail, file_id, image_url, type }`

4069 

4070 A screenshot of a computer.

4071 

4072 - `detail: "low" or "high" or "auto" or "original"`

4073 

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

4075 

4076 - `"low"`

4077 

4078 - `"high"`

4079 

4080 - `"auto"`

4081 

4082 - `"original"`

4083 

4084 - `file_id: string`

4085 

4086 The identifier of an uploaded file that contains the screenshot.

4087 

4088 - `image_url: string`

4089 

4090 The URL of the screenshot image.

4091 

4092 - `type: "computer_screenshot"`

4093 

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

4095 

4096 - `"computer_screenshot"`

4097 

4098 - `ResponseInputFile object { type, detail, file_data, 3 more }`

4099 

4100 A file input to the model.

4101 

4102 - `type: "input_file"`

4103 

4104 The type of the input item. Always `input_file`.

4105 

4106 - `"input_file"`

4107 

4108 - `detail: optional "low" or "high"`

4109 

4110 The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`.

4111 

4112 - `"low"`

4113 

4114 - `"high"`

4115 

4116 - `file_data: optional string`

4117 

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

4119 

4120 - `file_id: optional string`

4121 

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

4123 

4124 - `file_url: optional string`

4125 

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

4127 

4128 - `filename: optional string`

4129 

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

4131 

4132 - `role: "unknown" or "user" or "assistant" or 5 more`

4133 

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

4135 

4136 - `"unknown"`

4137 

4138 - `"user"`

4139 

4140 - `"assistant"`

4141 

4142 - `"system"`

4143 

4144 - `"critic"`

4145 

4146 - `"discriminator"`

4147 

4148 - `"developer"`

4149 

4150 - `"tool"`

4151 

4152 - `status: "in_progress" or "completed" or "incomplete"`

4153 

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

4155 

4156 - `"in_progress"`

4157 

4158 - `"completed"`

4159 

4160 - `"incomplete"`

4161 

4162 - `type: "message"`

4163 

4164 The type of the message. Always set to `message`.

4165 

4166 - `"message"`

4167 

4168 - `phase: optional "commentary" or "final_answer"`

4169 

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

4171 

4172 - `"commentary"`

4173 

4174 - `"final_answer"`

4175 

4176 - `FunctionCall object { arguments, call_id, name, 4 more }`

4177 

4178 A tool call to run a function. See the

4179 [function calling guide](/docs/guides/function-calling) for more information.

4180 

4181 - `arguments: string`

4182 

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

4184 

4185 - `call_id: string`

4186 

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

4188 

4189 - `name: string`

4190 

4191 The name of the function to run.

4192 

4193 - `type: "function_call"`

4194 

4195 The type of the function tool call. Always `function_call`.

4196 

4197 - `"function_call"`

4198 

4199 - `id: optional string`

4200 

4201 The unique ID of the function tool call.

4202 

4203 - `namespace: optional string`

4204 

4205 The namespace of the function to run.

4206 

4207 - `status: optional "in_progress" or "completed" or "incomplete"`

4208 

4209 The status of the item. One of `in_progress`, `completed`, or

4210 `incomplete`. Populated when items are returned via API.

4211 

4212 - `"in_progress"`

4213 

4214 - `"completed"`

4215 

4216 - `"incomplete"`

4217 

4218 - `ToolSearchCall object { id, arguments, call_id, 4 more }`

4219 

4220 - `id: string`

4221 

4222 The unique ID of the tool search call item.

4223 

4224 - `arguments: unknown`

4225 

4226 Arguments used for the tool search call.

4227 

4228 - `call_id: string`

4229 

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

4231 

4232 - `execution: "server" or "client"`

4233 

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

4235 

4236 - `"server"`

4237 

4238 - `"client"`

4239 

4240 - `status: "in_progress" or "completed" or "incomplete"`

4241 

4242 The status of the tool search call item that was recorded.

4243 

4244 - `"in_progress"`

4245 

4246 - `"completed"`

4247 

4248 - `"incomplete"`

4249 

4250 - `type: "tool_search_call"`

4251 

4252 The type of the item. Always `tool_search_call`.

4253 

4254 - `"tool_search_call"`

4255 

4256 - `created_by: optional string`

4257 

4258 The identifier of the actor that created the item.

4259 

4260 - `ToolSearchOutput object { id, call_id, execution, 4 more }`

4261 

4262 - `id: string`

4263 

4264 The unique ID of the tool search output item.

4265 

4266 - `call_id: string`

4267 

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

4269 

4270 - `execution: "server" or "client"`

4271 

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

4273 

4274 - `"server"`

4275 

4276 - `"client"`

4277 

4278 - `status: "in_progress" or "completed" or "incomplete"`

4279 

4280 The status of the tool search output item that was recorded.

4281 

4282 - `"in_progress"`

4283 

4284 - `"completed"`

4285 

4286 - `"incomplete"`

4287 

4288 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

4289 

4290 The loaded tool definitions returned by tool search.

4291 

4292 - `Function object { name, parameters, strict, 3 more }`

4293 

4294 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

4295 

4296 - `name: string`

4297 

4298 The name of the function to call.

4299 

4300 - `parameters: map[unknown]`

4301 

4302 A JSON schema object describing the parameters of the function.

4303 

4304 - `strict: boolean`

4305 

4306 Whether to enforce strict parameter validation. Default `true`.

4307 

4308 - `type: "function"`

4309 

4310 The type of the function tool. Always `function`.

4311 

4312 - `"function"`

4313 

4314 - `defer_loading: optional boolean`

4315 

4316 Whether this function is deferred and loaded via tool search.

4317 

4318 - `description: optional string`

4319 

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

4321 

4322 - `FileSearch object { type, vector_store_ids, filters, 2 more }`

4323 

4324 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

4325 

4326 - `type: "file_search"`

4327 

4328 The type of the file search tool. Always `file_search`.

4329 

4330 - `"file_search"`

4331 

4332 - `vector_store_ids: array of string`

4333 

4334 The IDs of the vector stores to search.

4335 

4336 - `filters: optional ComparisonFilter or CompoundFilter`

4337 

4338 A filter to apply.

4339 

4340 - `ComparisonFilter object { key, type, value }`

4341 

4342 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

4343 

4344 - `key: string`

4345 

4346 The key to compare against the value.

4347 

4348 - `type: "eq" or "ne" or "gt" or 5 more`

4349 

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

4351 

4352 - `eq`: equals

4353 - `ne`: not equal

4354 - `gt`: greater than

4355 - `gte`: greater than or equal

4356 - `lt`: less than

4357 - `lte`: less than or equal

4358 - `in`: in

4359 - `nin`: not in

4360 

4361 - `"eq"`

4362 

4363 - `"ne"`

4364 

4365 - `"gt"`

4366 

4367 - `"gte"`

4368 

4369 - `"lt"`

4370 

4371 - `"lte"`

4372 

4373 - `"in"`

4374 

4375 - `"nin"`

4376 

4377 - `value: string or number or boolean or array of string or number`

4378 

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

4380 

4381 - `string`

4382 

4383 - `number`

4384 

4385 - `boolean`

4386 

4387 - `array of string or number`

4388 

4389 - `string`

4390 

4391 - `number`

4392 

4393 - `CompoundFilter object { filters, type }`

4394 

4395 Combine multiple filters using `and` or `or`.

4396 

4397 - `filters: array of ComparisonFilter or unknown`

4398 

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

4400 

4401 - `ComparisonFilter object { key, type, value }`

4402 

4403 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

4404 

4405 - `unknown`

4406 

4407 - `type: "and" or "or"`

4408 

4409 Type of operation: `and` or `or`.

4410 

4411 - `"and"`

4412 

4413 - `"or"`

4414 

4415 - `max_num_results: optional number`

4416 

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

4418 

4419 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`

4420 

4421 Ranking options for search.

4422 

4423 - `hybrid_search: optional object { embedding_weight, text_weight }`

4424 

4425 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

4426 

4427 - `embedding_weight: number`

4428 

4429 The weight of the embedding in the reciprocal ranking fusion.

4430 

4431 - `text_weight: number`

4432 

4433 The weight of the text in the reciprocal ranking fusion.

4434 

4435 - `ranker: optional "auto" or "default-2024-11-15"`

4436 

4437 The ranker to use for the file search.

4438 

4439 - `"auto"`

4440 

4441 - `"default-2024-11-15"`

4442 

4443 - `score_threshold: optional number`

4444 

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

4446 

4447 - `Computer object { type }`

4448 

4449 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

4450 

4451 - `type: "computer"`

4452 

4453 The type of the computer tool. Always `computer`.

4454 

4455 - `"computer"`

4456 

4457 - `ComputerUsePreview object { display_height, display_width, environment, type }`

4458 

4459 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

4460 

4461 - `display_height: number`

4462 

4463 The height of the computer display.

4464 

4465 - `display_width: number`

4466 

4467 The width of the computer display.

4468 

4469 - `environment: "windows" or "mac" or "linux" or 2 more`

4470 

4471 The type of computer environment to control.

4472 

4473 - `"windows"`

4474 

4475 - `"mac"`

4476 

4477 - `"linux"`

4478 

4479 - `"ubuntu"`

4480 

4481 - `"browser"`

4482 

4483 - `type: "computer_use_preview"`

4484 

4485 The type of the computer use tool. Always `computer_use_preview`.

4486 

4487 - `"computer_use_preview"`

4488 

4489 - `WebSearch object { type, filters, search_context_size, user_location }`

4490 

4491 Search the Internet for sources related to the prompt. Learn more about the

4492 [web search tool](/docs/guides/tools-web-search).

4493 

4494 - `type: "web_search" or "web_search_2025_08_26"`

4495 

4496 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

4497 

4498 - `"web_search"`

4499 

4500 - `"web_search_2025_08_26"`

4501 

4502 - `filters: optional object { allowed_domains }`

4503 

4504 Filters for the search.

4505 

4506 - `allowed_domains: optional array of string`

4507 

4508 Allowed domains for the search. If not provided, all domains are allowed.

4509 Subdomains of the provided domains are allowed as well.

4510 

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

4512 

4513 - `search_context_size: optional "low" or "medium" or "high"`

4514 

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

4516 

4517 - `"low"`

4518 

4519 - `"medium"`

4520 

4521 - `"high"`

4522 

4523 - `user_location: optional object { city, country, region, 2 more }`

4524 

4525 The approximate location of the user.

3026 4526 

3027 The type of item to reference. Always `item_reference`.4527 - `city: optional string`

3028 4528 

3029 - `"item_reference"`4529 Free text input for the city of the user, e.g. `San Francisco`.

3030 4530 

3031- `instructions: optional string`4531 - `country: optional string`

3032 4532 

3033 A system (or developer) message inserted into the model's context.4533 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

3034 When used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.

3035 4534 

3036- `previous_response_id: optional string`4535 - `region: optional string`

3037 4536 

3038 The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.4537 Free text input for the region of the user, e.g. `California`.

3039 4538 

3040- `prompt_cache_key: optional string`4539 - `timezone: optional string`

3041 4540 

3042 A key to use when reading from or writing to the prompt cache.4541 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

3043 4542 

3044- `prompt_cache_retention: optional "in_memory" or "24h"`4543 - `type: optional "approximate"`

3045 4544 

3046 How long to retain a prompt cache entry created by this request.4545 The type of location approximation. Always `approximate`.

3047 4546 

3048 - `"in_memory"`4547 - `"approximate"`

3049 4548 

3050 - `"24h"`4549 - `Mcp object { server_label, type, allowed_tools, 7 more }`

3051 4550 

3052- `service_tier: optional "auto" or "default" or "flex" or "priority"`4551 Give the model access to additional tools via remote Model Context Protocol

4552 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

3053 4553 

3054 The service tier to use for this request.4554 - `server_label: string`

4555 

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

4557 

4558 - `type: "mcp"`

4559 

4560 The type of the MCP tool. Always `mcp`.

4561 

4562 - `"mcp"`

4563 

4564 - `allowed_tools: optional array of string or object { read_only, tool_names }`

4565 

4566 List of allowed tool names or a filter object.

4567 

4568 - `McpAllowedTools = array of string`

4569 

4570 A string array of allowed tool names

4571 

4572 - `McpToolFilter object { read_only, tool_names }`

4573 

4574 A filter object to specify which tools are allowed.

4575 

4576 - `read_only: optional boolean`

4577 

4578 Indicates whether or not a tool modifies data or is read-only. If an

4579 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

4580 it will match this filter.

4581 

4582 - `tool_names: optional array of string`

4583 

4584 List of allowed tool names.

4585 

4586 - `authorization: optional string`

4587 

4588 An OAuth access token that can be used with a remote MCP server, either

4589 with a custom MCP server URL or a service connector. Your application

4590 must handle the OAuth authorization flow and provide the token here.

4591 

4592 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`

4593 

4594 Identifier for service connectors, like those available in ChatGPT. One of

4595 `server_url` or `connector_id` must be provided. Learn more about service

4596 connectors [here](/docs/guides/tools-remote-mcp#connectors).

4597 

4598 Currently supported `connector_id` values are:

4599 

4600 - Dropbox: `connector_dropbox`

4601 - Gmail: `connector_gmail`

4602 - Google Calendar: `connector_googlecalendar`

4603 - Google Drive: `connector_googledrive`

4604 - Microsoft Teams: `connector_microsoftteams`

4605 - Outlook Calendar: `connector_outlookcalendar`

4606 - Outlook Email: `connector_outlookemail`

4607 - SharePoint: `connector_sharepoint`

4608 

4609 - `"connector_dropbox"`

4610 

4611 - `"connector_gmail"`

4612 

4613 - `"connector_googlecalendar"`

4614 

4615 - `"connector_googledrive"`

4616 

4617 - `"connector_microsoftteams"`

4618 

4619 - `"connector_outlookcalendar"`

4620 

4621 - `"connector_outlookemail"`

4622 

4623 - `"connector_sharepoint"`

4624 

4625 - `defer_loading: optional boolean`

4626 

4627 Whether this MCP tool is deferred and discovered via tool search.

4628 

4629 - `headers: optional map[string]`

4630 

4631 Optional HTTP headers to send to the MCP server. Use for authentication

4632 or other purposes.

4633 

4634 - `require_approval: optional object { always, never } or "always" or "never"`

4635 

4636 Specify which of the MCP server's tools require approval.

4637 

4638 - `McpToolApprovalFilter object { always, never }`

4639 

4640 Specify which of the MCP server's tools require approval. Can be

4641 `always`, `never`, or a filter object associated with tools

4642 that require approval.

4643 

4644 - `always: optional object { read_only, tool_names }`

4645 

4646 A filter object to specify which tools are allowed.

4647 

4648 - `read_only: optional boolean`

4649 

4650 Indicates whether or not a tool modifies data or is read-only. If an

4651 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

4652 it will match this filter.

4653 

4654 - `tool_names: optional array of string`

4655 

4656 List of allowed tool names.

4657 

4658 - `never: optional object { read_only, tool_names }`

4659 

4660 A filter object to specify which tools are allowed.

4661 

4662 - `read_only: optional boolean`

4663 

4664 Indicates whether or not a tool modifies data or is read-only. If an

4665 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

4666 it will match this filter.

4667 

4668 - `tool_names: optional array of string`

4669 

4670 List of allowed tool names.

4671 

4672 - `McpToolApprovalSetting = "always" or "never"`

4673 

4674 Specify a single approval policy for all tools. One of `always` or

4675 `never`. When set to `always`, all tools will require approval. When

4676 set to `never`, all tools will not require approval.

4677 

4678 - `"always"`

4679 

4680 - `"never"`

4681 

4682 - `server_description: optional string`

4683 

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

4685 

4686 - `server_url: optional string`

4687 

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

4689 provided.

4690 

4691 - `CodeInterpreter object { container, type }`

4692 

4693 A tool that runs Python code to help generate a response to a prompt.

4694 

4695 - `container: string or object { type, file_ids, memory_limit, network_policy }`

4696 

4697 The code interpreter container. Can be a container ID or an object that

4698 specifies uploaded file IDs to make available to your code, along with an

4699 optional `memory_limit` setting.

4700 

4701 - `string`

4702 

4703 The container ID.

4704 

4705 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`

4706 

4707 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

4708 

4709 - `type: "auto"`

4710 

4711 Always `auto`.

3055 4712 

3056 - `"auto"`4713 - `"auto"`

3057 4714 

3058 - `"default"`4715 - `file_ids: optional array of string`

3059 4716 

3060 - `"flex"`4717 An optional list of uploaded files to make available to your code.

3061 4718 

3062 - `"priority"`4719 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

3063 4720 

3064### Returns4721 The memory limit for the code interpreter container.

3065 4722 

3066- `CompactedResponse object { id, created_at, object, 2 more }`4723 - `"1g"`

3067 4724 

3068 - `id: string`4725 - `"4g"`

3069 4726 

3070 The unique identifier for the compacted response.4727 - `"16g"`

3071 4728 

3072 - `created_at: number`4729 - `"64g"`

3073 4730 

3074 Unix timestamp (in seconds) when the compacted conversation was created.4731 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

3075 4732 

3076 - `object: "response.compaction"`4733 Network access policy for the container.

3077 4734 

3078 The object type. Always `response.compaction`.4735 - `ContainerNetworkPolicyDisabled object { type }`

3079 4736 

3080 - `"response.compaction"`4737 - `type: "disabled"`

3081 4738 

3082 - `output: array of Message or object { arguments, call_id, name, 4 more } or object { id, arguments, call_id, 4 more } or 22 more`4739 Disable outbound network access. Always `disabled`.

3083 4740 

3084 The compacted list of output items.4741 - `"disabled"`

3085 4742 

3086 - `Message object { id, content, role, 3 more }`4743 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

4744 

4745 - `allowed_domains: array of string`

4746 

4747 A list of allowed domains when type is `allowlist`.

4748 

4749 - `type: "allowlist"`

4750 

4751 Allow outbound network access only to specified domains. Always `allowlist`.

4752 

4753 - `"allowlist"`

4754 

4755 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`

4756 

4757 Optional domain-scoped secrets for allowlisted domains.

4758 

4759 - `domain: string`

4760 

4761 The domain associated with the secret.

4762 

4763 - `name: string`

4764 

4765 The name of the secret to inject for the domain.

4766 

4767 - `value: string`

4768 

4769 The secret value to inject for the domain.

4770 

4771 - `type: "code_interpreter"`

4772 

4773 The type of the code interpreter tool. Always `code_interpreter`.

4774 

4775 - `"code_interpreter"`

4776 

4777 - `ImageGeneration object { type, action, background, 9 more }`

4778 

4779 A tool that generates images using the GPT image models.

4780 

4781 - `type: "image_generation"`

4782 

4783 The type of the image generation tool. Always `image_generation`.

3087 4784 

3088 A message to or from the model.4785 - `"image_generation"`

3089 4786 

3090 - `id: string`4787 - `action: optional "generate" or "edit" or "auto"`

3091 4788 

3092 The unique ID of the message.4789 Whether to generate a new image or edit an existing image. Default: `auto`.

3093 4790 

3094 - `content: array of ResponseInputText or ResponseOutputText or TextContent or 6 more`4791 - `"generate"`

3095 4792 

3096 The content of the message4793 - `"edit"`

3097 4794 

3098 - `ResponseInputText object { text, type }`4795 - `"auto"`

3099 4796 

3100 A text input to the model.4797 - `background: optional "transparent" or "opaque" or "auto"`

3101 4798 

3102 - `text: string`4799 Background type for the generated image. One of `transparent`,

4800 `opaque`, or `auto`. Default: `auto`.

3103 4801 

3104 The text input to the model.4802 - `"transparent"`

3105 4803 

3106 - `type: "input_text"`4804 - `"opaque"`

3107 4805 

3108 The type of the input item. Always `input_text`.4806 - `"auto"`

3109 4807 

3110 - `"input_text"`4808 - `input_fidelity: optional "high" or "low"`

3111 4809 

3112 - `ResponseOutputText object { annotations, logprobs, text, type }`4810 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`.

3113 4811 

3114 A text output from the model.4812 - `"high"`

3115 4813 

3116 - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }`4814 - `"low"`

3117 4815 

3118 The annotations of the text output.4816 - `input_image_mask: optional object { file_id, image_url }`

3119 4817 

3120 - `FileCitation object { file_id, filename, index, type }`4818 Optional mask for inpainting. Contains `image_url`

4819 (string, optional) and `file_id` (string, optional).

3121 4820 

3122 A citation to a file.4821 - `file_id: optional string`

3123 4822 

3124 - `file_id: string`4823 File ID for the mask image.

3125 4824 

3126 The ID of the file.4825 - `image_url: optional string`

3127 4826 

3128 - `filename: string`4827 Base64-encoded mask image.

3129 4828 

3130 The filename of the file cited.4829 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

3131 4830 

3132 - `index: number`4831 The image generation model to use. Default: `gpt-image-1`.

3133 4832 

3134 The index of the file in the list of files.4833 - `string`

3135 4834 

3136 - `type: "file_citation"`4835 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

3137 4836 

3138 The type of the file citation. Always `file_citation`.4837 The image generation model to use. Default: `gpt-image-1`.

3139 4838 

3140 - `"file_citation"`4839 - `"gpt-image-1"`

3141 4840 

3142 - `URLCitation object { end_index, start_index, title, 2 more }`4841 - `"gpt-image-1-mini"`

3143 4842 

3144 A citation for a web resource used to generate a model response.4843 - `"gpt-image-1.5"`

3145 4844 

3146 - `end_index: number`4845 - `moderation: optional "auto" or "low"`

3147 4846 

3148 The index of the last character of the URL citation in the message.4847 Moderation level for the generated image. Default: `auto`.

3149 4848 

3150 - `start_index: number`4849 - `"auto"`

3151 4850 

3152 The index of the first character of the URL citation in the message.4851 - `"low"`

3153 4852 

3154 - `title: string`4853 - `output_compression: optional number`

3155 4854 

3156 The title of the web resource.4855 Compression level for the output image. Default: 100.

3157 4856 

3158 - `type: "url_citation"`4857 - `output_format: optional "png" or "webp" or "jpeg"`

3159 4858 

3160 The type of the URL citation. Always `url_citation`.4859 The output format of the generated image. One of `png`, `webp`, or

4860 `jpeg`. Default: `png`.

3161 4861 

3162 - `"url_citation"`4862 - `"png"`

3163 4863 

3164 - `url: string`4864 - `"webp"`

3165 4865 

3166 The URL of the web resource.4866 - `"jpeg"`

3167 4867 

3168 - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`4868 - `partial_images: optional number`

3169 4869 

3170 A citation for a container file used to generate a model response.4870 Number of partial images to generate in streaming mode, from 0 (default value) to 3.

3171 4871 

3172 - `container_id: string`4872 - `quality: optional "low" or "medium" or "high" or "auto"`

3173 4873 

3174 The ID of the container file.4874 The quality of the generated image. One of `low`, `medium`, `high`,

4875 or `auto`. Default: `auto`.

3175 4876 

3176 - `end_index: number`4877 - `"low"`

3177 4878 

3178 The index of the last character of the container file citation in the message.4879 - `"medium"`

3179 4880 

3180 - `file_id: string`4881 - `"high"`

3181 4882 

3182 The ID of the file.4883 - `"auto"`

3183 4884 

3184 - `filename: string`4885 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`

3185 4886 

3186 The filename of the container file cited.4887 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

3187 4888 

3188 - `start_index: number`4889 - `string`

3189 4890 

3190 The index of the first character of the container file citation in the message.4891 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`

3191 4892 

3192 - `type: "container_file_citation"`4893 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

3193 4894 

3194 The type of the container file citation. Always `container_file_citation`.4895 - `"1024x1024"`

3195 4896 

3196 - `"container_file_citation"`4897 - `"1024x1536"`

3197 4898 

3198 - `FilePath object { file_id, index, type }`4899 - `"1536x1024"`

3199 4900 

3200 A path to a file.4901 - `"auto"`

3201 4902 

3202 - `file_id: string`4903 - `LocalShell object { type }`

3203 4904 

3204 The ID of the file.4905 A tool that allows the model to execute shell commands in a local environment.

3205 4906 

3206 - `index: number`4907 - `type: "local_shell"`

3207 4908 

3208 The index of the file in the list of files.4909 The type of the local shell tool. Always `local_shell`.

3209 4910 

3210 - `type: "file_path"`4911 - `"local_shell"`

3211 4912 

3212 The type of the file path. Always `file_path`.4913 - `Shell object { type, environment }`

3213 4914 

3214 - `"file_path"`4915 A tool that allows the model to execute shell commands.

3215 4916 

3216 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`4917 - `type: "shell"`

3217 4918 

3218 - `token: string`4919 The type of the shell tool. Always `shell`.

3219 4920 

3220 - `bytes: array of number`4921 - `"shell"`

3221 4922 

3222 - `logprob: number`4923 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`

3223 4924 

3224 - `top_logprobs: array of object { token, bytes, logprob }`4925 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

3225 4926 

3226 - `token: string`4927 - `type: "container_auto"`

3227 4928 

3228 - `bytes: array of number`4929 Automatically creates a container for this request

3229 4930 

3230 - `logprob: number`4931 - `"container_auto"`

3231 4932 

3232 - `text: string`4933 - `file_ids: optional array of string`

3233 4934 

3234 The text output from the model.4935 An optional list of uploaded files to make available to your code.

3235 4936 

3236 - `type: "output_text"`4937 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

3237 4938 

3238 The type of the output text. Always `output_text`.4939 The memory limit for the container.

3239 4940 

3240 - `"output_text"`4941 - `"1g"`

3241 4942 

3242 - `TextContent object { text, type }`4943 - `"4g"`

3243 4944 

3244 A text content.4945 - `"16g"`

3245 4946 

3246 - `text: string`4947 - `"64g"`

3247 4948 

3248 - `type: "text"`4949 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

3249 4950 

3250 - `"text"`4951 Network access policy for the container.

3251 4952 

3252 - `SummaryTextContent object { text, type }`4953 - `ContainerNetworkPolicyDisabled object { type }`

3253 4954 

3254 A summary text from the model.4955 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

3255 4956 

3256 - `text: string`4957 - `skills: optional array of SkillReference or InlineSkill`

3257 4958 

3258 A summary of the reasoning output from the model so far.4959 An optional list of skills referenced by id or inline data.

3259 4960 

3260 - `type: "summary_text"`4961 - `SkillReference object { skill_id, type, version }`

3261 4962 

3262 The type of the object. Always `summary_text`.4963 - `skill_id: string`

3263 4964 

3264 - `"summary_text"`4965 The ID of the referenced skill.

3265 4966 

3266 - `ReasoningText object { text, type }`4967 - `type: "skill_reference"`

3267 4968 

3268 Reasoning text from the model.4969 References a skill created with the /v1/skills endpoint.

3269 4970 

3270 - `text: string`4971 - `"skill_reference"`

3271 4972 

3272 The reasoning text from the model.4973 - `version: optional string`

3273 4974 

3274 - `type: "reasoning_text"`4975 Optional skill version. Use a positive integer or 'latest'. Omit for default.

3275 4976 

3276 The type of the reasoning text. Always `reasoning_text`.4977 - `InlineSkill object { description, name, source, type }`

3277 4978 

3278 - `"reasoning_text"`4979 - `description: string`

3279 4980 

3280 - `ResponseOutputRefusal object { refusal, type }`4981 The description of the skill.

3281 4982 

3282 A refusal from the model.4983 - `name: string`

3283 4984 

3284 - `refusal: string`4985 The name of the skill.

3285 4986 

3286 The refusal explanation from the model.4987 - `source: InlineSkillSource`

3287 4988 

3288 - `type: "refusal"`4989 Inline skill payload

3289 4990 

3290 The type of the refusal. Always `refusal`.4991 - `data: string`

3291 4992 

3292 - `"refusal"`4993 Base64-encoded skill zip bundle.

3293 4994 

3294 - `ResponseInputImage object { detail, type, file_id, image_url }`4995 - `media_type: "application/zip"`

3295 4996 

3296 An image input to the model. Learn about [image inputs](/docs/guides/vision).4997 The media type of the inline skill payload. Must be `application/zip`.

3297 4998 

3298 - `detail: "low" or "high" or "auto" or "original"`4999 - `"application/zip"`

3299 5000 

3300 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.5001 - `type: "base64"`

3301 5002 

3302 - `"low"`5003 The type of the inline skill source. Must be `base64`.

3303 5004 

3304 - `"high"`5005 - `"base64"`

3305 5006 

3306 - `"auto"`5007 - `type: "inline"`

3307 5008 

3308 - `"original"`5009 Defines an inline skill for this request.

3309 5010 

3310 - `type: "input_image"`5011 - `"inline"`

3311 5012 

3312 The type of the input item. Always `input_image`.5013 - `LocalEnvironment object { type, skills }`

3313 5014 

3314 - `"input_image"`5015 - `type: "local"`

3315 5016 

3316 - `file_id: optional string`5017 Use a local computer environment.

3317 5018 

3318 The ID of the file to be sent to the model.5019 - `"local"`

3319 5020 

3320 - `image_url: optional string`5021 - `skills: optional array of LocalSkill`

3321 5022 

3322 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.5023 An optional list of skills.

3323 5024 

3324 - `ComputerScreenshotContent object { detail, file_id, image_url, type }`5025 - `description: string`

3325 5026 

3326 A screenshot of a computer.5027 The description of the skill.

3327 5028 

3328 - `detail: "low" or "high" or "auto" or "original"`5029 - `name: string`

3329 5030 

3330 The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.5031 The name of the skill.

3331 5032 

3332 - `"low"`5033 - `path: string`

3333 5034 

3334 - `"high"`5035 The path to the directory containing the skill.

3335 5036 

3336 - `"auto"`5037 - `ContainerReference object { container_id, type }`

3337 5038 

3338 - `"original"`5039 - `container_id: string`

3339 5040 

3340 - `file_id: string`5041 The ID of the referenced container.

3341 5042 

3342 The identifier of an uploaded file that contains the screenshot.5043 - `type: "container_reference"`

3343 5044 

3344 - `image_url: string`5045 References a container created with the /v1/containers endpoint

3345 5046 

3346 The URL of the screenshot image.5047 - `"container_reference"`

3347 5048 

3348 - `type: "computer_screenshot"`5049 - `Custom object { name, type, defer_loading, 2 more }`

3349 5050 

3350 Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.5051 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

3351 5052 

3352 - `"computer_screenshot"`5053 - `name: string`

3353 5054 

3354 - `ResponseInputFile object { type, detail, file_data, 3 more }`5055 The name of the custom tool, used to identify it in tool calls.

3355 5056 

3356 A file input to the model.5057 - `type: "custom"`

3357 5058 

3358 - `type: "input_file"`5059 The type of the custom tool. Always `custom`.

3359 5060 

3360 The type of the input item. Always `input_file`.5061 - `"custom"`

3361 5062 

3362 - `"input_file"`5063 - `defer_loading: optional boolean`

3363 5064 

3364 - `detail: optional "low" or "high"`5065 Whether this tool should be deferred and discovered via tool search.

3365 5066 

3366 The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`.5067 - `description: optional string`

3367 5068 

3368 - `"low"`5069 Optional description of the custom tool, used to provide more context.

3369 5070 

3370 - `"high"`5071 - `format: optional CustomToolInputFormat`

3371 5072 

3372 - `file_data: optional string`5073 The input format for the custom tool. Default is unconstrained text.

3373 5074 

3374 The content of the file to be sent to the model.5075 - `Text object { type }`

3375 5076 

3376 - `file_id: optional string`5077 Unconstrained free-form text.

3377 5078 

3378 The ID of the file to be sent to the model.5079 - `type: "text"`

3379 5080 

3380 - `file_url: optional string`5081 Unconstrained text format. Always `text`.

3381 5082 

3382 The URL of the file to be sent to the model.5083 - `"text"`

3383 5084 

3384 - `filename: optional string`5085 - `Grammar object { definition, syntax, type }`

3385 5086 

3386 The name of the file to be sent to the model.5087 A grammar defined by the user.

3387 5088 

3388 - `role: "unknown" or "user" or "assistant" or 5 more`5089 - `definition: string`

3389 5090 

3390 The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`.5091 The grammar definition.

3391 5092 

3392 - `"unknown"`5093 - `syntax: "lark" or "regex"`

3393 5094 

3394 - `"user"`5095 The syntax of the grammar definition. One of `lark` or `regex`.

3395 5096 

3396 - `"assistant"`5097 - `"lark"`

3397 5098 

3398 - `"system"`5099 - `"regex"`

3399 5100 

3400 - `"critic"`5101 - `type: "grammar"`

3401 5102 

3402 - `"discriminator"`5103 Grammar format. Always `grammar`.

3403 5104 

3404 - `"developer"`5105 - `"grammar"`

3405 5106 

3406 - `"tool"`5107 - `Namespace object { description, name, tools, type }`

3407 5108 

3408 - `status: "in_progress" or "completed" or "incomplete"`5109 Groups function/custom tools under a shared namespace.

3409 5110 

3410 The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.5111 - `description: string`

3411 5112 

3412 - `"in_progress"`5113 A description of the namespace shown to the model.

3413 5114 

3414 - `"completed"`5115 - `name: string`

3415 5116 

3416 - `"incomplete"`5117 The namespace name used in tool calls (for example, `crm`).

3417 5118 

3418 - `type: "message"`5119 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`

3419 5120 

3420 The type of the message. Always set to `message`.5121 The function/custom tools available inside this namespace.

3421 5122 

3422 - `"message"`5123 - `Function object { name, type, defer_loading, 3 more }`

3423 5124 

3424 - `phase: optional "commentary" or "final_answer"`5125 - `name: string`

3425 5126 

3426 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.5127 - `type: "function"`

3427 5128 

3428 - `"commentary"`5129 - `"function"`

3429 5130 

3430 - `"final_answer"`5131 - `defer_loading: optional boolean`

3431 5132 

3432 - `FunctionCall object { arguments, call_id, name, 4 more }`5133 Whether this function should be deferred and discovered via tool search.

3433 5134 

3434 A tool call to run a function. See the5135 - `description: optional string`

3435 [function calling guide](/docs/guides/function-calling) for more information.

3436 5136 

3437 - `arguments: string`5137 - `parameters: optional unknown`

3438 5138 

3439 A JSON string of the arguments to pass to the function.5139 - `strict: optional boolean`

3440 5140 

3441 - `call_id: string`5141 - `Custom object { name, type, defer_loading, 2 more }`

3442 5142 

3443 The unique ID of the function tool call generated by the model.5143 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

3444 5144 

3445 - `name: string`5145 - `name: string`

3446 5146 

3447 The name of the function to run.5147 The name of the custom tool, used to identify it in tool calls.

3448 5148 

3449 - `type: "function_call"`5149 - `type: "custom"`

3450 5150 

3451 The type of the function tool call. Always `function_call`.5151 The type of the custom tool. Always `custom`.

3452 5152 

3453 - `"function_call"`5153 - `"custom"`

3454 5154 

3455 - `id: optional string`5155 - `defer_loading: optional boolean`

3456 5156 

3457 The unique ID of the function tool call.5157 Whether this tool should be deferred and discovered via tool search.

3458 5158 

3459 - `namespace: optional string`5159 - `description: optional string`

3460 5160 

3461 The namespace of the function to run.5161 Optional description of the custom tool, used to provide more context.

3462 5162 

3463 - `status: optional "in_progress" or "completed" or "incomplete"`5163 - `format: optional CustomToolInputFormat`

3464 5164 

3465 The status of the item. One of `in_progress`, `completed`, or5165 The input format for the custom tool. Default is unconstrained text.

3466 `incomplete`. Populated when items are returned via API.

3467 5166 

3468 - `"in_progress"`5167 - `type: "namespace"`

3469 5168 

3470 - `"completed"`5169 The type of the tool. Always `namespace`.

3471 5170 

3472 - `"incomplete"`5171 - `"namespace"`

3473 5172 

3474 - `ToolSearchCall object { id, arguments, call_id, 4 more }`5173 - `ToolSearch object { type, description, execution, parameters }`

3475 5174 

3476 - `id: string`5175 Hosted or BYOT tool search configuration for deferred tools.

3477 5176 

3478 The unique ID of the tool search call item.5177 - `type: "tool_search"`

3479 5178 

3480 - `arguments: unknown`5179 The type of the tool. Always `tool_search`.

3481 5180 

3482 Arguments used for the tool search call.5181 - `"tool_search"`

3483 5182 

3484 - `call_id: string`5183 - `description: optional string`

3485 5184 

3486 The unique ID of the tool search call generated by the model.5185 Description shown to the model for a client-executed tool search tool.

3487 5186 

3488 - `execution: "server" or "client"`5187 - `execution: optional "server" or "client"`

3489 5188 

3490 Whether tool search was executed by the server or by the client.5189 Whether tool search is executed by the server or by the client.

3491 5190 

3492 - `"server"`5191 - `"server"`

3493 5192 

3494 - `"client"`5193 - `"client"`

3495 5194 

3496 - `status: "in_progress" or "completed" or "incomplete"`5195 - `parameters: optional unknown`

3497 5196 

3498 The status of the tool search call item that was recorded.5197 Parameter schema for a client-executed tool search tool.

3499 5198 

3500 - `"in_progress"`5199 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`

3501 5200 

3502 - `"completed"`5201 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

3503 5202 

3504 - `"incomplete"`5203 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`

3505 5204 

3506 - `type: "tool_search_call"`5205 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

3507 5206 

3508 The type of the item. Always `tool_search_call`.5207 - `"web_search_preview"`

3509 5208 

3510 - `"tool_search_call"`5209 - `"web_search_preview_2025_03_11"`

3511 5210 

3512 - `created_by: optional string`5211 - `search_content_types: optional array of "text" or "image"`

3513 5212 

3514 The identifier of the actor that created the item.5213 - `"text"`

3515 5214 

3516 - `ToolSearchOutput object { id, call_id, execution, 4 more }`5215 - `"image"`

3517 5216 

3518 - `id: string`5217 - `search_context_size: optional "low" or "medium" or "high"`

3519 5218 

3520 The unique ID of the tool search output item.5219 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.

3521 5220 

3522 - `call_id: string`5221 - `"low"`

3523 5222 

3524 The unique ID of the tool search call generated by the model.5223 - `"medium"`

3525 5224 

3526 - `execution: "server" or "client"`5225 - `"high"`

3527 5226 

3528 Whether tool search was executed by the server or by the client.5227 - `user_location: optional object { type, city, country, 2 more }`

3529 5228 

3530 - `"server"`5229 The user's location.

3531 5230 

3532 - `"client"`5231 - `type: "approximate"`

3533 5232 

3534 - `status: "in_progress" or "completed" or "incomplete"`5233 The type of location approximation. Always `approximate`.

3535 5234 

3536 The status of the tool search output item that was recorded.5235 - `"approximate"`

3537 5236 

3538 - `"in_progress"`5237 - `city: optional string`

3539 5238 

3540 - `"completed"`5239 Free text input for the city of the user, e.g. `San Francisco`.

3541 5240 

3542 - `"incomplete"`5241 - `country: optional string`

3543 5242 

3544 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`5243 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

3545 5244 

3546 The loaded tool definitions returned by tool search.5245 - `region: optional string`

3547 5246 

3548 - `Function object { name, parameters, strict, 3 more }`5247 Free text input for the region of the user, e.g. `California`.

3549 5248 

3550 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).5249 - `timezone: optional string`

3551 5250 

3552 - `name: string`5251 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

3553 5252 

3554 The name of the function to call.5253 - `ApplyPatch object { type }`

3555 5254 

3556 - `parameters: map[unknown]`5255 Allows the assistant to create, delete, or update files using unified diffs.

3557 5256 

3558 A JSON schema object describing the parameters of the function.5257 - `type: "apply_patch"`

3559 5258 

3560 - `strict: boolean`5259 The type of the tool. Always `apply_patch`.

3561 5260 

3562 Whether to enforce strict parameter validation. Default `true`.5261 - `"apply_patch"`

3563 5262 

3564 - `type: "function"`5263 - `type: "tool_search_output"`

3565 5264 

3566 The type of the function tool. Always `function`.5265 The type of the item. Always `tool_search_output`.

3567 5266 

3568 - `"function"`5267 - `"tool_search_output"`

3569 5268 

3570 - `defer_loading: optional boolean`5269 - `created_by: optional string`

3571 5270 

3572 Whether this function is deferred and loaded via tool search.5271 The identifier of the actor that created the item.

3573 5272 

3574 - `description: optional string`5273 - `AdditionalTools object { id, role, tools, type }`

3575 5274 

3576 A description of the function. Used by the model to determine whether or not to call the function.5275 - `id: string`

3577 5276 

3578 - `FileSearch object { type, vector_store_ids, filters, 2 more }`5277 The unique ID of the additional tools item.

3579 5278 

3580 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).5279 - `role: "unknown" or "user" or "assistant" or 5 more`

3581 5280 

3582 - `type: "file_search"`5281 The role that provided the additional tools.

3583 5282 

3584 The type of the file search tool. Always `file_search`.5283 - `"unknown"`

3585 5284 

3586 - `"file_search"`5285 - `"user"`

3587 5286 

3588 - `vector_store_ids: array of string`5287 - `"assistant"`

3589 5288 

3590 The IDs of the vector stores to search.5289 - `"system"`

3591 5290 

3592 - `filters: optional ComparisonFilter or CompoundFilter`5291 - `"critic"`

3593 5292 

3594 A filter to apply.5293 - `"discriminator"`

3595 5294 

3596 - `ComparisonFilter object { key, type, value }`5295 - `"developer"`

3597 5296 

3598 A filter used to compare a specified attribute key to a given value using a defined comparison operation.5297 - `"tool"`

3599 5298 

3600 - `key: string`5299 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

3601 5300 

3602 The key to compare against the value.5301 The additional tool definitions made available at this item.

5302 

5303 - `Function object { name, parameters, strict, 3 more }`

3603 5304 

3604 - `type: "eq" or "ne" or "gt" or 5 more`5305 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

3605 5306 

3606 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.5307 - `name: string`

3607 5308 

3608 - `eq`: equals5309 The name of the function to call.

3609 - `ne`: not equal

3610 - `gt`: greater than

3611 - `gte`: greater than or equal

3612 - `lt`: less than

3613 - `lte`: less than or equal

3614 - `in`: in

3615 - `nin`: not in

3616 5310 

3617 - `"eq"`5311 - `parameters: map[unknown]`

3618 5312 

3619 - `"ne"`5313 A JSON schema object describing the parameters of the function.

3620 5314 

3621 - `"gt"`5315 - `strict: boolean`

3622 5316 

3623 - `"gte"`5317 Whether to enforce strict parameter validation. Default `true`.

3624 5318 

3625 - `"lt"`5319 - `type: "function"`

3626 5320 

3627 - `"lte"`5321 The type of the function tool. Always `function`.

3628 5322 

3629 - `"in"`5323 - `"function"`

3630 5324 

3631 - `"nin"`5325 - `defer_loading: optional boolean`

3632 5326 

3633 - `value: string or number or boolean or array of string or number`5327 Whether this function is deferred and loaded via tool search.

3634 5328 

3635 The value to compare against the attribute key; supports string, number, or boolean types.5329 - `description: optional string`

3636 5330 

3637 - `string`5331 A description of the function. Used by the model to determine whether or not to call the function.

3638 5332 

3639 - `number`5333 - `FileSearch object { type, vector_store_ids, filters, 2 more }`

3640 5334 

3641 - `boolean`5335 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

3642 5336 

3643 - `array of string or number`5337 - `type: "file_search"`

3644 5338 

3645 - `string`5339 The type of the file search tool. Always `file_search`.

3646 5340 

3647 - `number`5341 - `"file_search"`

3648 5342 

3649 - `CompoundFilter object { filters, type }`5343 - `vector_store_ids: array of string`

3650 5344 

3651 Combine multiple filters using `and` or `or`.5345 The IDs of the vector stores to search.

3652 5346 

3653 - `filters: array of ComparisonFilter or unknown`5347 - `filters: optional ComparisonFilter or CompoundFilter`

3654 5348 

3655 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.5349 A filter to apply.

3656 5350 

3657 - `ComparisonFilter object { key, type, value }`5351 - `ComparisonFilter object { key, type, value }`

3658 5352 

3659 A filter used to compare a specified attribute key to a given value using a defined comparison operation.5353 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

3660 5354 

3661 - `unknown`5355 - `CompoundFilter object { filters, type }`

3662 

3663 - `type: "and" or "or"`

3664 

3665 Type of operation: `and` or `or`.

3666 

3667 - `"and"`

3668 5356 

3669 - `"or"`5357 Combine multiple filters using `and` or `or`.

3670 5358 

3671 - `max_num_results: optional number`5359 - `max_num_results: optional number`

3672 5360 


3990 5678 

3991 - `ContainerNetworkPolicyDisabled object { type }`5679 - `ContainerNetworkPolicyDisabled object { type }`

3992 5680 

3993 - `type: "disabled"`

3994 

3995 Disable outbound network access. Always `disabled`.

3996 

3997 - `"disabled"`

3998 

3999 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`5681 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

4000 5682 

4001 - `allowed_domains: array of string`

4002 

4003 A list of allowed domains when type is `allowlist`.

4004 

4005 - `type: "allowlist"`

4006 

4007 Allow outbound network access only to specified domains. Always `allowlist`.

4008 

4009 - `"allowlist"`

4010 

4011 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`

4012 

4013 Optional domain-scoped secrets for allowlisted domains.

4014 

4015 - `domain: string`

4016 

4017 The domain associated with the secret.

4018 

4019 - `name: string`

4020 

4021 The name of the secret to inject for the domain.

4022 

4023 - `value: string`

4024 

4025 The secret value to inject for the domain.

4026 

4027 - `type: "code_interpreter"`5683 - `type: "code_interpreter"`

4028 5684 

4029 The type of the code interpreter tool. Always `code_interpreter`.5685 The type of the code interpreter tool. Always `code_interpreter`.


4180 5836 

4181 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`5837 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

4182 5838 

4183 - `type: "container_auto"`

4184 

4185 Automatically creates a container for this request

4186 

4187 - `"container_auto"`

4188 

4189 - `file_ids: optional array of string`

4190 

4191 An optional list of uploaded files to make available to your code.

4192 

4193 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

4194 

4195 The memory limit for the container.

4196 

4197 - `"1g"`

4198 

4199 - `"4g"`

4200 

4201 - `"16g"`

4202 

4203 - `"64g"`

4204 

4205 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

4206 

4207 Network access policy for the container.

4208 

4209 - `ContainerNetworkPolicyDisabled object { type }`

4210 

4211 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

4212 

4213 - `skills: optional array of SkillReference or InlineSkill`

4214 

4215 An optional list of skills referenced by id or inline data.

4216 

4217 - `SkillReference object { skill_id, type, version }`

4218 

4219 - `skill_id: string`

4220 

4221 The ID of the referenced skill.

4222 

4223 - `type: "skill_reference"`

4224 

4225 References a skill created with the /v1/skills endpoint.

4226 

4227 - `"skill_reference"`

4228 

4229 - `version: optional string`

4230 

4231 Optional skill version. Use a positive integer or 'latest'. Omit for default.

4232 

4233 - `InlineSkill object { description, name, source, type }`

4234 

4235 - `description: string`

4236 

4237 The description of the skill.

4238 

4239 - `name: string`

4240 

4241 The name of the skill.

4242 

4243 - `source: InlineSkillSource`

4244 

4245 Inline skill payload

4246 

4247 - `data: string`

4248 

4249 Base64-encoded skill zip bundle.

4250 

4251 - `media_type: "application/zip"`

4252 

4253 The media type of the inline skill payload. Must be `application/zip`.

4254 

4255 - `"application/zip"`

4256 

4257 - `type: "base64"`

4258 

4259 The type of the inline skill source. Must be `base64`.

4260 

4261 - `"base64"`

4262 

4263 - `type: "inline"`

4264 

4265 Defines an inline skill for this request.

4266 

4267 - `"inline"`

4268 

4269 - `LocalEnvironment object { type, skills }`5839 - `LocalEnvironment object { type, skills }`

4270 5840 

4271 - `type: "local"`

4272 

4273 Use a local computer environment.

4274 

4275 - `"local"`

4276 

4277 - `skills: optional array of LocalSkill`

4278 

4279 An optional list of skills.

4280 

4281 - `description: string`

4282 

4283 The description of the skill.

4284 

4285 - `name: string`

4286 

4287 The name of the skill.

4288 

4289 - `path: string`

4290 

4291 The path to the directory containing the skill.

4292 

4293 - `ContainerReference object { container_id, type }`5841 - `ContainerReference object { container_id, type }`

4294 5842 

4295 - `container_id: string`

4296 

4297 The ID of the referenced container.

4298 

4299 - `type: "container_reference"`

4300 

4301 References a container created with the /v1/containers endpoint

4302 

4303 - `"container_reference"`

4304 

4305 - `Custom object { name, type, defer_loading, 2 more }`5843 - `Custom object { name, type, defer_loading, 2 more }`

4306 5844 

4307 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)5845 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)


4328 5866 

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

4330 5868 

4331 - `Text object { type }`

4332 

4333 Unconstrained free-form text.

4334 

4335 - `type: "text"`

4336 

4337 Unconstrained text format. Always `text`.

4338 

4339 - `"text"`

4340 

4341 - `Grammar object { definition, syntax, type }`

4342 

4343 A grammar defined by the user.

4344 

4345 - `definition: string`

4346 

4347 The grammar definition.

4348 

4349 - `syntax: "lark" or "regex"`

4350 

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

4352 

4353 - `"lark"`

4354 

4355 - `"regex"`

4356 

4357 - `type: "grammar"`

4358 

4359 Grammar format. Always `grammar`.

4360 

4361 - `"grammar"`

4362 

4363 - `Namespace object { description, name, tools, type }`5869 - `Namespace object { description, name, tools, type }`

4364 5870 

4365 Groups function/custom tools under a shared namespace.5871 Groups function/custom tools under a shared namespace.


4516 6022 

4517 - `"apply_patch"`6023 - `"apply_patch"`

4518 6024 

4519 - `type: "tool_search_output"`6025 - `type: "additional_tools"`

4520 

4521 The type of the item. Always `tool_search_output`.

4522 

4523 - `"tool_search_output"`

4524 6026 

4525 - `created_by: optional string`6027 The type of the item. Always `additional_tools`.

4526 6028 

4527 The identifier of the actor that created the item.6029 - `"additional_tools"`

4528 6030 

4529 - `FunctionCallOutput object { call_id, output, type, 2 more }`6031 - `FunctionCallOutput object { call_id, output, type, 2 more }`

4530 6032 


4658 6160 

4659 The unique ID of the web search tool call.6161 The unique ID of the web search tool call.

4660 6162 

4661 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`6163 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`

4662 6164 

4663 An object describing the specific action taken in this web search call.6165 An object describing the specific action taken in this web search call.

4664 Includes details on how the model used the web (search, open_page, find_in_page).6166 Includes details on how the model used the web (search, open_page, find_in_page).

4665 6167 

4666 - `Search object { query, type, queries, sources }`6168 - `Search object { type, queries, query, sources }`

4667 6169 

4668 Action type "search" - Performs a web search query.6170 Action type "search" - Performs a web search query.

4669 6171 

4670 - `query: string`

4671 

4672 [DEPRECATED] The search query.

4673 

4674 - `type: "search"`6172 - `type: "search"`

4675 6173 

4676 The action type.6174 The action type.


4681 6179 

4682 The search queries.6180 The search queries.

4683 6181 

6182 - `query: optional string`

6183 

6184 The search query.

6185 

4684 - `sources: optional array of object { type, url }`6186 - `sources: optional array of object { type, url }`

4685 6187 

4686 The sources used in the search.6188 The sources used in the search.

Details

126 126 

127 - `"content_filter"`127 - `"content_filter"`

128 128 

129 - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 26 more`129 - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 27 more`

130 130 

131 A system (or developer) message inserted into the model's context.131 A system (or developer) message inserted into the model's context.

132 132 


139 A text input to the model, equivalent to a text input with the139 A text input to the model, equivalent to a text input with the

140 `developer` role.140 `developer` role.

141 141 

142 - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 26 more`142 - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 27 more`

143 143 

144 A list of one or many input items to the model, containing144 A list of one or many input items to the model, containing

145 different content types.145 different content types.


922 922 

923 The unique ID of the web search tool call.923 The unique ID of the web search tool call.

924 924 

925 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`925 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`

926 926 

927 An object describing the specific action taken in this web search call.927 An object describing the specific action taken in this web search call.

928 Includes details on how the model used the web (search, open_page, find_in_page).928 Includes details on how the model used the web (search, open_page, find_in_page).

929 929 

930 - `Search object { query, type, queries, sources }`930 - `Search object { type, queries, query, sources }`

931 931 

932 Action type "search" - Performs a web search query.932 Action type "search" - Performs a web search query.

933 933 

934 - `query: string`

935 

936 [DEPRECATED] The search query.

937 

938 - `type: "search"`934 - `type: "search"`

939 935 

940 The action type.936 The action type.


945 941 

946 The search queries.942 The search queries.

947 943 

944 - `query: optional string`

945 

946 The search query.

947 

948 - `sources: optional array of object { type, url }`948 - `sources: optional array of object { type, url }`

949 949 

950 The sources used in the search.950 The sources used in the search.


2216 2216 

2217 - `"incomplete"`2217 - `"incomplete"`

2218 2218 

2219 - `Reasoning object { id, summary, type, 3 more }`2219 - `AdditionalTools object { role, tools, type, id }`

2220 

2221 A description of the chain of thought used by a reasoning model while generating

2222 a response. Be sure to include these items in your `input` to the Responses API

2223 for subsequent turns of a conversation if you are manually

2224 [managing context](/docs/guides/conversation-state).

2225 2220 

2226 - `id: string`2221 - `role: "developer"`

2227 2222 

2228 The unique identifier of the reasoning content.2223 The role that provided the additional tools. Only `developer` is supported.

2229 2224 

2230 - `summary: array of SummaryTextContent`2225 - `"developer"`

2231 2226 

2232 Reasoning summary content.2227 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

2233 2228 

2234 - `text: string`2229 A list of additional tools made available at this item.

2235 2230 

2236 A summary of the reasoning output from the model so far.2231 - `Function object { name, parameters, strict, 3 more }`

2237 2232 

2238 - `type: "summary_text"`2233 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

2239 2234 

2240 The type of the object. Always `summary_text`.2235 - `name: string`

2241 2236 

2242 - `"summary_text"`2237 The name of the function to call.

2243 2238 

2244 - `type: "reasoning"`2239 - `parameters: map[unknown]`

2245 2240 

2246 The type of the object. Always `reasoning`.2241 A JSON schema object describing the parameters of the function.

2247 2242 

2248 - `"reasoning"`2243 - `strict: boolean`

2249 2244 

2250 - `content: optional array of object { text, type }`2245 Whether to enforce strict parameter validation. Default `true`.

2251 2246 

2252 Reasoning text content.2247 - `type: "function"`

2253 2248 

2254 - `text: string`2249 The type of the function tool. Always `function`.

2255 2250 

2256 The reasoning text from the model.2251 - `"function"`

2257 2252 

2258 - `type: "reasoning_text"`2253 - `defer_loading: optional boolean`

2259 2254 

2260 The type of the reasoning text. Always `reasoning_text`.2255 Whether this function is deferred and loaded via tool search.

2261 2256 

2262 - `"reasoning_text"`2257 - `description: optional string`

2263 2258 

2264 - `encrypted_content: optional string`2259 A description of the function. Used by the model to determine whether or not to call the function.

2265 2260 

2266 The encrypted content of the reasoning item - populated when a response is2261 - `FileSearch object { type, vector_store_ids, filters, 2 more }`

2267 generated with `reasoning.encrypted_content` in the `include` parameter.

2268 2262 

2269 - `status: optional "in_progress" or "completed" or "incomplete"`2263 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

2270 2264 

2271 The status of the item. One of `in_progress`, `completed`, or2265 - `type: "file_search"`

2272 `incomplete`. Populated when items are returned via API.

2273 2266 

2274 - `"in_progress"`2267 The type of the file search tool. Always `file_search`.

2275 2268 

2276 - `"completed"`2269 - `"file_search"`

2277 2270 

2278 - `"incomplete"`2271 - `vector_store_ids: array of string`

2279 2272 

2280 - `Compaction object { encrypted_content, type, id }`2273 The IDs of the vector stores to search.

2281 2274 

2282 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).2275 - `filters: optional ComparisonFilter or CompoundFilter`

2283 2276 

2284 - `encrypted_content: string`2277 A filter to apply.

2285 2278 

2286 The encrypted content of the compaction summary.2279 - `ComparisonFilter object { key, type, value }`

2287 2280 

2288 - `type: "compaction"`2281 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

2289 2282 

2290 The type of the item. Always `compaction`.2283 - `CompoundFilter object { filters, type }`

2291 2284 

2292 - `"compaction"`2285 Combine multiple filters using `and` or `or`.

2293 2286 

2294 - `id: optional string`2287 - `max_num_results: optional number`

2295 2288 

2296 The ID of the compaction item.2289 The maximum number of results to return. This number should be between 1 and 50 inclusive.

2297 2290 

2298 - `ImageGenerationCall object { id, result, status, type }`2291 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`

2299 2292 

2300 An image generation request made by the model.2293 Ranking options for search.

2301 2294 

2302 - `id: string`2295 - `hybrid_search: optional object { embedding_weight, text_weight }`

2303 2296 

2304 The unique ID of the image generation call.2297 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

2305 2298 

2306 - `result: string`2299 - `embedding_weight: number`

2307 2300 

2308 The generated image encoded in base64.2301 The weight of the embedding in the reciprocal ranking fusion.

2309 2302 

2310 - `status: "in_progress" or "completed" or "generating" or "failed"`2303 - `text_weight: number`

2311 2304 

2312 The status of the image generation call.2305 The weight of the text in the reciprocal ranking fusion.

2313 2306 

2314 - `"in_progress"`2307 - `ranker: optional "auto" or "default-2024-11-15"`

2315 2308 

2316 - `"completed"`2309 The ranker to use for the file search.

2317 2310 

2318 - `"generating"`2311 - `"auto"`

2319 2312 

2320 - `"failed"`2313 - `"default-2024-11-15"`

2321 2314 

2322 - `type: "image_generation_call"`2315 - `score_threshold: optional number`

2323 2316 

2324 The type of the image generation call. Always `image_generation_call`.2317 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.

2325 2318 

2326 - `"image_generation_call"`2319 - `Computer object { type }`

2327 2320 

2328 - `CodeInterpreterCall object { id, code, container_id, 3 more }`2321 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2329 2322 

2330 A tool call to run code.2323 - `type: "computer"`

2331 2324 

2332 - `id: string`2325 The type of the computer tool. Always `computer`.

2333 2326 

2334 The unique ID of the code interpreter tool call.2327 - `"computer"`

2335 2328 

2336 - `code: string`2329 - `ComputerUsePreview object { display_height, display_width, environment, type }`

2337 2330 

2338 The code to run, or null if not available.2331 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2339 2332 

2340 - `container_id: string`2333 - `display_height: number`

2341 2334 

2342 The ID of the container used to run the code.2335 The height of the computer display.

2343 2336 

2344 - `outputs: array of object { logs, type } or object { type, url }`2337 - `display_width: number`

2345 2338 

2346 The outputs generated by the code interpreter, such as logs or images.2339 The width of the computer display.

2347 Can be null if no outputs are available.

2348 2340 

2349 - `Logs object { logs, type }`2341 - `environment: "windows" or "mac" or "linux" or 2 more`

2350 2342 

2351 The logs output from the code interpreter.2343 The type of computer environment to control.

2352 2344 

2353 - `logs: string`2345 - `"windows"`

2354 2346 

2355 The logs output from the code interpreter.2347 - `"mac"`

2356 2348 

2357 - `type: "logs"`2349 - `"linux"`

2358 2350 

2359 The type of the output. Always `logs`.2351 - `"ubuntu"`

2360 2352 

2361 - `"logs"`2353 - `"browser"`

2362 2354 

2363 - `Image object { type, url }`2355 - `type: "computer_use_preview"`

2364 2356 

2365 The image output from the code interpreter.2357 The type of the computer use tool. Always `computer_use_preview`.

2366 2358 

2367 - `type: "image"`2359 - `"computer_use_preview"`

2368 2360 

2369 The type of the output. Always `image`.2361 - `WebSearch object { type, filters, search_context_size, user_location }`

2370 2362 

2371 - `"image"`2363 Search the Internet for sources related to the prompt. Learn more about the

2364 [web search tool](/docs/guides/tools-web-search).

2372 2365 

2373 - `url: string`2366 - `type: "web_search" or "web_search_2025_08_26"`

2374 2367 

2375 The URL of the image output from the code interpreter.2368 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

2376 2369 

2377 - `status: "in_progress" or "completed" or "incomplete" or 2 more`2370 - `"web_search"`

2378 2371 

2379 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.2372 - `"web_search_2025_08_26"`

2380 2373 

2381 - `"in_progress"`2374 - `filters: optional object { allowed_domains }`

2382 2375 

2383 - `"completed"`2376 Filters for the search.

2384 2377 

2385 - `"incomplete"`2378 - `allowed_domains: optional array of string`

2386 2379 

2387 - `"interpreting"`2380 Allowed domains for the search. If not provided, all domains are allowed.

2381 Subdomains of the provided domains are allowed as well.

2388 2382 

2389 - `"failed"`2383 Example: `["pubmed.ncbi.nlm.nih.gov"]`

2390 2384 

2391 - `type: "code_interpreter_call"`2385 - `search_context_size: optional "low" or "medium" or "high"`

2392 2386 

2393 The type of the code interpreter tool call. Always `code_interpreter_call`.2387 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.

2394 2388 

2395 - `"code_interpreter_call"`2389 - `"low"`

2396 2390 

2397 - `LocalShellCall object { id, action, call_id, 2 more }`2391 - `"medium"`

2398 2392 

2399 A tool call to run a command on the local shell.2393 - `"high"`

2400 2394 

2401 - `id: string`2395 - `user_location: optional object { city, country, region, 2 more }`

2402 2396 

2403 The unique ID of the local shell call.2397 The approximate location of the user.

2404 2398 

2405 - `action: object { command, env, type, 3 more }`2399 - `city: optional string`

2406 2400 

2407 Execute a shell command on the server.2401 Free text input for the city of the user, e.g. `San Francisco`.

2408 2402 

2409 - `command: array of string`2403 - `country: optional string`

2410 2404 

2411 The command to run.2405 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2412 2406 

2413 - `env: map[string]`2407 - `region: optional string`

2414 2408 

2415 Environment variables to set for the command.2409 Free text input for the region of the user, e.g. `California`.

2416 2410 

2417 - `type: "exec"`2411 - `timezone: optional string`

2418 2412 

2419 The type of the local shell action. Always `exec`.2413 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2420 2414 

2421 - `"exec"`2415 - `type: optional "approximate"`

2422 2416 

2423 - `timeout_ms: optional number`2417 The type of location approximation. Always `approximate`.

2424 2418 

2425 Optional timeout in milliseconds for the command.2419 - `"approximate"`

2426 2420 

2427 - `user: optional string`2421 - `Mcp object { server_label, type, allowed_tools, 7 more }`

2428 2422 

2429 Optional user to run the command as.2423 Give the model access to additional tools via remote Model Context Protocol

2424 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

2430 2425 

2431 - `working_directory: optional string`2426 - `server_label: string`

2432 2427 

2433 Optional working directory to run the command in.2428 A label for this MCP server, used to identify it in tool calls.

2434 2429 

2435 - `call_id: string`2430 - `type: "mcp"`

2436 2431 

2437 The unique ID of the local shell tool call generated by the model.2432 The type of the MCP tool. Always `mcp`.

2438 2433 

2439 - `status: "in_progress" or "completed" or "incomplete"`2434 - `"mcp"`

2440 2435 

2441 The status of the local shell call.2436 - `allowed_tools: optional array of string or object { read_only, tool_names }`

2442 2437 

2443 - `"in_progress"`2438 List of allowed tool names or a filter object.

2444 2439 

2445 - `"completed"`2440 - `McpAllowedTools = array of string`

2446 2441 

2447 - `"incomplete"`2442 A string array of allowed tool names

2448 2443 

2449 - `type: "local_shell_call"`2444 - `McpToolFilter object { read_only, tool_names }`

2450 2445 

2451 The type of the local shell call. Always `local_shell_call`.2446 A filter object to specify which tools are allowed.

2452 2447 

2453 - `"local_shell_call"`2448 - `read_only: optional boolean`

2454 2449 

2455 - `LocalShellCallOutput object { id, output, type, status }`2450 Indicates whether or not a tool modifies data or is read-only. If an

2451 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2452 it will match this filter.

2456 2453 

2457 The output of a local shell tool call.2454 - `tool_names: optional array of string`

2458 2455 

2459 - `id: string`2456 List of allowed tool names.

2460 2457 

2461 The unique ID of the local shell tool call generated by the model.2458 - `authorization: optional string`

2462 2459 

2463 - `output: string`2460 An OAuth access token that can be used with a remote MCP server, either

2461 with a custom MCP server URL or a service connector. Your application

2462 must handle the OAuth authorization flow and provide the token here.

2464 2463 

2465 A JSON string of the output of the local shell tool call.2464 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`

2466 2465 

2467 - `type: "local_shell_call_output"`2466 Identifier for service connectors, like those available in ChatGPT. One of

2467 `server_url` or `connector_id` must be provided. Learn more about service

2468 connectors [here](/docs/guides/tools-remote-mcp#connectors).

2468 2469 

2469 The type of the local shell tool call output. Always `local_shell_call_output`.2470 Currently supported `connector_id` values are:

2470 2471 

2471 - `"local_shell_call_output"`2472 - Dropbox: `connector_dropbox`

2473 - Gmail: `connector_gmail`

2474 - Google Calendar: `connector_googlecalendar`

2475 - Google Drive: `connector_googledrive`

2476 - Microsoft Teams: `connector_microsoftteams`

2477 - Outlook Calendar: `connector_outlookcalendar`

2478 - Outlook Email: `connector_outlookemail`

2479 - SharePoint: `connector_sharepoint`

2472 2480 

2473 - `status: optional "in_progress" or "completed" or "incomplete"`2481 - `"connector_dropbox"`

2474 2482 

2475 The status of the item. One of `in_progress`, `completed`, or `incomplete`.2483 - `"connector_gmail"`

2476 2484 

2477 - `"in_progress"`2485 - `"connector_googlecalendar"`

2478 2486 

2479 - `"completed"`2487 - `"connector_googledrive"`

2480 2488 

2481 - `"incomplete"`2489 - `"connector_microsoftteams"`

2482 2490 

2483 - `ShellCall object { action, call_id, type, 3 more }`2491 - `"connector_outlookcalendar"`

2484 2492 

2485 A tool representing a request to execute one or more shell commands.2493 - `"connector_outlookemail"`

2486 2494 

2487 - `action: object { commands, max_output_length, timeout_ms }`2495 - `"connector_sharepoint"`

2488 2496 

2489 The shell commands and limits that describe how to run the tool call.2497 - `defer_loading: optional boolean`

2490 2498 

2491 - `commands: array of string`2499 Whether this MCP tool is deferred and discovered via tool search.

2492 2500 

2493 Ordered shell commands for the execution environment to run.2501 - `headers: optional map[string]`

2494 2502 

2495 - `max_output_length: optional number`2503 Optional HTTP headers to send to the MCP server. Use for authentication

2504 or other purposes.

2496 2505 

2497 Maximum number of UTF-8 characters to capture from combined stdout and stderr output.2506 - `require_approval: optional object { always, never } or "always" or "never"`

2498 2507 

2499 - `timeout_ms: optional number`2508 Specify which of the MCP server's tools require approval.

2500 2509 

2501 Maximum wall-clock time in milliseconds to allow the shell commands to run.2510 - `McpToolApprovalFilter object { always, never }`

2502 2511 

2503 - `call_id: string`2512 Specify which of the MCP server's tools require approval. Can be

2513 `always`, `never`, or a filter object associated with tools

2514 that require approval.

2504 2515 

2505 The unique ID of the shell tool call generated by the model.2516 - `always: optional object { read_only, tool_names }`

2506 2517 

2507 - `type: "shell_call"`2518 A filter object to specify which tools are allowed.

2508 2519 

2509 The type of the item. Always `shell_call`.2520 - `read_only: optional boolean`

2510 2521 

2511 - `"shell_call"`2522 Indicates whether or not a tool modifies data or is read-only. If an

2523 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2524 it will match this filter.

2512 2525 

2513 - `id: optional string`2526 - `tool_names: optional array of string`

2514 2527 

2515 The unique ID of the shell tool call. Populated when this item is returned via API.2528 List of allowed tool names.

2516 2529 

2517 - `environment: optional LocalEnvironment or ContainerReference`2530 - `never: optional object { read_only, tool_names }`

2518 2531 

2519 The environment to execute the shell commands in.2532 A filter object to specify which tools are allowed.

2520 2533 

2521 - `LocalEnvironment object { type, skills }`2534 - `read_only: optional boolean`

2522 2535 

2523 - `ContainerReference object { container_id, type }`2536 Indicates whether or not a tool modifies data or is read-only. If an

2537 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2538 it will match this filter.

2524 2539 

2525 - `status: optional "in_progress" or "completed" or "incomplete"`2540 - `tool_names: optional array of string`

2526 2541 

2527 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.2542 List of allowed tool names.

2528 2543 

2529 - `"in_progress"`2544 - `McpToolApprovalSetting = "always" or "never"`

2530 2545 

2531 - `"completed"`2546 Specify a single approval policy for all tools. One of `always` or

2547 `never`. When set to `always`, all tools will require approval. When

2548 set to `never`, all tools will not require approval.

2532 2549 

2533 - `"incomplete"`2550 - `"always"`

2534 2551 

2535 - `ShellCallOutput object { call_id, output, type, 3 more }`2552 - `"never"`

2536 2553 

2537 The streamed output items emitted by a shell tool call.2554 - `server_description: optional string`

2538 2555 

2539 - `call_id: string`2556 Optional description of the MCP server, used to provide more context.

2540 2557 

2541 The unique ID of the shell tool call generated by the model.2558 - `server_url: optional string`

2542 2559 

2543 - `output: array of ResponseFunctionShellCallOutputContent`2560 The URL for the MCP server. One of `server_url` or `connector_id` must be

2561 provided.

2544 2562 

2545 Captured chunks of stdout and stderr output, along with their associated outcomes.2563 - `CodeInterpreter object { container, type }`

2546 2564 

2547 - `outcome: object { type } or object { exit_code, type }`2565 A tool that runs Python code to help generate a response to a prompt.

2548 2566 

2549 The exit or timeout outcome associated with this shell call.2567 - `container: string or object { type, file_ids, memory_limit, network_policy }`

2550 2568 

2551 - `Timeout object { type }`2569 The code interpreter container. Can be a container ID or an object that

2570 specifies uploaded file IDs to make available to your code, along with an

2571 optional `memory_limit` setting.

2552 2572 

2553 Indicates that the shell call exceeded its configured time limit.2573 - `string`

2554 2574 

2555 - `type: "timeout"`2575 The container ID.

2556 2576 

2557 The outcome type. Always `timeout`.2577 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`

2558 2578 

2559 - `"timeout"`2579 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

2560 2580 

2561 - `Exit object { exit_code, type }`2581 - `type: "auto"`

2562 2582 

2563 Indicates that the shell commands finished and returned an exit code.2583 Always `auto`.

2564 2584 

2565 - `exit_code: number`2585 - `"auto"`

2566 2586 

2567 The exit code returned by the shell process.2587 - `file_ids: optional array of string`

2568 2588 

2569 - `type: "exit"`2589 An optional list of uploaded files to make available to your code.

2570 2590 

2571 The outcome type. Always `exit`.2591 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

2572 2592 

2573 - `"exit"`2593 The memory limit for the code interpreter container.

2574 2594 

2575 - `stderr: string`2595 - `"1g"`

2576 2596 

2577 Captured stderr output for the shell call.2597 - `"4g"`

2578 2598 

2579 - `stdout: string`2599 - `"16g"`

2580 2600 

2581 Captured stdout output for the shell call.2601 - `"64g"`

2582 2602 

2583 - `type: "shell_call_output"`2603 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

2584 2604 

2585 The type of the item. Always `shell_call_output`.2605 Network access policy for the container.

2586 2606 

2587 - `"shell_call_output"`2607 - `ContainerNetworkPolicyDisabled object { type }`

2588 2608 

2589 - `id: optional string`2609 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

2590 2610 

2591 The unique ID of the shell tool call output. Populated when this item is returned via API.2611 - `type: "code_interpreter"`

2592 2612 

2593 - `max_output_length: optional number`2613 The type of the code interpreter tool. Always `code_interpreter`.

2594 2614 

2595 The maximum number of UTF-8 characters captured for this shell call's combined output.2615 - `"code_interpreter"`

2596 2616 

2597 - `status: optional "in_progress" or "completed" or "incomplete"`2617 - `ImageGeneration object { type, action, background, 9 more }`

2598 2618 

2599 The status of the shell call output.2619 A tool that generates images using the GPT image models.

2600 2620 

2601 - `"in_progress"`2621 - `type: "image_generation"`

2602 2622 

2603 - `"completed"`2623 The type of the image generation tool. Always `image_generation`.

2604 2624 

2605 - `"incomplete"`2625 - `"image_generation"`

2606 2626 

2607 - `ApplyPatchCall object { call_id, operation, status, 2 more }`2627 - `action: optional "generate" or "edit" or "auto"`

2608 2628 

2609 A tool call representing a request to create, delete, or update files using diff patches.2629 Whether to generate a new image or edit an existing image. Default: `auto`.

2610 2630 

2611 - `call_id: string`2631 - `"generate"`

2612 2632 

2613 The unique ID of the apply patch tool call generated by the model.2633 - `"edit"`

2614 2634 

2615 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`2635 - `"auto"`

2616 2636 

2617 The specific create, delete, or update instruction for the apply_patch tool call.2637 - `background: optional "transparent" or "opaque" or "auto"`

2618 2638 

2619 - `CreateFile object { diff, path, type }`2639 Background type for the generated image. One of `transparent`,

2640 `opaque`, or `auto`. Default: `auto`.

2620 2641 

2621 Instruction for creating a new file via the apply_patch tool.2642 - `"transparent"`

2622 2643 

2623 - `diff: string`2644 - `"opaque"`

2624 2645 

2625 Unified diff content to apply when creating the file.2646 - `"auto"`

2626 2647 

2627 - `path: string`2648 - `input_fidelity: optional "high" or "low"`

2628 2649 

2629 Path of the file to create relative to the workspace root.2650 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`.

2630 2651 

2631 - `type: "create_file"`2652 - `"high"`

2632 2653 

2633 The operation type. Always `create_file`.2654 - `"low"`

2634 2655 

2635 - `"create_file"`2656 - `input_image_mask: optional object { file_id, image_url }`

2636 2657 

2637 - `DeleteFile object { path, type }`2658 Optional mask for inpainting. Contains `image_url`

2659 (string, optional) and `file_id` (string, optional).

2638 2660 

2639 Instruction for deleting an existing file via the apply_patch tool.2661 - `file_id: optional string`

2640 2662 

2641 - `path: string`2663 File ID for the mask image.

2642 2664 

2643 Path of the file to delete relative to the workspace root.2665 - `image_url: optional string`

2644 2666 

2645 - `type: "delete_file"`2667 Base64-encoded mask image.

2646 2668 

2647 The operation type. Always `delete_file`.2669 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2648 2670 

2649 - `"delete_file"`2671 The image generation model to use. Default: `gpt-image-1`.

2650 2672 

2651 - `UpdateFile object { diff, path, type }`2673 - `string`

2652 2674 

2653 Instruction for updating an existing file via the apply_patch tool.2675 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2654 2676 

2655 - `diff: string`2677 The image generation model to use. Default: `gpt-image-1`.

2656 2678 

2657 Unified diff content to apply to the existing file.2679 - `"gpt-image-1"`

2658 2680 

2659 - `path: string`2681 - `"gpt-image-1-mini"`

2660 2682 

2661 Path of the file to update relative to the workspace root.2683 - `"gpt-image-1.5"`

2662 2684 

2663 - `type: "update_file"`2685 - `moderation: optional "auto" or "low"`

2664 2686 

2665 The operation type. Always `update_file`.2687 Moderation level for the generated image. Default: `auto`.

2666 2688 

2667 - `"update_file"`2689 - `"auto"`

2668 2690 

2669 - `status: "in_progress" or "completed"`2691 - `"low"`

2670 2692 

2671 The status of the apply patch tool call. One of `in_progress` or `completed`.2693 - `output_compression: optional number`

2672 2694 

2673 - `"in_progress"`2695 Compression level for the output image. Default: 100.

2674 2696 

2675 - `"completed"`2697 - `output_format: optional "png" or "webp" or "jpeg"`

2676 2698 

2677 - `type: "apply_patch_call"`2699 The output format of the generated image. One of `png`, `webp`, or

2700 `jpeg`. Default: `png`.

2678 2701 

2679 The type of the item. Always `apply_patch_call`.2702 - `"png"`

2680 2703 

2681 - `"apply_patch_call"`2704 - `"webp"`

2682 2705 

2683 - `id: optional string`2706 - `"jpeg"`

2684 2707 

2685 The unique ID of the apply patch tool call. Populated when this item is returned via API.2708 - `partial_images: optional number`

2686 2709 

2687 - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`2710 Number of partial images to generate in streaming mode, from 0 (default value) to 3.

2688 2711 

2689 The streamed output emitted by an apply patch tool call.2712 - `quality: optional "low" or "medium" or "high" or "auto"`

2690 2713 

2691 - `call_id: string`2714 The quality of the generated image. One of `low`, `medium`, `high`,

2715 or `auto`. Default: `auto`.

2692 2716 

2693 The unique ID of the apply patch tool call generated by the model.2717 - `"low"`

2694 2718 

2695 - `status: "completed" or "failed"`2719 - `"medium"`

2696 2720 

2697 The status of the apply patch tool call output. One of `completed` or `failed`.2721 - `"high"`

2698 2722 

2699 - `"completed"`2723 - `"auto"`

2700 2724 

2701 - `"failed"`2725 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2702 2726 

2703 - `type: "apply_patch_call_output"`2727 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2704 2728 

2705 The type of the item. Always `apply_patch_call_output`.2729 - `string`

2706 2730 

2707 - `"apply_patch_call_output"`2731 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2708 2732 

2709 - `id: optional string`2733 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2710 2734 

2711 The unique ID of the apply patch tool call output. Populated when this item is returned via API.2735 - `"1024x1024"`

2712 2736 

2713 - `output: optional string`2737 - `"1024x1536"`

2714 2738 

2715 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).2739 - `"1536x1024"`

2716 2740 

2717 - `McpListTools object { id, server_label, tools, 2 more }`2741 - `"auto"`

2718 2742 

2719 A list of tools available on an MCP server.2743 - `LocalShell object { type }`

2720 2744 

2721 - `id: string`2745 A tool that allows the model to execute shell commands in a local environment.

2722 2746 

2723 The unique ID of the list.2747 - `type: "local_shell"`

2724 2748 

2725 - `server_label: string`2749 The type of the local shell tool. Always `local_shell`.

2726 2750 

2727 The label of the MCP server.2751 - `"local_shell"`

2728 2752 

2729 - `tools: array of object { input_schema, name, annotations, description }`2753 - `Shell object { type, environment }`

2730 2754 

2731 The tools available on the server.2755 A tool that allows the model to execute shell commands.

2732 2756 

2733 - `input_schema: unknown`2757 - `type: "shell"`

2734 2758 

2735 The JSON schema describing the tool's input.2759 The type of the shell tool. Always `shell`.

2736 2760 

2737 - `name: string`2761 - `"shell"`

2738 2762 

2739 The name of the tool.2763 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`

2740 2764 

2741 - `annotations: optional unknown`2765 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

2742 2766 

2743 Additional annotations about the tool.2767 - `LocalEnvironment object { type, skills }`

2744 2768 

2745 - `description: optional string`2769 - `ContainerReference object { container_id, type }`

2746 2770 

2747 The description of the tool.2771 - `Custom object { name, type, defer_loading, 2 more }`

2748 2772 

2749 - `type: "mcp_list_tools"`2773 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2750 2774 

2751 The type of the item. Always `mcp_list_tools`.2775 - `name: string`

2752 2776 

2753 - `"mcp_list_tools"`2777 The name of the custom tool, used to identify it in tool calls.

2754 2778 

2755 - `error: optional string`2779 - `type: "custom"`

2756 2780 

2757 Error message if the server could not list tools.2781 The type of the custom tool. Always `custom`.

2758 2782 

2759 - `McpApprovalRequest object { id, arguments, name, 2 more }`2783 - `"custom"`

2760 2784 

2761 A request for human approval of a tool invocation.2785 - `defer_loading: optional boolean`

2762 2786 

2763 - `id: string`2787 Whether this tool should be deferred and discovered via tool search.

2764 2788 

2765 The unique ID of the approval request.2789 - `description: optional string`

2766 2790 

2767 - `arguments: string`2791 Optional description of the custom tool, used to provide more context.

2768 2792 

2769 A JSON string of arguments for the tool.2793 - `format: optional CustomToolInputFormat`

2770 2794 

2771 - `name: string`2795 The input format for the custom tool. Default is unconstrained text.

2772 2796 

2773 The name of the tool to run.2797 - `Namespace object { description, name, tools, type }`

2774 2798 

2775 - `server_label: string`2799 Groups function/custom tools under a shared namespace.

2776 2800 

2777 The label of the MCP server making the request.2801 - `description: string`

2778 2802 

2779 - `type: "mcp_approval_request"`2803 A description of the namespace shown to the model.

2780 2804 

2781 The type of the item. Always `mcp_approval_request`.2805 - `name: string`

2782 2806 

2783 - `"mcp_approval_request"`2807 The namespace name used in tool calls (for example, `crm`).

2784 2808 

2785 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`2809 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`

2786 2810 

2787 A response to an MCP approval request.2811 The function/custom tools available inside this namespace.

2788 2812 

2789 - `approval_request_id: string`2813 - `Function object { name, type, defer_loading, 3 more }`

2790 2814 

2791 The ID of the approval request being answered.2815 - `name: string`

2792 2816 

2793 - `approve: boolean`2817 - `type: "function"`

2794 2818 

2795 Whether the request was approved.2819 - `"function"`

2796 2820 

2797 - `type: "mcp_approval_response"`2821 - `defer_loading: optional boolean`

2798 2822 

2799 The type of the item. Always `mcp_approval_response`.2823 Whether this function should be deferred and discovered via tool search.

2800 2824 

2801 - `"mcp_approval_response"`2825 - `description: optional string`

2802 2826 

2803 - `id: optional string`2827 - `parameters: optional unknown`

2804 2828 

2805 The unique ID of the approval response2829 - `strict: optional boolean`

2806 2830 

2807 - `reason: optional string`2831 - `Custom object { name, type, defer_loading, 2 more }`

2808 2832 

2809 Optional reason for the decision.2833 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2810 2834 

2811 - `McpCall object { id, arguments, name, 6 more }`2835 - `name: string`

2812 2836 

2813 An invocation of a tool on an MCP server.2837 The name of the custom tool, used to identify it in tool calls.

2814 2838 

2815 - `id: string`2839 - `type: "custom"`

2816 2840 

2817 The unique ID of the tool call.2841 The type of the custom tool. Always `custom`.

2818 2842 

2819 - `arguments: string`2843 - `"custom"`

2820 2844 

2821 A JSON string of the arguments passed to the tool.2845 - `defer_loading: optional boolean`

2822 2846 

2823 - `name: string`2847 Whether this tool should be deferred and discovered via tool search.

2824 2848 

2825 The name of the tool that was run.2849 - `description: optional string`

2826 2850 

2827 - `server_label: string`2851 Optional description of the custom tool, used to provide more context.

2828 2852 

2829 The label of the MCP server running the tool.2853 - `format: optional CustomToolInputFormat`

2830 2854 

2831 - `type: "mcp_call"`2855 The input format for the custom tool. Default is unconstrained text.

2832 2856 

2833 The type of the item. Always `mcp_call`.2857 - `type: "namespace"`

2834 2858 

2835 - `"mcp_call"`2859 The type of the tool. Always `namespace`.

2836 2860 

2837 - `approval_request_id: optional string`2861 - `"namespace"`

2838 2862 

2839 Unique identifier for the MCP tool call approval request.2863 - `ToolSearch object { type, description, execution, parameters }`

2840 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

2841 2864 

2842 - `error: optional string`2865 Hosted or BYOT tool search configuration for deferred tools.

2843 2866 

2844 The error from the tool call, if any.2867 - `type: "tool_search"`

2845 2868 

2846 - `output: optional string`2869 The type of the tool. Always `tool_search`.

2847 2870 

2848 The output from the tool call.2871 - `"tool_search"`

2849 2872 

2850 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`2873 - `description: optional string`

2851 2874 

2852 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.2875 Description shown to the model for a client-executed tool search tool.

2853 2876 

2854 - `"in_progress"`2877 - `execution: optional "server" or "client"`

2855 2878 

2856 - `"completed"`2879 Whether tool search is executed by the server or by the client.

2857 2880 

2858 - `"incomplete"`2881 - `"server"`

2859 2882 

2860 - `"calling"`2883 - `"client"`

2861 2884 

2862 - `"failed"`2885 - `parameters: optional unknown`

2863 2886 

2864 - `CustomToolCallOutput object { call_id, output, type, id }`2887 Parameter schema for a client-executed tool search tool.

2865 2888 

2866 The output of a custom tool call from your code, being sent back to the model.2889 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`

2867 2890 

2868 - `call_id: string`2891 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

2869 2892 

2870 The call ID, used to map this custom tool call output to a custom tool call.2893 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`

2871 2894 

2872 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`2895 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

2873 2896 

2874 The output from the custom tool call generated by your code.2897 - `"web_search_preview"`

2875 Can be a string or an list of output content.

2876 2898 

2877 - `StringOutput = string`2899 - `"web_search_preview_2025_03_11"`

2878 2900 

2879 A string of the output of the custom tool call.2901 - `search_content_types: optional array of "text" or "image"`

2880 2902 

2881 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`2903 - `"text"`

2882 2904 

2883 Text, image, or file output of the custom tool call.2905 - `"image"`

2884 2906 

2885 - `ResponseInputText object { text, type }`2907 - `search_context_size: optional "low" or "medium" or "high"`

2886 2908 

2887 A text input to the model.2909 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.

2888 2910 

2889 - `ResponseInputImage object { detail, type, file_id, image_url }`2911 - `"low"`

2890 2912 

2891 An image input to the model. Learn about [image inputs](/docs/guides/vision).2913 - `"medium"`

2892 2914 

2893 - `ResponseInputFile object { type, detail, file_data, 3 more }`2915 - `"high"`

2894 2916 

2895 A file input to the model.2917 - `user_location: optional object { type, city, country, 2 more }`

2896 2918 

2897 - `type: "custom_tool_call_output"`2919 The user's location.

2898 2920 

2899 The type of the custom tool call output. Always `custom_tool_call_output`.2921 - `type: "approximate"`

2900 2922 

2901 - `"custom_tool_call_output"`2923 The type of location approximation. Always `approximate`.

2902 2924 

2903 - `id: optional string`2925 - `"approximate"`

2904 2926 

2905 The unique ID of the custom tool call output in the OpenAI platform.2927 - `city: optional string`

2906 2928 

2907 - `CustomToolCall object { call_id, input, name, 3 more }`2929 Free text input for the city of the user, e.g. `San Francisco`.

2908 2930 

2909 A call to a custom tool created by the model.2931 - `country: optional string`

2910 2932 

2911 - `call_id: string`2933 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2912 2934 

2913 An identifier used to map this custom tool call to a tool call output.2935 - `region: optional string`

2914 2936 

2915 - `input: string`2937 Free text input for the region of the user, e.g. `California`.

2916 2938 

2917 The input for the custom tool call generated by the model.2939 - `timezone: optional string`

2918 2940 

2919 - `name: string`2941 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2920 2942 

2921 The name of the custom tool being called.2943 - `ApplyPatch object { type }`

2922 2944 

2923 - `type: "custom_tool_call"`2945 Allows the assistant to create, delete, or update files using unified diffs.

2924 2946 

2925 The type of the custom tool call. Always `custom_tool_call`.2947 - `type: "apply_patch"`

2926 2948 

2927 - `"custom_tool_call"`2949 The type of the tool. Always `apply_patch`.

2928 2950 

2929 - `id: optional string`2951 - `"apply_patch"`

2930 2952 

2931 The unique ID of the custom tool call in the OpenAI platform.2953 - `type: "additional_tools"`

2932 2954 

2933 - `namespace: optional string`2955 The item type. Always `additional_tools`.

2934 2956 

2935 The namespace of the custom tool being called.2957 - `"additional_tools"`

2936 2958 

2937 - `CompactionTrigger object { type }`2959 - `id: optional string`

2938 2960 

2939 Compacts the current context. Must be the final input item.2961 The unique ID of this additional tools item.

2940 2962 

2941 - `type: "compaction_trigger"`2963 - `Reasoning object { id, summary, type, 3 more }`

2942 2964 

2943 The type of the item. Always `compaction_trigger`.2965 A description of the chain of thought used by a reasoning model while generating

2966 a response. Be sure to include these items in your `input` to the Responses API

2967 for subsequent turns of a conversation if you are manually

2968 [managing context](/docs/guides/conversation-state).

2944 2969 

2945 - `"compaction_trigger"`2970 - `id: string`

2946 2971 

2947 - `ItemReference object { id, type }`2972 The unique identifier of the reasoning content.

2948 2973 

2949 An internal identifier for an item to reference.2974 - `summary: array of SummaryTextContent`

2950 2975 

2951 - `id: string`2976 Reasoning summary content.

2952 2977 

2953 The ID of the item to reference.2978 - `text: string`

2954 2979 

2955 - `type: optional "item_reference"`2980 A summary of the reasoning output from the model so far.

2981 

2982 - `type: "summary_text"`

2983 

2984 The type of the object. Always `summary_text`.

2985 

2986 - `"summary_text"`

2987 

2988 - `type: "reasoning"`

2989 

2990 The type of the object. Always `reasoning`.

2991 

2992 - `"reasoning"`

2993 

2994 - `content: optional array of object { text, type }`

2995 

2996 Reasoning text content.

2997 

2998 - `text: string`

2999 

3000 The reasoning text from the model.

3001 

3002 - `type: "reasoning_text"`

3003 

3004 The type of the reasoning text. Always `reasoning_text`.

3005 

3006 - `"reasoning_text"`

3007 

3008 - `encrypted_content: optional string`

3009 

3010 The encrypted content of the reasoning item - populated when a response is

3011 generated with `reasoning.encrypted_content` in the `include` parameter.

3012 

3013 - `status: optional "in_progress" or "completed" or "incomplete"`

3014 

3015 The status of the item. One of `in_progress`, `completed`, or

3016 `incomplete`. Populated when items are returned via API.

3017 

3018 - `"in_progress"`

3019 

3020 - `"completed"`

3021 

3022 - `"incomplete"`

3023 

3024 - `Compaction object { encrypted_content, type, id }`

3025 

3026 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).

3027 

3028 - `encrypted_content: string`

3029 

3030 The encrypted content of the compaction summary.

3031 

3032 - `type: "compaction"`

3033 

3034 The type of the item. Always `compaction`.

3035 

3036 - `"compaction"`

3037 

3038 - `id: optional string`

3039 

3040 The ID of the compaction item.

3041 

3042 - `ImageGenerationCall object { id, result, status, type }`

3043 

3044 An image generation request made by the model.

3045 

3046 - `id: string`

3047 

3048 The unique ID of the image generation call.

3049 

3050 - `result: string`

3051 

3052 The generated image encoded in base64.

3053 

3054 - `status: "in_progress" or "completed" or "generating" or "failed"`

3055 

3056 The status of the image generation call.

3057 

3058 - `"in_progress"`

3059 

3060 - `"completed"`

3061 

3062 - `"generating"`

3063 

3064 - `"failed"`

3065 

3066 - `type: "image_generation_call"`

3067 

3068 The type of the image generation call. Always `image_generation_call`.

3069 

3070 - `"image_generation_call"`

3071 

3072 - `CodeInterpreterCall object { id, code, container_id, 3 more }`

3073 

3074 A tool call to run code.

3075 

3076 - `id: string`

3077 

3078 The unique ID of the code interpreter tool call.

3079 

3080 - `code: string`

3081 

3082 The code to run, or null if not available.

3083 

3084 - `container_id: string`

3085 

3086 The ID of the container used to run the code.

3087 

3088 - `outputs: array of object { logs, type } or object { type, url }`

3089 

3090 The outputs generated by the code interpreter, such as logs or images.

3091 Can be null if no outputs are available.

3092 

3093 - `Logs object { logs, type }`

3094 

3095 The logs output from the code interpreter.

3096 

3097 - `logs: string`

3098 

3099 The logs output from the code interpreter.

3100 

3101 - `type: "logs"`

3102 

3103 The type of the output. Always `logs`.

3104 

3105 - `"logs"`

3106 

3107 - `Image object { type, url }`

3108 

3109 The image output from the code interpreter.

3110 

3111 - `type: "image"`

3112 

3113 The type of the output. Always `image`.

3114 

3115 - `"image"`

3116 

3117 - `url: string`

3118 

3119 The URL of the image output from the code interpreter.

3120 

3121 - `status: "in_progress" or "completed" or "incomplete" or 2 more`

3122 

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

3124 

3125 - `"in_progress"`

3126 

3127 - `"completed"`

3128 

3129 - `"incomplete"`

3130 

3131 - `"interpreting"`

3132 

3133 - `"failed"`

3134 

3135 - `type: "code_interpreter_call"`

3136 

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

3138 

3139 - `"code_interpreter_call"`

3140 

3141 - `LocalShellCall object { id, action, call_id, 2 more }`

3142 

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

3144 

3145 - `id: string`

3146 

3147 The unique ID of the local shell call.

3148 

3149 - `action: object { command, env, type, 3 more }`

3150 

3151 Execute a shell command on the server.

3152 

3153 - `command: array of string`

3154 

3155 The command to run.

3156 

3157 - `env: map[string]`

3158 

3159 Environment variables to set for the command.

3160 

3161 - `type: "exec"`

3162 

3163 The type of the local shell action. Always `exec`.

3164 

3165 - `"exec"`

3166 

3167 - `timeout_ms: optional number`

3168 

3169 Optional timeout in milliseconds for the command.

3170 

3171 - `user: optional string`

3172 

3173 Optional user to run the command as.

3174 

3175 - `working_directory: optional string`

3176 

3177 Optional working directory to run the command in.

3178 

3179 - `call_id: string`

3180 

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

3182 

3183 - `status: "in_progress" or "completed" or "incomplete"`

3184 

3185 The status of the local shell call.

3186 

3187 - `"in_progress"`

3188 

3189 - `"completed"`

3190 

3191 - `"incomplete"`

3192 

3193 - `type: "local_shell_call"`

3194 

3195 The type of the local shell call. Always `local_shell_call`.

3196 

3197 - `"local_shell_call"`

3198 

3199 - `LocalShellCallOutput object { id, output, type, status }`

3200 

3201 The output of a local shell tool call.

3202 

3203 - `id: string`

3204 

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

3206 

3207 - `output: string`

3208 

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

3210 

3211 - `type: "local_shell_call_output"`

3212 

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

3214 

3215 - `"local_shell_call_output"`

3216 

3217 - `status: optional "in_progress" or "completed" or "incomplete"`

3218 

3219 The status of the item. One of `in_progress`, `completed`, or `incomplete`.

3220 

3221 - `"in_progress"`

3222 

3223 - `"completed"`

3224 

3225 - `"incomplete"`

3226 

3227 - `ShellCall object { action, call_id, type, 3 more }`

3228 

3229 A tool representing a request to execute one or more shell commands.

3230 

3231 - `action: object { commands, max_output_length, timeout_ms }`

3232 

3233 The shell commands and limits that describe how to run the tool call.

3234 

3235 - `commands: array of string`

3236 

3237 Ordered shell commands for the execution environment to run.

3238 

3239 - `max_output_length: optional number`

3240 

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

3242 

3243 - `timeout_ms: optional number`

3244 

3245 Maximum wall-clock time in milliseconds to allow the shell commands to run.

3246 

3247 - `call_id: string`

3248 

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

3250 

3251 - `type: "shell_call"`

3252 

3253 The type of the item. Always `shell_call`.

3254 

3255 - `"shell_call"`

3256 

3257 - `id: optional string`

3258 

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

3260 

3261 - `environment: optional LocalEnvironment or ContainerReference`

3262 

3263 The environment to execute the shell commands in.

3264 

3265 - `LocalEnvironment object { type, skills }`

3266 

3267 - `ContainerReference object { container_id, type }`

3268 

3269 - `status: optional "in_progress" or "completed" or "incomplete"`

3270 

3271 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

3272 

3273 - `"in_progress"`

3274 

3275 - `"completed"`

3276 

3277 - `"incomplete"`

3278 

3279 - `ShellCallOutput object { call_id, output, type, 3 more }`

3280 

3281 The streamed output items emitted by a shell tool call.

3282 

3283 - `call_id: string`

3284 

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

3286 

3287 - `output: array of ResponseFunctionShellCallOutputContent`

3288 

3289 Captured chunks of stdout and stderr output, along with their associated outcomes.

3290 

3291 - `outcome: object { type } or object { exit_code, type }`

3292 

3293 The exit or timeout outcome associated with this shell call.

3294 

3295 - `Timeout object { type }`

3296 

3297 Indicates that the shell call exceeded its configured time limit.

3298 

3299 - `type: "timeout"`

3300 

3301 The outcome type. Always `timeout`.

3302 

3303 - `"timeout"`

3304 

3305 - `Exit object { exit_code, type }`

3306 

3307 Indicates that the shell commands finished and returned an exit code.

3308 

3309 - `exit_code: number`

3310 

3311 The exit code returned by the shell process.

3312 

3313 - `type: "exit"`

3314 

3315 The outcome type. Always `exit`.

3316 

3317 - `"exit"`

3318 

3319 - `stderr: string`

3320 

3321 Captured stderr output for the shell call.

3322 

3323 - `stdout: string`

3324 

3325 Captured stdout output for the shell call.

3326 

3327 - `type: "shell_call_output"`

3328 

3329 The type of the item. Always `shell_call_output`.

3330 

3331 - `"shell_call_output"`

3332 

3333 - `id: optional string`

3334 

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

3336 

3337 - `max_output_length: optional number`

3338 

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

3340 

3341 - `status: optional "in_progress" or "completed" or "incomplete"`

3342 

3343 The status of the shell call output.

3344 

3345 - `"in_progress"`

3346 

3347 - `"completed"`

3348 

3349 - `"incomplete"`

3350 

3351 - `ApplyPatchCall object { call_id, operation, status, 2 more }`

3352 

3353 A tool call representing a request to create, delete, or update files using diff patches.

3354 

3355 - `call_id: string`

3356 

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

3358 

3359 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`

3360 

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

3362 

3363 - `CreateFile object { diff, path, type }`

3364 

3365 Instruction for creating a new file via the apply_patch tool.

3366 

3367 - `diff: string`

3368 

3369 Unified diff content to apply when creating the file.

3370 

3371 - `path: string`

3372 

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

3374 

3375 - `type: "create_file"`

3376 

3377 The operation type. Always `create_file`.

3378 

3379 - `"create_file"`

3380 

3381 - `DeleteFile object { path, type }`

3382 

3383 Instruction for deleting an existing file via the apply_patch tool.

3384 

3385 - `path: string`

3386 

3387 Path of the file to delete relative to the workspace root.

3388 

3389 - `type: "delete_file"`

3390 

3391 The operation type. Always `delete_file`.

3392 

3393 - `"delete_file"`

3394 

3395 - `UpdateFile object { diff, path, type }`

3396 

3397 Instruction for updating an existing file via the apply_patch tool.

3398 

3399 - `diff: string`

3400 

3401 Unified diff content to apply to the existing file.

3402 

3403 - `path: string`

3404 

3405 Path of the file to update relative to the workspace root.

3406 

3407 - `type: "update_file"`

3408 

3409 The operation type. Always `update_file`.

3410 

3411 - `"update_file"`

3412 

3413 - `status: "in_progress" or "completed"`

3414 

3415 The status of the apply patch tool call. One of `in_progress` or `completed`.

3416 

3417 - `"in_progress"`

3418 

3419 - `"completed"`

3420 

3421 - `type: "apply_patch_call"`

3422 

3423 The type of the item. Always `apply_patch_call`.

3424 

3425 - `"apply_patch_call"`

3426 

3427 - `id: optional string`

3428 

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

3430 

3431 - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`

3432 

3433 The streamed output emitted by an apply patch tool call.

3434 

3435 - `call_id: string`

3436 

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

3438 

3439 - `status: "completed" or "failed"`

3440 

3441 The status of the apply patch tool call output. One of `completed` or `failed`.

3442 

3443 - `"completed"`

3444 

3445 - `"failed"`

3446 

3447 - `type: "apply_patch_call_output"`

3448 

3449 The type of the item. Always `apply_patch_call_output`.

3450 

3451 - `"apply_patch_call_output"`

3452 

3453 - `id: optional string`

3454 

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

3456 

3457 - `output: optional string`

3458 

3459 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

3460 

3461 - `McpListTools object { id, server_label, tools, 2 more }`

3462 

3463 A list of tools available on an MCP server.

3464 

3465 - `id: string`

3466 

3467 The unique ID of the list.

3468 

3469 - `server_label: string`

3470 

3471 The label of the MCP server.

3472 

3473 - `tools: array of object { input_schema, name, annotations, description }`

3474 

3475 The tools available on the server.

3476 

3477 - `input_schema: unknown`

3478 

3479 The JSON schema describing the tool's input.

3480 

3481 - `name: string`

3482 

3483 The name of the tool.

3484 

3485 - `annotations: optional unknown`

3486 

3487 Additional annotations about the tool.

3488 

3489 - `description: optional string`

3490 

3491 The description of the tool.

3492 

3493 - `type: "mcp_list_tools"`

3494 

3495 The type of the item. Always `mcp_list_tools`.

3496 

3497 - `"mcp_list_tools"`

3498 

3499 - `error: optional string`

3500 

3501 Error message if the server could not list tools.

3502 

3503 - `McpApprovalRequest object { id, arguments, name, 2 more }`

3504 

3505 A request for human approval of a tool invocation.

3506 

3507 - `id: string`

3508 

3509 The unique ID of the approval request.

3510 

3511 - `arguments: string`

3512 

3513 A JSON string of arguments for the tool.

3514 

3515 - `name: string`

3516 

3517 The name of the tool to run.

3518 

3519 - `server_label: string`

3520 

3521 The label of the MCP server making the request.

3522 

3523 - `type: "mcp_approval_request"`

3524 

3525 The type of the item. Always `mcp_approval_request`.

3526 

3527 - `"mcp_approval_request"`

3528 

3529 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`

3530 

3531 A response to an MCP approval request.

3532 

3533 - `approval_request_id: string`

3534 

3535 The ID of the approval request being answered.

3536 

3537 - `approve: boolean`

3538 

3539 Whether the request was approved.

3540 

3541 - `type: "mcp_approval_response"`

3542 

3543 The type of the item. Always `mcp_approval_response`.

3544 

3545 - `"mcp_approval_response"`

3546 

3547 - `id: optional string`

3548 

3549 The unique ID of the approval response

3550 

3551 - `reason: optional string`

3552 

3553 Optional reason for the decision.

3554 

3555 - `McpCall object { id, arguments, name, 6 more }`

3556 

3557 An invocation of a tool on an MCP server.

3558 

3559 - `id: string`

3560 

3561 The unique ID of the tool call.

3562 

3563 - `arguments: string`

3564 

3565 A JSON string of the arguments passed to the tool.

3566 

3567 - `name: string`

3568 

3569 The name of the tool that was run.

3570 

3571 - `server_label: string`

3572 

3573 The label of the MCP server running the tool.

3574 

3575 - `type: "mcp_call"`

3576 

3577 The type of the item. Always `mcp_call`.

3578 

3579 - `"mcp_call"`

3580 

3581 - `approval_request_id: optional string`

3582 

3583 Unique identifier for the MCP tool call approval request.

3584 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

3585 

3586 - `error: optional string`

3587 

3588 The error from the tool call, if any.

3589 

3590 - `output: optional string`

3591 

3592 The output from the tool call.

3593 

3594 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`

3595 

3596 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

3597 

3598 - `"in_progress"`

3599 

3600 - `"completed"`

3601 

3602 - `"incomplete"`

3603 

3604 - `"calling"`

3605 

3606 - `"failed"`

3607 

3608 - `CustomToolCallOutput object { call_id, output, type, id }`

3609 

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

3611 

3612 - `call_id: string`

3613 

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

3615 

3616 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`

3617 

3618 The output from the custom tool call generated by your code.

3619 Can be a string or an list of output content.

3620 

3621 - `StringOutput = string`

3622 

3623 A string of the output of the custom tool call.

3624 

3625 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`

3626 

3627 Text, image, or file output of the custom tool call.

3628 

3629 - `ResponseInputText object { text, type }`

3630 

3631 A text input to the model.

3632 

3633 - `ResponseInputImage object { detail, type, file_id, image_url }`

3634 

3635 An image input to the model. Learn about [image inputs](/docs/guides/vision).

3636 

3637 - `ResponseInputFile object { type, detail, file_data, 3 more }`

3638 

3639 A file input to the model.

3640 

3641 - `type: "custom_tool_call_output"`

3642 

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

3644 

3645 - `"custom_tool_call_output"`

3646 

3647 - `id: optional string`

3648 

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

3650 

3651 - `CustomToolCall object { call_id, input, name, 3 more }`

3652 

3653 A call to a custom tool created by the model.

3654 

3655 - `call_id: string`

3656 

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

3658 

3659 - `input: string`

3660 

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

3662 

3663 - `name: string`

3664 

3665 The name of the custom tool being called.

3666 

3667 - `type: "custom_tool_call"`

3668 

3669 The type of the custom tool call. Always `custom_tool_call`.

3670 

3671 - `"custom_tool_call"`

3672 

3673 - `id: optional string`

3674 

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

3676 

3677 - `namespace: optional string`

3678 

3679 The namespace of the custom tool being called.

3680 

3681 - `CompactionTrigger object { type }`

3682 

3683 Compacts the current context. Must be the final input item.

3684 

3685 - `type: "compaction_trigger"`

3686 

3687 The type of the item. Always `compaction_trigger`.

3688 

3689 - `"compaction_trigger"`

3690 

3691 - `ItemReference object { id, type }`

3692 

3693 An internal identifier for an item to reference.

3694 

3695 - `id: string`

3696 

3697 The ID of the item to reference.

3698 

3699 - `type: optional "item_reference"`

3700 

3701 The type of item to reference. Always `item_reference`.

3702 

3703 - `"item_reference"`

3704 

3705 - `metadata: Metadata`

3706 

3707 Set of 16 key-value pairs that can be attached to an object. This can be

3708 useful for storing additional information about the object in a structured

3709 format, and querying for objects via API or the dashboard.

3710 

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

3712 with a maximum length of 512 characters.

3713 

3714 - `model: ResponsesModel`

3715 

3716 Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI

3717 offers a wide range of models with different capabilities, performance

3718 characteristics, and price points. Refer to the [model guide](/docs/models)

3719 to browse and compare available models.

3720 

3721 - `string`

3722 

3723 - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more`

3724 

3725 - `"gpt-5.4"`

3726 

3727 - `"gpt-5.4-mini"`

3728 

3729 - `"gpt-5.4-nano"`

3730 

3731 - `"gpt-5.4-mini-2026-03-17"`

3732 

3733 - `"gpt-5.4-nano-2026-03-17"`

3734 

3735 - `"gpt-5.3-chat-latest"`

3736 

3737 - `"gpt-5.2"`

3738 

3739 - `"gpt-5.2-2025-12-11"`

3740 

3741 - `"gpt-5.2-chat-latest"`

3742 

3743 - `"gpt-5.2-pro"`

3744 

3745 - `"gpt-5.2-pro-2025-12-11"`

3746 

3747 - `"gpt-5.1"`

3748 

3749 - `"gpt-5.1-2025-11-13"`

3750 

3751 - `"gpt-5.1-codex"`

3752 

3753 - `"gpt-5.1-mini"`

3754 

3755 - `"gpt-5.1-chat-latest"`

3756 

3757 - `"gpt-5"`

3758 

3759 - `"gpt-5-mini"`

3760 

3761 - `"gpt-5-nano"`

3762 

3763 - `"gpt-5-2025-08-07"`

3764 

3765 - `"gpt-5-mini-2025-08-07"`

3766 

3767 - `"gpt-5-nano-2025-08-07"`

3768 

3769 - `"gpt-5-chat-latest"`

3770 

3771 - `"gpt-4.1"`

3772 

3773 - `"gpt-4.1-mini"`

3774 

3775 - `"gpt-4.1-nano"`

3776 

3777 - `"gpt-4.1-2025-04-14"`

3778 

3779 - `"gpt-4.1-mini-2025-04-14"`

3780 

3781 - `"gpt-4.1-nano-2025-04-14"`

3782 

3783 - `"o4-mini"`

3784 

3785 - `"o4-mini-2025-04-16"`

3786 

3787 - `"o3"`

3788 

3789 - `"o3-2025-04-16"`

3790 

3791 - `"o3-mini"`

3792 

3793 - `"o3-mini-2025-01-31"`

3794 

3795 - `"o1"`

3796 

3797 - `"o1-2024-12-17"`

3798 

3799 - `"o1-preview"`

3800 

3801 - `"o1-preview-2024-09-12"`

3802 

3803 - `"o1-mini"`

3804 

3805 - `"o1-mini-2024-09-12"`

3806 

3807 - `"gpt-4o"`

3808 

3809 - `"gpt-4o-2024-11-20"`

3810 

3811 - `"gpt-4o-2024-08-06"`

3812 

3813 - `"gpt-4o-2024-05-13"`

3814 

3815 - `"gpt-4o-audio-preview"`

3816 

3817 - `"gpt-4o-audio-preview-2024-10-01"`

3818 

3819 - `"gpt-4o-audio-preview-2024-12-17"`

3820 

3821 - `"gpt-4o-audio-preview-2025-06-03"`

3822 

3823 - `"gpt-4o-mini-audio-preview"`

3824 

3825 - `"gpt-4o-mini-audio-preview-2024-12-17"`

3826 

3827 - `"gpt-4o-search-preview"`

3828 

3829 - `"gpt-4o-mini-search-preview"`

3830 

3831 - `"gpt-4o-search-preview-2025-03-11"`

3832 

3833 - `"gpt-4o-mini-search-preview-2025-03-11"`

3834 

3835 - `"chatgpt-4o-latest"`

3836 

3837 - `"codex-mini-latest"`

3838 

3839 - `"gpt-4o-mini"`

3840 

3841 - `"gpt-4o-mini-2024-07-18"`

3842 

3843 - `"gpt-4-turbo"`

3844 

3845 - `"gpt-4-turbo-2024-04-09"`

3846 

3847 - `"gpt-4-0125-preview"`

3848 

3849 - `"gpt-4-turbo-preview"`

3850 

3851 - `"gpt-4-1106-preview"`

3852 

3853 - `"gpt-4-vision-preview"`

3854 

3855 - `"gpt-4"`

3856 

3857 - `"gpt-4-0314"`

3858 

3859 - `"gpt-4-0613"`

3860 

3861 - `"gpt-4-32k"`

3862 

3863 - `"gpt-4-32k-0314"`

3864 

3865 - `"gpt-4-32k-0613"`

3866 

3867 - `"gpt-3.5-turbo"`

3868 

3869 - `"gpt-3.5-turbo-16k"`

3870 

3871 - `"gpt-3.5-turbo-0301"`

3872 

3873 - `"gpt-3.5-turbo-0613"`

3874 

3875 - `"gpt-3.5-turbo-1106"`

3876 

3877 - `"gpt-3.5-turbo-0125"`

3878 

3879 - `"gpt-3.5-turbo-16k-0613"`

3880 

3881 - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more`

3882 

3883 - `"o1-pro"`

3884 

3885 - `"o1-pro-2025-03-19"`

3886 

3887 - `"o3-pro"`

3888 

3889 - `"o3-pro-2025-06-10"`

3890 

3891 - `"o3-deep-research"`

3892 

3893 - `"o3-deep-research-2025-06-26"`

3894 

3895 - `"o4-mini-deep-research"`

3896 

3897 - `"o4-mini-deep-research-2025-06-26"`

3898 

3899 - `"computer-use-preview"`

3900 

3901 - `"computer-use-preview-2025-03-11"`

3902 

3903 - `"gpt-5-codex"`

3904 

3905 - `"gpt-5-pro"`

3906 

3907 - `"gpt-5-pro-2025-10-06"`

3908 

3909 - `"gpt-5.1-codex-max"`

3910 

3911 - `object: "response"`

3912 

3913 The object type of this resource - always set to `response`.

3914 

3915 - `"response"`

3916 

3917 - `output: array of ResponseOutputItem`

3918 

3919 An array of content items generated by the model.

3920 

3921 - The length and order of items in the `output` array is dependent

3922 on the model's response.

3923 - Rather than accessing the first item in the `output` array and

3924 assuming it's an `assistant` message with the content generated by

3925 the model, you might consider using the `output_text` property where

3926 supported in SDKs.

3927 

3928 - `ResponseOutputMessage object { id, content, role, 3 more }`

3929 

3930 An output message from the model.

3931 

3932 - `FileSearchCall object { id, queries, status, 2 more }`

3933 

3934 The results of a file search tool call. See the

3935 [file search guide](/docs/guides/tools-file-search) for more information.

3936 

3937 - `id: string`

3938 

3939 The unique ID of the file search tool call.

3940 

3941 - `queries: array of string`

3942 

3943 The queries used to search for files.

3944 

3945 - `status: "in_progress" or "searching" or "completed" or 2 more`

3946 

3947 The status of the file search tool call. One of `in_progress`,

3948 `searching`, `incomplete` or `failed`,

3949 

3950 - `"in_progress"`

3951 

3952 - `"searching"`

3953 

3954 - `"completed"`

3955 

3956 - `"incomplete"`

3957 

3958 - `"failed"`

3959 

3960 - `type: "file_search_call"`

3961 

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

3963 

3964 - `"file_search_call"`

3965 

3966 - `results: optional array of object { attributes, file_id, filename, 2 more }`

3967 

3968 The results of the file search tool call.

3969 

3970 - `attributes: optional map[string or number or boolean]`

3971 

3972 Set of 16 key-value pairs that can be attached to an object. This can be

3973 useful for storing additional information about the object in a structured

3974 format, and querying for objects via API or the dashboard. Keys are strings

3975 with a maximum length of 64 characters. Values are strings with a maximum

3976 length of 512 characters, booleans, or numbers.

3977 

3978 - `string`

3979 

3980 - `number`

3981 

3982 - `boolean`

3983 

3984 - `file_id: optional string`

3985 

3986 The unique ID of the file.

3987 

3988 - `filename: optional string`

3989 

3990 The name of the file.

3991 

3992 - `score: optional number`

3993 

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

3995 

3996 - `text: optional string`

3997 

3998 The text that was retrieved from the file.

3999 

4000 - `FunctionCall object { arguments, call_id, name, 4 more }`

4001 

4002 A tool call to run a function. See the

4003 [function calling guide](/docs/guides/function-calling) for more information.

4004 

4005 - `arguments: string`

4006 

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

4008 

4009 - `call_id: string`

4010 

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

4012 

4013 - `name: string`

4014 

4015 The name of the function to run.

4016 

4017 - `type: "function_call"`

4018 

4019 The type of the function tool call. Always `function_call`.

4020 

4021 - `"function_call"`

4022 

4023 - `id: optional string`

4024 

4025 The unique ID of the function tool call.

4026 

4027 - `namespace: optional string`

4028 

4029 The namespace of the function to run.

4030 

4031 - `status: optional "in_progress" or "completed" or "incomplete"`

4032 

4033 The status of the item. One of `in_progress`, `completed`, or

4034 `incomplete`. Populated when items are returned via API.

4035 

4036 - `"in_progress"`

4037 

4038 - `"completed"`

4039 

4040 - `"incomplete"`

4041 

4042 - `FunctionCallOutput object { id, call_id, output, 3 more }`

4043 

4044 - `id: string`

4045 

4046 The unique ID of the function call tool output.

4047 

4048 - `call_id: string`

4049 

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

4051 

4052 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`

4053 

4054 The output from the function call generated by your code.

4055 Can be a string or an list of output content.

4056 

4057 - `StringOutput = string`

4058 

4059 A string of the output of the function call.

4060 

4061 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`

4062 

4063 Text, image, or file output of the function call.

4064 

4065 - `ResponseInputText object { text, type }`

4066 

4067 A text input to the model.

4068 

4069 - `ResponseInputImage object { detail, type, file_id, image_url }`

4070 

4071 An image input to the model. Learn about [image inputs](/docs/guides/vision).

4072 

4073 - `ResponseInputFile object { type, detail, file_data, 3 more }`

4074 

4075 A file input to the model.

4076 

4077 - `status: "in_progress" or "completed" or "incomplete"`

4078 

4079 The status of the item. One of `in_progress`, `completed`, or

4080 `incomplete`. Populated when items are returned via API.

4081 

4082 - `"in_progress"`

4083 

4084 - `"completed"`

4085 

4086 - `"incomplete"`

4087 

4088 - `type: "function_call_output"`

4089 

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

4091 

4092 - `"function_call_output"`

4093 

4094 - `created_by: optional string`

4095 

4096 The identifier of the actor that created the item.

4097 

4098 - `WebSearchCall object { id, action, status, type }`

4099 

4100 The results of a web search tool call. See the

4101 [web search guide](/docs/guides/tools-web-search) for more information.

4102 

4103 - `id: string`

4104 

4105 The unique ID of the web search tool call.

4106 

4107 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`

4108 

4109 An object describing the specific action taken in this web search call.

4110 Includes details on how the model used the web (search, open_page, find_in_page).

4111 

4112 - `Search object { type, queries, query, sources }`

4113 

4114 Action type "search" - Performs a web search query.

4115 

4116 - `type: "search"`

4117 

4118 The action type.

4119 

4120 - `"search"`

4121 

4122 - `queries: optional array of string`

4123 

4124 The search queries.

4125 

4126 - `query: optional string`

4127 

4128 The search query.

4129 

4130 - `sources: optional array of object { type, url }`

4131 

4132 The sources used in the search.

4133 

4134 - `type: "url"`

4135 

4136 The type of source. Always `url`.

4137 

4138 - `"url"`

4139 

4140 - `url: string`

4141 

4142 The URL of the source.

4143 

4144 - `OpenPage object { type, url }`

4145 

4146 Action type "open_page" - Opens a specific URL from search results.

4147 

4148 - `type: "open_page"`

4149 

4150 The action type.

4151 

4152 - `"open_page"`

4153 

4154 - `url: optional string`

4155 

4156 The URL opened by the model.

4157 

4158 - `FindInPage object { pattern, type, url }`

4159 

4160 Action type "find_in_page": Searches for a pattern within a loaded page.

4161 

4162 - `pattern: string`

4163 

4164 The pattern or text to search for within the page.

4165 

4166 - `type: "find_in_page"`

4167 

4168 The action type.

4169 

4170 - `"find_in_page"`

4171 

4172 - `url: string`

4173 

4174 The URL of the page searched for the pattern.

4175 

4176 - `status: "in_progress" or "searching" or "completed" or "failed"`

4177 

4178 The status of the web search tool call.

4179 

4180 - `"in_progress"`

4181 

4182 - `"searching"`

4183 

4184 - `"completed"`

4185 

4186 - `"failed"`

4187 

4188 - `type: "web_search_call"`

4189 

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

4191 

4192 - `"web_search_call"`

4193 

4194 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`

4195 

4196 A tool call to a computer use tool. See the

4197 [computer use guide](/docs/guides/tools-computer-use) for more information.

4198 

4199 - `id: string`

4200 

4201 The unique ID of the computer call.

4202 

4203 - `call_id: string`

4204 

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

4206 

4207 - `pending_safety_checks: array of object { id, code, message }`

4208 

4209 The pending safety checks for the computer call.

4210 

4211 - `id: string`

4212 

4213 The ID of the pending safety check.

4214 

4215 - `code: optional string`

4216 

4217 The type of the pending safety check.

4218 

4219 - `message: optional string`

4220 

4221 Details about the pending safety check.

4222 

4223 - `status: "in_progress" or "completed" or "incomplete"`

4224 

4225 The status of the item. One of `in_progress`, `completed`, or

4226 `incomplete`. Populated when items are returned via API.

4227 

4228 - `"in_progress"`

4229 

4230 - `"completed"`

4231 

4232 - `"incomplete"`

4233 

4234 - `type: "computer_call"`

4235 

4236 The type of the computer call. Always `computer_call`.

4237 

4238 - `"computer_call"`

4239 

4240 - `action: optional ComputerAction`

4241 

4242 A click action.

4243 

4244 - `actions: optional ComputerActionList`

4245 

4246 Flattened batched actions for `computer_use`. Each action includes an

4247 `type` discriminator and action-specific fields.

4248 

4249 - `ComputerCallOutput object { id, call_id, output, 4 more }`

4250 

4251 - `id: string`

4252 

4253 The unique ID of the computer call tool output.

4254 

4255 - `call_id: string`

4256 

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

4258 

4259 - `output: ResponseComputerToolCallOutputScreenshot`

4260 

4261 A computer screenshot image used with the computer use tool.

4262 

4263 - `status: "completed" or "incomplete" or "failed" or "in_progress"`

4264 

4265 The status of the message input. One of `in_progress`, `completed`, or

4266 `incomplete`. Populated when input items are returned via API.

4267 

4268 - `"completed"`

4269 

4270 - `"incomplete"`

4271 

4272 - `"failed"`

4273 

4274 - `"in_progress"`

4275 

4276 - `type: "computer_call_output"`

4277 

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

4279 

4280 - `"computer_call_output"`

4281 

4282 - `acknowledged_safety_checks: optional array of object { id, code, message }`

4283 

4284 The safety checks reported by the API that have been acknowledged by the

4285 developer.

4286 

4287 - `id: string`

4288 

4289 The ID of the pending safety check.

4290 

4291 - `code: optional string`

4292 

4293 The type of the pending safety check.

4294 

4295 - `message: optional string`

4296 

4297 Details about the pending safety check.

4298 

4299 - `created_by: optional string`

4300 

4301 The identifier of the actor that created the item.

4302 

4303 - `Reasoning object { id, summary, type, 3 more }`

4304 

4305 A description of the chain of thought used by a reasoning model while generating

4306 a response. Be sure to include these items in your `input` to the Responses API

4307 for subsequent turns of a conversation if you are manually

4308 [managing context](/docs/guides/conversation-state).

4309 

4310 - `id: string`

4311 

4312 The unique identifier of the reasoning content.

4313 

4314 - `summary: array of SummaryTextContent`

4315 

4316 Reasoning summary content.

4317 

4318 - `text: string`

4319 

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

4321 

4322 - `type: "summary_text"`

4323 

4324 The type of the object. Always `summary_text`.

4325 

4326 - `type: "reasoning"`

4327 

4328 The type of the object. Always `reasoning`.

4329 

4330 - `"reasoning"`

4331 

4332 - `content: optional array of object { text, type }`

4333 

4334 Reasoning text content.

4335 

4336 - `text: string`

4337 

4338 The reasoning text from the model.

4339 

4340 - `type: "reasoning_text"`

4341 

4342 The type of the reasoning text. Always `reasoning_text`.

4343 

4344 - `"reasoning_text"`

4345 

4346 - `encrypted_content: optional string`

4347 

4348 The encrypted content of the reasoning item - populated when a response is

4349 generated with `reasoning.encrypted_content` in the `include` parameter.

4350 

4351 - `status: optional "in_progress" or "completed" or "incomplete"`

4352 

4353 The status of the item. One of `in_progress`, `completed`, or

4354 `incomplete`. Populated when items are returned via API.

4355 

4356 - `"in_progress"`

4357 

4358 - `"completed"`

4359 

4360 - `"incomplete"`

4361 

4362 - `ToolSearchCall object { id, arguments, call_id, 4 more }`

4363 

4364 - `id: string`

4365 

4366 The unique ID of the tool search call item.

4367 

4368 - `arguments: unknown`

4369 

4370 Arguments used for the tool search call.

4371 

4372 - `call_id: string`

4373 

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

4375 

4376 - `execution: "server" or "client"`

4377 

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

4379 

4380 - `"server"`

4381 

4382 - `"client"`

4383 

4384 - `status: "in_progress" or "completed" or "incomplete"`

4385 

4386 The status of the tool search call item that was recorded.

4387 

4388 - `"in_progress"`

4389 

4390 - `"completed"`

4391 

4392 - `"incomplete"`

4393 

4394 - `type: "tool_search_call"`

4395 

4396 The type of the item. Always `tool_search_call`.

4397 

4398 - `"tool_search_call"`

4399 

4400 - `created_by: optional string`

4401 

4402 The identifier of the actor that created the item.

4403 

4404 - `ToolSearchOutput object { id, call_id, execution, 4 more }`

4405 

4406 - `id: string`

4407 

4408 The unique ID of the tool search output item.

4409 

4410 - `call_id: string`

4411 

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

4413 

4414 - `execution: "server" or "client"`

4415 

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

4417 

4418 - `"server"`

4419 

4420 - `"client"`

4421 

4422 - `status: "in_progress" or "completed" or "incomplete"`

4423 

4424 The status of the tool search output item that was recorded.

4425 

4426 - `"in_progress"`

4427 

4428 - `"completed"`

4429 

4430 - `"incomplete"`

4431 

4432 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

4433 

4434 The loaded tool definitions returned by tool search.

4435 

4436 - `Function object { name, parameters, strict, 3 more }`

4437 

4438 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

4439 

4440 - `name: string`

4441 

4442 The name of the function to call.

4443 

4444 - `parameters: map[unknown]`

4445 

4446 A JSON schema object describing the parameters of the function.

4447 

4448 - `strict: boolean`

4449 

4450 Whether to enforce strict parameter validation. Default `true`.

4451 

4452 - `type: "function"`

2956 4453 

2957 The type of item to reference. Always `item_reference`.4454 The type of the function tool. Always `function`.

2958 4455 

2959 - `"item_reference"`4456 - `"function"`

2960 4457 

2961 - `metadata: Metadata`4458 - `defer_loading: optional boolean`

2962 4459 

2963 Set of 16 key-value pairs that can be attached to an object. This can be4460 Whether this function is deferred and loaded via tool search.

2964 useful for storing additional information about the object in a structured

2965 format, and querying for objects via API or the dashboard.

2966 4461 

2967 Keys are strings with a maximum length of 64 characters. Values are strings4462 - `description: optional string`

2968 with a maximum length of 512 characters.

2969 4463 

2970 - `model: ResponsesModel`4464 A description of the function. Used by the model to determine whether or not to call the function.

2971 4465 

2972 Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI4466 - `FileSearch object { type, vector_store_ids, filters, 2 more }`

2973 offers a wide range of models with different capabilities, performance

2974 characteristics, and price points. Refer to the [model guide](/docs/models)

2975 to browse and compare available models.

2976 4467 

2977 - `string`4468 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

2978 4469 

2979 - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more`4470 - `type: "file_search"`

2980 4471 

2981 - `"gpt-5.4"`4472 The type of the file search tool. Always `file_search`.

2982 4473 

2983 - `"gpt-5.4-mini"`4474 - `"file_search"`

2984 4475 

2985 - `"gpt-5.4-nano"`4476 - `vector_store_ids: array of string`

2986 4477 

2987 - `"gpt-5.4-mini-2026-03-17"`4478 The IDs of the vector stores to search.

2988 4479 

2989 - `"gpt-5.4-nano-2026-03-17"`4480 - `filters: optional ComparisonFilter or CompoundFilter`

2990 4481 

2991 - `"gpt-5.3-chat-latest"`4482 A filter to apply.

2992 4483 

2993 - `"gpt-5.2"`4484 - `ComparisonFilter object { key, type, value }`

2994 4485 

2995 - `"gpt-5.2-2025-12-11"`4486 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

2996 4487 

2997 - `"gpt-5.2-chat-latest"`4488 - `CompoundFilter object { filters, type }`

2998 4489 

2999 - `"gpt-5.2-pro"`4490 Combine multiple filters using `and` or `or`.

3000 4491 

3001 - `"gpt-5.2-pro-2025-12-11"`4492 - `max_num_results: optional number`

3002 4493 

3003 - `"gpt-5.1"`4494 The maximum number of results to return. This number should be between 1 and 50 inclusive.

3004 4495 

3005 - `"gpt-5.1-2025-11-13"`4496 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`

3006 4497 

3007 - `"gpt-5.1-codex"`4498 Ranking options for search.

3008 4499 

3009 - `"gpt-5.1-mini"`4500 - `hybrid_search: optional object { embedding_weight, text_weight }`

3010 4501 

3011 - `"gpt-5.1-chat-latest"`4502 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

3012 4503 

3013 - `"gpt-5"`4504 - `embedding_weight: number`

3014 4505 

3015 - `"gpt-5-mini"`4506 The weight of the embedding in the reciprocal ranking fusion.

3016 4507 

3017 - `"gpt-5-nano"`4508 - `text_weight: number`

3018 4509 

3019 - `"gpt-5-2025-08-07"`4510 The weight of the text in the reciprocal ranking fusion.

3020 4511 

3021 - `"gpt-5-mini-2025-08-07"`4512 - `ranker: optional "auto" or "default-2024-11-15"`

3022 4513 

3023 - `"gpt-5-nano-2025-08-07"`4514 The ranker to use for the file search.

3024 4515 

3025 - `"gpt-5-chat-latest"`4516 - `"auto"`

3026 4517 

3027 - `"gpt-4.1"`4518 - `"default-2024-11-15"`

3028 4519 

3029 - `"gpt-4.1-mini"`4520 - `score_threshold: optional number`

3030 4521 

3031 - `"gpt-4.1-nano"`4522 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.

3032 4523 

3033 - `"gpt-4.1-2025-04-14"`4524 - `Computer object { type }`

3034 4525 

3035 - `"gpt-4.1-mini-2025-04-14"`4526 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

3036 4527 

3037 - `"gpt-4.1-nano-2025-04-14"`4528 - `type: "computer"`

3038 4529 

3039 - `"o4-mini"`4530 The type of the computer tool. Always `computer`.

3040 4531 

3041 - `"o4-mini-2025-04-16"`4532 - `"computer"`

3042 4533 

3043 - `"o3"`4534 - `ComputerUsePreview object { display_height, display_width, environment, type }`

3044 4535 

3045 - `"o3-2025-04-16"`4536 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

3046 4537 

3047 - `"o3-mini"`4538 - `display_height: number`

3048 4539 

3049 - `"o3-mini-2025-01-31"`4540 The height of the computer display.

3050 4541 

3051 - `"o1"`4542 - `display_width: number`

3052 4543 

3053 - `"o1-2024-12-17"`4544 The width of the computer display.

3054 4545 

3055 - `"o1-preview"`4546 - `environment: "windows" or "mac" or "linux" or 2 more`

3056 4547 

3057 - `"o1-preview-2024-09-12"`4548 The type of computer environment to control.

3058 4549 

3059 - `"o1-mini"`4550 - `"windows"`

3060 4551 

3061 - `"o1-mini-2024-09-12"`4552 - `"mac"`

3062 4553 

3063 - `"gpt-4o"`4554 - `"linux"`

3064 4555 

3065 - `"gpt-4o-2024-11-20"`4556 - `"ubuntu"`

3066 4557 

3067 - `"gpt-4o-2024-08-06"`4558 - `"browser"`

3068 4559 

3069 - `"gpt-4o-2024-05-13"`4560 - `type: "computer_use_preview"`

3070 4561 

3071 - `"gpt-4o-audio-preview"`4562 The type of the computer use tool. Always `computer_use_preview`.

3072 4563 

3073 - `"gpt-4o-audio-preview-2024-10-01"`4564 - `"computer_use_preview"`

3074 4565 

3075 - `"gpt-4o-audio-preview-2024-12-17"`4566 - `WebSearch object { type, filters, search_context_size, user_location }`

3076 4567 

3077 - `"gpt-4o-audio-preview-2025-06-03"`4568 Search the Internet for sources related to the prompt. Learn more about the

4569 [web search tool](/docs/guides/tools-web-search).

3078 4570 

3079 - `"gpt-4o-mini-audio-preview"`4571 - `type: "web_search" or "web_search_2025_08_26"`

3080 4572 

3081 - `"gpt-4o-mini-audio-preview-2024-12-17"`4573 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

3082 4574 

3083 - `"gpt-4o-search-preview"`4575 - `"web_search"`

3084 4576 

3085 - `"gpt-4o-mini-search-preview"`4577 - `"web_search_2025_08_26"`

3086 4578 

3087 - `"gpt-4o-search-preview-2025-03-11"`4579 - `filters: optional object { allowed_domains }`

3088 4580 

3089 - `"gpt-4o-mini-search-preview-2025-03-11"`4581 Filters for the search.

3090 4582 

3091 - `"chatgpt-4o-latest"`4583 - `allowed_domains: optional array of string`

3092 4584 

3093 - `"codex-mini-latest"`4585 Allowed domains for the search. If not provided, all domains are allowed.

4586 Subdomains of the provided domains are allowed as well.

3094 4587 

3095 - `"gpt-4o-mini"`4588 Example: `["pubmed.ncbi.nlm.nih.gov"]`

3096 4589 

3097 - `"gpt-4o-mini-2024-07-18"`4590 - `search_context_size: optional "low" or "medium" or "high"`

3098 4591 

3099 - `"gpt-4-turbo"`4592 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.

3100 4593 

3101 - `"gpt-4-turbo-2024-04-09"`4594 - `"low"`

3102 4595 

3103 - `"gpt-4-0125-preview"`4596 - `"medium"`

3104 4597 

3105 - `"gpt-4-turbo-preview"`4598 - `"high"`

3106 4599 

3107 - `"gpt-4-1106-preview"`4600 - `user_location: optional object { city, country, region, 2 more }`

3108 4601 

3109 - `"gpt-4-vision-preview"`4602 The approximate location of the user.

3110 4603 

3111 - `"gpt-4"`4604 - `city: optional string`

3112 4605 

3113 - `"gpt-4-0314"`4606 Free text input for the city of the user, e.g. `San Francisco`.

3114 4607 

3115 - `"gpt-4-0613"`4608 - `country: optional string`

3116 4609 

3117 - `"gpt-4-32k"`4610 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

3118 4611 

3119 - `"gpt-4-32k-0314"`4612 - `region: optional string`

3120 4613 

3121 - `"gpt-4-32k-0613"`4614 Free text input for the region of the user, e.g. `California`.

3122 4615 

3123 - `"gpt-3.5-turbo"`4616 - `timezone: optional string`

3124 4617 

3125 - `"gpt-3.5-turbo-16k"`4618 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

3126 4619 

3127 - `"gpt-3.5-turbo-0301"`4620 - `type: optional "approximate"`

3128 4621 

3129 - `"gpt-3.5-turbo-0613"`4622 The type of location approximation. Always `approximate`.

3130 4623 

3131 - `"gpt-3.5-turbo-1106"`4624 - `"approximate"`

3132 4625 

3133 - `"gpt-3.5-turbo-0125"`4626 - `Mcp object { server_label, type, allowed_tools, 7 more }`

3134 4627 

3135 - `"gpt-3.5-turbo-16k-0613"`4628 Give the model access to additional tools via remote Model Context Protocol

4629 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

3136 4630 

3137 - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more`4631 - `server_label: string`

3138 4632 

3139 - `"o1-pro"`4633 A label for this MCP server, used to identify it in tool calls.

3140 4634 

3141 - `"o1-pro-2025-03-19"`4635 - `type: "mcp"`

3142 4636 

3143 - `"o3-pro"`4637 The type of the MCP tool. Always `mcp`.

3144 4638 

3145 - `"o3-pro-2025-06-10"`4639 - `"mcp"`

3146 4640 

3147 - `"o3-deep-research"`4641 - `allowed_tools: optional array of string or object { read_only, tool_names }`

3148 4642 

3149 - `"o3-deep-research-2025-06-26"`4643 List of allowed tool names or a filter object.

3150 4644 

3151 - `"o4-mini-deep-research"`4645 - `McpAllowedTools = array of string`

3152 4646 

3153 - `"o4-mini-deep-research-2025-06-26"`4647 A string array of allowed tool names

3154 4648 

3155 - `"computer-use-preview"`4649 - `McpToolFilter object { read_only, tool_names }`

3156 4650 

3157 - `"computer-use-preview-2025-03-11"`4651 A filter object to specify which tools are allowed.

3158 4652 

3159 - `"gpt-5-codex"`4653 - `read_only: optional boolean`

3160 4654 

3161 - `"gpt-5-pro"`4655 Indicates whether or not a tool modifies data or is read-only. If an

4656 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

4657 it will match this filter.

3162 4658 

3163 - `"gpt-5-pro-2025-10-06"`4659 - `tool_names: optional array of string`

3164 4660 

3165 - `"gpt-5.1-codex-max"`4661 List of allowed tool names.

3166 4662 

3167 - `object: "response"`4663 - `authorization: optional string`

3168 4664 

3169 The object type of this resource - always set to `response`.4665 An OAuth access token that can be used with a remote MCP server, either

4666 with a custom MCP server URL or a service connector. Your application

4667 must handle the OAuth authorization flow and provide the token here.

3170 4668 

3171 - `"response"`4669 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`

3172 4670 

3173 - `output: array of ResponseOutputItem`4671 Identifier for service connectors, like those available in ChatGPT. One of

4672 `server_url` or `connector_id` must be provided. Learn more about service

4673 connectors [here](/docs/guides/tools-remote-mcp#connectors).

3174 4674 

3175 An array of content items generated by the model.4675 Currently supported `connector_id` values are:

3176 4676 

3177 - The length and order of items in the `output` array is dependent4677 - Dropbox: `connector_dropbox`

3178 on the model's response.4678 - Gmail: `connector_gmail`

3179 - Rather than accessing the first item in the `output` array and4679 - Google Calendar: `connector_googlecalendar`

3180 assuming it's an `assistant` message with the content generated by4680 - Google Drive: `connector_googledrive`

3181 the model, you might consider using the `output_text` property where4681 - Microsoft Teams: `connector_microsoftteams`

3182 supported in SDKs.4682 - Outlook Calendar: `connector_outlookcalendar`

4683 - Outlook Email: `connector_outlookemail`

4684 - SharePoint: `connector_sharepoint`

4685 

4686 - `"connector_dropbox"`

4687 

4688 - `"connector_gmail"`

4689 

4690 - `"connector_googlecalendar"`

4691 

4692 - `"connector_googledrive"`

4693 

4694 - `"connector_microsoftteams"`

4695 

4696 - `"connector_outlookcalendar"`

3183 4697 

3184 - `ResponseOutputMessage object { id, content, role, 3 more }`4698 - `"connector_outlookemail"`

3185 4699 

3186 An output message from the model.4700 - `"connector_sharepoint"`

3187 4701 

3188 - `FileSearchCall object { id, queries, status, 2 more }`4702 - `defer_loading: optional boolean`

3189 4703 

3190 The results of a file search tool call. See the4704 Whether this MCP tool is deferred and discovered via tool search.

3191 [file search guide](/docs/guides/tools-file-search) for more information.

3192 4705 

3193 - `id: string`4706 - `headers: optional map[string]`

3194 4707 

3195 The unique ID of the file search tool call.4708 Optional HTTP headers to send to the MCP server. Use for authentication

4709 or other purposes.

3196 4710 

3197 - `queries: array of string`4711 - `require_approval: optional object { always, never } or "always" or "never"`

3198 4712 

3199 The queries used to search for files.4713 Specify which of the MCP server's tools require approval.

3200 4714 

3201 - `status: "in_progress" or "searching" or "completed" or 2 more`4715 - `McpToolApprovalFilter object { always, never }`

3202 4716 

3203 The status of the file search tool call. One of `in_progress`,4717 Specify which of the MCP server's tools require approval. Can be

3204 `searching`, `incomplete` or `failed`,4718 `always`, `never`, or a filter object associated with tools

4719 that require approval.

3205 4720 

3206 - `"in_progress"`4721 - `always: optional object { read_only, tool_names }`

3207 4722 

3208 - `"searching"`4723 A filter object to specify which tools are allowed.

3209 4724 

3210 - `"completed"`4725 - `read_only: optional boolean`

3211 4726 

3212 - `"incomplete"`4727 Indicates whether or not a tool modifies data or is read-only. If an

4728 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

4729 it will match this filter.

3213 4730 

3214 - `"failed"`4731 - `tool_names: optional array of string`

3215 4732 

3216 - `type: "file_search_call"`4733 List of allowed tool names.

3217 4734 

3218 The type of the file search tool call. Always `file_search_call`.4735 - `never: optional object { read_only, tool_names }`

3219 4736 

3220 - `"file_search_call"`4737 A filter object to specify which tools are allowed.

3221 4738 

3222 - `results: optional array of object { attributes, file_id, filename, 2 more }`4739 - `read_only: optional boolean`

3223 4740 

3224 The results of the file search tool call.4741 Indicates whether or not a tool modifies data or is read-only. If an

4742 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

4743 it will match this filter.

3225 4744 

3226 - `attributes: optional map[string or number or boolean]`4745 - `tool_names: optional array of string`

3227 4746 

3228 Set of 16 key-value pairs that can be attached to an object. This can be4747 List of allowed tool names.

3229 useful for storing additional information about the object in a structured

3230 format, and querying for objects via API or the dashboard. Keys are strings

3231 with a maximum length of 64 characters. Values are strings with a maximum

3232 length of 512 characters, booleans, or numbers.

3233 4748 

3234 - `string`4749 - `McpToolApprovalSetting = "always" or "never"`

3235 4750 

3236 - `number`4751 Specify a single approval policy for all tools. One of `always` or

4752 `never`. When set to `always`, all tools will require approval. When

4753 set to `never`, all tools will not require approval.

3237 4754 

3238 - `boolean`4755 - `"always"`

3239 4756 

3240 - `file_id: optional string`4757 - `"never"`

3241 4758 

3242 The unique ID of the file.4759 - `server_description: optional string`

3243 4760 

3244 - `filename: optional string`4761 Optional description of the MCP server, used to provide more context.

3245 4762 

3246 The name of the file.4763 - `server_url: optional string`

3247 4764 

3248 - `score: optional number`4765 The URL for the MCP server. One of `server_url` or `connector_id` must be

4766 provided.

3249 4767 

3250 The relevance score of the file - a value between 0 and 1.4768 - `CodeInterpreter object { container, type }`

3251 4769 

3252 - `text: optional string`4770 A tool that runs Python code to help generate a response to a prompt.

3253 4771 

3254 The text that was retrieved from the file.4772 - `container: string or object { type, file_ids, memory_limit, network_policy }`

3255 4773 

3256 - `FunctionCall object { arguments, call_id, name, 4 more }`4774 The code interpreter container. Can be a container ID or an object that

4775 specifies uploaded file IDs to make available to your code, along with an

4776 optional `memory_limit` setting.

3257 4777 

3258 A tool call to run a function. See the4778 - `string`

3259 [function calling guide](/docs/guides/function-calling) for more information.

3260 4779 

3261 - `arguments: string`4780 The container ID.

3262 4781 

3263 A JSON string of the arguments to pass to the function.4782 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`

3264 4783 

3265 - `call_id: string`4784 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

3266 4785 

3267 The unique ID of the function tool call generated by the model.4786 - `type: "auto"`

3268 4787 

3269 - `name: string`4788 Always `auto`.

3270 4789 

3271 The name of the function to run.4790 - `"auto"`

3272 4791 

3273 - `type: "function_call"`4792 - `file_ids: optional array of string`

3274 4793 

3275 The type of the function tool call. Always `function_call`.4794 An optional list of uploaded files to make available to your code.

3276 4795 

3277 - `"function_call"`4796 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

3278 4797 

3279 - `id: optional string`4798 The memory limit for the code interpreter container.

3280 4799 

3281 The unique ID of the function tool call.4800 - `"1g"`

3282 4801 

3283 - `namespace: optional string`4802 - `"4g"`

3284 4803 

3285 The namespace of the function to run.4804 - `"16g"`

3286 4805 

3287 - `status: optional "in_progress" or "completed" or "incomplete"`4806 - `"64g"`

3288 4807 

3289 The status of the item. One of `in_progress`, `completed`, or4808 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

3290 `incomplete`. Populated when items are returned via API.

3291 4809 

3292 - `"in_progress"`4810 Network access policy for the container.

3293 4811 

3294 - `"completed"`4812 - `ContainerNetworkPolicyDisabled object { type }`

3295 4813 

3296 - `"incomplete"`4814 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

3297 4815 

3298 - `FunctionCallOutput object { id, call_id, output, 3 more }`4816 - `type: "code_interpreter"`

3299 4817 

3300 - `id: string`4818 The type of the code interpreter tool. Always `code_interpreter`.

3301 4819 

3302 The unique ID of the function call tool output.4820 - `"code_interpreter"`

3303 4821 

3304 - `call_id: string`4822 - `ImageGeneration object { type, action, background, 9 more }`

3305 4823 

3306 The unique ID of the function tool call generated by the model.4824 A tool that generates images using the GPT image models.

3307 4825 

3308 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`4826 - `type: "image_generation"`

3309 4827 

3310 The output from the function call generated by your code.4828 The type of the image generation tool. Always `image_generation`.

3311 Can be a string or an list of output content.

3312 4829 

3313 - `StringOutput = string`4830 - `"image_generation"`

3314 4831 

3315 A string of the output of the function call.4832 - `action: optional "generate" or "edit" or "auto"`

3316 4833 

3317 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`4834 Whether to generate a new image or edit an existing image. Default: `auto`.

3318 4835 

3319 Text, image, or file output of the function call.4836 - `"generate"`

3320 4837 

3321 - `ResponseInputText object { text, type }`4838 - `"edit"`

3322 4839 

3323 A text input to the model.4840 - `"auto"`

3324 4841 

3325 - `ResponseInputImage object { detail, type, file_id, image_url }`4842 - `background: optional "transparent" or "opaque" or "auto"`

3326 4843 

3327 An image input to the model. Learn about [image inputs](/docs/guides/vision).4844 Background type for the generated image. One of `transparent`,

4845 `opaque`, or `auto`. Default: `auto`.

3328 4846 

3329 - `ResponseInputFile object { type, detail, file_data, 3 more }`4847 - `"transparent"`

3330 4848 

3331 A file input to the model.4849 - `"opaque"`

3332 4850 

3333 - `status: "in_progress" or "completed" or "incomplete"`4851 - `"auto"`

3334 4852 

3335 The status of the item. One of `in_progress`, `completed`, or4853 - `input_fidelity: optional "high" or "low"`

3336 `incomplete`. Populated when items are returned via API.

3337 4854 

3338 - `"in_progress"`4855 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`.

3339 4856 

3340 - `"completed"`4857 - `"high"`

3341 4858 

3342 - `"incomplete"`4859 - `"low"`

3343 4860 

3344 - `type: "function_call_output"`4861 - `input_image_mask: optional object { file_id, image_url }`

3345 4862 

3346 The type of the function tool call output. Always `function_call_output`.4863 Optional mask for inpainting. Contains `image_url`

4864 (string, optional) and `file_id` (string, optional).

3347 4865 

3348 - `"function_call_output"`4866 - `file_id: optional string`

3349 4867 

3350 - `created_by: optional string`4868 File ID for the mask image.

3351 4869 

3352 The identifier of the actor that created the item.4870 - `image_url: optional string`

3353 4871 

3354 - `WebSearchCall object { id, action, status, type }`4872 Base64-encoded mask image.

3355 4873 

3356 The results of a web search tool call. See the4874 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

3357 [web search guide](/docs/guides/tools-web-search) for more information.

3358 4875 

3359 - `id: string`4876 The image generation model to use. Default: `gpt-image-1`.

3360 4877 

3361 The unique ID of the web search tool call.4878 - `string`

3362 4879 

3363 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`4880 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

3364 4881 

3365 An object describing the specific action taken in this web search call.4882 The image generation model to use. Default: `gpt-image-1`.

3366 Includes details on how the model used the web (search, open_page, find_in_page).

3367 4883 

3368 - `Search object { query, type, queries, sources }`4884 - `"gpt-image-1"`

3369 4885 

3370 Action type "search" - Performs a web search query.4886 - `"gpt-image-1-mini"`

3371 4887 

3372 - `query: string`4888 - `"gpt-image-1.5"`

3373 4889 

3374 [DEPRECATED] The search query.4890 - `moderation: optional "auto" or "low"`

3375 4891 

3376 - `type: "search"`4892 Moderation level for the generated image. Default: `auto`.

3377 4893 

3378 The action type.4894 - `"auto"`

3379 4895 

3380 - `"search"`4896 - `"low"`

3381 4897 

3382 - `queries: optional array of string`4898 - `output_compression: optional number`

3383 4899 

3384 The search queries.4900 Compression level for the output image. Default: 100.

3385 4901 

3386 - `sources: optional array of object { type, url }`4902 - `output_format: optional "png" or "webp" or "jpeg"`

3387 4903 

3388 The sources used in the search.4904 The output format of the generated image. One of `png`, `webp`, or

4905 `jpeg`. Default: `png`.

3389 4906 

3390 - `type: "url"`4907 - `"png"`

3391 4908 

3392 The type of source. Always `url`.4909 - `"webp"`

3393 4910 

3394 - `"url"`4911 - `"jpeg"`

3395 4912 

3396 - `url: string`4913 - `partial_images: optional number`

3397 4914 

3398 The URL of the source.4915 Number of partial images to generate in streaming mode, from 0 (default value) to 3.

3399 4916 

3400 - `OpenPage object { type, url }`4917 - `quality: optional "low" or "medium" or "high" or "auto"`

3401 4918 

3402 Action type "open_page" - Opens a specific URL from search results.4919 The quality of the generated image. One of `low`, `medium`, `high`,

4920 or `auto`. Default: `auto`.

3403 4921 

3404 - `type: "open_page"`4922 - `"low"`

3405 4923 

3406 The action type.4924 - `"medium"`

3407 4925 

3408 - `"open_page"`4926 - `"high"`

3409 4927 

3410 - `url: optional string`4928 - `"auto"`

3411 4929 

3412 The URL opened by the model.4930 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`

3413 4931 

3414 - `FindInPage object { pattern, type, url }`4932 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

3415 4933 

3416 Action type "find_in_page": Searches for a pattern within a loaded page.4934 - `string`

3417 4935 

3418 - `pattern: string`4936 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`

3419 4937 

3420 The pattern or text to search for within the page.4938 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

3421 4939 

3422 - `type: "find_in_page"`4940 - `"1024x1024"`

3423 4941 

3424 The action type.4942 - `"1024x1536"`

3425 4943 

3426 - `"find_in_page"`4944 - `"1536x1024"`

3427 4945 

3428 - `url: string`4946 - `"auto"`

3429 4947 

3430 The URL of the page searched for the pattern.4948 - `LocalShell object { type }`

3431 4949 

3432 - `status: "in_progress" or "searching" or "completed" or "failed"`4950 A tool that allows the model to execute shell commands in a local environment.

3433 4951 

3434 The status of the web search tool call.4952 - `type: "local_shell"`

3435 4953 

3436 - `"in_progress"`4954 The type of the local shell tool. Always `local_shell`.

3437 4955 

3438 - `"searching"`4956 - `"local_shell"`

3439 4957 

3440 - `"completed"`4958 - `Shell object { type, environment }`

3441 4959 

3442 - `"failed"`4960 A tool that allows the model to execute shell commands.

3443 4961 

3444 - `type: "web_search_call"`4962 - `type: "shell"`

3445 4963 

3446 The type of the web search tool call. Always `web_search_call`.4964 The type of the shell tool. Always `shell`.

3447 4965 

3448 - `"web_search_call"`4966 - `"shell"`

3449 4967 

3450 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`4968 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`

3451 4969 

3452 A tool call to a computer use tool. See the4970 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

3453 [computer use guide](/docs/guides/tools-computer-use) for more information.

3454 4971 

3455 - `id: string`4972 - `LocalEnvironment object { type, skills }`

3456 4973 

3457 The unique ID of the computer call.4974 - `ContainerReference object { container_id, type }`

3458 4975 

3459 - `call_id: string`4976 - `Custom object { name, type, defer_loading, 2 more }`

3460 4977 

3461 An identifier used when responding to the tool call with output.4978 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

3462 4979 

3463 - `pending_safety_checks: array of object { id, code, message }`4980 - `name: string`

3464 4981 

3465 The pending safety checks for the computer call.4982 The name of the custom tool, used to identify it in tool calls.

3466 4983 

3467 - `id: string`4984 - `type: "custom"`

3468 4985 

3469 The ID of the pending safety check.4986 The type of the custom tool. Always `custom`.

3470 4987 

3471 - `code: optional string`4988 - `"custom"`

3472 4989 

3473 The type of the pending safety check.4990 - `defer_loading: optional boolean`

3474 4991 

3475 - `message: optional string`4992 Whether this tool should be deferred and discovered via tool search.

3476 4993 

3477 Details about the pending safety check.4994 - `description: optional string`

3478 4995 

3479 - `status: "in_progress" or "completed" or "incomplete"`4996 Optional description of the custom tool, used to provide more context.

3480 4997 

3481 The status of the item. One of `in_progress`, `completed`, or4998 - `format: optional CustomToolInputFormat`

3482 `incomplete`. Populated when items are returned via API.

3483 4999 

3484 - `"in_progress"`5000 The input format for the custom tool. Default is unconstrained text.

3485 5001 

3486 - `"completed"`5002 - `Namespace object { description, name, tools, type }`

3487 5003 

3488 - `"incomplete"`5004 Groups function/custom tools under a shared namespace.

3489 5005 

3490 - `type: "computer_call"`5006 - `description: string`

3491 5007 

3492 The type of the computer call. Always `computer_call`.5008 A description of the namespace shown to the model.

3493 5009 

3494 - `"computer_call"`5010 - `name: string`

3495 5011 

3496 - `action: optional ComputerAction`5012 The namespace name used in tool calls (for example, `crm`).

3497 5013 

3498 A click action.5014 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`

3499 5015 

3500 - `actions: optional ComputerActionList`5016 The function/custom tools available inside this namespace.

3501 5017 

3502 Flattened batched actions for `computer_use`. Each action includes an5018 - `Function object { name, type, defer_loading, 3 more }`

3503 `type` discriminator and action-specific fields.

3504 5019 

3505 - `ComputerCallOutput object { id, call_id, output, 4 more }`5020 - `name: string`

3506 5021 

3507 - `id: string`5022 - `type: "function"`

3508 5023 

3509 The unique ID of the computer call tool output.5024 - `"function"`

3510 5025 

3511 - `call_id: string`5026 - `defer_loading: optional boolean`

3512 5027 

3513 The ID of the computer tool call that produced the output.5028 Whether this function should be deferred and discovered via tool search.

3514 5029 

3515 - `output: ResponseComputerToolCallOutputScreenshot`5030 - `description: optional string`

3516 5031 

3517 A computer screenshot image used with the computer use tool.5032 - `parameters: optional unknown`

3518 5033 

3519 - `status: "completed" or "incomplete" or "failed" or "in_progress"`5034 - `strict: optional boolean`

3520 5035 

3521 The status of the message input. One of `in_progress`, `completed`, or5036 - `Custom object { name, type, defer_loading, 2 more }`

3522 `incomplete`. Populated when input items are returned via API.

3523 5037 

3524 - `"completed"`5038 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

3525 5039 

3526 - `"incomplete"`5040 - `name: string`

3527 5041 

3528 - `"failed"`5042 The name of the custom tool, used to identify it in tool calls.

3529 5043 

3530 - `"in_progress"`5044 - `type: "custom"`

3531 5045 

3532 - `type: "computer_call_output"`5046 The type of the custom tool. Always `custom`.

3533 5047 

3534 The type of the computer tool call output. Always `computer_call_output`.5048 - `"custom"`

3535 5049 

3536 - `"computer_call_output"`5050 - `defer_loading: optional boolean`

3537 5051 

3538 - `acknowledged_safety_checks: optional array of object { id, code, message }`5052 Whether this tool should be deferred and discovered via tool search.

3539 5053 

3540 The safety checks reported by the API that have been acknowledged by the5054 - `description: optional string`

3541 developer.

3542 5055 

3543 - `id: string`5056 Optional description of the custom tool, used to provide more context.

3544 5057 

3545 The ID of the pending safety check.5058 - `format: optional CustomToolInputFormat`

3546 5059 

3547 - `code: optional string`5060 The input format for the custom tool. Default is unconstrained text.

3548 5061 

3549 The type of the pending safety check.5062 - `type: "namespace"`

3550 5063 

3551 - `message: optional string`5064 The type of the tool. Always `namespace`.

3552 5065 

3553 Details about the pending safety check.5066 - `"namespace"`

3554 5067 

3555 - `created_by: optional string`5068 - `ToolSearch object { type, description, execution, parameters }`

3556 5069 

3557 The identifier of the actor that created the item.5070 Hosted or BYOT tool search configuration for deferred tools.

3558 5071 

3559 - `Reasoning object { id, summary, type, 3 more }`5072 - `type: "tool_search"`

3560 5073 

3561 A description of the chain of thought used by a reasoning model while generating5074 The type of the tool. Always `tool_search`.

3562 a response. Be sure to include these items in your `input` to the Responses API

3563 for subsequent turns of a conversation if you are manually

3564 [managing context](/docs/guides/conversation-state).

3565 5075 

3566 - `id: string`5076 - `"tool_search"`

3567 5077 

3568 The unique identifier of the reasoning content.5078 - `description: optional string`

3569 5079 

3570 - `summary: array of SummaryTextContent`5080 Description shown to the model for a client-executed tool search tool.

3571 5081 

3572 Reasoning summary content.5082 - `execution: optional "server" or "client"`

3573 5083 

3574 - `text: string`5084 Whether tool search is executed by the server or by the client.

3575 5085 

3576 A summary of the reasoning output from the model so far.5086 - `"server"`

3577 5087 

3578 - `type: "summary_text"`5088 - `"client"`

3579 5089 

3580 The type of the object. Always `summary_text`.5090 - `parameters: optional unknown`

3581 5091 

3582 - `type: "reasoning"`5092 Parameter schema for a client-executed tool search tool.

3583 5093 

3584 The type of the object. Always `reasoning`.5094 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`

3585 5095 

3586 - `"reasoning"`5096 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

3587 5097 

3588 - `content: optional array of object { text, type }`5098 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`

3589 5099 

3590 Reasoning text content.5100 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

3591 5101 

3592 - `text: string`5102 - `"web_search_preview"`

3593 5103 

3594 The reasoning text from the model.5104 - `"web_search_preview_2025_03_11"`

3595 5105 

3596 - `type: "reasoning_text"`5106 - `search_content_types: optional array of "text" or "image"`

3597 5107 

3598 The type of the reasoning text. Always `reasoning_text`.5108 - `"text"`

3599 5109 

3600 - `"reasoning_text"`5110 - `"image"`

3601 5111 

3602 - `encrypted_content: optional string`5112 - `search_context_size: optional "low" or "medium" or "high"`

3603 5113 

3604 The encrypted content of the reasoning item - populated when a response is5114 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.

3605 generated with `reasoning.encrypted_content` in the `include` parameter.

3606 5115 

3607 - `status: optional "in_progress" or "completed" or "incomplete"`5116 - `"low"`

3608 5117 

3609 The status of the item. One of `in_progress`, `completed`, or5118 - `"medium"`

3610 `incomplete`. Populated when items are returned via API.

3611 5119 

3612 - `"in_progress"`5120 - `"high"`

3613 5121 

3614 - `"completed"`5122 - `user_location: optional object { type, city, country, 2 more }`

3615 5123 

3616 - `"incomplete"`5124 The user's location.

3617 5125 

3618 - `ToolSearchCall object { id, arguments, call_id, 4 more }`5126 - `type: "approximate"`

3619 5127 

3620 - `id: string`5128 The type of location approximation. Always `approximate`.

3621 5129 

3622 The unique ID of the tool search call item.5130 - `"approximate"`

3623 5131 

3624 - `arguments: unknown`5132 - `city: optional string`

3625 5133 

3626 Arguments used for the tool search call.5134 Free text input for the city of the user, e.g. `San Francisco`.

3627 5135 

3628 - `call_id: string`5136 - `country: optional string`

3629 5137 

3630 The unique ID of the tool search call generated by the model.5138 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

3631 5139 

3632 - `execution: "server" or "client"`5140 - `region: optional string`

3633 5141 

3634 Whether tool search was executed by the server or by the client.5142 Free text input for the region of the user, e.g. `California`.

3635 5143 

3636 - `"server"`5144 - `timezone: optional string`

3637 5145 

3638 - `"client"`5146 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

3639 5147 

3640 - `status: "in_progress" or "completed" or "incomplete"`5148 - `ApplyPatch object { type }`

3641 5149 

3642 The status of the tool search call item that was recorded.5150 Allows the assistant to create, delete, or update files using unified diffs.

3643 5151 

3644 - `"in_progress"`5152 - `type: "apply_patch"`

3645 5153 

3646 - `"completed"`5154 The type of the tool. Always `apply_patch`.

3647 5155 

3648 - `"incomplete"`5156 - `"apply_patch"`

3649 5157 

3650 - `type: "tool_search_call"`5158 - `type: "tool_search_output"`

3651 5159 

3652 The type of the item. Always `tool_search_call`.5160 The type of the item. Always `tool_search_output`.

3653 5161 

3654 - `"tool_search_call"`5162 - `"tool_search_output"`

3655 5163 

3656 - `created_by: optional string`5164 - `created_by: optional string`

3657 5165 

3658 The identifier of the actor that created the item.5166 The identifier of the actor that created the item.

3659 5167 

3660 - `ToolSearchOutput object { id, call_id, execution, 4 more }`5168 - `AdditionalTools object { id, role, tools, type }`

3661 5169 

3662 - `id: string`5170 - `id: string`

3663 5171 

3664 The unique ID of the tool search output item.5172 The unique ID of the additional tools item.

3665 

3666 - `call_id: string`

3667 5173 

3668 The unique ID of the tool search call generated by the model.5174 - `role: "unknown" or "user" or "assistant" or 5 more`

3669 5175 

3670 - `execution: "server" or "client"`5176 The role that provided the additional tools.

3671 5177 

3672 Whether tool search was executed by the server or by the client.5178 - `"unknown"`

3673 5179 

3674 - `"server"`5180 - `"user"`

3675 5181 

3676 - `"client"`5182 - `"assistant"`

3677 5183 

3678 - `status: "in_progress" or "completed" or "incomplete"`5184 - `"system"`

3679 5185 

3680 The status of the tool search output item that was recorded.5186 - `"critic"`

3681 5187 

3682 - `"in_progress"`5188 - `"discriminator"`

3683 5189 

3684 - `"completed"`5190 - `"developer"`

3685 5191 

3686 - `"incomplete"`5192 - `"tool"`

3687 5193 

3688 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`5194 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

3689 5195 

3690 The loaded tool definitions returned by tool search.5196 The additional tool definitions made available at this item.

3691 5197 

3692 - `Function object { name, parameters, strict, 3 more }`5198 - `Function object { name, parameters, strict, 3 more }`

3693 5199 


4411 5917 

4412 - `"apply_patch"`5918 - `"apply_patch"`

4413 5919 

4414 - `type: "tool_search_output"`5920 - `type: "additional_tools"`

4415 

4416 The type of the item. Always `tool_search_output`.

4417 

4418 - `"tool_search_output"`

4419 5921 

4420 - `created_by: optional string`5922 The type of the item. Always `additional_tools`.

4421 5923 

4422 The identifier of the actor that created the item.5924 - `"additional_tools"`

4423 5925 

4424 - `Compaction object { id, encrypted_content, type, created_by }`5926 - `Compaction object { id, encrypted_content, type, created_by }`

4425 5927 


6131 - `prompt_cache_retention: optional "in_memory" or "24h"`7633 - `prompt_cache_retention: optional "in_memory" or "24h"`

6132 7634 

6133 The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention).7635 The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention).

7636 For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

7637 

7638 For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

7639 

7640 - Organizations without ZDR enabled default to `24h`.

7641 - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

6134 7642 

6135 - `"in_memory"`7643 - `"in_memory"`

6136 7644 

Details

57 57 

58 A list of Response items.58 A list of Response items.

59 59 

60 - `data: array of ResponseInputMessageItem or ResponseOutputMessage or object { id, queries, status, 2 more } or 23 more`60 - `data: array of ResponseInputMessageItem or ResponseOutputMessage or object { id, queries, status, 2 more } or 24 more`

61 61 

62 A list of items used to generate this response.62 A list of items used to generate this response.

63 63 


794 794 

795 The unique ID of the web search tool call.795 The unique ID of the web search tool call.

796 796 

797 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`797 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`

798 798 

799 An object describing the specific action taken in this web search call.799 An object describing the specific action taken in this web search call.

800 Includes details on how the model used the web (search, open_page, find_in_page).800 Includes details on how the model used the web (search, open_page, find_in_page).

801 801 

802 - `Search object { query, type, queries, sources }`802 - `Search object { type, queries, query, sources }`

803 803 

804 Action type "search" - Performs a web search query.804 Action type "search" - Performs a web search query.

805 805 

806 - `query: string`

807 

808 [DEPRECATED] The search query.

809 

810 - `type: "search"`806 - `type: "search"`

811 807 

812 The action type.808 The action type.


817 813 

818 The search queries.814 The search queries.

819 815 

816 - `query: optional string`

817 

818 The search query.

819 

820 - `sources: optional array of object { type, url }`820 - `sources: optional array of object { type, url }`

821 821 

822 The sources used in the search.822 The sources used in the search.


2035 2035 

2036 The identifier of the actor that created the item.2036 The identifier of the actor that created the item.

2037 2037 

2038 - `AdditionalTools object { id, role, tools, type }`

2039 

2040 - `id: string`

2041 

2042 The unique ID of the additional tools item.

2043 

2044 - `role: "unknown" or "user" or "assistant" or 5 more`

2045 

2046 The role that provided the additional tools.

2047 

2048 - `"unknown"`

2049 

2050 - `"user"`

2051 

2052 - `"assistant"`

2053 

2054 - `"system"`

2055 

2056 - `"critic"`

2057 

2058 - `"discriminator"`

2059 

2060 - `"developer"`

2061 

2062 - `"tool"`

2063 

2064 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

2065 

2066 The additional tool definitions made available at this item.

2067 

2068 - `Function object { name, parameters, strict, 3 more }`

2069 

2070 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

2071 

2072 - `name: string`

2073 

2074 The name of the function to call.

2075 

2076 - `parameters: map[unknown]`

2077 

2078 A JSON schema object describing the parameters of the function.

2079 

2080 - `strict: boolean`

2081 

2082 Whether to enforce strict parameter validation. Default `true`.

2083 

2084 - `type: "function"`

2085 

2086 The type of the function tool. Always `function`.

2087 

2088 - `"function"`

2089 

2090 - `defer_loading: optional boolean`

2091 

2092 Whether this function is deferred and loaded via tool search.

2093 

2094 - `description: optional string`

2095 

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

2097 

2098 - `FileSearch object { type, vector_store_ids, filters, 2 more }`

2099 

2100 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

2101 

2102 - `type: "file_search"`

2103 

2104 The type of the file search tool. Always `file_search`.

2105 

2106 - `"file_search"`

2107 

2108 - `vector_store_ids: array of string`

2109 

2110 The IDs of the vector stores to search.

2111 

2112 - `filters: optional ComparisonFilter or CompoundFilter`

2113 

2114 A filter to apply.

2115 

2116 - `ComparisonFilter object { key, type, value }`

2117 

2118 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

2119 

2120 - `CompoundFilter object { filters, type }`

2121 

2122 Combine multiple filters using `and` or `or`.

2123 

2124 - `max_num_results: optional number`

2125 

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

2127 

2128 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`

2129 

2130 Ranking options for search.

2131 

2132 - `hybrid_search: optional object { embedding_weight, text_weight }`

2133 

2134 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

2135 

2136 - `embedding_weight: number`

2137 

2138 The weight of the embedding in the reciprocal ranking fusion.

2139 

2140 - `text_weight: number`

2141 

2142 The weight of the text in the reciprocal ranking fusion.

2143 

2144 - `ranker: optional "auto" or "default-2024-11-15"`

2145 

2146 The ranker to use for the file search.

2147 

2148 - `"auto"`

2149 

2150 - `"default-2024-11-15"`

2151 

2152 - `score_threshold: optional number`

2153 

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

2155 

2156 - `Computer object { type }`

2157 

2158 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2159 

2160 - `type: "computer"`

2161 

2162 The type of the computer tool. Always `computer`.

2163 

2164 - `"computer"`

2165 

2166 - `ComputerUsePreview object { display_height, display_width, environment, type }`

2167 

2168 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

2169 

2170 - `display_height: number`

2171 

2172 The height of the computer display.

2173 

2174 - `display_width: number`

2175 

2176 The width of the computer display.

2177 

2178 - `environment: "windows" or "mac" or "linux" or 2 more`

2179 

2180 The type of computer environment to control.

2181 

2182 - `"windows"`

2183 

2184 - `"mac"`

2185 

2186 - `"linux"`

2187 

2188 - `"ubuntu"`

2189 

2190 - `"browser"`

2191 

2192 - `type: "computer_use_preview"`

2193 

2194 The type of the computer use tool. Always `computer_use_preview`.

2195 

2196 - `"computer_use_preview"`

2197 

2198 - `WebSearch object { type, filters, search_context_size, user_location }`

2199 

2200 Search the Internet for sources related to the prompt. Learn more about the

2201 [web search tool](/docs/guides/tools-web-search).

2202 

2203 - `type: "web_search" or "web_search_2025_08_26"`

2204 

2205 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

2206 

2207 - `"web_search"`

2208 

2209 - `"web_search_2025_08_26"`

2210 

2211 - `filters: optional object { allowed_domains }`

2212 

2213 Filters for the search.

2214 

2215 - `allowed_domains: optional array of string`

2216 

2217 Allowed domains for the search. If not provided, all domains are allowed.

2218 Subdomains of the provided domains are allowed as well.

2219 

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

2221 

2222 - `search_context_size: optional "low" or "medium" or "high"`

2223 

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

2225 

2226 - `"low"`

2227 

2228 - `"medium"`

2229 

2230 - `"high"`

2231 

2232 - `user_location: optional object { city, country, region, 2 more }`

2233 

2234 The approximate location of the user.

2235 

2236 - `city: optional string`

2237 

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

2239 

2240 - `country: optional string`

2241 

2242 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2243 

2244 - `region: optional string`

2245 

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

2247 

2248 - `timezone: optional string`

2249 

2250 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2251 

2252 - `type: optional "approximate"`

2253 

2254 The type of location approximation. Always `approximate`.

2255 

2256 - `"approximate"`

2257 

2258 - `Mcp object { server_label, type, allowed_tools, 7 more }`

2259 

2260 Give the model access to additional tools via remote Model Context Protocol

2261 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

2262 

2263 - `server_label: string`

2264 

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

2266 

2267 - `type: "mcp"`

2268 

2269 The type of the MCP tool. Always `mcp`.

2270 

2271 - `"mcp"`

2272 

2273 - `allowed_tools: optional array of string or object { read_only, tool_names }`

2274 

2275 List of allowed tool names or a filter object.

2276 

2277 - `McpAllowedTools = array of string`

2278 

2279 A string array of allowed tool names

2280 

2281 - `McpToolFilter object { read_only, tool_names }`

2282 

2283 A filter object to specify which tools are allowed.

2284 

2285 - `read_only: optional boolean`

2286 

2287 Indicates whether or not a tool modifies data or is read-only. If an

2288 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2289 it will match this filter.

2290 

2291 - `tool_names: optional array of string`

2292 

2293 List of allowed tool names.

2294 

2295 - `authorization: optional string`

2296 

2297 An OAuth access token that can be used with a remote MCP server, either

2298 with a custom MCP server URL or a service connector. Your application

2299 must handle the OAuth authorization flow and provide the token here.

2300 

2301 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`

2302 

2303 Identifier for service connectors, like those available in ChatGPT. One of

2304 `server_url` or `connector_id` must be provided. Learn more about service

2305 connectors [here](/docs/guides/tools-remote-mcp#connectors).

2306 

2307 Currently supported `connector_id` values are:

2308 

2309 - Dropbox: `connector_dropbox`

2310 - Gmail: `connector_gmail`

2311 - Google Calendar: `connector_googlecalendar`

2312 - Google Drive: `connector_googledrive`

2313 - Microsoft Teams: `connector_microsoftteams`

2314 - Outlook Calendar: `connector_outlookcalendar`

2315 - Outlook Email: `connector_outlookemail`

2316 - SharePoint: `connector_sharepoint`

2317 

2318 - `"connector_dropbox"`

2319 

2320 - `"connector_gmail"`

2321 

2322 - `"connector_googlecalendar"`

2323 

2324 - `"connector_googledrive"`

2325 

2326 - `"connector_microsoftteams"`

2327 

2328 - `"connector_outlookcalendar"`

2329 

2330 - `"connector_outlookemail"`

2331 

2332 - `"connector_sharepoint"`

2333 

2334 - `defer_loading: optional boolean`

2335 

2336 Whether this MCP tool is deferred and discovered via tool search.

2337 

2338 - `headers: optional map[string]`

2339 

2340 Optional HTTP headers to send to the MCP server. Use for authentication

2341 or other purposes.

2342 

2343 - `require_approval: optional object { always, never } or "always" or "never"`

2344 

2345 Specify which of the MCP server's tools require approval.

2346 

2347 - `McpToolApprovalFilter object { always, never }`

2348 

2349 Specify which of the MCP server's tools require approval. Can be

2350 `always`, `never`, or a filter object associated with tools

2351 that require approval.

2352 

2353 - `always: optional object { read_only, tool_names }`

2354 

2355 A filter object to specify which tools are allowed.

2356 

2357 - `read_only: optional boolean`

2358 

2359 Indicates whether or not a tool modifies data or is read-only. If an

2360 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2361 it will match this filter.

2362 

2363 - `tool_names: optional array of string`

2364 

2365 List of allowed tool names.

2366 

2367 - `never: optional object { read_only, tool_names }`

2368 

2369 A filter object to specify which tools are allowed.

2370 

2371 - `read_only: optional boolean`

2372 

2373 Indicates whether or not a tool modifies data or is read-only. If an

2374 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

2375 it will match this filter.

2376 

2377 - `tool_names: optional array of string`

2378 

2379 List of allowed tool names.

2380 

2381 - `McpToolApprovalSetting = "always" or "never"`

2382 

2383 Specify a single approval policy for all tools. One of `always` or

2384 `never`. When set to `always`, all tools will require approval. When

2385 set to `never`, all tools will not require approval.

2386 

2387 - `"always"`

2388 

2389 - `"never"`

2390 

2391 - `server_description: optional string`

2392 

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

2394 

2395 - `server_url: optional string`

2396 

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

2398 provided.

2399 

2400 - `CodeInterpreter object { container, type }`

2401 

2402 A tool that runs Python code to help generate a response to a prompt.

2403 

2404 - `container: string or object { type, file_ids, memory_limit, network_policy }`

2405 

2406 The code interpreter container. Can be a container ID or an object that

2407 specifies uploaded file IDs to make available to your code, along with an

2408 optional `memory_limit` setting.

2409 

2410 - `string`

2411 

2412 The container ID.

2413 

2414 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`

2415 

2416 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

2417 

2418 - `type: "auto"`

2419 

2420 Always `auto`.

2421 

2422 - `"auto"`

2423 

2424 - `file_ids: optional array of string`

2425 

2426 An optional list of uploaded files to make available to your code.

2427 

2428 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

2429 

2430 The memory limit for the code interpreter container.

2431 

2432 - `"1g"`

2433 

2434 - `"4g"`

2435 

2436 - `"16g"`

2437 

2438 - `"64g"`

2439 

2440 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

2441 

2442 Network access policy for the container.

2443 

2444 - `ContainerNetworkPolicyDisabled object { type }`

2445 

2446 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

2447 

2448 - `type: "code_interpreter"`

2449 

2450 The type of the code interpreter tool. Always `code_interpreter`.

2451 

2452 - `"code_interpreter"`

2453 

2454 - `ImageGeneration object { type, action, background, 9 more }`

2455 

2456 A tool that generates images using the GPT image models.

2457 

2458 - `type: "image_generation"`

2459 

2460 The type of the image generation tool. Always `image_generation`.

2461 

2462 - `"image_generation"`

2463 

2464 - `action: optional "generate" or "edit" or "auto"`

2465 

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

2467 

2468 - `"generate"`

2469 

2470 - `"edit"`

2471 

2472 - `"auto"`

2473 

2474 - `background: optional "transparent" or "opaque" or "auto"`

2475 

2476 Background type for the generated image. One of `transparent`,

2477 `opaque`, or `auto`. Default: `auto`.

2478 

2479 - `"transparent"`

2480 

2481 - `"opaque"`

2482 

2483 - `"auto"`

2484 

2485 - `input_fidelity: optional "high" or "low"`

2486 

2487 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`.

2488 

2489 - `"high"`

2490 

2491 - `"low"`

2492 

2493 - `input_image_mask: optional object { file_id, image_url }`

2494 

2495 Optional mask for inpainting. Contains `image_url`

2496 (string, optional) and `file_id` (string, optional).

2497 

2498 - `file_id: optional string`

2499 

2500 File ID for the mask image.

2501 

2502 - `image_url: optional string`

2503 

2504 Base64-encoded mask image.

2505 

2506 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2507 

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

2509 

2510 - `string`

2511 

2512 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

2513 

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

2515 

2516 - `"gpt-image-1"`

2517 

2518 - `"gpt-image-1-mini"`

2519 

2520 - `"gpt-image-1.5"`

2521 

2522 - `moderation: optional "auto" or "low"`

2523 

2524 Moderation level for the generated image. Default: `auto`.

2525 

2526 - `"auto"`

2527 

2528 - `"low"`

2529 

2530 - `output_compression: optional number`

2531 

2532 Compression level for the output image. Default: 100.

2533 

2534 - `output_format: optional "png" or "webp" or "jpeg"`

2535 

2536 The output format of the generated image. One of `png`, `webp`, or

2537 `jpeg`. Default: `png`.

2538 

2539 - `"png"`

2540 

2541 - `"webp"`

2542 

2543 - `"jpeg"`

2544 

2545 - `partial_images: optional number`

2546 

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

2548 

2549 - `quality: optional "low" or "medium" or "high" or "auto"`

2550 

2551 The quality of the generated image. One of `low`, `medium`, `high`,

2552 or `auto`. Default: `auto`.

2553 

2554 - `"low"`

2555 

2556 - `"medium"`

2557 

2558 - `"high"`

2559 

2560 - `"auto"`

2561 

2562 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2563 

2564 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2565 

2566 - `string`

2567 

2568 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`

2569 

2570 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

2571 

2572 - `"1024x1024"`

2573 

2574 - `"1024x1536"`

2575 

2576 - `"1536x1024"`

2577 

2578 - `"auto"`

2579 

2580 - `LocalShell object { type }`

2581 

2582 A tool that allows the model to execute shell commands in a local environment.

2583 

2584 - `type: "local_shell"`

2585 

2586 The type of the local shell tool. Always `local_shell`.

2587 

2588 - `"local_shell"`

2589 

2590 - `Shell object { type, environment }`

2591 

2592 A tool that allows the model to execute shell commands.

2593 

2594 - `type: "shell"`

2595 

2596 The type of the shell tool. Always `shell`.

2597 

2598 - `"shell"`

2599 

2600 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`

2601 

2602 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

2603 

2604 - `LocalEnvironment object { type, skills }`

2605 

2606 - `ContainerReference object { container_id, type }`

2607 

2608 - `Custom object { name, type, defer_loading, 2 more }`

2609 

2610 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2611 

2612 - `name: string`

2613 

2614 The name of the custom tool, used to identify it in tool calls.

2615 

2616 - `type: "custom"`

2617 

2618 The type of the custom tool. Always `custom`.

2619 

2620 - `"custom"`

2621 

2622 - `defer_loading: optional boolean`

2623 

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

2625 

2626 - `description: optional string`

2627 

2628 Optional description of the custom tool, used to provide more context.

2629 

2630 - `format: optional CustomToolInputFormat`

2631 

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

2633 

2634 - `Namespace object { description, name, tools, type }`

2635 

2636 Groups function/custom tools under a shared namespace.

2637 

2638 - `description: string`

2639 

2640 A description of the namespace shown to the model.

2641 

2642 - `name: string`

2643 

2644 The namespace name used in tool calls (for example, `crm`).

2645 

2646 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`

2647 

2648 The function/custom tools available inside this namespace.

2649 

2650 - `Function object { name, type, defer_loading, 3 more }`

2651 

2652 - `name: string`

2653 

2654 - `type: "function"`

2655 

2656 - `"function"`

2657 

2658 - `defer_loading: optional boolean`

2659 

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

2661 

2662 - `description: optional string`

2663 

2664 - `parameters: optional unknown`

2665 

2666 - `strict: optional boolean`

2667 

2668 - `Custom object { name, type, defer_loading, 2 more }`

2669 

2670 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

2671 

2672 - `name: string`

2673 

2674 The name of the custom tool, used to identify it in tool calls.

2675 

2676 - `type: "custom"`

2677 

2678 The type of the custom tool. Always `custom`.

2679 

2680 - `"custom"`

2681 

2682 - `defer_loading: optional boolean`

2683 

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

2685 

2686 - `description: optional string`

2687 

2688 Optional description of the custom tool, used to provide more context.

2689 

2690 - `format: optional CustomToolInputFormat`

2691 

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

2693 

2694 - `type: "namespace"`

2695 

2696 The type of the tool. Always `namespace`.

2697 

2698 - `"namespace"`

2699 

2700 - `ToolSearch object { type, description, execution, parameters }`

2701 

2702 Hosted or BYOT tool search configuration for deferred tools.

2703 

2704 - `type: "tool_search"`

2705 

2706 The type of the tool. Always `tool_search`.

2707 

2708 - `"tool_search"`

2709 

2710 - `description: optional string`

2711 

2712 Description shown to the model for a client-executed tool search tool.

2713 

2714 - `execution: optional "server" or "client"`

2715 

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

2717 

2718 - `"server"`

2719 

2720 - `"client"`

2721 

2722 - `parameters: optional unknown`

2723 

2724 Parameter schema for a client-executed tool search tool.

2725 

2726 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`

2727 

2728 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

2729 

2730 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`

2731 

2732 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

2733 

2734 - `"web_search_preview"`

2735 

2736 - `"web_search_preview_2025_03_11"`

2737 

2738 - `search_content_types: optional array of "text" or "image"`

2739 

2740 - `"text"`

2741 

2742 - `"image"`

2743 

2744 - `search_context_size: optional "low" or "medium" or "high"`

2745 

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

2747 

2748 - `"low"`

2749 

2750 - `"medium"`

2751 

2752 - `"high"`

2753 

2754 - `user_location: optional object { type, city, country, 2 more }`

2755 

2756 The user's location.

2757 

2758 - `type: "approximate"`

2759 

2760 The type of location approximation. Always `approximate`.

2761 

2762 - `"approximate"`

2763 

2764 - `city: optional string`

2765 

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

2767 

2768 - `country: optional string`

2769 

2770 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2771 

2772 - `region: optional string`

2773 

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

2775 

2776 - `timezone: optional string`

2777 

2778 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2779 

2780 - `ApplyPatch object { type }`

2781 

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

2783 

2784 - `type: "apply_patch"`

2785 

2786 The type of the tool. Always `apply_patch`.

2787 

2788 - `"apply_patch"`

2789 

2790 - `type: "additional_tools"`

2791 

2792 The type of the item. Always `additional_tools`.

2793 

2794 - `"additional_tools"`

2795 

2038 - `Reasoning object { id, summary, type, 3 more }`2796 - `Reasoning object { id, summary, type, 3 more }`

2039 2797 

2040 A description of the chain of thought used by a reasoning model while generating2798 A description of the chain of thought used by a reasoning model while generating

Details

27 27 

28 The unique ID of the conversation.28 The unique ID of the conversation.

29 29 

30- `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 26 more`30- `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 27 more`

31 31 

32 Text, image, or file inputs to the model, used to generate a response32 Text, image, or file inputs to the model, used to generate a response

33 33 


35 35 

36 A text input to the model, equivalent to a text input with the `user` role.36 A text input to the model, equivalent to a text input with the `user` role.

37 37 

38 - `array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 26 more`38 - `array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 27 more`

39 39 

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

41 41 


817 817 

818 The unique ID of the web search tool call.818 The unique ID of the web search tool call.

819 819 

820 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`820 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`

821 821 

822 An object describing the specific action taken in this web search call.822 An object describing the specific action taken in this web search call.

823 Includes details on how the model used the web (search, open_page, find_in_page).823 Includes details on how the model used the web (search, open_page, find_in_page).

824 824 

825 - `Search object { query, type, queries, sources }`825 - `Search object { type, queries, query, sources }`

826 826 

827 Action type "search" - Performs a web search query.827 Action type "search" - Performs a web search query.

828 828 

829 - `query: string`

830 

831 [DEPRECATED] The search query.

832 

833 - `type: "search"`829 - `type: "search"`

834 830 

835 The action type.831 The action type.


840 836 

841 The search queries.837 The search queries.

842 838 

839 - `query: optional string`

840 

841 The search query.

842 

843 - `sources: optional array of object { type, url }`843 - `sources: optional array of object { type, url }`

844 844 

845 The sources used in the search.845 The sources used in the search.


1187 1187 

1188 - `"lt"`1188 - `"lt"`

1189 1189 

1190 - `"lte"`1190 - `"lte"`

1191 

1192 - `"in"`

1193 

1194 - `"nin"`

1195 

1196 - `value: string or number or boolean or array of string or number`

1197 

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

1199 

1200 - `string`

1201 

1202 - `number`

1203 

1204 - `boolean`

1205 

1206 - `array of string or number`

1207 

1208 - `string`

1209 

1210 - `number`

1211 

1212 - `CompoundFilter object { filters, type }`

1213 

1214 Combine multiple filters using `and` or `or`.

1215 

1216 - `filters: array of ComparisonFilter or unknown`

1217 

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

1219 

1220 - `ComparisonFilter object { key, type, value }`

1221 

1222 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

1223 

1224 - `unknown`

1225 

1226 - `type: "and" or "or"`

1227 

1228 Type of operation: `and` or `or`.

1229 

1230 - `"and"`

1231 

1232 - `"or"`

1233 

1234 - `max_num_results: optional number`

1235 

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

1237 

1238 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`

1239 

1240 Ranking options for search.

1241 

1242 - `hybrid_search: optional object { embedding_weight, text_weight }`

1243 

1244 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

1245 

1246 - `embedding_weight: number`

1247 

1248 The weight of the embedding in the reciprocal ranking fusion.

1249 

1250 - `text_weight: number`

1251 

1252 The weight of the text in the reciprocal ranking fusion.

1253 

1254 - `ranker: optional "auto" or "default-2024-11-15"`

1255 

1256 The ranker to use for the file search.

1257 

1258 - `"auto"`

1259 

1260 - `"default-2024-11-15"`

1261 

1262 - `score_threshold: optional number`

1263 

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

1265 

1266 - `Computer object { type }`

1267 

1268 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

1269 

1270 - `type: "computer"`

1271 

1272 The type of the computer tool. Always `computer`.

1273 

1274 - `"computer"`

1275 

1276 - `ComputerUsePreview object { display_height, display_width, environment, type }`

1277 

1278 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

1279 

1280 - `display_height: number`

1281 

1282 The height of the computer display.

1283 

1284 - `display_width: number`

1285 

1286 The width of the computer display.

1287 

1288 - `environment: "windows" or "mac" or "linux" or 2 more`

1289 

1290 The type of computer environment to control.

1291 

1292 - `"windows"`

1293 

1294 - `"mac"`

1295 

1296 - `"linux"`

1297 

1298 - `"ubuntu"`

1299 

1300 - `"browser"`

1301 

1302 - `type: "computer_use_preview"`

1303 

1304 The type of the computer use tool. Always `computer_use_preview`.

1305 

1306 - `"computer_use_preview"`

1307 

1308 - `WebSearch object { type, filters, search_context_size, user_location }`

1309 

1310 Search the Internet for sources related to the prompt. Learn more about the

1311 [web search tool](/docs/guides/tools-web-search).

1312 

1313 - `type: "web_search" or "web_search_2025_08_26"`

1314 

1315 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

1316 

1317 - `"web_search"`

1318 

1319 - `"web_search_2025_08_26"`

1320 

1321 - `filters: optional object { allowed_domains }`

1322 

1323 Filters for the search.

1324 

1325 - `allowed_domains: optional array of string`

1326 

1327 Allowed domains for the search. If not provided, all domains are allowed.

1328 Subdomains of the provided domains are allowed as well.

1329 

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

1331 

1332 - `search_context_size: optional "low" or "medium" or "high"`

1333 

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

1335 

1336 - `"low"`

1337 

1338 - `"medium"`

1339 

1340 - `"high"`

1341 

1342 - `user_location: optional object { city, country, region, 2 more }`

1343 

1344 The approximate location of the user.

1345 

1346 - `city: optional string`

1347 

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

1349 

1350 - `country: optional string`

1351 

1352 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

1353 

1354 - `region: optional string`

1355 

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

1357 

1358 - `timezone: optional string`

1359 

1360 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

1361 

1362 - `type: optional "approximate"`

1363 

1364 The type of location approximation. Always `approximate`.

1365 

1366 - `"approximate"`

1367 

1368 - `Mcp object { server_label, type, allowed_tools, 7 more }`

1369 

1370 Give the model access to additional tools via remote Model Context Protocol

1371 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

1372 

1373 - `server_label: string`

1374 

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

1376 

1377 - `type: "mcp"`

1378 

1379 The type of the MCP tool. Always `mcp`.

1380 

1381 - `"mcp"`

1382 

1383 - `allowed_tools: optional array of string or object { read_only, tool_names }`

1384 

1385 List of allowed tool names or a filter object.

1386 

1387 - `McpAllowedTools = array of string`

1388 

1389 A string array of allowed tool names

1390 

1391 - `McpToolFilter object { read_only, tool_names }`

1392 

1393 A filter object to specify which tools are allowed.

1394 

1395 - `read_only: optional boolean`

1396 

1397 Indicates whether or not a tool modifies data or is read-only. If an

1398 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

1399 it will match this filter.

1400 

1401 - `tool_names: optional array of string`

1402 

1403 List of allowed tool names.

1404 

1405 - `authorization: optional string`

1406 

1407 An OAuth access token that can be used with a remote MCP server, either

1408 with a custom MCP server URL or a service connector. Your application

1409 must handle the OAuth authorization flow and provide the token here.

1410 

1411 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`

1412 

1413 Identifier for service connectors, like those available in ChatGPT. One of

1414 `server_url` or `connector_id` must be provided. Learn more about service

1415 connectors [here](/docs/guides/tools-remote-mcp#connectors).

1416 

1417 Currently supported `connector_id` values are:

1418 

1419 - Dropbox: `connector_dropbox`

1420 - Gmail: `connector_gmail`

1421 - Google Calendar: `connector_googlecalendar`

1422 - Google Drive: `connector_googledrive`

1423 - Microsoft Teams: `connector_microsoftteams`

1424 - Outlook Calendar: `connector_outlookcalendar`

1425 - Outlook Email: `connector_outlookemail`

1426 - SharePoint: `connector_sharepoint`

1427 

1428 - `"connector_dropbox"`

1429 

1430 - `"connector_gmail"`

1431 

1432 - `"connector_googlecalendar"`

1433 

1434 - `"connector_googledrive"`

1435 

1436 - `"connector_microsoftteams"`

1437 

1438 - `"connector_outlookcalendar"`

1439 

1440 - `"connector_outlookemail"`

1441 

1442 - `"connector_sharepoint"`

1443 

1444 - `defer_loading: optional boolean`

1445 

1446 Whether this MCP tool is deferred and discovered via tool search.

1447 

1448 - `headers: optional map[string]`

1449 

1450 Optional HTTP headers to send to the MCP server. Use for authentication

1451 or other purposes.

1452 

1453 - `require_approval: optional object { always, never } or "always" or "never"`

1454 

1455 Specify which of the MCP server's tools require approval.

1456 

1457 - `McpToolApprovalFilter object { always, never }`

1458 

1459 Specify which of the MCP server's tools require approval. Can be

1460 `always`, `never`, or a filter object associated with tools

1461 that require approval.

1462 

1463 - `always: optional object { read_only, tool_names }`

1464 

1465 A filter object to specify which tools are allowed.

1466 

1467 - `read_only: optional boolean`

1468 

1469 Indicates whether or not a tool modifies data or is read-only. If an

1470 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

1471 it will match this filter.

1472 

1473 - `tool_names: optional array of string`

1474 

1475 List of allowed tool names.

1476 

1477 - `never: optional object { read_only, tool_names }`

1478 

1479 A filter object to specify which tools are allowed.

1480 

1481 - `read_only: optional boolean`

1482 

1483 Indicates whether or not a tool modifies data or is read-only. If an

1484 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),

1485 it will match this filter.

1486 

1487 - `tool_names: optional array of string`

1488 

1489 List of allowed tool names.

1490 

1491 - `McpToolApprovalSetting = "always" or "never"`

1492 

1493 Specify a single approval policy for all tools. One of `always` or

1494 `never`. When set to `always`, all tools will require approval. When

1495 set to `never`, all tools will not require approval.

1496 

1497 - `"always"`

1498 

1499 - `"never"`

1500 

1501 - `server_description: optional string`

1502 

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

1504 

1505 - `server_url: optional string`

1506 

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

1508 provided.

1509 

1510 - `CodeInterpreter object { container, type }`

1511 

1512 A tool that runs Python code to help generate a response to a prompt.

1513 

1514 - `container: string or object { type, file_ids, memory_limit, network_policy }`

1515 

1516 The code interpreter container. Can be a container ID or an object that

1517 specifies uploaded file IDs to make available to your code, along with an

1518 optional `memory_limit` setting.

1519 

1520 - `string`

1521 

1522 The container ID.

1523 

1524 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`

1525 

1526 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

1527 

1528 - `type: "auto"`

1529 

1530 Always `auto`.

1531 

1532 - `"auto"`

1533 

1534 - `file_ids: optional array of string`

1535 

1536 An optional list of uploaded files to make available to your code.

1537 

1538 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

1539 

1540 The memory limit for the code interpreter container.

1541 

1542 - `"1g"`

1543 

1544 - `"4g"`

1545 

1546 - `"16g"`

1547 

1548 - `"64g"`

1549 

1550 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

1551 

1552 Network access policy for the container.

1553 

1554 - `ContainerNetworkPolicyDisabled object { type }`

1555 

1556 - `type: "disabled"`

1557 

1558 Disable outbound network access. Always `disabled`.

1559 

1560 - `"disabled"`

1561 

1562 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

1563 

1564 - `allowed_domains: array of string`

1565 

1566 A list of allowed domains when type is `allowlist`.

1567 

1568 - `type: "allowlist"`

1569 

1570 Allow outbound network access only to specified domains. Always `allowlist`.

1571 

1572 - `"allowlist"`

1573 

1574 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`

1575 

1576 Optional domain-scoped secrets for allowlisted domains.

1577 

1578 - `domain: string`

1579 

1580 The domain associated with the secret.

1581 

1582 - `name: string`

1583 

1584 The name of the secret to inject for the domain.

1585 

1586 - `value: string`

1587 

1588 The secret value to inject for the domain.

1589 

1590 - `type: "code_interpreter"`

1591 

1592 The type of the code interpreter tool. Always `code_interpreter`.

1593 

1594 - `"code_interpreter"`

1595 

1596 - `ImageGeneration object { type, action, background, 9 more }`

1597 

1598 A tool that generates images using the GPT image models.

1599 

1600 - `type: "image_generation"`

1601 

1602 The type of the image generation tool. Always `image_generation`.

1603 

1604 - `"image_generation"`

1605 

1606 - `action: optional "generate" or "edit" or "auto"`

1607 

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

1609 

1610 - `"generate"`

1611 

1612 - `"edit"`

1613 

1614 - `"auto"`

1615 

1616 - `background: optional "transparent" or "opaque" or "auto"`

1617 

1618 Background type for the generated image. One of `transparent`,

1619 `opaque`, or `auto`. Default: `auto`.

1620 

1621 - `"transparent"`

1622 

1623 - `"opaque"`

1624 

1625 - `"auto"`

1626 

1627 - `input_fidelity: optional "high" or "low"`

1628 

1629 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`.

1630 

1631 - `"high"`

1632 

1633 - `"low"`

1634 

1635 - `input_image_mask: optional object { file_id, image_url }`

1636 

1637 Optional mask for inpainting. Contains `image_url`

1638 (string, optional) and `file_id` (string, optional).

1639 

1640 - `file_id: optional string`

1641 

1642 File ID for the mask image.

1643 

1644 - `image_url: optional string`

1645 

1646 Base64-encoded mask image.

1647 

1648 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

1649 

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

1651 

1652 - `string`

1653 

1654 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`

1655 

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

1657 

1658 - `"gpt-image-1"`

1659 

1660 - `"gpt-image-1-mini"`

1661 

1662 - `"gpt-image-1.5"`

1663 

1664 - `moderation: optional "auto" or "low"`

1665 

1666 Moderation level for the generated image. Default: `auto`.

1667 

1668 - `"auto"`

1669 

1670 - `"low"`

1671 

1672 - `output_compression: optional number`

1673 

1674 Compression level for the output image. Default: 100.

1675 

1676 - `output_format: optional "png" or "webp" or "jpeg"`

1677 

1678 The output format of the generated image. One of `png`, `webp`, or

1679 `jpeg`. Default: `png`.

1680 

1681 - `"png"`

1682 

1683 - `"webp"`

1684 

1685 - `"jpeg"`

1686 

1687 - `partial_images: optional number`

1688 

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

1690 

1691 - `quality: optional "low" or "medium" or "high" or "auto"`

1692 

1693 The quality of the generated image. One of `low`, `medium`, `high`,

1694 or `auto`. Default: `auto`.

1695 

1696 - `"low"`

1697 

1698 - `"medium"`

1699 

1700 - `"high"`

1701 

1702 - `"auto"`

1703 

1704 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`

1705 

1706 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

1707 

1708 - `string`

1709 

1710 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`

1711 

1712 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

1713 

1714 - `"1024x1024"`

1715 

1716 - `"1024x1536"`

1717 

1718 - `"1536x1024"`

1719 

1720 - `"auto"`

1721 

1722 - `LocalShell object { type }`

1723 

1724 A tool that allows the model to execute shell commands in a local environment.

1725 

1726 - `type: "local_shell"`

1727 

1728 The type of the local shell tool. Always `local_shell`.

1729 

1730 - `"local_shell"`

1731 

1732 - `Shell object { type, environment }`

1733 

1734 A tool that allows the model to execute shell commands.

1735 

1736 - `type: "shell"`

1737 

1738 The type of the shell tool. Always `shell`.

1739 

1740 - `"shell"`

1741 

1742 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`

1743 

1744 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

1745 

1746 - `type: "container_auto"`

1747 

1748 Automatically creates a container for this request

1749 

1750 - `"container_auto"`

1751 

1752 - `file_ids: optional array of string`

1753 

1754 An optional list of uploaded files to make available to your code.

1755 

1756 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

1757 

1758 The memory limit for the container.

1759 

1760 - `"1g"`

1761 

1762 - `"4g"`

1763 

1764 - `"16g"`

1765 

1766 - `"64g"`

1767 

1768 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

1769 

1770 Network access policy for the container.

1771 

1772 - `ContainerNetworkPolicyDisabled object { type }`

1773 

1774 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

1775 

1776 - `skills: optional array of SkillReference or InlineSkill`

1777 

1778 An optional list of skills referenced by id or inline data.

1779 

1780 - `SkillReference object { skill_id, type, version }`

1781 

1782 - `skill_id: string`

1783 

1784 The ID of the referenced skill.

1785 

1786 - `type: "skill_reference"`

1787 

1788 References a skill created with the /v1/skills endpoint.

1789 

1790 - `"skill_reference"`

1791 

1792 - `version: optional string`

1793 

1794 Optional skill version. Use a positive integer or 'latest'. Omit for default.

1795 

1796 - `InlineSkill object { description, name, source, type }`

1797 

1798 - `description: string`

1799 

1800 The description of the skill.

1801 

1802 - `name: string`

1803 

1804 The name of the skill.

1805 

1806 - `source: InlineSkillSource`

1807 

1808 Inline skill payload

1809 

1810 - `data: string`

1811 

1812 Base64-encoded skill zip bundle.

1813 

1814 - `media_type: "application/zip"`

1815 

1816 The media type of the inline skill payload. Must be `application/zip`.

1817 

1818 - `"application/zip"`

1819 

1820 - `type: "base64"`

1821 

1822 The type of the inline skill source. Must be `base64`.

1823 

1824 - `"base64"`

1825 

1826 - `type: "inline"`

1827 

1828 Defines an inline skill for this request.

1829 

1830 - `"inline"`

1831 

1832 - `LocalEnvironment object { type, skills }`

1833 

1834 - `type: "local"`

1835 

1836 Use a local computer environment.

1837 

1838 - `"local"`

1839 

1840 - `skills: optional array of LocalSkill`

1841 

1842 An optional list of skills.

1843 

1844 - `description: string`

1845 

1846 The description of the skill.

1847 

1848 - `name: string`

1849 

1850 The name of the skill.

1851 

1852 - `path: string`

1853 

1854 The path to the directory containing the skill.

1855 

1856 - `ContainerReference object { container_id, type }`

1857 

1858 - `container_id: string`

1859 

1860 The ID of the referenced container.

1861 

1862 - `type: "container_reference"`

1863 

1864 References a container created with the /v1/containers endpoint

1865 

1866 - `"container_reference"`

1867 

1868 - `Custom object { name, type, defer_loading, 2 more }`

1869 

1870 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

1871 

1872 - `name: string`

1873 

1874 The name of the custom tool, used to identify it in tool calls.

1875 

1876 - `type: "custom"`

1877 

1878 The type of the custom tool. Always `custom`.

1879 

1880 - `"custom"`

1881 

1882 - `defer_loading: optional boolean`

1883 

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

1885 

1886 - `description: optional string`

1887 

1888 Optional description of the custom tool, used to provide more context.

1889 

1890 - `format: optional CustomToolInputFormat`

1891 

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

1893 

1894 - `Text object { type }`

1895 

1896 Unconstrained free-form text.

1897 

1898 - `type: "text"`

1899 

1900 Unconstrained text format. Always `text`.

1901 

1902 - `"text"`

1903 

1904 - `Grammar object { definition, syntax, type }`

1905 

1906 A grammar defined by the user.

1907 

1908 - `definition: string`

1909 

1910 The grammar definition.

1911 

1912 - `syntax: "lark" or "regex"`

1913 

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

1915 

1916 - `"lark"`

1917 

1918 - `"regex"`

1919 

1920 - `type: "grammar"`

1921 

1922 Grammar format. Always `grammar`.

1923 

1924 - `"grammar"`

1925 

1926 - `Namespace object { description, name, tools, type }`

1927 

1928 Groups function/custom tools under a shared namespace.

1929 

1930 - `description: string`

1931 

1932 A description of the namespace shown to the model.

1933 

1934 - `name: string`

1935 

1936 The namespace name used in tool calls (for example, `crm`).

1937 

1938 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`

1939 

1940 The function/custom tools available inside this namespace.

1941 

1942 - `Function object { name, type, defer_loading, 3 more }`

1943 

1944 - `name: string`

1945 

1946 - `type: "function"`

1947 

1948 - `"function"`

1949 

1950 - `defer_loading: optional boolean`

1951 

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

1953 

1954 - `description: optional string`

1955 

1956 - `parameters: optional unknown`

1957 

1958 - `strict: optional boolean`

1959 

1960 - `Custom object { name, type, defer_loading, 2 more }`

1961 

1962 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

1963 

1964 - `name: string`

1965 

1966 The name of the custom tool, used to identify it in tool calls.

1967 

1968 - `type: "custom"`

1969 

1970 The type of the custom tool. Always `custom`.

1971 

1972 - `"custom"`

1973 

1974 - `defer_loading: optional boolean`

1975 

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

1977 

1978 - `description: optional string`

1979 

1980 Optional description of the custom tool, used to provide more context.

1981 

1982 - `format: optional CustomToolInputFormat`

1983 

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

1985 

1986 - `type: "namespace"`

1987 

1988 The type of the tool. Always `namespace`.

1989 

1990 - `"namespace"`

1991 

1992 - `ToolSearch object { type, description, execution, parameters }`

1993 

1994 Hosted or BYOT tool search configuration for deferred tools.

1995 

1996 - `type: "tool_search"`

1997 

1998 The type of the tool. Always `tool_search`.

1999 

2000 - `"tool_search"`

2001 

2002 - `description: optional string`

2003 

2004 Description shown to the model for a client-executed tool search tool.

2005 

2006 - `execution: optional "server" or "client"`

2007 

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

2009 

2010 - `"server"`

2011 

2012 - `"client"`

2013 

2014 - `parameters: optional unknown`

2015 

2016 Parameter schema for a client-executed tool search tool.

2017 

2018 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`

2019 

2020 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

2021 

2022 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`

2023 

2024 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

2025 

2026 - `"web_search_preview"`

2027 

2028 - `"web_search_preview_2025_03_11"`

2029 

2030 - `search_content_types: optional array of "text" or "image"`

2031 

2032 - `"text"`

2033 

2034 - `"image"`

2035 

2036 - `search_context_size: optional "low" or "medium" or "high"`

2037 

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

2039 

2040 - `"low"`

2041 

2042 - `"medium"`

2043 

2044 - `"high"`

2045 

2046 - `user_location: optional object { type, city, country, 2 more }`

2047 

2048 The user's location.

2049 

2050 - `type: "approximate"`

2051 

2052 The type of location approximation. Always `approximate`.

2053 

2054 - `"approximate"`

2055 

2056 - `city: optional string`

2057 

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

2059 

2060 - `country: optional string`

2061 

2062 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

2063 

2064 - `region: optional string`

2065 

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

2067 

2068 - `timezone: optional string`

2069 

2070 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

2071 

2072 - `ApplyPatch object { type }`

2073 

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

2075 

2076 - `type: "apply_patch"`

2077 

2078 The type of the tool. Always `apply_patch`.

2079 

2080 - `"apply_patch"`

2081 

2082 - `type: "tool_search_output"`

2083 

2084 The item type. Always `tool_search_output`.

2085 

2086 - `"tool_search_output"`

2087 

2088 - `id: optional string`

2089 

2090 The unique ID of this tool search output.

2091 

2092 - `call_id: optional string`

2093 

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

2095 

2096 - `execution: optional "server" or "client"`

2097 

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

2099 

2100 - `"server"`

2101 

2102 - `"client"`

2103 

2104 - `status: optional "in_progress" or "completed" or "incomplete"`

2105 

2106 The status of the tool search output.

2107 

2108 - `"in_progress"`

2109 

2110 - `"completed"`

2111 

2112 - `"incomplete"`

2113 

2114 - `AdditionalTools object { role, tools, type, id }`

2115 

2116 - `role: "developer"`

2117 

2118 The role that provided the additional tools. Only `developer` is supported.

2119 

2120 - `"developer"`

2121 

2122 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`

2123 

2124 A list of additional tools made available at this item.

2125 

2126 - `Function object { name, parameters, strict, 3 more }`

2127 

2128 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

2129 

2130 - `name: string`

2131 

2132 The name of the function to call.

2133 

2134 - `parameters: map[unknown]`

2135 

2136 A JSON schema object describing the parameters of the function.

2137 

2138 - `strict: boolean`

2139 

2140 Whether to enforce strict parameter validation. Default `true`.

2141 

2142 - `type: "function"`

2143 

2144 The type of the function tool. Always `function`.

1191 2145 

1192 - `"in"`2146 - `"function"`

1193 2147 

1194 - `"nin"`2148 - `defer_loading: optional boolean`

1195 2149 

1196 - `value: string or number or boolean or array of string or number`2150 Whether this function is deferred and loaded via tool search.

1197 2151 

1198 The value to compare against the attribute key; supports string, number, or boolean types.2152 - `description: optional string`

1199 2153 

1200 - `string`2154 A description of the function. Used by the model to determine whether or not to call the function.

1201 2155 

1202 - `number`2156 - `FileSearch object { type, vector_store_ids, filters, 2 more }`

1203 2157 

1204 - `boolean`2158 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

1205 2159 

1206 - `array of string or number`2160 - `type: "file_search"`

1207 2161 

1208 - `string`2162 The type of the file search tool. Always `file_search`.

1209 2163 

1210 - `number`2164 - `"file_search"`

1211 2165 

1212 - `CompoundFilter object { filters, type }`2166 - `vector_store_ids: array of string`

1213 2167 

1214 Combine multiple filters using `and` or `or`.2168 The IDs of the vector stores to search.

1215 2169 

1216 - `filters: array of ComparisonFilter or unknown`2170 - `filters: optional ComparisonFilter or CompoundFilter`

1217 2171 

1218 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.2172 A filter to apply.

1219 2173 

1220 - `ComparisonFilter object { key, type, value }`2174 - `ComparisonFilter object { key, type, value }`

1221 2175 

1222 A filter used to compare a specified attribute key to a given value using a defined comparison operation.2176 A filter used to compare a specified attribute key to a given value using a defined comparison operation.

1223 2177 

1224 - `unknown`2178 - `CompoundFilter object { filters, type }`

1225 

1226 - `type: "and" or "or"`

1227 

1228 Type of operation: `and` or `or`.

1229 

1230 - `"and"`

1231 2179 

1232 - `"or"`2180 Combine multiple filters using `and` or `or`.

1233 2181 

1234 - `max_num_results: optional number`2182 - `max_num_results: optional number`

1235 2183 


1553 2501 

1554 - `ContainerNetworkPolicyDisabled object { type }`2502 - `ContainerNetworkPolicyDisabled object { type }`

1555 2503 

1556 - `type: "disabled"`

1557 

1558 Disable outbound network access. Always `disabled`.

1559 

1560 - `"disabled"`

1561 

1562 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`2504 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

1563 2505 

1564 - `allowed_domains: array of string`

1565 

1566 A list of allowed domains when type is `allowlist`.

1567 

1568 - `type: "allowlist"`

1569 

1570 Allow outbound network access only to specified domains. Always `allowlist`.

1571 

1572 - `"allowlist"`

1573 

1574 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`

1575 

1576 Optional domain-scoped secrets for allowlisted domains.

1577 

1578 - `domain: string`

1579 

1580 The domain associated with the secret.

1581 

1582 - `name: string`

1583 

1584 The name of the secret to inject for the domain.

1585 

1586 - `value: string`

1587 

1588 The secret value to inject for the domain.

1589 

1590 - `type: "code_interpreter"`2506 - `type: "code_interpreter"`

1591 2507 

1592 The type of the code interpreter tool. Always `code_interpreter`.2508 The type of the code interpreter tool. Always `code_interpreter`.


1743 2659 

1744 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`2660 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`

1745 2661 

1746 - `type: "container_auto"`

1747 

1748 Automatically creates a container for this request

1749 

1750 - `"container_auto"`

1751 

1752 - `file_ids: optional array of string`

1753 

1754 An optional list of uploaded files to make available to your code.

1755 

1756 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`

1757 

1758 The memory limit for the container.

1759 

1760 - `"1g"`

1761 

1762 - `"4g"`

1763 

1764 - `"16g"`

1765 

1766 - `"64g"`

1767 

1768 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`

1769 

1770 Network access policy for the container.

1771 

1772 - `ContainerNetworkPolicyDisabled object { type }`

1773 

1774 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`

1775 

1776 - `skills: optional array of SkillReference or InlineSkill`

1777 

1778 An optional list of skills referenced by id or inline data.

1779 

1780 - `SkillReference object { skill_id, type, version }`

1781 

1782 - `skill_id: string`

1783 

1784 The ID of the referenced skill.

1785 

1786 - `type: "skill_reference"`

1787 

1788 References a skill created with the /v1/skills endpoint.

1789 

1790 - `"skill_reference"`

1791 

1792 - `version: optional string`

1793 

1794 Optional skill version. Use a positive integer or 'latest'. Omit for default.

1795 

1796 - `InlineSkill object { description, name, source, type }`

1797 

1798 - `description: string`

1799 

1800 The description of the skill.

1801 

1802 - `name: string`

1803 

1804 The name of the skill.

1805 

1806 - `source: InlineSkillSource`

1807 

1808 Inline skill payload

1809 

1810 - `data: string`

1811 

1812 Base64-encoded skill zip bundle.

1813 

1814 - `media_type: "application/zip"`

1815 

1816 The media type of the inline skill payload. Must be `application/zip`.

1817 

1818 - `"application/zip"`

1819 

1820 - `type: "base64"`

1821 

1822 The type of the inline skill source. Must be `base64`.

1823 

1824 - `"base64"`

1825 

1826 - `type: "inline"`

1827 

1828 Defines an inline skill for this request.

1829 

1830 - `"inline"`

1831 

1832 - `LocalEnvironment object { type, skills }`2662 - `LocalEnvironment object { type, skills }`

1833 2663 

1834 - `type: "local"`

1835 

1836 Use a local computer environment.

1837 

1838 - `"local"`

1839 

1840 - `skills: optional array of LocalSkill`

1841 

1842 An optional list of skills.

1843 

1844 - `description: string`

1845 

1846 The description of the skill.

1847 

1848 - `name: string`

1849 

1850 The name of the skill.

1851 

1852 - `path: string`

1853 

1854 The path to the directory containing the skill.

1855 

1856 - `ContainerReference object { container_id, type }`2664 - `ContainerReference object { container_id, type }`

1857 2665 

1858 - `container_id: string`

1859 

1860 The ID of the referenced container.

1861 

1862 - `type: "container_reference"`

1863 

1864 References a container created with the /v1/containers endpoint

1865 

1866 - `"container_reference"`

1867 

1868 - `Custom object { name, type, defer_loading, 2 more }`2666 - `Custom object { name, type, defer_loading, 2 more }`

1869 2667 

1870 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)2668 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)


1891 2689 

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

1893 2691 

1894 - `Text object { type }`

1895 

1896 Unconstrained free-form text.

1897 

1898 - `type: "text"`

1899 

1900 Unconstrained text format. Always `text`.

1901 

1902 - `"text"`

1903 

1904 - `Grammar object { definition, syntax, type }`

1905 

1906 A grammar defined by the user.

1907 

1908 - `definition: string`

1909 

1910 The grammar definition.

1911 

1912 - `syntax: "lark" or "regex"`

1913 

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

1915 

1916 - `"lark"`

1917 

1918 - `"regex"`

1919 

1920 - `type: "grammar"`

1921 

1922 Grammar format. Always `grammar`.

1923 

1924 - `"grammar"`

1925 

1926 - `Namespace object { description, name, tools, type }`2692 - `Namespace object { description, name, tools, type }`

1927 2693 

1928 Groups function/custom tools under a shared namespace.2694 Groups function/custom tools under a shared namespace.


2079 2845 

2080 - `"apply_patch"`2846 - `"apply_patch"`

2081 2847 

2082 - `type: "tool_search_output"`2848 - `type: "additional_tools"`

2083 2849 

2084 The item type. Always `tool_search_output`.2850 The item type. Always `additional_tools`.

2085 2851 

2086 - `"tool_search_output"`2852 - `"additional_tools"`

2087 2853 

2088 - `id: optional string`2854 - `id: optional string`

2089 2855 

2090 The unique ID of this tool search output.2856 The unique ID of this additional tools item.

2091 

2092 - `call_id: optional string`

2093 

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

2095 

2096 - `execution: optional "server" or "client"`

2097 

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

2099 

2100 - `"server"`

2101 

2102 - `"client"`

2103 

2104 - `status: optional "in_progress" or "completed" or "incomplete"`

2105 

2106 The status of the tool search output.

2107 

2108 - `"in_progress"`

2109 

2110 - `"completed"`

2111 

2112 - `"incomplete"`

2113 2857 

2114 - `Reasoning object { id, summary, type, 3 more }`2858 - `Reasoning object { id, summary, type, 3 more }`

2115 2859 


2866 3610 

2867 Whether to allow the model to run tool calls in parallel.3611 Whether to allow the model to run tool calls in parallel.

2868 3612 

3613- `personality: optional string or "friendly" or "pragmatic"`

3614 

3615 A model-owned style preset to apply to this request. Omit this parameter to use the model's default style. Supported values may expand over time. Values must be at most 64 characters.

3616 

3617 - `string`

3618 

3619 - `"friendly" or "pragmatic"`

3620 

3621 A model-owned style preset to apply to this request. Omit this parameter to use the model's default style. Supported values may expand over time. Values must be at most 64 characters.

3622 

3623 - `"friendly"`

3624 

3625 - `"pragmatic"`

3626 

2869- `previous_response_id: optional string`3627- `previous_response_id: optional string`

2870 3628 

2871 The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.3629 The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.