56 56
57 - `"cedar"`57 - `"cedar"`
58 58
5959 - `ID = object { id }` - `ID object { id }`
60 60
61 Custom voice reference.61 Custom voice reference.
62 62
56 56
57 - `"cedar"`57 - `"cedar"`
58 58
5959 - `ID = object { id }` - `ID object { id }`
60 60
61 Custom voice reference.61 Custom voice reference.
62 62
9 9
10### Returns10### Returns
11 11
1212- `Transcription = object { text, logprobs, usage }`- `Transcription object { text, logprobs, usage }`
13 13
14 Represents a transcription response returned by model, based on the provided input.14 Represents a transcription response returned by model, based on the provided input.
15 15
37 37
38 Token usage statistics for the request.38 Token usage statistics for the request.
39 39
4040 - `TokenUsage = object { input_tokens, output_tokens, total_tokens, 2 more }` - `TokenUsage object { input_tokens, output_tokens, total_tokens, 2 more }`
41 41
42 Usage statistics for models billed by token usage.42 Usage statistics for models billed by token usage.
43 43
71 71
72 Number of text tokens billed for this request.72 Number of text tokens billed for this request.
73 73
7474 - `DurationUsage = object { seconds, type }` - `DurationUsage object { seconds, type }`
75 75
76 Usage statistics for models billed by audio input duration.76 Usage statistics for models billed by audio input duration.
77 77
85 85
86 - `"duration"`86 - `"duration"`
87 87
8888- `TranscriptionDiarized = object { duration, segments, task, 2 more }`- `TranscriptionDiarized object { duration, segments, task, 2 more }`
89 89
90 Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.90 Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.
91 91
137 137
138 Token or duration usage statistics for the request.138 Token or duration usage statistics for the request.
139 139
140140 - `Tokens = object { input_tokens, output_tokens, total_tokens, 2 more }` - `Tokens object { input_tokens, output_tokens, total_tokens, 2 more }`
141 141
142 Usage statistics for models billed by token usage.142 Usage statistics for models billed by token usage.
143 143
171 171
172 Number of text tokens billed for this request.172 Number of text tokens billed for this request.
173 173
174174 - `Duration = object { seconds, type }` - `Duration object { seconds, type }`
175 175
176 Usage statistics for models billed by audio input duration.176 Usage statistics for models billed by audio input duration.
177 177
185 185
186 - `"duration"`186 - `"duration"`
187 187
188188- `TranscriptionVerbose = object { duration, language, text, 3 more }`- `TranscriptionVerbose object { duration, language, text, 3 more }`
189 189
190 Represents a verbose json transcription response returned by model, based on the provided input.190 Represents a verbose json transcription response returned by model, based on the provided input.
191 191
6 6
7### Returns7### Returns
8 8
99- `Translation = object { text }`- `Translation object { text }`
10 10
11 - `text: string`11 - `text: string`
12 12
1313- `TranslationVerbose = object { duration, language, text, segments }`- `TranslationVerbose object { duration, language, text, segments }`
14 14
15 - `duration: number`15 - `duration: number`
16 16
10 10
11### Returns11### Returns
12 12
1313- `Batch = object { id, completion_window, created_at, 19 more }`- `Batch object { id, completion_window, created_at, 19 more }`
14 14
15 - `id: string`15 - `id: string`
16 16
65 65
66### Returns66### Returns
67 67
6868- `Batch = object { id, completion_window, created_at, 19 more }`- `Batch object { id, completion_window, created_at, 19 more }`
69 69
70 - `id: string`70 - `id: string`
71 71
10 10
11### Returns11### Returns
12 12
1313- `Batch = object { id, completion_window, created_at, 19 more }`- `Batch object { id, completion_window, created_at, 19 more }`
14 14
15 - `id: string`15 - `id: string`
16 16
162 162
163 - `"auto"`163 - `"auto"`
164 164
165165 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
166 166
167 Default response format. Used to generate text responses.167 Default response format. Used to generate text responses.
168 168
172 172
173 - `"text"`173 - `"text"`
174 174
175175 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
176 176
177 JSON object response format. An older method of generating JSON responses.177 JSON object response format. An older method of generating JSON responses.
178 Using `json_schema` is recommended for models that support it. Note that the178 Using `json_schema` is recommended for models that support it. Note that the
185 185
186 - `"json_object"`186 - `"json_object"`
187 187
188188 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
189 189
190 JSON Schema response format. Used to generate structured JSON responses.190 JSON Schema response format. Used to generate structured JSON responses.
191 Learn more about [Structured Outputs](/docs/guides/structured-outputs).191 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
251 251
252 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.252 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.
253 253
254254 - `AutoChunkingStrategy = object { type }` - `AutoChunkingStrategy object { type }`
255 255
256 The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.256 The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
257 257
261 261
262 - `"auto"`262 - `"auto"`
263 263
264264 - `StaticChunkingStrategy = object { static, type }` - `StaticChunkingStrategy object { static, type }`
265 265
266 - `static: object { chunk_overlap_tokens, max_chunk_size_tokens }`266 - `static: object { chunk_overlap_tokens, max_chunk_size_tokens }`
267 267
298 298
299 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.299 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
300 300
301301 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
302 302
303 - `type: "code_interpreter"`303 - `type: "code_interpreter"`
304 304
306 306
307 - `"code_interpreter"`307 - `"code_interpreter"`
308 308
309309 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
310 310
311 - `type: "file_search"`311 - `type: "file_search"`
312 312
342 342
343 - `"default_2024_08_21"`343 - `"default_2024_08_21"`
344 344
345345 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
346 346
347 - `function: FunctionDefinition`347 - `function: FunctionDefinition`
348 348
378 378
379### Returns379### Returns
380 380
381381- `Assistant = object { id, created_at, description, 10 more }`- `Assistant object { id, created_at, description, 10 more }`
382 382
383 Represents an `assistant` that can call the model and use tools.383 Represents an `assistant` that can call the model and use tools.
384 384
425 425
426 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.426 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
427 427
428428 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
429 429
430 - `type: "code_interpreter"`430 - `type: "code_interpreter"`
431 431
433 433
434 - `"code_interpreter"`434 - `"code_interpreter"`
435 435
436436 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
437 437
438 - `type: "file_search"`438 - `type: "file_search"`
439 439
469 469
470 - `"default_2024_08_21"`470 - `"default_2024_08_21"`
471 471
472472 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
473 473
474 - `function: FunctionDefinition`474 - `function: FunctionDefinition`
475 475
513 513
514 - `"auto"`514 - `"auto"`
515 515
516516 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
517 517
518 Default response format. Used to generate text responses.518 Default response format. Used to generate text responses.
519 519
523 523
524 - `"text"`524 - `"text"`
525 525
526526 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
527 527
528 JSON object response format. An older method of generating JSON responses.528 JSON object response format. An older method of generating JSON responses.
529 Using `json_schema` is recommended for models that support it. Note that the529 Using `json_schema` is recommended for models that support it. Note that the
536 536
537 - `"json_object"`537 - `"json_object"`
538 538
539539 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
540 540
541 JSON Schema response format. Used to generate structured JSON responses.541 JSON Schema response format. Used to generate structured JSON responses.
542 Learn more about [Structured Outputs](/docs/guides/structured-outputs).542 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
10 10
11### Returns11### Returns
12 12
1313- `AssistantDeleted = object { id, deleted, object }`- `AssistantDeleted object { id, deleted, object }`
14 14
15 - `id: string`15 - `id: string`
16 16
73 73
74 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.74 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
75 75
7676 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
77 77
78 - `type: "code_interpreter"`78 - `type: "code_interpreter"`
79 79
81 81
82 - `"code_interpreter"`82 - `"code_interpreter"`
83 83
8484 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
85 85
86 - `type: "file_search"`86 - `type: "file_search"`
87 87
117 117
118 - `"default_2024_08_21"`118 - `"default_2024_08_21"`
119 119
120120 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
121 121
122 - `function: FunctionDefinition`122 - `function: FunctionDefinition`
123 123
161 161
162 - `"auto"`162 - `"auto"`
163 163
164164 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
165 165
166 Default response format. Used to generate text responses.166 Default response format. Used to generate text responses.
167 167
171 171
172 - `"text"`172 - `"text"`
173 173
174174 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
175 175
176 JSON object response format. An older method of generating JSON responses.176 JSON object response format. An older method of generating JSON responses.
177 Using `json_schema` is recommended for models that support it. Note that the177 Using `json_schema` is recommended for models that support it. Note that the
184 184
185 - `"json_object"`185 - `"json_object"`
186 186
187187 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
188 188
189 JSON Schema response format. Used to generate structured JSON responses.189 JSON Schema response format. Used to generate structured JSON responses.
190 Learn more about [Structured Outputs](/docs/guides/structured-outputs).190 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
10 10
11### Returns11### Returns
12 12
1313- `Assistant = object { id, created_at, description, 10 more }`- `Assistant object { id, created_at, description, 10 more }`
14 14
15 Represents an `assistant` that can call the model and use tools.15 Represents an `assistant` that can call the model and use tools.
16 16
57 57
58 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.58 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
59 59
6060 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
61 61
62 - `type: "code_interpreter"`62 - `type: "code_interpreter"`
63 63
65 65
66 - `"code_interpreter"`66 - `"code_interpreter"`
67 67
6868 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
69 69
70 - `type: "file_search"`70 - `type: "file_search"`
71 71
101 101
102 - `"default_2024_08_21"`102 - `"default_2024_08_21"`
103 103
104104 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
105 105
106 - `function: FunctionDefinition`106 - `function: FunctionDefinition`
107 107
145 145
146 - `"auto"`146 - `"auto"`
147 147
148148 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
149 149
150 Default response format. Used to generate text responses.150 Default response format. Used to generate text responses.
151 151
155 155
156 - `"text"`156 - `"text"`
157 157
158158 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
159 159
160 JSON object response format. An older method of generating JSON responses.160 JSON object response format. An older method of generating JSON responses.
161 Using `json_schema` is recommended for models that support it. Note that the161 Using `json_schema` is recommended for models that support it. Note that the
168 168
169 - `"json_object"`169 - `"json_object"`
170 170
171171 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
172 172
173 JSON Schema response format. Used to generate structured JSON responses.173 JSON Schema response format. Used to generate structured JSON responses.
174 Learn more about [Structured Outputs](/docs/guides/structured-outputs).174 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
166 166
167 - `"auto"`167 - `"auto"`
168 168
169169 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
170 170
171 Default response format. Used to generate text responses.171 Default response format. Used to generate text responses.
172 172
176 176
177 - `"text"`177 - `"text"`
178 178
179179 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
180 180
181 JSON object response format. An older method of generating JSON responses.181 JSON object response format. An older method of generating JSON responses.
182 Using `json_schema` is recommended for models that support it. Note that the182 Using `json_schema` is recommended for models that support it. Note that the
189 189
190 - `"json_object"`190 - `"json_object"`
191 191
192192 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
193 193
194 JSON Schema response format. Used to generate structured JSON responses.194 JSON Schema response format. Used to generate structured JSON responses.
195 Learn more about [Structured Outputs](/docs/guides/structured-outputs).195 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
251 251
252 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.252 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
253 253
254254 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
255 255
256 - `type: "code_interpreter"`256 - `type: "code_interpreter"`
257 257
259 259
260 - `"code_interpreter"`260 - `"code_interpreter"`
261 261
262262 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
263 263
264 - `type: "file_search"`264 - `type: "file_search"`
265 265
295 295
296 - `"default_2024_08_21"`296 - `"default_2024_08_21"`
297 297
298298 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
299 299
300 - `function: FunctionDefinition`300 - `function: FunctionDefinition`
301 301
331 331
332### Returns332### Returns
333 333
334334- `Assistant = object { id, created_at, description, 10 more }`- `Assistant object { id, created_at, description, 10 more }`
335 335
336 Represents an `assistant` that can call the model and use tools.336 Represents an `assistant` that can call the model and use tools.
337 337
378 378
379 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.379 A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
380 380
381381 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
382 382
383 - `type: "code_interpreter"`383 - `type: "code_interpreter"`
384 384
386 386
387 - `"code_interpreter"`387 - `"code_interpreter"`
388 388
389389 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
390 390
391 - `type: "file_search"`391 - `type: "file_search"`
392 392
422 422
423 - `"default_2024_08_21"`423 - `"default_2024_08_21"`
424 424
425425 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
426 426
427 - `function: FunctionDefinition`427 - `function: FunctionDefinition`
428 428
466 466
467 - `"auto"`467 - `"auto"`
468 468
469469 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
470 470
471 Default response format. Used to generate text responses.471 Default response format. Used to generate text responses.
472 472
476 476
477 - `"text"`477 - `"text"`
478 478
479479 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
480 480
481 JSON object response format. An older method of generating JSON responses.481 JSON object response format. An older method of generating JSON responses.
482 Using `json_schema` is recommended for models that support it. Note that the482 Using `json_schema` is recommended for models that support it. Note that the
489 489
490 - `"json_object"`490 - `"json_object"`
491 491
492492 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
493 493
494 JSON Schema response format. Used to generate structured JSON responses.494 JSON Schema response format. Used to generate structured JSON responses.
495 Learn more about [Structured Outputs](/docs/guides/structured-outputs).495 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
12 12
13### Returns13### Returns
14 14
1515- `ChatSession = object { id, chatkit_configuration, client_secret, 7 more }`- `ChatSession object { id, chatkit_configuration, client_secret, 7 more }`
16 16
17 Represents a ChatKit session and its resolved configuration.17 Represents a ChatKit session and its resolved configuration.
18 18
104 104
105### Returns105### Returns
106 106
107107- `ChatSession = object { id, chatkit_configuration, client_secret, 7 more }`- `ChatSession object { id, chatkit_configuration, client_secret, 7 more }`
108 108
109 Represents a ChatKit session and its resolved configuration.109 Represents a ChatKit session and its resolved configuration.
110 110
54 54
55 Current status for the thread. Defaults to `active` for newly created threads.55 Current status for the thread. Defaults to `active` for newly created threads.
56 56
5757 - `Active = object { type }` - `Active object { type }`
58 58
59 Indicates that a thread is active.59 Indicates that a thread is active.
60 60
64 64
65 - `"active"`65 - `"active"`
66 66
6767 - `Locked = object { reason, type }` - `Locked object { reason, type }`
68 68
69 Indicates that a thread is locked and cannot accept new input.69 Indicates that a thread is locked and cannot accept new input.
70 70
78 78
79 - `"locked"`79 - `"locked"`
80 80
8181 - `Closed = object { reason, type }` - `Closed object { reason, type }`
82 82
83 Indicates that a thread has been closed.83 Indicates that a thread has been closed.
84 84
32 32
33### Returns33### Returns
34 34
3535- `ChatKitThreadItemList = object { data, first_id, has_more, 2 more }`- `ChatKitThreadItemList object { data, first_id, has_more, 2 more }`
36 36
37 A paginated list of thread items rendered for the ChatKit API.37 A paginated list of thread items rendered for the ChatKit API.
38 38
40 40
41 A list of items41 A list of items
42 42
4343 - `ChatKitThreadUserMessageItem = object { id, attachments, content, 5 more }` - `ChatKitThreadUserMessageItem object { id, attachments, content, 5 more }`
44 44
45 User-authored messages within a thread.45 User-authored messages within a thread.
46 46
80 80
81 Ordered content elements supplied by the user.81 Ordered content elements supplied by the user.
82 82
8383 - `InputText = object { text, type }` - `InputText object { text, type }`
84 84
85 Text block that a user contributed to the thread.85 Text block that a user contributed to the thread.
86 86
94 94
95 - `"input_text"`95 - `"input_text"`
96 96
9797 - `QuotedText = object { text, type }` - `QuotedText object { text, type }`
98 98
99 Quoted snippet that the user referenced in their message.99 Quoted snippet that the user referenced in their message.
100 100
142 142
143 - `"chatkit.user_message"`143 - `"chatkit.user_message"`
144 144
145145 - `ChatKitThreadAssistantMessageItem = object { id, content, created_at, 3 more }` - `ChatKitThreadAssistantMessageItem object { id, content, created_at, 3 more }`
146 146
147 Assistant-authored message within a thread.147 Assistant-authored message within a thread.
148 148
158 158
159 Ordered list of annotations attached to the response text.159 Ordered list of annotations attached to the response text.
160 160
161161 - `File = object { source, type }` - `File object { source, type }`
162 162
163 Annotation that references an uploaded file.163 Annotation that references an uploaded file.
164 164
182 182
183 - `"file"`183 - `"file"`
184 184
185185 - `URL = object { source, type }` - `URL object { source, type }`
186 186
187 Annotation that references a URL.187 Annotation that references a URL.
188 188
236 236
237 - `"chatkit.assistant_message"`237 - `"chatkit.assistant_message"`
238 238
239239 - `ChatKitWidgetItem = object { id, created_at, object, 3 more }` - `ChatKitWidgetItem object { id, created_at, object, 3 more }`
240 240
241 Thread item that renders a widget payload.241 Thread item that renders a widget payload.
242 242
268 268
269 Serialized widget payload rendered in the UI.269 Serialized widget payload rendered in the UI.
270 270
271271 - `ChatKitClientToolCall = object { id, arguments, call_id, 7 more }` - `ChatKitClientToolCall object { id, arguments, call_id, 7 more }`
272 272
273 Record of a client side tool invocation initiated by the assistant.273 Record of a client side tool invocation initiated by the assistant.
274 274
320 320
321 - `"chatkit.client_tool_call"`321 - `"chatkit.client_tool_call"`
322 322
323323 - `ChatKitTask = object { id, created_at, heading, 5 more }` - `ChatKitTask object { id, created_at, heading, 5 more }`
324 324
325 Task emitted by the workflow to show progress and status updates.325 Task emitted by the workflow to show progress and status updates.
326 326
364 364
365 - `"chatkit.task"`365 - `"chatkit.task"`
366 366
367367 - `ChatKitTaskGroup = object { id, created_at, object, 3 more }` - `ChatKitTaskGroup object { id, created_at, object, 3 more }`
368 368
369 Collection of workflow tasks grouped together in the thread.369 Collection of workflow tasks grouped together in the thread.
370 370
10 10
11### Returns11### Returns
12 12
1313- `ChatKitThread = object { id, created_at, object, 3 more }`- `ChatKitThread object { id, created_at, object, 3 more }`
14 14
15 Represents a ChatKit thread and its current status.15 Represents a ChatKit thread and its current status.
16 16
32 32
33 Current status for the thread. Defaults to `active` for newly created threads.33 Current status for the thread. Defaults to `active` for newly created threads.
34 34
3535 - `Active = object { type }` - `Active object { type }`
36 36
37 Indicates that a thread is active.37 Indicates that a thread is active.
38 38
42 42
43 - `"active"`43 - `"active"`
44 44
4545 - `Locked = object { reason, type }` - `Locked object { reason, type }`
46 46
47 Indicates that a thread is locked and cannot accept new input.47 Indicates that a thread is locked and cannot accept new input.
48 48
56 56
57 - `"locked"`57 - `"locked"`
58 58
5959 - `Closed = object { reason, type }` - `Closed object { reason, type }`
60 60
61 Indicates that a thread has been closed.61 Indicates that a thread has been closed.
62 62
22 22
23 An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](/docs/models).23 An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](/docs/models).
24 24
2525 - `ImageFileContentBlock = object { image_file, type }` - `ImageFileContentBlock object { image_file, type }`
26 26
27 References an image [File](/docs/api-reference/files) in the content of a message.27 References an image [File](/docs/api-reference/files) in the content of a message.
28 28
48 48
49 - `"image_file"`49 - `"image_file"`
50 50
5151 - `ImageURLContentBlock = object { image_url, type }` - `ImageURLContentBlock object { image_url, type }`
52 52
53 References an image URL in the content of a message.53 References an image URL in the content of a message.
54 54
74 74
75 - `"image_url"`75 - `"image_url"`
76 76
7777 - `TextContentBlockParam = object { text, type }` - `TextContentBlockParam object { text, type }`
78 78
79 The text content that is part of a message.79 The text content that is part of a message.
80 80
111 111
112 The tools to add this file to.112 The tools to add this file to.
113 113
114114 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
115 115
116 - `type: "code_interpreter"`116 - `type: "code_interpreter"`
117 117
119 119
120 - `"code_interpreter"`120 - `"code_interpreter"`
121 121
122122 - `FileSearchTool = object { type }` - `FileSearchTool object { type }`
123 123
124 - `type: "file_search"`124 - `type: "file_search"`
125 125
169 169
170 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.170 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.
171 171
172172 - `AutoChunkingStrategy = object { type }` - `AutoChunkingStrategy object { type }`
173 173
174 The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.174 The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
175 175
179 179
180 - `"auto"`180 - `"auto"`
181 181
182182 - `StaticChunkingStrategy = object { static, type }` - `StaticChunkingStrategy object { static, type }`
183 183
184 - `static: object { chunk_overlap_tokens, max_chunk_size_tokens }`184 - `static: object { chunk_overlap_tokens, max_chunk_size_tokens }`
185 185
214 214
215### Returns215### Returns
216 216
217217- `Thread = object { id, created_at, metadata, 2 more }`- `Thread object { id, created_at, metadata, 2 more }`
218 218
219 Represents a thread that contains [messages](/docs/api-reference/messages).219 Represents a thread that contains [messages](/docs/api-reference/messages).
220 220
10 10
11### Returns11### Returns
12 12
1313- `ThreadDeleted = object { id, deleted, object }`- `ThreadDeleted object { id, deleted, object }`
14 14
15 - `id: string`15 - `id: string`
16 16
10 10
11### Returns11### Returns
12 12
1313- `Thread = object { id, created_at, metadata, 2 more }`- `Thread object { id, created_at, metadata, 2 more }`
14 14
15 Represents a thread that contains [messages](/docs/api-reference/messages).15 Represents a thread that contains [messages](/docs/api-reference/messages).
16 16
37 37
38### Returns38### Returns
39 39
4040- `Thread = object { id, created_at, metadata, 2 more }`- `Thread object { id, created_at, metadata, 2 more }`
41 41
42 Represents a thread that contains [messages](/docs/api-reference/messages).42 Represents a thread that contains [messages](/docs/api-reference/messages).
43 43
22 22
23 An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](/docs/models).23 An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](/docs/models).
24 24
2525 - `ImageFileContentBlock = object { image_file, type }` - `ImageFileContentBlock object { image_file, type }`
26 26
27 References an image [File](/docs/api-reference/files) in the content of a message.27 References an image [File](/docs/api-reference/files) in the content of a message.
28 28
48 48
49 - `"image_file"`49 - `"image_file"`
50 50
5151 - `ImageURLContentBlock = object { image_url, type }` - `ImageURLContentBlock object { image_url, type }`
52 52
53 References an image URL in the content of a message.53 References an image URL in the content of a message.
54 54
74 74
75 - `"image_url"`75 - `"image_url"`
76 76
7777 - `TextContentBlockParam = object { text, type }` - `TextContentBlockParam object { text, type }`
78 78
79 The text content that is part of a message.79 The text content that is part of a message.
80 80
111 111
112 The tools to add this file to.112 The tools to add this file to.
113 113
114114 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
115 115
116 - `type: "code_interpreter"`116 - `type: "code_interpreter"`
117 117
119 119
120 - `"code_interpreter"`120 - `"code_interpreter"`
121 121
122122 - `FileSearchTool = object { type }` - `FileSearchTool object { type }`
123 123
124 - `type: "file_search"`124 - `type: "file_search"`
125 125
138 138
139### Returns139### Returns
140 140
141141- `Message = object { id, assistant_id, attachments, 11 more }`- `Message object { id, assistant_id, attachments, 11 more }`
142 142
143 Represents a message within a [thread](/docs/api-reference/threads).143 Represents a message within a [thread](/docs/api-reference/threads).
144 144
162 162
163 The tools to add this file to.163 The tools to add this file to.
164 164
165165 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
166 166
167 - `type: "code_interpreter"`167 - `type: "code_interpreter"`
168 168
170 170
171 - `"code_interpreter"`171 - `"code_interpreter"`
172 172
173173 - `FileSearchTool = object { type }` - `FileSearchTool object { type }`
174 174
175 - `type: "file_search"`175 - `type: "file_search"`
176 176
186 186
187 The content of the message in array of text and/or images.187 The content of the message in array of text and/or images.
188 188
189189 - `ImageFileContentBlock = object { image_file, type }` - `ImageFileContentBlock object { image_file, type }`
190 190
191 References an image [File](/docs/api-reference/files) in the content of a message.191 References an image [File](/docs/api-reference/files) in the content of a message.
192 192
212 212
213 - `"image_file"`213 - `"image_file"`
214 214
215215 - `ImageURLContentBlock = object { image_url, type }` - `ImageURLContentBlock object { image_url, type }`
216 216
217 References an image URL in the content of a message.217 References an image URL in the content of a message.
218 218
238 238
239 - `"image_url"`239 - `"image_url"`
240 240
241241 - `TextContentBlock = object { text, type }` - `TextContentBlock object { text, type }`
242 242
243 The text content that is part of a message.243 The text content that is part of a message.
244 244
246 246
247 - `annotations: array of FileCitationAnnotation or FilePathAnnotation`247 - `annotations: array of FileCitationAnnotation or FilePathAnnotation`
248 248
249249 - `FileCitationAnnotation = object { end_index, file_citation, start_index, 2 more }` - `FileCitationAnnotation object { end_index, file_citation, start_index, 2 more }`
250 250
251 A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.251 A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.
252 252
270 270
271 - `"file_citation"`271 - `"file_citation"`
272 272
273273 - `FilePathAnnotation = object { end_index, file_path, start_index, 2 more }` - `FilePathAnnotation object { end_index, file_path, start_index, 2 more }`
274 274
275 A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.275 A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.
276 276
304 304
305 - `"text"`305 - `"text"`
306 306
307307 - `RefusalContentBlock = object { refusal, type }` - `RefusalContentBlock object { refusal, type }`
308 308
309 The refusal content generated by the assistant.309 The refusal content generated by the assistant.
310 310
12 12
13### Returns13### Returns
14 14
1515- `MessageDeleted = object { id, deleted, object }`- `MessageDeleted object { id, deleted, object }`
16 16
17 - `id: string`17 - `id: string`
18 18
58 58
59 The tools to add this file to.59 The tools to add this file to.
60 60
6161 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
62 62
63 - `type: "code_interpreter"`63 - `type: "code_interpreter"`
64 64
66 66
67 - `"code_interpreter"`67 - `"code_interpreter"`
68 68
6969 - `FileSearchTool = object { type }` - `FileSearchTool object { type }`
70 70
71 - `type: "file_search"`71 - `type: "file_search"`
72 72
82 82
83 The content of the message in array of text and/or images.83 The content of the message in array of text and/or images.
84 84
8585 - `ImageFileContentBlock = object { image_file, type }` - `ImageFileContentBlock object { image_file, type }`
86 86
87 References an image [File](/docs/api-reference/files) in the content of a message.87 References an image [File](/docs/api-reference/files) in the content of a message.
88 88
108 108
109 - `"image_file"`109 - `"image_file"`
110 110
111111 - `ImageURLContentBlock = object { image_url, type }` - `ImageURLContentBlock object { image_url, type }`
112 112
113 References an image URL in the content of a message.113 References an image URL in the content of a message.
114 114
134 134
135 - `"image_url"`135 - `"image_url"`
136 136
137137 - `TextContentBlock = object { text, type }` - `TextContentBlock object { text, type }`
138 138
139 The text content that is part of a message.139 The text content that is part of a message.
140 140
142 142
143 - `annotations: array of FileCitationAnnotation or FilePathAnnotation`143 - `annotations: array of FileCitationAnnotation or FilePathAnnotation`
144 144
145145 - `FileCitationAnnotation = object { end_index, file_citation, start_index, 2 more }` - `FileCitationAnnotation object { end_index, file_citation, start_index, 2 more }`
146 146
147 A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.147 A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.
148 148
166 166
167 - `"file_citation"`167 - `"file_citation"`
168 168
169169 - `FilePathAnnotation = object { end_index, file_path, start_index, 2 more }` - `FilePathAnnotation object { end_index, file_path, start_index, 2 more }`
170 170
171 A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.171 A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.
172 172
200 200
201 - `"text"`201 - `"text"`
202 202
203203 - `RefusalContentBlock = object { refusal, type }` - `RefusalContentBlock object { refusal, type }`
204 204
205 The refusal content generated by the assistant.205 The refusal content generated by the assistant.
206 206
12 12
13### Returns13### Returns
14 14
1515- `Message = object { id, assistant_id, attachments, 11 more }`- `Message object { id, assistant_id, attachments, 11 more }`
16 16
17 Represents a message within a [thread](/docs/api-reference/threads).17 Represents a message within a [thread](/docs/api-reference/threads).
18 18
36 36
37 The tools to add this file to.37 The tools to add this file to.
38 38
3939 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
40 40
41 - `type: "code_interpreter"`41 - `type: "code_interpreter"`
42 42
44 44
45 - `"code_interpreter"`45 - `"code_interpreter"`
46 46
4747 - `FileSearchTool = object { type }` - `FileSearchTool object { type }`
48 48
49 - `type: "file_search"`49 - `type: "file_search"`
50 50
60 60
61 The content of the message in array of text and/or images.61 The content of the message in array of text and/or images.
62 62
6363 - `ImageFileContentBlock = object { image_file, type }` - `ImageFileContentBlock object { image_file, type }`
64 64
65 References an image [File](/docs/api-reference/files) in the content of a message.65 References an image [File](/docs/api-reference/files) in the content of a message.
66 66
86 86
87 - `"image_file"`87 - `"image_file"`
88 88
8989 - `ImageURLContentBlock = object { image_url, type }` - `ImageURLContentBlock object { image_url, type }`
90 90
91 References an image URL in the content of a message.91 References an image URL in the content of a message.
92 92
112 112
113 - `"image_url"`113 - `"image_url"`
114 114
115115 - `TextContentBlock = object { text, type }` - `TextContentBlock object { text, type }`
116 116
117 The text content that is part of a message.117 The text content that is part of a message.
118 118
120 120
121 - `annotations: array of FileCitationAnnotation or FilePathAnnotation`121 - `annotations: array of FileCitationAnnotation or FilePathAnnotation`
122 122
123123 - `FileCitationAnnotation = object { end_index, file_citation, start_index, 2 more }` - `FileCitationAnnotation object { end_index, file_citation, start_index, 2 more }`
124 124
125 A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.125 A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.
126 126
144 144
145 - `"file_citation"`145 - `"file_citation"`
146 146
147147 - `FilePathAnnotation = object { end_index, file_path, start_index, 2 more }` - `FilePathAnnotation object { end_index, file_path, start_index, 2 more }`
148 148
149 A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.149 A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.
150 150
178 178
179 - `"text"`179 - `"text"`
180 180
181181 - `RefusalContentBlock = object { refusal, type }` - `RefusalContentBlock object { refusal, type }`
182 182
183 The refusal content generated by the assistant.183 The refusal content generated by the assistant.
184 184
23 23
24### Returns24### Returns
25 25
2626- `Message = object { id, assistant_id, attachments, 11 more }`- `Message object { id, assistant_id, attachments, 11 more }`
27 27
28 Represents a message within a [thread](/docs/api-reference/threads).28 Represents a message within a [thread](/docs/api-reference/threads).
29 29
47 47
48 The tools to add this file to.48 The tools to add this file to.
49 49
5050 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
51 51
52 - `type: "code_interpreter"`52 - `type: "code_interpreter"`
53 53
55 55
56 - `"code_interpreter"`56 - `"code_interpreter"`
57 57
5858 - `FileSearchTool = object { type }` - `FileSearchTool object { type }`
59 59
60 - `type: "file_search"`60 - `type: "file_search"`
61 61
71 71
72 The content of the message in array of text and/or images.72 The content of the message in array of text and/or images.
73 73
7474 - `ImageFileContentBlock = object { image_file, type }` - `ImageFileContentBlock object { image_file, type }`
75 75
76 References an image [File](/docs/api-reference/files) in the content of a message.76 References an image [File](/docs/api-reference/files) in the content of a message.
77 77
97 97
98 - `"image_file"`98 - `"image_file"`
99 99
100100 - `ImageURLContentBlock = object { image_url, type }` - `ImageURLContentBlock object { image_url, type }`
101 101
102 References an image URL in the content of a message.102 References an image URL in the content of a message.
103 103
123 123
124 - `"image_url"`124 - `"image_url"`
125 125
126126 - `TextContentBlock = object { text, type }` - `TextContentBlock object { text, type }`
127 127
128 The text content that is part of a message.128 The text content that is part of a message.
129 129
131 131
132 - `annotations: array of FileCitationAnnotation or FilePathAnnotation`132 - `annotations: array of FileCitationAnnotation or FilePathAnnotation`
133 133
134134 - `FileCitationAnnotation = object { end_index, file_citation, start_index, 2 more }` - `FileCitationAnnotation object { end_index, file_citation, start_index, 2 more }`
135 135
136 A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.136 A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.
137 137
155 155
156 - `"file_citation"`156 - `"file_citation"`
157 157
158158 - `FilePathAnnotation = object { end_index, file_path, start_index, 2 more }` - `FilePathAnnotation object { end_index, file_path, start_index, 2 more }`
159 159
160 A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.160 A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.
161 161
189 189
190 - `"text"`190 - `"text"`
191 191
192192 - `RefusalContentBlock = object { refusal, type }` - `RefusalContentBlock object { refusal, type }`
193 193
194 The refusal content generated by the assistant.194 The refusal content generated by the assistant.
195 195
12 12
13### Returns13### Returns
14 14
1515- `Run = object { id, assistant_id, cancelled_at, 24 more }`- `Run object { id, assistant_id, cancelled_at, 24 more }`
16 16
17 Represents an execution run on a [thread](/docs/api-reference/threads).17 Represents an execution run on a [thread](/docs/api-reference/threads).
18 18
165 165
166 - `"auto"`166 - `"auto"`
167 167
168168 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
169 169
170 Default response format. Used to generate text responses.170 Default response format. Used to generate text responses.
171 171
175 175
176 - `"text"`176 - `"text"`
177 177
178178 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
179 179
180 JSON object response format. An older method of generating JSON responses.180 JSON object response format. An older method of generating JSON responses.
181 Using `json_schema` is recommended for models that support it. Note that the181 Using `json_schema` is recommended for models that support it. Note that the
188 188
189 - `"json_object"`189 - `"json_object"`
190 190
191191 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
192 192
193 JSON Schema response format. Used to generate structured JSON responses.193 JSON Schema response format. Used to generate structured JSON responses.
194 Learn more about [Structured Outputs](/docs/guides/structured-outputs).194 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
274 274
275 - `"required"`275 - `"required"`
276 276
277277 - `AssistantToolChoice = object { type, function }` - `AssistantToolChoice object { type, function }`
278 278
279 Specifies a tool the model should use. Use to force the model to call a specific tool.279 Specifies a tool the model should use. Use to force the model to call a specific tool.
280 280
298 298
299 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.299 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.
300 300
301301 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
302 302
303 - `type: "code_interpreter"`303 - `type: "code_interpreter"`
304 304
306 306
307 - `"code_interpreter"`307 - `"code_interpreter"`
308 308
309309 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
310 310
311 - `type: "file_search"`311 - `type: "file_search"`
312 312
342 342
343 - `"default_2024_08_21"`343 - `"default_2024_08_21"`
344 344
345345 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
346 346
347 - `function: FunctionDefinition`347 - `function: FunctionDefinition`
348 348
44 44
45 An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](/docs/models).45 An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](/docs/models).
46 46
4747 - `ImageFileContentBlock = object { image_file, type }` - `ImageFileContentBlock object { image_file, type }`
48 48
49 References an image [File](/docs/api-reference/files) in the content of a message.49 References an image [File](/docs/api-reference/files) in the content of a message.
50 50
70 70
71 - `"image_file"`71 - `"image_file"`
72 72
7373 - `ImageURLContentBlock = object { image_url, type }` - `ImageURLContentBlock object { image_url, type }`
74 74
75 References an image URL in the content of a message.75 References an image URL in the content of a message.
76 76
96 96
97 - `"image_url"`97 - `"image_url"`
98 98
9999 - `TextContentBlockParam = object { text, type }` - `TextContentBlockParam object { text, type }`
100 100
101 The text content that is part of a message.101 The text content that is part of a message.
102 102
133 133
134 The tools to add this file to.134 The tools to add this file to.
135 135
136136 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
137 137
138 - `type: "code_interpreter"`138 - `type: "code_interpreter"`
139 139
141 141
142 - `"code_interpreter"`142 - `"code_interpreter"`
143 143
144144 - `FileSearchTool = object { type }` - `FileSearchTool object { type }`
145 145
146 - `type: "file_search"`146 - `type: "file_search"`
147 147
318 318
319 - `"auto"`319 - `"auto"`
320 320
321321 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
322 322
323 Default response format. Used to generate text responses.323 Default response format. Used to generate text responses.
324 324
328 328
329 - `"text"`329 - `"text"`
330 330
331331 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
332 332
333 JSON object response format. An older method of generating JSON responses.333 JSON object response format. An older method of generating JSON responses.
334 Using `json_schema` is recommended for models that support it. Note that the334 Using `json_schema` is recommended for models that support it. Note that the
341 341
342 - `"json_object"`342 - `"json_object"`
343 343
344344 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
345 345
346 JSON Schema response format. Used to generate structured JSON responses.346 JSON Schema response format. Used to generate structured JSON responses.
347 Learn more about [Structured Outputs](/docs/guides/structured-outputs).347 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
405 405
406 - `"required"`406 - `"required"`
407 407
408408 - `AssistantToolChoice = object { type, function }` - `AssistantToolChoice object { type, function }`
409 409
410 Specifies a tool the model should use. Use to force the model to call a specific tool.410 Specifies a tool the model should use. Use to force the model to call a specific tool.
411 411
429 429
430 Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.430 Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.
431 431
432432 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
433 433
434434 - `type: "code_interpreter"` - `FileSearchTool object { type, file_search }`
435
436 The type of tool being defined: `code_interpreter`
437
438 - `"code_interpreter"`
439
440 - `FileSearchTool = object { type, file_search }`
441 435
442 - `type: "file_search"`436 - `type: "file_search"`
443 437
473 467
474 - `"default_2024_08_21"`468 - `"default_2024_08_21"`
475 469
476470 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
477 471
478 - `function: FunctionDefinition`472 - `function: FunctionDefinition`
479 473
525 519
526### Returns520### Returns
527 521
528522- `Run = object { id, assistant_id, cancelled_at, 24 more }`- `Run object { id, assistant_id, cancelled_at, 24 more }`
529 523
530 Represents an execution run on a [thread](/docs/api-reference/threads).524 Represents an execution run on a [thread](/docs/api-reference/threads).
531 525
678 672
679 - `"auto"`673 - `"auto"`
680 674
681675 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
682 676
683 Default response format. Used to generate text responses.677 Default response format. Used to generate text responses.
684 678
688 682
689 - `"text"`683 - `"text"`
690 684
691685 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
692 686
693 JSON object response format. An older method of generating JSON responses.687 JSON object response format. An older method of generating JSON responses.
694 Using `json_schema` is recommended for models that support it. Note that the688 Using `json_schema` is recommended for models that support it. Note that the
701 695
702 - `"json_object"`696 - `"json_object"`
703 697
704698 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
705 699
706 JSON Schema response format. Used to generate structured JSON responses.700 JSON Schema response format. Used to generate structured JSON responses.
707 Learn more about [Structured Outputs](/docs/guides/structured-outputs).701 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
787 781
788 - `"required"`782 - `"required"`
789 783
790784 - `AssistantToolChoice = object { type, function }` - `AssistantToolChoice object { type, function }`
791 785
792 Specifies a tool the model should use. Use to force the model to call a specific tool.786 Specifies a tool the model should use. Use to force the model to call a specific tool.
793 787
811 805
812 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.806 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.
813 807
814808 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
815 809
816 - `type: "code_interpreter"`810 - `type: "code_interpreter"`
817 811
819 813
820 - `"code_interpreter"`814 - `"code_interpreter"`
821 815
822816 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
823 817
824 - `type: "file_search"`818 - `type: "file_search"`
825 819
855 849
856 - `"default_2024_08_21"`850 - `"default_2024_08_21"`
857 851
858852 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
859 853
860 - `function: FunctionDefinition`854 - `function: FunctionDefinition`
861 855
183 183
184 - `"auto"`184 - `"auto"`
185 185
186186 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
187 187
188 Default response format. Used to generate text responses.188 Default response format. Used to generate text responses.
189 189
193 193
194 - `"text"`194 - `"text"`
195 195
196196 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
197 197
198 JSON object response format. An older method of generating JSON responses.198 JSON object response format. An older method of generating JSON responses.
199 Using `json_schema` is recommended for models that support it. Note that the199 Using `json_schema` is recommended for models that support it. Note that the
206 206
207 - `"json_object"`207 - `"json_object"`
208 208
209209 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
210 210
211 JSON Schema response format. Used to generate structured JSON responses.211 JSON Schema response format. Used to generate structured JSON responses.
212 Learn more about [Structured Outputs](/docs/guides/structured-outputs).212 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
292 292
293 - `"required"`293 - `"required"`
294 294
295295 - `AssistantToolChoice = object { type, function }` - `AssistantToolChoice object { type, function }`
296 296
297 Specifies a tool the model should use. Use to force the model to call a specific tool.297 Specifies a tool the model should use. Use to force the model to call a specific tool.
298 298
316 316
317 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.317 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.
318 318
319319 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
320 320
321 - `type: "code_interpreter"`321 - `type: "code_interpreter"`
322 322
324 324
325 - `"code_interpreter"`325 - `"code_interpreter"`
326 326
327327 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
328 328
329 - `type: "file_search"`329 - `type: "file_search"`
330 330
360 360
361 - `"default_2024_08_21"`361 - `"default_2024_08_21"`
362 362
363363 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
364 364
365 - `function: FunctionDefinition`365 - `function: FunctionDefinition`
366 366
12 12
13### Returns13### Returns
14 14
1515- `Run = object { id, assistant_id, cancelled_at, 24 more }`- `Run object { id, assistant_id, cancelled_at, 24 more }`
16 16
17 Represents an execution run on a [thread](/docs/api-reference/threads).17 Represents an execution run on a [thread](/docs/api-reference/threads).
18 18
165 165
166 - `"auto"`166 - `"auto"`
167 167
168168 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
169 169
170 Default response format. Used to generate text responses.170 Default response format. Used to generate text responses.
171 171
175 175
176 - `"text"`176 - `"text"`
177 177
178178 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
179 179
180 JSON object response format. An older method of generating JSON responses.180 JSON object response format. An older method of generating JSON responses.
181 Using `json_schema` is recommended for models that support it. Note that the181 Using `json_schema` is recommended for models that support it. Note that the
188 188
189 - `"json_object"`189 - `"json_object"`
190 190
191191 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
192 192
193 JSON Schema response format. Used to generate structured JSON responses.193 JSON Schema response format. Used to generate structured JSON responses.
194 Learn more about [Structured Outputs](/docs/guides/structured-outputs).194 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
274 274
275 - `"required"`275 - `"required"`
276 276
277277 - `AssistantToolChoice = object { type, function }` - `AssistantToolChoice object { type, function }`
278 278
279 Specifies a tool the model should use. Use to force the model to call a specific tool.279 Specifies a tool the model should use. Use to force the model to call a specific tool.
280 280
298 298
299 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.299 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.
300 300
301301 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
302 302
303 - `type: "code_interpreter"`303 - `type: "code_interpreter"`
304 304
306 306
307 - `"code_interpreter"`307 - `"code_interpreter"`
308 308
309309 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
310 310
311 - `type: "file_search"`311 - `type: "file_search"`
312 312
342 342
343 - `"default_2024_08_21"`343 - `"default_2024_08_21"`
344 344
345345 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
346 346
347 - `function: FunctionDefinition`347 - `function: FunctionDefinition`
348 348
30 30
31### Returns31### Returns
32 32
3333- `Run = object { id, assistant_id, cancelled_at, 24 more }`- `Run object { id, assistant_id, cancelled_at, 24 more }`
34 34
35 Represents an execution run on a [thread](/docs/api-reference/threads).35 Represents an execution run on a [thread](/docs/api-reference/threads).
36 36
183 183
184 - `"auto"`184 - `"auto"`
185 185
186186 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
187 187
188 Default response format. Used to generate text responses.188 Default response format. Used to generate text responses.
189 189
193 193
194 - `"text"`194 - `"text"`
195 195
196196 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
197 197
198 JSON object response format. An older method of generating JSON responses.198 JSON object response format. An older method of generating JSON responses.
199 Using `json_schema` is recommended for models that support it. Note that the199 Using `json_schema` is recommended for models that support it. Note that the
206 206
207 - `"json_object"`207 - `"json_object"`
208 208
209209 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
210 210
211 JSON Schema response format. Used to generate structured JSON responses.211 JSON Schema response format. Used to generate structured JSON responses.
212 Learn more about [Structured Outputs](/docs/guides/structured-outputs).212 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
292 292
293 - `"required"`293 - `"required"`
294 294
295295 - `AssistantToolChoice = object { type, function }` - `AssistantToolChoice object { type, function }`
296 296
297 Specifies a tool the model should use. Use to force the model to call a specific tool.297 Specifies a tool the model should use. Use to force the model to call a specific tool.
298 298
316 316
317 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.317 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.
318 318
319319 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
320 320
321 - `type: "code_interpreter"`321 - `type: "code_interpreter"`
322 322
324 324
325 - `"code_interpreter"`325 - `"code_interpreter"`
326 326
327327 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
328 328
329 - `type: "file_search"`329 - `type: "file_search"`
330 330
360 360
361 - `"default_2024_08_21"`361 - `"default_2024_08_21"`
362 362
363363 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
364 364
365 - `function: FunctionDefinition`365 - `function: FunctionDefinition`
366 366
23 23
24### Returns24### Returns
25 25
2626- `Run = object { id, assistant_id, cancelled_at, 24 more }`- `Run object { id, assistant_id, cancelled_at, 24 more }`
27 27
28 Represents an execution run on a [thread](/docs/api-reference/threads).28 Represents an execution run on a [thread](/docs/api-reference/threads).
29 29
176 176
177 - `"auto"`177 - `"auto"`
178 178
179179 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
180 180
181 Default response format. Used to generate text responses.181 Default response format. Used to generate text responses.
182 182
186 186
187 - `"text"`187 - `"text"`
188 188
189189 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
190 190
191 JSON object response format. An older method of generating JSON responses.191 JSON object response format. An older method of generating JSON responses.
192 Using `json_schema` is recommended for models that support it. Note that the192 Using `json_schema` is recommended for models that support it. Note that the
199 199
200 - `"json_object"`200 - `"json_object"`
201 201
202202 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
203 203
204 JSON Schema response format. Used to generate structured JSON responses.204 JSON Schema response format. Used to generate structured JSON responses.
205 Learn more about [Structured Outputs](/docs/guides/structured-outputs).205 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
285 285
286 - `"required"`286 - `"required"`
287 287
288288 - `AssistantToolChoice = object { type, function }` - `AssistantToolChoice object { type, function }`
289 289
290 Specifies a tool the model should use. Use to force the model to call a specific tool.290 Specifies a tool the model should use. Use to force the model to call a specific tool.
291 291
309 309
310 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.310 The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.
311 311
312312 - `CodeInterpreterTool = object { type }` - `CodeInterpreterTool object { type }`
313 313
314 - `type: "code_interpreter"`314 - `type: "code_interpreter"`
315 315
317 317
318 - `"code_interpreter"`318 - `"code_interpreter"`
319 319
320320 - `FileSearchTool = object { type, file_search }` - `FileSearchTool object { type, file_search }`
321 321
322 - `type: "file_search"`322 - `type: "file_search"`
323 323
353 353
354 - `"default_2024_08_21"`354 - `"default_2024_08_21"`
355 355
356356 - `FunctionTool = object { function, type }` - `FunctionTool object { function, type }`
357 357
358 - `function: FunctionDefinition`358 - `function: FunctionDefinition`
359 359
125 125
126 The details of the run step.126 The details of the run step.
127 127
128128 - `MessageCreationStepDetails = object { message_creation, type }` - `MessageCreationStepDetails object { message_creation, type }`
129 129
130 Details of the message creation by the run step.130 Details of the message creation by the run step.
131 131
141 141
142 - `"message_creation"`142 - `"message_creation"`
143 143
144144 - `ToolCallsStepDetails = object { tool_calls, type }` - `ToolCallsStepDetails object { tool_calls, type }`
145 145
146 Details of the tool call.146 Details of the tool call.
147 147
149 149
150 An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.150 An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.
151 151
152152 - `CodeInterpreterToolCall = object { id, code_interpreter, type }` - `CodeInterpreterToolCall object { id, code_interpreter, type }`
153 153
154 Details of the Code Interpreter tool call the run step was involved in.154 Details of the Code Interpreter tool call the run step was involved in.
155 155
169 169
170 The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.170 The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.
171 171
172172 - `CodeInterpreterLogOutput = object { logs, type }` - `CodeInterpreterLogOutput object { logs, type }`
173 173
174 Text output from the Code Interpreter tool call as part of a run step.174 Text output from the Code Interpreter tool call as part of a run step.
175 175
183 183
184 - `"logs"`184 - `"logs"`
185 185
186186 - `CodeInterpreterImageOutput = object { image, type }` - `CodeInterpreterImageOutput object { image, type }`
187 187
188 - `image: object { file_id }`188 - `image: object { file_id }`
189 189
203 203
204 - `"code_interpreter"`204 - `"code_interpreter"`
205 205
206206 - `FileSearchToolCall = object { id, file_search, type }` - `FileSearchToolCall object { id, file_search, type }`
207 207
208 - `id: string`208 - `id: string`
209 209
265 265
266 - `"file_search"`266 - `"file_search"`
267 267
268268 - `FunctionToolCall = object { id, function, type }` - `FunctionToolCall object { id, function, type }`
269 269
270 - `id: string`270 - `id: string`
271 271
24 24
25### Returns25### Returns
26 26
2727- `RunStep = object { id, assistant_id, cancelled_at, 13 more }`- `RunStep object { id, assistant_id, cancelled_at, 13 more }`
28 28
29 Represents a step in execution of a run.29 Represents a step in execution of a run.
30 30
109 109
110 The details of the run step.110 The details of the run step.
111 111
112112 - `MessageCreationStepDetails = object { message_creation, type }` - `MessageCreationStepDetails object { message_creation, type }`
113 113
114 Details of the message creation by the run step.114 Details of the message creation by the run step.
115 115
125 125
126 - `"message_creation"`126 - `"message_creation"`
127 127
128128 - `ToolCallsStepDetails = object { tool_calls, type }` - `ToolCallsStepDetails object { tool_calls, type }`
129 129
130 Details of the tool call.130 Details of the tool call.
131 131
133 133
134 An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.134 An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.
135 135
136136 - `CodeInterpreterToolCall = object { id, code_interpreter, type }` - `CodeInterpreterToolCall object { id, code_interpreter, type }`
137 137
138 Details of the Code Interpreter tool call the run step was involved in.138 Details of the Code Interpreter tool call the run step was involved in.
139 139
153 153
154 The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.154 The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.
155 155
156156 - `CodeInterpreterLogOutput = object { logs, type }` - `CodeInterpreterLogOutput object { logs, type }`
157 157
158 Text output from the Code Interpreter tool call as part of a run step.158 Text output from the Code Interpreter tool call as part of a run step.
159 159
167 167
168 - `"logs"`168 - `"logs"`
169 169
170170 - `CodeInterpreterImageOutput = object { image, type }` - `CodeInterpreterImageOutput object { image, type }`
171 171
172 - `image: object { file_id }`172 - `image: object { file_id }`
173 173
187 187
188 - `"code_interpreter"`188 - `"code_interpreter"`
189 189
190190 - `FileSearchToolCall = object { id, file_search, type }` - `FileSearchToolCall object { id, file_search, type }`
191 191
192 - `id: string`192 - `id: string`
193 193
249 249
250 - `"file_search"`250 - `"file_search"`
251 251
252252 - `FunctionToolCall = object { id, function, type }` - `FunctionToolCall object { id, function, type }`
253 253
254 - `id: string`254 - `id: string`
255 255
11 11
12### Returns12### Returns
13 13
1414- `ChatCompletion = object { id, choices, created, 5 more }`- `ChatCompletion object { id, choices, created, 5 more }`
15 15
16 Represents a chat completion response returned by model, based on the provided input.16 Represents a chat completion response returned by model, based on the provided input.
17 17
100 100
101 List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.101 List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.
102 102
103 - `token: string`
104
105 The token.
106
107 - `bytes: array of number`
108
109 A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
110
111 - `logprob: number`
112
113 The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.
114
115 - `message: ChatCompletionMessage`103 - `message: ChatCompletionMessage`
116 104
117 A chat completion message generated by the model.105 A chat completion message generated by the model.
201 189
202 The tool calls generated by the model, such as function calls.190 The tool calls generated by the model, such as function calls.
203 191
204192 - `ChatCompletionMessageFunctionToolCall = object { id, function, type }` - `ChatCompletionMessageFunctionToolCall object { id, function, type }`
205 193
206 A call to a function tool created by the model.194 A call to a function tool created by the model.
207 195
227 215
228 - `"function"`216 - `"function"`
229 217
230218 - `ChatCompletionMessageCustomToolCall = object { id, custom, type }` - `ChatCompletionMessageCustomToolCall object { id, custom, type }`
231 219
232 A call to a custom tool created by the model.220 A call to a custom tool created by the model.
233 221
158 158
159### Returns159### Returns
160 160
161161- `Completion = object { id, choices, created, 4 more }`- `Completion object { id, choices, created, 4 more }`
162 162
163 Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).163 Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).
164 164
42 42
43 Network access policy for the container.43 Network access policy for the container.
44 44
4545 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
46 46
47 - `type: "disabled"`47 - `type: "disabled"`
48 48
50 50
51 - `"disabled"`51 - `"disabled"`
52 52
5353 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
54 54
55 - `allowed_domains: array of string`55 - `allowed_domains: array of string`
56 56
82 82
83 An optional list of skills referenced by id or inline data.83 An optional list of skills referenced by id or inline data.
84 84
8585 - `SkillReference = object { skill_id, type, version }` - `SkillReference object { skill_id, type, version }`
86 86
87 - `skill_id: string`87 - `skill_id: string`
88 88
98 98
99 Optional skill version. Use a positive integer or 'latest'. Omit for default.99 Optional skill version. Use a positive integer or 'latest'. Omit for default.
100 100
101101 - `InlineSkill = object { description, name, source, type }` - `InlineSkill object { description, name, source, type }`
102 102
103 - `description: string`103 - `description: string`
104 104
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
1313 - `EasyInputMessage = object { content, role, phase, type }` - `EasyInputMessage object { content, role, phase, type }`
14 14
15 A message input to the model with a role indicating instruction following15 A message input to the model with a role indicating instruction following
16 hierarchy. Instructions given with the `developer` or `system` role take16 hierarchy. Instructions given with the `developer` or `system` role take
32 A list of one or many input items to the model, containing different content32 A list of one or many input items to the model, containing different content
33 types.33 types.
34 34
3535 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
36 36
37 A text input to the model.37 A text input to the model.
38 38
46 46
47 - `"input_text"`47 - `"input_text"`
48 48
4949 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
50 50
51 An image input to the model. Learn about [image inputs](/docs/guides/vision).51 An image input to the model. Learn about [image inputs](/docs/guides/vision).
52 52
76 76
77 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.77 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
78 78
7979 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
80 80
81 A file input to the model.81 A file input to the model.
82 82
139 139
140 - `"message"`140 - `"message"`
141 141
142142 - `Message = object { content, role, status, type }` - `Message object { content, role, status, type }`
143 143
144 A message input to the model with a role indicating instruction following144 A message input to the model with a role indicating instruction following
145 hierarchy. Instructions given with the `developer` or `system` role take145 hierarchy. Instructions given with the `developer` or `system` role take
150 A list of one or many input items to the model, containing different content150 A list of one or many input items to the model, containing different content
151 types.151 types.
152 152
153 - `ResponseInputText = object { text, type }`
154
155 A text input to the model.
156
157 - `text: string`
158
159 The text input to the model.
160
161 - `type: "input_text"`
162
163 The type of the input item. Always `input_text`.
164
165 - `"input_text"`
166
167 - `ResponseInputImage = object { detail, type, file_id, image_url }`
168
169 An image input to the model. Learn about [image inputs](/docs/guides/vision).
170
171 - `detail: "low" or "high" or "auto" or "original"`
172
173 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
174
175 - `"low"`
176
177 - `"high"`
178
179 - `"auto"`
180
181 - `"original"`
182
183 - `type: "input_image"`
184
185 The type of the input item. Always `input_image`.
186
187 - `"input_image"`
188
189 - `file_id: optional string`
190
191 The ID of the file to be sent to the model.
192
193 - `image_url: optional string`
194
195 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
196
197 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
198
199 A file input to the model.
200
201 - `type: "input_file"`
202
203 The type of the input item. Always `input_file`.
204
205 - `"input_file"`
206
207 - `detail: optional "low" or "high"`
208
209 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`.
210
211 - `"low"`
212
213 - `"high"`
214
215 - `file_data: optional string`
216
217 The content of the file to be sent to the model.
218
219 - `file_id: optional string`
220
221 The ID of the file to be sent to the model.
222
223 - `file_url: optional string`
224
225 The URL of the file to be sent to the model.
226
227 - `filename: optional string`
228
229 The name of the file to be sent to the model.
230
231 - `role: "user" or "system" or "developer"`153 - `role: "user" or "system" or "developer"`
232 154
233 The role of the message input. One of `user`, `system`, or `developer`.155 The role of the message input. One of `user`, `system`, or `developer`.
255 177
256 - `"message"`178 - `"message"`
257 179
258180 - `ResponseOutputMessage = object { id, content, role, 3 more }` - `ResponseOutputMessage object { id, content, role, 3 more }`
259 181
260 An output message from the model.182 An output message from the model.
261 183
267 189
268 The content of the output message.190 The content of the output message.
269 191
270192 - `ResponseOutputText = object { annotations, logprobs, text, type }` - `ResponseOutputText object { annotations, logprobs, text, type }`
271 193
272 A text output from the model.194 A text output from the model.
273 195
275 197
276 The annotations of the text output.198 The annotations of the text output.
277 199
278200 - `FileCitation = object { file_id, filename, index, type }` - `FileCitation object { file_id, filename, index, type }`
279 201
280 A citation to a file.202 A citation to a file.
281 203
297 219
298 - `"file_citation"`220 - `"file_citation"`
299 221
300222 - `URLCitation = object { end_index, start_index, title, 2 more }` - `URLCitation object { end_index, start_index, title, 2 more }`
301 223
302 A citation for a web resource used to generate a model response.224 A citation for a web resource used to generate a model response.
303 225
323 245
324 The URL of the web resource.246 The URL of the web resource.
325 247
326248 - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`
327 249
328 A citation for a container file used to generate a model response.250 A citation for a container file used to generate a model response.
329 251
353 275
354 - `"container_file_citation"`276 - `"container_file_citation"`
355 277
356278 - `FilePath = object { file_id, index, type }` - `FilePath object { file_id, index, type }`
357 279
358 A path to a file.280 A path to a file.
359 281
397 319
398 - `"output_text"`320 - `"output_text"`
399 321
400322 - `ResponseOutputRefusal = object { refusal, type }` - `ResponseOutputRefusal object { refusal, type }`
401 323
402 A refusal from the model.324 A refusal from the model.
403 325
444 366
445 - `"final_answer"`367 - `"final_answer"`
446 368
447369 - `FileSearchCall = object { id, queries, status, 2 more }` - `FileSearchCall object { id, queries, status, 2 more }`
448 370
449 The results of a file search tool call. See the371 The results of a file search tool call. See the
450 [file search guide](/docs/guides/tools-file-search) for more information.372 [file search guide](/docs/guides/tools-file-search) for more information.
512 434
513 The text that was retrieved from the file.435 The text that was retrieved from the file.
514 436
515437 - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`
516 438
517 A tool call to a computer use tool. See the439 A tool call to a computer use tool. See the
518 [computer use guide](/docs/guides/tools-computer-use) for more information.440 [computer use guide](/docs/guides/tools-computer-use) for more information.
562 484
563 A click action.485 A click action.
564 486
565487 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
566 488
567 A click action.489 A click action.
568 490
598 520
599 The keys being held while clicking.521 The keys being held while clicking.
600 522
601523 - `DoubleClick = object { keys, type, x, y }` - `DoubleClick object { keys, type, x, y }`
602 524
603 A double click action.525 A double click action.
604 526
620 542
621 The y-coordinate where the double click occurred.543 The y-coordinate where the double click occurred.
622 544
623545 - `Drag = object { path, type, keys }` - `Drag object { path, type, keys }`
624 546
625 A drag action.547 A drag action.
626 548
653 575
654 The keys being held while dragging the mouse.576 The keys being held while dragging the mouse.
655 577
656578 - `Keypress = object { keys, type }` - `Keypress object { keys, type }`
657 579
658 A collection of keypresses the model would like to perform.580 A collection of keypresses the model would like to perform.
659 581
667 589
668 - `"keypress"`590 - `"keypress"`
669 591
670592 - `Move = object { type, x, y, keys }` - `Move object { type, x, y, keys }`
671 593
672 A mouse move action.594 A mouse move action.
673 595
689 611
690 The keys being held while moving the mouse.612 The keys being held while moving the mouse.
691 613
692614 - `Screenshot = object { type }` - `Screenshot object { type }`
693 615
694 A screenshot action.616 A screenshot action.
695 617
699 621
700 - `"screenshot"`622 - `"screenshot"`
701 623
702624 - `Scroll = object { scroll_x, scroll_y, type, 3 more }` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
703 625
704 A scroll action.626 A scroll action.
705 627
729 651
730 The keys being held while scrolling.652 The keys being held while scrolling.
731 653
732654 - `Type = object { text, type }` - `Type object { text, type }`
733 655
734 An action to type in text.656 An action to type in text.
735 657
743 665
744 - `"type"`666 - `"type"`
745 667
746668 - `Wait = object { type }` - `Wait object { type }`
747 669
748 A wait action.670 A wait action.
749 671
758 Flattened batched actions for `computer_use`. Each action includes an680 Flattened batched actions for `computer_use`. Each action includes an
759 `type` discriminator and action-specific fields.681 `type` discriminator and action-specific fields.
760 682
761683 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
762 684
763 A click action.685 A click action.
764 686
765687 - `button: "left" or "right" or "wheel" or 2 more` - `DoubleClick object { keys, type, x, y }`
766
767 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
768
769 - `"left"`
770
771 - `"right"`
772
773 - `"wheel"`
774
775 - `"back"`
776
777 - `"forward"`
778
779 - `type: "click"`
780
781 Specifies the event type. For a click action, this property is always `click`.
782
783 - `"click"`
784
785 - `x: number`
786
787 The x-coordinate where the click occurred.
788
789 - `y: number`
790
791 The y-coordinate where the click occurred.
792
793 - `keys: optional array of string`
794
795 The keys being held while clicking.
796
797 - `DoubleClick = object { keys, type, x, y }`
798 688
799 A double click action.689 A double click action.
800 690
801691 - `keys: array of string` - `Drag object { path, type, keys }`
802
803 The keys being held while double-clicking.
804
805 - `type: "double_click"`
806
807 Specifies the event type. For a double click action, this property is always set to `double_click`.
808
809 - `"double_click"`
810
811 - `x: number`
812
813 The x-coordinate where the double click occurred.
814
815 - `y: number`
816
817 The y-coordinate where the double click occurred.
818
819 - `Drag = object { path, type, keys }`
820 692
821 A drag action.693 A drag action.
822 694
823695 - `path: array of object { x, y }` - `Keypress object { keys, type }`
824
825 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
826
827 ```
828 [
829 { x: 100, y: 200 },
830 { x: 200, y: 300 }
831 ]
832 ```
833
834 - `x: number`
835
836 The x-coordinate.
837
838 - `y: number`
839
840 The y-coordinate.
841
842 - `type: "drag"`
843
844 Specifies the event type. For a drag action, this property is always set to `drag`.
845
846 - `"drag"`
847
848 - `keys: optional array of string`
849
850 The keys being held while dragging the mouse.
851
852 - `Keypress = object { keys, type }`
853 696
854 A collection of keypresses the model would like to perform.697 A collection of keypresses the model would like to perform.
855 698
856699 - `keys: array of string` - `Move object { type, x, y, keys }`
857
858 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
859
860 - `type: "keypress"`
861
862 Specifies the event type. For a keypress action, this property is always set to `keypress`.
863
864 - `"keypress"`
865
866 - `Move = object { type, x, y, keys }`
867 700
868 A mouse move action.701 A mouse move action.
869 702
870703 - `type: "move"` - `Screenshot object { type }`
871
872 Specifies the event type. For a move action, this property is always set to `move`.
873
874 - `"move"`
875
876 - `x: number`
877
878 The x-coordinate to move to.
879
880 - `y: number`
881
882 The y-coordinate to move to.
883
884 - `keys: optional array of string`
885
886 The keys being held while moving the mouse.
887
888 - `Screenshot = object { type }`
889 704
890 A screenshot action.705 A screenshot action.
891 706
892707 - `type: "screenshot"` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
893
894 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
895
896 - `"screenshot"`
897
898 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
899 708
900 A scroll action.709 A scroll action.
901 710
902711 - `scroll_x: number` - `Type object { text, type }`
903
904 The horizontal scroll distance.
905
906 - `scroll_y: number`
907
908 The vertical scroll distance.
909
910 - `type: "scroll"`
911
912 Specifies the event type. For a scroll action, this property is always set to `scroll`.
913
914 - `"scroll"`
915
916 - `x: number`
917
918 The x-coordinate where the scroll occurred.
919
920 - `y: number`
921
922 The y-coordinate where the scroll occurred.
923
924 - `keys: optional array of string`
925
926 The keys being held while scrolling.
927
928 - `Type = object { text, type }`
929 712
930 An action to type in text.713 An action to type in text.
931 714
932715 - `text: string` - `Wait object { type }`
933
934 The text to type.
935
936 - `type: "type"`
937
938 Specifies the event type. For a type action, this property is always set to `type`.
939
940 - `"type"`
941
942 - `Wait = object { type }`
943 716
944 A wait action.717 A wait action.
945 718
946719 - `type: "wait"` - `ComputerCallOutput object { call_id, output, type, 3 more }`
947
948 Specifies the event type. For a wait action, this property is always set to `wait`.
949
950 - `"wait"`
951
952 - `ComputerCallOutput = object { call_id, output, type, 3 more }`
953 720
954 The output of a computer tool call.721 The output of a computer tool call.
955 722
1012 779
1013 - `"incomplete"`780 - `"incomplete"`
1014 781
1015782 - `WebSearchCall = object { id, action, status, type }` - `WebSearchCall object { id, action, status, type }`
1016 783
1017 The results of a web search tool call. See the784 The results of a web search tool call. See the
1018 [web search guide](/docs/guides/tools-web-search) for more information.785 [web search guide](/docs/guides/tools-web-search) for more information.
1026 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.
1027 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).
1028 795
1029796 - `Search = object { query, type, queries, sources }` - `Search object { query, type, queries, sources }`
1030 797
1031 Action type "search" - Performs a web search query.798 Action type "search" - Performs a web search query.
1032 799
1058 825
1059 The URL of the source.826 The URL of the source.
1060 827
1061828 - `OpenPage = object { type, url }` - `OpenPage object { type, url }`
1062 829
1063 Action type "open_page" - Opens a specific URL from search results.830 Action type "open_page" - Opens a specific URL from search results.
1064 831
1072 839
1073 The URL opened by the model.840 The URL opened by the model.
1074 841
1075842 - `FindInPage = object { pattern, type, url }` - `FindInPage object { pattern, type, url }`
1076 843
1077 Action type "find_in_page": Searches for a pattern within a loaded page.844 Action type "find_in_page": Searches for a pattern within a loaded page.
1078 845
1108 875
1109 - `"web_search_call"`876 - `"web_search_call"`
1110 877
1111878 - `FunctionCall = object { arguments, call_id, name, 4 more }` - `FunctionCall object { arguments, call_id, name, 4 more }`
1112 879
1113 A tool call to run a function. See the880 A tool call to run a function. See the
1114 [function calling guide](/docs/guides/function-calling) for more information.881 [function calling guide](/docs/guides/function-calling) for more information.
1150 917
1151 - `"incomplete"`918 - `"incomplete"`
1152 919
1153920 - `FunctionCallOutput = object { call_id, output, type, 2 more }` - `FunctionCallOutput object { call_id, output, type, 2 more }`
1154 921
1155 The output of a function tool call.922 The output of a function tool call.
1156 923
1170 937
1171 An array of content outputs (text, image, file) for the function tool call.938 An array of content outputs (text, image, file) for the function tool call.
1172 939
1173940 - `ResponseInputTextContent = object { text, type }` - `ResponseInputTextContent object { text, type }`
1174 941
1175 A text input to the model.942 A text input to the model.
1176 943
1184 951
1185 - `"input_text"`952 - `"input_text"`
1186 953
1187954 - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - `ResponseInputImageContent object { type, detail, file_id, image_url }`
1188 955
1189 An image input to the model. Learn about [image inputs](/docs/guides/vision)956 An image input to the model. Learn about [image inputs](/docs/guides/vision)
1190 957
1214 981
1215 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.982 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
1216 983
1217984 - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - `ResponseInputFileContent object { type, detail, file_data, 3 more }`
1218 985
1219 A file input to the model.986 A file input to the model.
1220 987
1268 1035
1269 - `"incomplete"`1036 - `"incomplete"`
1270 1037
12711038 - `ToolSearchCall = object { arguments, type, id, 3 more }` - `ToolSearchCall object { arguments, type, id, 3 more }`
1272 1039
1273 - `arguments: unknown`1040 - `arguments: unknown`
1274 1041
1306 1073
1307 - `"incomplete"`1074 - `"incomplete"`
1308 1075
13091076 - `ToolSearchOutput = object { tools, type, id, 3 more }` - `ToolSearchOutput object { tools, type, id, 3 more }`
1310 1077
1311 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`1078 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
1312 1079
1313 The loaded tool definitions returned by the tool search output.1080 The loaded tool definitions returned by the tool search output.
1314 1081
13151082 - `Function = object { name, parameters, strict, 3 more }` - `Function object { name, parameters, strict, 3 more }`
1316 1083
1317 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).1084 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).
1318 1085
1342 1109
1343 A description of the function. Used by the model to determine whether or not to call the function.1110 A description of the function. Used by the model to determine whether or not to call the function.
1344 1111
13451112 - `FileSearch = object { type, vector_store_ids, filters, 2 more }` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
1346 1113
1347 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).1114 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).
1348 1115
1360 1127
1361 A filter to apply.1128 A filter to apply.
1362 1129
13631130 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1364 1131
1365 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1132 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1366 1133
1413 1180
1414 - `number`1181 - `number`
1415 1182
14161183 - `CompoundFilter = object { filters, type }` - `CompoundFilter object { filters, type }`
1417 1184
1418 Combine multiple filters using `and` or `or`.1185 Combine multiple filters using `and` or `or`.
1419 1186
1421 1188
1422 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.1189 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
1423 1190
14241191 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1425 1192
1426 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1193 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1427 1194
1428 - `key: string`
1429
1430 The key to compare against the value.
1431
1432 - `type: "eq" or "ne" or "gt" or 5 more`
1433
1434 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
1435
1436 - `eq`: equals
1437 - `ne`: not equal
1438 - `gt`: greater than
1439 - `gte`: greater than or equal
1440 - `lt`: less than
1441 - `lte`: less than or equal
1442 - `in`: in
1443 - `nin`: not in
1444
1445 - `"eq"`
1446
1447 - `"ne"`
1448
1449 - `"gt"`
1450
1451 - `"gte"`
1452
1453 - `"lt"`
1454
1455 - `"lte"`
1456
1457 - `"in"`
1458
1459 - `"nin"`
1460
1461 - `value: string or number or boolean or array of string or number`
1462
1463 The value to compare against the attribute key; supports string, number, or boolean types.
1464
1465 - `string`
1466
1467 - `number`
1468
1469 - `boolean`
1470
1471 - `array of string or number`
1472
1473 - `string`
1474
1475 - `number`
1476
1477 - `unknown`1195 - `unknown`
1478 1196
1479 - `type: "and" or "or"`1197 - `type: "and" or "or"`
1516 1234
1517 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.1235 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.
1518 1236
15191237 - `Computer = object { type }` - `Computer object { type }`
1520 1238
1521 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1239 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1522 1240
1526 1244
1527 - `"computer"`1245 - `"computer"`
1528 1246
15291247 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
1530 1248
1531 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1249 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1532 1250
1558 1276
1559 - `"computer_use_preview"`1277 - `"computer_use_preview"`
1560 1278
15611279 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
1562 1280
1563 Search the Internet for sources related to the prompt. Learn more about the1281 Search the Internet for sources related to the prompt. Learn more about the
1564 [web search tool](/docs/guides/tools-web-search).1282 [web search tool](/docs/guides/tools-web-search).
1618 1336
1619 - `"approximate"`1337 - `"approximate"`
1620 1338
16211339 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
1622 1340
1623 Give the model access to additional tools via remote Model Context Protocol1341 Give the model access to additional tools via remote Model Context Protocol
1624 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).1342 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
1641 1359
1642 A string array of allowed tool names1360 A string array of allowed tool names
1643 1361
16441362 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
1645 1363
1646 A filter object to specify which tools are allowed.1364 A filter object to specify which tools are allowed.
1647 1365
1707 1425
1708 Specify which of the MCP server's tools require approval.1426 Specify which of the MCP server's tools require approval.
1709 1427
17101428 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
1711 1429
1712 Specify which of the MCP server's tools require approval. Can be1430 Specify which of the MCP server's tools require approval. Can be
1713 `always`, `never`, or a filter object associated with tools1431 `always`, `never`, or a filter object associated with tools
1760 The URL for the MCP server. One of `server_url` or `connector_id` must be1478 The URL for the MCP server. One of `server_url` or `connector_id` must be
1761 provided.1479 provided.
1762 1480
17631481 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
1764 1482
1765 A tool that runs Python code to help generate a response to a prompt.1483 A tool that runs Python code to help generate a response to a prompt.
1766 1484
1774 1492
1775 The container ID.1493 The container ID.
1776 1494
17771495 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
1778 1496
1779 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.1497 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
1780 1498
1804 1522
1805 Network access policy for the container.1523 Network access policy for the container.
1806 1524
18071525 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
1808 1526
1809 - `type: "disabled"`1527 - `type: "disabled"`
1810 1528
1812 1530
1813 - `"disabled"`1531 - `"disabled"`
1814 1532
18151533 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
1816 1534
1817 - `allowed_domains: array of string`1535 - `allowed_domains: array of string`
1818 1536
1846 1564
1847 - `"code_interpreter"`1565 - `"code_interpreter"`
1848 1566
18491567 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
1850 1568
1851 A tool that generates images using the GPT image models.1569 A tool that generates images using the GPT image models.
1852 1570
1967 1685
1968 - `"auto"`1686 - `"auto"`
1969 1687
19701688 - `LocalShell = object { type }` - `LocalShell object { type }`
1971 1689
1972 A tool that allows the model to execute shell commands in a local environment.1690 A tool that allows the model to execute shell commands in a local environment.
1973 1691
1977 1695
1978 - `"local_shell"`1696 - `"local_shell"`
1979 1697
19801698 - `Shell = object { type, environment }` - `Shell object { type, environment }`
1981 1699
1982 A tool that allows the model to execute shell commands.1700 A tool that allows the model to execute shell commands.
1983 1701
1989 1707
1990 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`1708 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
1991 1709
19921710 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
1993 1711
1994 - `type: "container_auto"`1712 - `type: "container_auto"`
1995 1713
2017 1735
2018 Network access policy for the container.1736 Network access policy for the container.
2019 1737
20201738 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
2021
2022 - `type: "disabled"`
2023
2024 Disable outbound network access. Always `disabled`.
2025
2026 - `"disabled"`
2027
2028 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
2029
2030 - `allowed_domains: array of string`
2031
2032 A list of allowed domains when type is `allowlist`.
2033
2034 - `type: "allowlist"`
2035
2036 Allow outbound network access only to specified domains. Always `allowlist`.
2037
2038 - `"allowlist"`
2039 1739
20401740 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
2041
2042 Optional domain-scoped secrets for allowlisted domains.
2043
2044 - `domain: string`
2045
2046 The domain associated with the secret.
2047
2048 - `name: string`
2049
2050 The name of the secret to inject for the domain.
2051
2052 - `value: string`
2053
2054 The secret value to inject for the domain.
2055 1741
2056 - `skills: optional array of SkillReference or InlineSkill`1742 - `skills: optional array of SkillReference or InlineSkill`
2057 1743
2058 An optional list of skills referenced by id or inline data.1744 An optional list of skills referenced by id or inline data.
2059 1745
20601746 - `SkillReference = object { skill_id, type, version }` - `SkillReference object { skill_id, type, version }`
2061 1747
2062 - `skill_id: string`1748 - `skill_id: string`
2063 1749
2073 1759
2074 Optional skill version. Use a positive integer or 'latest'. Omit for default.1760 Optional skill version. Use a positive integer or 'latest'. Omit for default.
2075 1761
20761762 - `InlineSkill = object { description, name, source, type }` - `InlineSkill object { description, name, source, type }`
2077 1763
2078 - `description: string`1764 - `description: string`
2079 1765
2109 1795
2110 - `"inline"`1796 - `"inline"`
2111 1797
21121798 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
2113 1799
2114 - `type: "local"`1800 - `type: "local"`
2115 1801
2133 1819
2134 The path to the directory containing the skill.1820 The path to the directory containing the skill.
2135 1821
21361822 - `ContainerReference = object { container_id, type }` - `ContainerReference object { container_id, type }`
2137 1823
2138 - `container_id: string`1824 - `container_id: string`
2139 1825
2145 1831
2146 - `"container_reference"`1832 - `"container_reference"`
2147 1833
21481834 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2149 1835
2150 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1836 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2151 1837
2171 1857
2172 The input format for the custom tool. Default is unconstrained text.1858 The input format for the custom tool. Default is unconstrained text.
2173 1859
21741860 - `Text = object { type }` - `Text object { type }`
2175 1861
2176 Unconstrained free-form text.1862 Unconstrained free-form text.
2177 1863
2181 1867
2182 - `"text"`1868 - `"text"`
2183 1869
21841870 - `Grammar = object { definition, syntax, type }` - `Grammar object { definition, syntax, type }`
2185 1871
2186 A grammar defined by the user.1872 A grammar defined by the user.
2187 1873
2203 1889
2204 - `"grammar"`1890 - `"grammar"`
2205 1891
22061892 - `Namespace = object { description, name, tools, type }` - `Namespace object { description, name, tools, type }`
2207 1893
2208 Groups function/custom tools under a shared namespace.1894 Groups function/custom tools under a shared namespace.
2209 1895
2219 1905
2220 The function/custom tools available inside this namespace.1906 The function/custom tools available inside this namespace.
2221 1907
22221908 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
2223 1909
2224 - `name: string`1910 - `name: string`
2225 1911
2237 1923
2238 - `strict: optional boolean`1924 - `strict: optional boolean`
2239 1925
22401926 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2241 1927
2242 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1928 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2243 1929
2263 1949
2264 The input format for the custom tool. Default is unconstrained text.1950 The input format for the custom tool. Default is unconstrained text.
2265 1951
2266 - `Text = object { type }`
2267
2268 Unconstrained free-form text.
2269
2270 - `type: "text"`
2271
2272 Unconstrained text format. Always `text`.
2273
2274 - `"text"`
2275
2276 - `Grammar = object { definition, syntax, type }`
2277
2278 A grammar defined by the user.
2279
2280 - `definition: string`
2281
2282 The grammar definition.
2283
2284 - `syntax: "lark" or "regex"`
2285
2286 The syntax of the grammar definition. One of `lark` or `regex`.
2287
2288 - `"lark"`
2289
2290 - `"regex"`
2291
2292 - `type: "grammar"`
2293
2294 Grammar format. Always `grammar`.
2295
2296 - `"grammar"`
2297
2298 - `type: "namespace"`1952 - `type: "namespace"`
2299 1953
2300 The type of the tool. Always `namespace`.1954 The type of the tool. Always `namespace`.
2301 1955
2302 - `"namespace"`1956 - `"namespace"`
2303 1957
23041958 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
2305 1959
2306 Hosted or BYOT tool search configuration for deferred tools.1960 Hosted or BYOT tool search configuration for deferred tools.
2307 1961
2327 1981
2328 Parameter schema for a client-executed tool search tool.1982 Parameter schema for a client-executed tool search tool.
2329 1983
23301984 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
2331 1985
2332 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).1986 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).
2333 1987
2381 2035
2382 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.2036 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2383 2037
23842038 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
2385 2039
2386 Allows the assistant to create, delete, or update files using unified diffs.2040 Allows the assistant to create, delete, or update files using unified diffs.
2387 2041
2423 2077
2424 - `"incomplete"`2078 - `"incomplete"`
2425 2079
24262080 - `Reasoning = object { id, summary, type, 3 more }` - `Reasoning object { id, summary, type, 3 more }`
2427 2081
2428 A description of the chain of thought used by a reasoning model while generating2082 A description of the chain of thought used by a reasoning model while generating
2429 a response. Be sure to include these items in your `input` to the Responses API2083 a response. Be sure to include these items in your `input` to the Responses API
2484 2138
2485 - `"incomplete"`2139 - `"incomplete"`
2486 2140
24872141 - `Compaction = object { encrypted_content, type, id }` - `Compaction object { encrypted_content, type, id }`
2488 2142
2489 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).2143 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
2490 2144
2502 2156
2503 The ID of the compaction item.2157 The ID of the compaction item.
2504 2158
25052159 - `ImageGenerationCall = object { id, result, status, type }` - `ImageGenerationCall object { id, result, status, type }`
2506 2160
2507 An image generation request made by the model.2161 An image generation request made by the model.
2508 2162
2532 2186
2533 - `"image_generation_call"`2187 - `"image_generation_call"`
2534 2188
25352189 - `CodeInterpreterCall = object { id, code, container_id, 3 more }` - `CodeInterpreterCall object { id, code, container_id, 3 more }`
2536 2190
2537 A tool call to run code.2191 A tool call to run code.
2538 2192
2553 The outputs generated by the code interpreter, such as logs or images.2207 The outputs generated by the code interpreter, such as logs or images.
2554 Can be null if no outputs are available.2208 Can be null if no outputs are available.
2555 2209
25562210 - `Logs = object { logs, type }` - `Logs object { logs, type }`
2557 2211
2558 The logs output from the code interpreter.2212 The logs output from the code interpreter.
2559 2213
2567 2221
2568 - `"logs"`2222 - `"logs"`
2569 2223
25702224 - `Image = object { type, url }` - `Image object { type, url }`
2571 2225
2572 The image output from the code interpreter.2226 The image output from the code interpreter.
2573 2227
2601 2255
2602 - `"code_interpreter_call"`2256 - `"code_interpreter_call"`
2603 2257
26042258 - `LocalShellCall = object { id, action, call_id, 2 more }` - `LocalShellCall object { id, action, call_id, 2 more }`
2605 2259
2606 A tool call to run a command on the local shell.2260 A tool call to run a command on the local shell.
2607 2261
2659 2313
2660 - `"local_shell_call"`2314 - `"local_shell_call"`
2661 2315
26622316 - `LocalShellCallOutput = object { id, output, type, status }` - `LocalShellCallOutput object { id, output, type, status }`
2663 2317
2664 The output of a local shell tool call.2318 The output of a local shell tool call.
2665 2319
2687 2341
2688 - `"incomplete"`2342 - `"incomplete"`
2689 2343
26902344 - `ShellCall = object { action, call_id, type, 3 more }` - `ShellCall object { action, call_id, type, 3 more }`
2691 2345
2692 A tool representing a request to execute one or more shell commands.2346 A tool representing a request to execute one or more shell commands.
2693 2347
2725 2379
2726 The environment to execute the shell commands in.2380 The environment to execute the shell commands in.
2727 2381
27282382 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
2729
2730 - `type: "local"`
2731
2732 Use a local computer environment.
2733
2734 - `"local"`
2735
2736 - `skills: optional array of LocalSkill`
2737
2738 An optional list of skills.
2739 2383
27402384 - `description: string` - `ContainerReference object { container_id, type }`
2741
2742 The description of the skill.
2743
2744 - `name: string`
2745
2746 The name of the skill.
2747
2748 - `path: string`
2749
2750 The path to the directory containing the skill.
2751
2752 - `ContainerReference = object { container_id, type }`
2753
2754 - `container_id: string`
2755
2756 The ID of the referenced container.
2757
2758 - `type: "container_reference"`
2759
2760 References a container created with the /v1/containers endpoint
2761
2762 - `"container_reference"`
2763 2385
2764 - `status: optional "in_progress" or "completed" or "incomplete"`2386 - `status: optional "in_progress" or "completed" or "incomplete"`
2765 2387
2771 2393
2772 - `"incomplete"`2394 - `"incomplete"`
2773 2395
27742396 - `ShellCallOutput = object { call_id, output, type, 3 more }` - `ShellCallOutput object { call_id, output, type, 3 more }`
2775 2397
2776 The streamed output items emitted by a shell tool call.2398 The streamed output items emitted by a shell tool call.
2777 2399
2787 2409
2788 The exit or timeout outcome associated with this shell call.2410 The exit or timeout outcome associated with this shell call.
2789 2411
27902412 - `Timeout = object { type }` - `Timeout object { type }`
2791 2413
2792 Indicates that the shell call exceeded its configured time limit.2414 Indicates that the shell call exceeded its configured time limit.
2793 2415
2797 2419
2798 - `"timeout"`2420 - `"timeout"`
2799 2421
28002422 - `Exit = object { exit_code, type }` - `Exit object { exit_code, type }`
2801 2423
2802 Indicates that the shell commands finished and returned an exit code.2424 Indicates that the shell commands finished and returned an exit code.
2803 2425
2843 2465
2844 - `"incomplete"`2466 - `"incomplete"`
2845 2467
28462468 - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - `ApplyPatchCall object { call_id, operation, status, 2 more }`
2847 2469
2848 A tool call representing a request to create, delete, or update files using diff patches.2470 A tool call representing a request to create, delete, or update files using diff patches.
2849 2471
2855 2477
2856 The specific create, delete, or update instruction for the apply_patch tool call.2478 The specific create, delete, or update instruction for the apply_patch tool call.
2857 2479
28582480 - `CreateFile = object { diff, path, type }` - `CreateFile object { diff, path, type }`
2859 2481
2860 Instruction for creating a new file via the apply_patch tool.2482 Instruction for creating a new file via the apply_patch tool.
2861 2483
2873 2495
2874 - `"create_file"`2496 - `"create_file"`
2875 2497
28762498 - `DeleteFile = object { path, type }` - `DeleteFile object { path, type }`
2877 2499
2878 Instruction for deleting an existing file via the apply_patch tool.2500 Instruction for deleting an existing file via the apply_patch tool.
2879 2501
2887 2509
2888 - `"delete_file"`2510 - `"delete_file"`
2889 2511
28902512 - `UpdateFile = object { diff, path, type }` - `UpdateFile object { diff, path, type }`
2891 2513
2892 Instruction for updating an existing file via the apply_patch tool.2514 Instruction for updating an existing file via the apply_patch tool.
2893 2515
2923 2545
2924 The unique ID of the apply patch tool call. Populated when this item is returned via API.2546 The unique ID of the apply patch tool call. Populated when this item is returned via API.
2925 2547
29262548 - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`
2927 2549
2928 The streamed output emitted by an apply patch tool call.2550 The streamed output emitted by an apply patch tool call.
2929 2551
2953 2575
2954 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).2576 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).
2955 2577
29562578 - `McpListTools = object { id, server_label, tools, 2 more }` - `McpListTools object { id, server_label, tools, 2 more }`
2957 2579
2958 A list of tools available on an MCP server.2580 A list of tools available on an MCP server.
2959 2581
2995 2617
2996 Error message if the server could not list tools.2618 Error message if the server could not list tools.
2997 2619
29982620 - `McpApprovalRequest = object { id, arguments, name, 2 more }` - `McpApprovalRequest object { id, arguments, name, 2 more }`
2999 2621
3000 A request for human approval of a tool invocation.2622 A request for human approval of a tool invocation.
3001 2623
3021 2643
3022 - `"mcp_approval_request"`2644 - `"mcp_approval_request"`
3023 2645
30242646 - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`
3025 2647
3026 A response to an MCP approval request.2648 A response to an MCP approval request.
3027 2649
3047 2669
3048 Optional reason for the decision.2670 Optional reason for the decision.
3049 2671
30502672 - `McpCall = object { id, arguments, name, 6 more }` - `McpCall object { id, arguments, name, 6 more }`
3051 2673
3052 An invocation of a tool on an MCP server.2674 An invocation of a tool on an MCP server.
3053 2675
3100 2722
3101 - `"failed"`2723 - `"failed"`
3102 2724
31032725 - `CustomToolCallOutput = object { call_id, output, type, id }` - `CustomToolCallOutput object { call_id, output, type, id }`
3104 2726
3105 The output of a custom tool call from your code, being sent back to the model.2727 The output of a custom tool call from your code, being sent back to the model.
3106 2728
3121 2743
3122 Text, image, or file output of the custom tool call.2744 Text, image, or file output of the custom tool call.
3123 2745
31242746 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
3125 2747
3126 A text input to the model.2748 A text input to the model.
3127 2749
31282750 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
3129
3130 The text input to the model.
3131
3132 - `type: "input_text"`
3133
3134 The type of the input item. Always `input_text`.
3135
3136 - `"input_text"`
3137
3138 - `ResponseInputImage = object { detail, type, file_id, image_url }`
3139 2751
3140 An image input to the model. Learn about [image inputs](/docs/guides/vision).2752 An image input to the model. Learn about [image inputs](/docs/guides/vision).
3141 2753
31422754 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
3143
3144 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
3145
3146 - `"low"`
3147
3148 - `"high"`
3149
3150 - `"auto"`
3151
3152 - `"original"`
3153
3154 - `type: "input_image"`
3155
3156 The type of the input item. Always `input_image`.
3157
3158 - `"input_image"`
3159
3160 - `file_id: optional string`
3161
3162 The ID of the file to be sent to the model.
3163
3164 - `image_url: optional string`
3165
3166 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
3167
3168 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
3169 2755
3170 A file input to the model.2756 A file input to the model.
3171 2757
3172 - `type: "input_file"`
3173
3174 The type of the input item. Always `input_file`.
3175
3176 - `"input_file"`
3177
3178 - `detail: optional "low" or "high"`
3179
3180 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`.
3181
3182 - `"low"`
3183
3184 - `"high"`
3185
3186 - `file_data: optional string`
3187
3188 The content of the file to be sent to the model.
3189
3190 - `file_id: optional string`
3191
3192 The ID of the file to be sent to the model.
3193
3194 - `file_url: optional string`
3195
3196 The URL of the file to be sent to the model.
3197
3198 - `filename: optional string`
3199
3200 The name of the file to be sent to the model.
3201
3202 - `type: "custom_tool_call_output"`2758 - `type: "custom_tool_call_output"`
3203 2759
3204 The type of the custom tool call output. Always `custom_tool_call_output`.2760 The type of the custom tool call output. Always `custom_tool_call_output`.
3209 2765
3210 The unique ID of the custom tool call output in the OpenAI platform.2766 The unique ID of the custom tool call output in the OpenAI platform.
3211 2767
32122768 - `CustomToolCall = object { call_id, input, name, 3 more }` - `CustomToolCall object { call_id, input, name, 3 more }`
3213 2769
3214 A call to a custom tool created by the model.2770 A call to a custom tool created by the model.
3215 2771
3239 2795
3240 The namespace of the custom tool being called.2796 The namespace of the custom tool being called.
3241 2797
32422798 - `ItemReference = object { id, type }` - `ItemReference object { id, type }`
3243 2799
3244 An internal identifier for an item to reference.2800 An internal identifier for an item to reference.
3245 2801
3264 2820
3265### Returns2821### Returns
3266 2822
32672823- `Conversation = object { id, created_at, metadata, object }`- `Conversation object { id, created_at, metadata, object }`
3268 2824
3269 - `id: string`2825 - `id: string`
3270 2826
10 10
11### Returns11### Returns
12 12
1313- `ConversationDeletedResource = object { id, deleted, object }`- `ConversationDeletedResource object { id, deleted, object }`
14 14
15 - `id: string`15 - `id: string`
16 16
10 10
11### Returns11### Returns
12 12
1313- `Conversation = object { id, created_at, metadata, object }`- `Conversation object { id, created_at, metadata, object }`
14 14
15 - `id: string`15 - `id: string`
16 16
21 21
22### Returns22### Returns
23 23
2424- `Conversation = object { id, created_at, metadata, object }`- `Conversation object { id, created_at, metadata, object }`
25 25
26 - `id: string`26 - `id: string`
27 27
60 60
61### Returns61### Returns
62 62
6363- `ConversationItemList = object { data, first_id, has_more, 2 more }`- `ConversationItemList object { data, first_id, has_more, 2 more }`
64 64
65 A list of Conversation items.65 A list of Conversation items.
66 66
68 68
69 A list of conversation items.69 A list of conversation items.
70 70
7171 - `Message = object { id, content, role, 3 more }` - `Message object { id, content, role, 3 more }`
72 72
73 A message to or from the model.73 A message to or from the model.
74 74
80 80
81 The content of the message81 The content of the message
82 82
8383 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
84 84
85 A text input to the model.85 A text input to the model.
86 86
94 94
95 - `"input_text"`95 - `"input_text"`
96 96
9797 - `ResponseOutputText = object { annotations, logprobs, text, type }` - `ResponseOutputText object { annotations, logprobs, text, type }`
98 98
99 A text output from the model.99 A text output from the model.
100 100
102 102
103 The annotations of the text output.103 The annotations of the text output.
104 104
105105 - `FileCitation = object { file_id, filename, index, type }` - `FileCitation object { file_id, filename, index, type }`
106 106
107 A citation to a file.107 A citation to a file.
108 108
124 124
125 - `"file_citation"`125 - `"file_citation"`
126 126
127127 - `URLCitation = object { end_index, start_index, title, 2 more }` - `URLCitation object { end_index, start_index, title, 2 more }`
128 128
129 A citation for a web resource used to generate a model response.129 A citation for a web resource used to generate a model response.
130 130
150 150
151 The URL of the web resource.151 The URL of the web resource.
152 152
153153 - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`
154 154
155 A citation for a container file used to generate a model response.155 A citation for a container file used to generate a model response.
156 156
180 180
181 - `"container_file_citation"`181 - `"container_file_citation"`
182 182
183183 - `FilePath = object { file_id, index, type }` - `FilePath object { file_id, index, type }`
184 184
185 A path to a file.185 A path to a file.
186 186
224 224
225 - `"output_text"`225 - `"output_text"`
226 226
227227 - `TextContent = object { text, type }` - `TextContent object { text, type }`
228 228
229 A text content.229 A text content.
230 230
234 234
235 - `"text"`235 - `"text"`
236 236
237237 - `SummaryTextContent = object { text, type }` - `SummaryTextContent object { text, type }`
238 238
239 A summary text from the model.239 A summary text from the model.
240 240
248 248
249 - `"summary_text"`249 - `"summary_text"`
250 250
251251 - `ReasoningText = object { text, type }` - `ReasoningText object { text, type }`
252 252
253 Reasoning text from the model.253 Reasoning text from the model.
254 254
262 262
263 - `"reasoning_text"`263 - `"reasoning_text"`
264 264
265265 - `ResponseOutputRefusal = object { refusal, type }` - `ResponseOutputRefusal object { refusal, type }`
266 266
267 A refusal from the model.267 A refusal from the model.
268 268
276 276
277 - `"refusal"`277 - `"refusal"`
278 278
279279 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
280 280
281 An image input to the model. Learn about [image inputs](/docs/guides/vision).281 An image input to the model. Learn about [image inputs](/docs/guides/vision).
282 282
306 306
307 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.307 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
308 308
309309 - `ComputerScreenshotContent = object { detail, file_id, image_url, type }` - `ComputerScreenshotContent object { detail, file_id, image_url, type }`
310 310
311 A screenshot of a computer.311 A screenshot of a computer.
312 312
336 336
337 - `"computer_screenshot"`337 - `"computer_screenshot"`
338 338
339339 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
340 340
341 A file input to the model.341 A file input to the model.
342 342
414 414
415 - `"final_answer"`415 - `"final_answer"`
416 416
417417 - `FunctionCall = object { id, arguments, call_id, 5 more }` - `FunctionCall object { id, arguments, call_id, 5 more }`
418 418
419 - `id: string`419 - `id: string`
420 420
457 457
458 The namespace of the function to run.458 The namespace of the function to run.
459 459
460460 - `FunctionCallOutput = object { id, call_id, output, 3 more }` - `FunctionCallOutput object { id, call_id, output, 3 more }`
461 461
462 - `id: string`462 - `id: string`
463 463
480 480
481 Text, image, or file output of the function call.481 Text, image, or file output of the function call.
482 482
483483 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
484 484
485 A text input to the model.485 A text input to the model.
486 486
487487 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
488
489 The text input to the model.
490
491 - `type: "input_text"`
492
493 The type of the input item. Always `input_text`.
494
495 - `"input_text"`
496
497 - `ResponseInputImage = object { detail, type, file_id, image_url }`
498 488
499 An image input to the model. Learn about [image inputs](/docs/guides/vision).489 An image input to the model. Learn about [image inputs](/docs/guides/vision).
500 490
501491 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
502
503 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
504
505 - `"low"`
506
507 - `"high"`
508
509 - `"auto"`
510
511 - `"original"`
512
513 - `type: "input_image"`
514
515 The type of the input item. Always `input_image`.
516
517 - `"input_image"`
518
519 - `file_id: optional string`
520
521 The ID of the file to be sent to the model.
522
523 - `image_url: optional string`
524
525 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
526
527 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
528 492
529 A file input to the model.493 A file input to the model.
530 494
531 - `type: "input_file"`
532
533 The type of the input item. Always `input_file`.
534
535 - `"input_file"`
536
537 - `detail: optional "low" or "high"`
538
539 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`.
540
541 - `"low"`
542
543 - `"high"`
544
545 - `file_data: optional string`
546
547 The content of the file to be sent to the model.
548
549 - `file_id: optional string`
550
551 The ID of the file to be sent to the model.
552
553 - `file_url: optional string`
554
555 The URL of the file to be sent to the model.
556
557 - `filename: optional string`
558
559 The name of the file to be sent to the model.
560
561 - `status: "in_progress" or "completed" or "incomplete"`495 - `status: "in_progress" or "completed" or "incomplete"`
562 496
563 The status of the item. One of `in_progress`, `completed`, or497 The status of the item. One of `in_progress`, `completed`, or
579 513
580 The identifier of the actor that created the item.514 The identifier of the actor that created the item.
581 515
582516 - `FileSearchCall = object { id, queries, status, 2 more }` - `FileSearchCall object { id, queries, status, 2 more }`
583 517
584 The results of a file search tool call. See the518 The results of a file search tool call. See the
585 [file search guide](/docs/guides/tools-file-search) for more information.519 [file search guide](/docs/guides/tools-file-search) for more information.
647 581
648 The text that was retrieved from the file.582 The text that was retrieved from the file.
649 583
650584 - `WebSearchCall = object { id, action, status, type }` - `WebSearchCall object { id, action, status, type }`
651 585
652 The results of a web search tool call. See the586 The results of a web search tool call. See the
653 [web search guide](/docs/guides/tools-web-search) for more information.587 [web search guide](/docs/guides/tools-web-search) for more information.
661 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.
662 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).
663 597
664598 - `Search = object { query, type, queries, sources }` - `Search object { query, type, queries, sources }`
665 599
666 Action type "search" - Performs a web search query.600 Action type "search" - Performs a web search query.
667 601
693 627
694 The URL of the source.628 The URL of the source.
695 629
696630 - `OpenPage = object { type, url }` - `OpenPage object { type, url }`
697 631
698 Action type "open_page" - Opens a specific URL from search results.632 Action type "open_page" - Opens a specific URL from search results.
699 633
707 641
708 The URL opened by the model.642 The URL opened by the model.
709 643
710644 - `FindInPage = object { pattern, type, url }` - `FindInPage object { pattern, type, url }`
711 645
712 Action type "find_in_page": Searches for a pattern within a loaded page.646 Action type "find_in_page": Searches for a pattern within a loaded page.
713 647
743 677
744 - `"web_search_call"`678 - `"web_search_call"`
745 679
746680 - `ImageGenerationCall = object { id, result, status, type }` - `ImageGenerationCall object { id, result, status, type }`
747 681
748 An image generation request made by the model.682 An image generation request made by the model.
749 683
773 707
774 - `"image_generation_call"`708 - `"image_generation_call"`
775 709
776710 - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`
777 711
778 A tool call to a computer use tool. See the712 A tool call to a computer use tool. See the
779 [computer use guide](/docs/guides/tools-computer-use) for more information.713 [computer use guide](/docs/guides/tools-computer-use) for more information.
823 757
824 A click action.758 A click action.
825 759
826760 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
827 761
828 A click action.762 A click action.
829 763
859 793
860 The keys being held while clicking.794 The keys being held while clicking.
861 795
862796 - `DoubleClick = object { keys, type, x, y }` - `DoubleClick object { keys, type, x, y }`
863 797
864 A double click action.798 A double click action.
865 799
881 815
882 The y-coordinate where the double click occurred.816 The y-coordinate where the double click occurred.
883 817
884818 - `Drag = object { path, type, keys }` - `Drag object { path, type, keys }`
885 819
886 A drag action.820 A drag action.
887 821
914 848
915 The keys being held while dragging the mouse.849 The keys being held while dragging the mouse.
916 850
917851 - `Keypress = object { keys, type }` - `Keypress object { keys, type }`
918 852
919 A collection of keypresses the model would like to perform.853 A collection of keypresses the model would like to perform.
920 854
928 862
929 - `"keypress"`863 - `"keypress"`
930 864
931865 - `Move = object { type, x, y, keys }` - `Move object { type, x, y, keys }`
932 866
933 A mouse move action.867 A mouse move action.
934 868
950 884
951 The keys being held while moving the mouse.885 The keys being held while moving the mouse.
952 886
953887 - `Screenshot = object { type }` - `Screenshot object { type }`
954 888
955 A screenshot action.889 A screenshot action.
956 890
960 894
961 - `"screenshot"`895 - `"screenshot"`
962 896
963897 - `Scroll = object { scroll_x, scroll_y, type, 3 more }` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
964 898
965 A scroll action.899 A scroll action.
966 900
990 924
991 The keys being held while scrolling.925 The keys being held while scrolling.
992 926
993927 - `Type = object { text, type }` - `Type object { text, type }`
994 928
995 An action to type in text.929 An action to type in text.
996 930
1004 938
1005 - `"type"`939 - `"type"`
1006 940
1007941 - `Wait = object { type }` - `Wait object { type }`
1008 942
1009 A wait action.943 A wait action.
1010 944
1019 Flattened batched actions for `computer_use`. Each action includes an953 Flattened batched actions for `computer_use`. Each action includes an
1020 `type` discriminator and action-specific fields.954 `type` discriminator and action-specific fields.
1021 955
1022956 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
1023 957
1024 A click action.958 A click action.
1025 959
1026960 - `button: "left" or "right" or "wheel" or 2 more` - `DoubleClick object { keys, type, x, y }`
1027
1028 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
1029
1030 - `"left"`
1031
1032 - `"right"`
1033
1034 - `"wheel"`
1035
1036 - `"back"`
1037
1038 - `"forward"`
1039
1040 - `type: "click"`
1041
1042 Specifies the event type. For a click action, this property is always `click`.
1043
1044 - `"click"`
1045
1046 - `x: number`
1047
1048 The x-coordinate where the click occurred.
1049
1050 - `y: number`
1051
1052 The y-coordinate where the click occurred.
1053
1054 - `keys: optional array of string`
1055
1056 The keys being held while clicking.
1057
1058 - `DoubleClick = object { keys, type, x, y }`
1059 961
1060 A double click action.962 A double click action.
1061 963
1062964 - `keys: array of string` - `Drag object { path, type, keys }`
1063
1064 The keys being held while double-clicking.
1065
1066 - `type: "double_click"`
1067
1068 Specifies the event type. For a double click action, this property is always set to `double_click`.
1069
1070 - `"double_click"`
1071
1072 - `x: number`
1073
1074 The x-coordinate where the double click occurred.
1075
1076 - `y: number`
1077
1078 The y-coordinate where the double click occurred.
1079
1080 - `Drag = object { path, type, keys }`
1081 965
1082 A drag action.966 A drag action.
1083 967
1084968 - `path: array of object { x, y }` - `Keypress object { keys, type }`
1085
1086 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
1087
1088 ```
1089 [
1090 { x: 100, y: 200 },
1091 { x: 200, y: 300 }
1092 ]
1093 ```
1094
1095 - `x: number`
1096
1097 The x-coordinate.
1098
1099 - `y: number`
1100
1101 The y-coordinate.
1102
1103 - `type: "drag"`
1104
1105 Specifies the event type. For a drag action, this property is always set to `drag`.
1106
1107 - `"drag"`
1108
1109 - `keys: optional array of string`
1110
1111 The keys being held while dragging the mouse.
1112
1113 - `Keypress = object { keys, type }`
1114 969
1115 A collection of keypresses the model would like to perform.970 A collection of keypresses the model would like to perform.
1116 971
1117972 - `keys: array of string` - `Move object { type, x, y, keys }`
1118
1119 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
1120
1121 - `type: "keypress"`
1122
1123 Specifies the event type. For a keypress action, this property is always set to `keypress`.
1124
1125 - `"keypress"`
1126
1127 - `Move = object { type, x, y, keys }`
1128 973
1129 A mouse move action.974 A mouse move action.
1130 975
1131976 - `type: "move"` - `Screenshot object { type }`
1132
1133 Specifies the event type. For a move action, this property is always set to `move`.
1134
1135 - `"move"`
1136
1137 - `x: number`
1138
1139 The x-coordinate to move to.
1140
1141 - `y: number`
1142
1143 The y-coordinate to move to.
1144
1145 - `keys: optional array of string`
1146
1147 The keys being held while moving the mouse.
1148
1149 - `Screenshot = object { type }`
1150 977
1151 A screenshot action.978 A screenshot action.
1152 979
1153980 - `type: "screenshot"` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
1154
1155 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
1156
1157 - `"screenshot"`
1158
1159 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
1160 981
1161 A scroll action.982 A scroll action.
1162 983
1163984 - `scroll_x: number` - `Type object { text, type }`
1164
1165 The horizontal scroll distance.
1166
1167 - `scroll_y: number`
1168
1169 The vertical scroll distance.
1170
1171 - `type: "scroll"`
1172
1173 Specifies the event type. For a scroll action, this property is always set to `scroll`.
1174
1175 - `"scroll"`
1176
1177 - `x: number`
1178
1179 The x-coordinate where the scroll occurred.
1180
1181 - `y: number`
1182
1183 The y-coordinate where the scroll occurred.
1184
1185 - `keys: optional array of string`
1186
1187 The keys being held while scrolling.
1188
1189 - `Type = object { text, type }`
1190 985
1191 An action to type in text.986 An action to type in text.
1192 987
1193988 - `text: string` - `Wait object { type }`
1194
1195 The text to type.
1196
1197 - `type: "type"`
1198
1199 Specifies the event type. For a type action, this property is always set to `type`.
1200
1201 - `"type"`
1202
1203 - `Wait = object { type }`
1204 989
1205 A wait action.990 A wait action.
1206 991
1207992 - `type: "wait"` - `ComputerCallOutput object { id, call_id, output, 4 more }`
1208
1209 Specifies the event type. For a wait action, this property is always set to `wait`.
1210
1211 - `"wait"`
1212
1213 - `ComputerCallOutput = object { id, call_id, output, 4 more }`
1214 993
1215 - `id: string`994 - `id: string`
1216 995
1279 1058
1280 The identifier of the actor that created the item.1059 The identifier of the actor that created the item.
1281 1060
12821061 - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - `ToolSearchCall object { id, arguments, call_id, 4 more }`
1283 1062
1284 - `id: string`1063 - `id: string`
1285 1064
1321 1100
1322 The identifier of the actor that created the item.1101 The identifier of the actor that created the item.
1323 1102
13241103 - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - `ToolSearchOutput object { id, call_id, execution, 4 more }`
1325 1104
1326 - `id: string`1105 - `id: string`
1327 1106
1353 1132
1354 The loaded tool definitions returned by tool search.1133 The loaded tool definitions returned by tool search.
1355 1134
13561135 - `Function = object { name, parameters, strict, 3 more }` - `Function object { name, parameters, strict, 3 more }`
1357 1136
1358 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).1137 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).
1359 1138
1383 1162
1384 A description of the function. Used by the model to determine whether or not to call the function.1163 A description of the function. Used by the model to determine whether or not to call the function.
1385 1164
13861165 - `FileSearch = object { type, vector_store_ids, filters, 2 more }` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
1387 1166
1388 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).1167 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).
1389 1168
1401 1180
1402 A filter to apply.1181 A filter to apply.
1403 1182
14041183 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1405 1184
1406 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1185 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1407 1186
1454 1233
1455 - `number`1234 - `number`
1456 1235
14571236 - `CompoundFilter = object { filters, type }` - `CompoundFilter object { filters, type }`
1458 1237
1459 Combine multiple filters using `and` or `or`.1238 Combine multiple filters using `and` or `or`.
1460 1239
1462 1241
1463 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.1242 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
1464 1243
14651244 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1466 1245
1467 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1246 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1468 1247
1469 - `key: string`
1470
1471 The key to compare against the value.
1472
1473 - `type: "eq" or "ne" or "gt" or 5 more`
1474
1475 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
1476
1477 - `eq`: equals
1478 - `ne`: not equal
1479 - `gt`: greater than
1480 - `gte`: greater than or equal
1481 - `lt`: less than
1482 - `lte`: less than or equal
1483 - `in`: in
1484 - `nin`: not in
1485
1486 - `"eq"`
1487
1488 - `"ne"`
1489
1490 - `"gt"`
1491
1492 - `"gte"`
1493
1494 - `"lt"`
1495
1496 - `"lte"`
1497
1498 - `"in"`
1499
1500 - `"nin"`
1501
1502 - `value: string or number or boolean or array of string or number`
1503
1504 The value to compare against the attribute key; supports string, number, or boolean types.
1505
1506 - `string`
1507
1508 - `number`
1509
1510 - `boolean`
1511
1512 - `array of string or number`
1513
1514 - `string`
1515
1516 - `number`
1517
1518 - `unknown`1248 - `unknown`
1519 1249
1520 - `type: "and" or "or"`1250 - `type: "and" or "or"`
1557 1287
1558 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.1288 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.
1559 1289
15601290 - `Computer = object { type }` - `Computer object { type }`
1561 1291
1562 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1292 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1563 1293
1567 1297
1568 - `"computer"`1298 - `"computer"`
1569 1299
15701300 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
1571 1301
1572 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1302 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1573 1303
1599 1329
1600 - `"computer_use_preview"`1330 - `"computer_use_preview"`
1601 1331
16021332 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
1603 1333
1604 Search the Internet for sources related to the prompt. Learn more about the1334 Search the Internet for sources related to the prompt. Learn more about the
1605 [web search tool](/docs/guides/tools-web-search).1335 [web search tool](/docs/guides/tools-web-search).
1659 1389
1660 - `"approximate"`1390 - `"approximate"`
1661 1391
16621392 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
1663 1393
1664 Give the model access to additional tools via remote Model Context Protocol1394 Give the model access to additional tools via remote Model Context Protocol
1665 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).1395 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
1682 1412
1683 A string array of allowed tool names1413 A string array of allowed tool names
1684 1414
16851415 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
1686 1416
1687 A filter object to specify which tools are allowed.1417 A filter object to specify which tools are allowed.
1688 1418
1748 1478
1749 Specify which of the MCP server's tools require approval.1479 Specify which of the MCP server's tools require approval.
1750 1480
17511481 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
1752 1482
1753 Specify which of the MCP server's tools require approval. Can be1483 Specify which of the MCP server's tools require approval. Can be
1754 `always`, `never`, or a filter object associated with tools1484 `always`, `never`, or a filter object associated with tools
1801 The URL for the MCP server. One of `server_url` or `connector_id` must be1531 The URL for the MCP server. One of `server_url` or `connector_id` must be
1802 provided.1532 provided.
1803 1533
18041534 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
1805 1535
1806 A tool that runs Python code to help generate a response to a prompt.1536 A tool that runs Python code to help generate a response to a prompt.
1807 1537
1815 1545
1816 The container ID.1546 The container ID.
1817 1547
18181548 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
1819 1549
1820 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.1550 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
1821 1551
1845 1575
1846 Network access policy for the container.1576 Network access policy for the container.
1847 1577
18481578 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
1849 1579
1850 - `type: "disabled"`1580 - `type: "disabled"`
1851 1581
1853 1583
1854 - `"disabled"`1584 - `"disabled"`
1855 1585
18561586 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
1857 1587
1858 - `allowed_domains: array of string`1588 - `allowed_domains: array of string`
1859 1589
1887 1617
1888 - `"code_interpreter"`1618 - `"code_interpreter"`
1889 1619
18901620 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
1891 1621
1892 A tool that generates images using the GPT image models.1622 A tool that generates images using the GPT image models.
1893 1623
2008 1738
2009 - `"auto"`1739 - `"auto"`
2010 1740
20111741 - `LocalShell = object { type }` - `LocalShell object { type }`
2012 1742
2013 A tool that allows the model to execute shell commands in a local environment.1743 A tool that allows the model to execute shell commands in a local environment.
2014 1744
2018 1748
2019 - `"local_shell"`1749 - `"local_shell"`
2020 1750
20211751 - `Shell = object { type, environment }` - `Shell object { type, environment }`
2022 1752
2023 A tool that allows the model to execute shell commands.1753 A tool that allows the model to execute shell commands.
2024 1754
2030 1760
2031 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`1761 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
2032 1762
20331763 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
2034 1764
2035 - `type: "container_auto"`1765 - `type: "container_auto"`
2036 1766
2058 1788
2059 Network access policy for the container.1789 Network access policy for the container.
2060 1790
20611791 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
2062
2063 - `type: "disabled"`
2064
2065 Disable outbound network access. Always `disabled`.
2066
2067 - `"disabled"`
2068
2069 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
2070
2071 - `allowed_domains: array of string`
2072
2073 A list of allowed domains when type is `allowlist`.
2074
2075 - `type: "allowlist"`
2076
2077 Allow outbound network access only to specified domains. Always `allowlist`.
2078
2079 - `"allowlist"`
2080
2081 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
2082
2083 Optional domain-scoped secrets for allowlisted domains.
2084
2085 - `domain: string`
2086
2087 The domain associated with the secret.
2088
2089 - `name: string`
2090
2091 The name of the secret to inject for the domain.
2092
2093 - `value: string`
2094 1792
20951793 The secret value to inject for the domain. - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
2096 1794
2097 - `skills: optional array of SkillReference or InlineSkill`1795 - `skills: optional array of SkillReference or InlineSkill`
2098 1796
2099 An optional list of skills referenced by id or inline data.1797 An optional list of skills referenced by id or inline data.
2100 1798
21011799 - `SkillReference = object { skill_id, type, version }` - `SkillReference object { skill_id, type, version }`
2102 1800
2103 - `skill_id: string`1801 - `skill_id: string`
2104 1802
2114 1812
2115 Optional skill version. Use a positive integer or 'latest'. Omit for default.1813 Optional skill version. Use a positive integer or 'latest'. Omit for default.
2116 1814
21171815 - `InlineSkill = object { description, name, source, type }` - `InlineSkill object { description, name, source, type }`
2118 1816
2119 - `description: string`1817 - `description: string`
2120 1818
2150 1848
2151 - `"inline"`1849 - `"inline"`
2152 1850
21531851 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
2154 1852
2155 - `type: "local"`1853 - `type: "local"`
2156 1854
2174 1872
2175 The path to the directory containing the skill.1873 The path to the directory containing the skill.
2176 1874
21771875 - `ContainerReference = object { container_id, type }` - `ContainerReference object { container_id, type }`
2178 1876
2179 - `container_id: string`1877 - `container_id: string`
2180 1878
2186 1884
2187 - `"container_reference"`1885 - `"container_reference"`
2188 1886
21891887 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2190 1888
2191 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1889 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2192 1890
2212 1910
2213 The input format for the custom tool. Default is unconstrained text.1911 The input format for the custom tool. Default is unconstrained text.
2214 1912
22151913 - `Text = object { type }` - `Text object { type }`
2216 1914
2217 Unconstrained free-form text.1915 Unconstrained free-form text.
2218 1916
2222 1920
2223 - `"text"`1921 - `"text"`
2224 1922
22251923 - `Grammar = object { definition, syntax, type }` - `Grammar object { definition, syntax, type }`
2226 1924
2227 A grammar defined by the user.1925 A grammar defined by the user.
2228 1926
2244 1942
2245 - `"grammar"`1943 - `"grammar"`
2246 1944
22471945 - `Namespace = object { description, name, tools, type }` - `Namespace object { description, name, tools, type }`
2248 1946
2249 Groups function/custom tools under a shared namespace.1947 Groups function/custom tools under a shared namespace.
2250 1948
2260 1958
2261 The function/custom tools available inside this namespace.1959 The function/custom tools available inside this namespace.
2262 1960
22631961 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
2264 1962
2265 - `name: string`1963 - `name: string`
2266 1964
2278 1976
2279 - `strict: optional boolean`1977 - `strict: optional boolean`
2280 1978
22811979 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2282 1980
2283 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1981 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2284 1982
2304 2002
2305 The input format for the custom tool. Default is unconstrained text.2003 The input format for the custom tool. Default is unconstrained text.
2306 2004
2307 - `Text = object { type }`
2308
2309 Unconstrained free-form text.
2310
2311 - `type: "text"`
2312
2313 Unconstrained text format. Always `text`.
2314
2315 - `"text"`
2316
2317 - `Grammar = object { definition, syntax, type }`
2318
2319 A grammar defined by the user.
2320
2321 - `definition: string`
2322
2323 The grammar definition.
2324
2325 - `syntax: "lark" or "regex"`
2326
2327 The syntax of the grammar definition. One of `lark` or `regex`.
2328
2329 - `"lark"`
2330
2331 - `"regex"`
2332
2333 - `type: "grammar"`
2334
2335 Grammar format. Always `grammar`.
2336
2337 - `"grammar"`
2338
2339 - `type: "namespace"`2005 - `type: "namespace"`
2340 2006
2341 The type of the tool. Always `namespace`.2007 The type of the tool. Always `namespace`.
2342 2008
2343 - `"namespace"`2009 - `"namespace"`
2344 2010
23452011 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
2346 2012
2347 Hosted or BYOT tool search configuration for deferred tools.2013 Hosted or BYOT tool search configuration for deferred tools.
2348 2014
2368 2034
2369 Parameter schema for a client-executed tool search tool.2035 Parameter schema for a client-executed tool search tool.
2370 2036
23712037 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
2372 2038
2373 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).2039 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).
2374 2040
2422 2088
2423 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.2089 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2424 2090
24252091 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
2426 2092
2427 Allows the assistant to create, delete, or update files using unified diffs.2093 Allows the assistant to create, delete, or update files using unified diffs.
2428 2094
2442 2108
2443 The identifier of the actor that created the item.2109 The identifier of the actor that created the item.
2444 2110
24452111 - `Reasoning = object { id, summary, type, 3 more }` - `Reasoning object { id, summary, type, 3 more }`
2446 2112
2447 A description of the chain of thought used by a reasoning model while generating2113 A description of the chain of thought used by a reasoning model while generating
2448 a response. Be sure to include these items in your `input` to the Responses API2114 a response. Be sure to include these items in your `input` to the Responses API
2465 2131
2466 The type of the object. Always `summary_text`.2132 The type of the object. Always `summary_text`.
2467 2133
2468 - `"summary_text"`
2469
2470 - `type: "reasoning"`2134 - `type: "reasoning"`
2471 2135
2472 The type of the object. Always `reasoning`.2136 The type of the object. Always `reasoning`.
2503 2167
2504 - `"incomplete"`2168 - `"incomplete"`
2505 2169
25062170 - `Compaction = object { id, encrypted_content, type, created_by }` - `Compaction object { id, encrypted_content, type, created_by }`
2507 2171
2508 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).2172 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
2509 2173
2525 2189
2526 The identifier of the actor that created the item.2190 The identifier of the actor that created the item.
2527 2191
25282192 - `CodeInterpreterCall = object { id, code, container_id, 3 more }` - `CodeInterpreterCall object { id, code, container_id, 3 more }`
2529 2193
2530 A tool call to run code.2194 A tool call to run code.
2531 2195
2546 The outputs generated by the code interpreter, such as logs or images.2210 The outputs generated by the code interpreter, such as logs or images.
2547 Can be null if no outputs are available.2211 Can be null if no outputs are available.
2548 2212
25492213 - `Logs = object { logs, type }` - `Logs object { logs, type }`
2550 2214
2551 The logs output from the code interpreter.2215 The logs output from the code interpreter.
2552 2216
2560 2224
2561 - `"logs"`2225 - `"logs"`
2562 2226
25632227 - `Image = object { type, url }` - `Image object { type, url }`
2564 2228
2565 The image output from the code interpreter.2229 The image output from the code interpreter.
2566 2230
2594 2258
2595 - `"code_interpreter_call"`2259 - `"code_interpreter_call"`
2596 2260
25972261 - `LocalShellCall = object { id, action, call_id, 2 more }` - `LocalShellCall object { id, action, call_id, 2 more }`
2598 2262
2599 A tool call to run a command on the local shell.2263 A tool call to run a command on the local shell.
2600 2264
2652 2316
2653 - `"local_shell_call"`2317 - `"local_shell_call"`
2654 2318
26552319 - `LocalShellCallOutput = object { id, output, type, status }` - `LocalShellCallOutput object { id, output, type, status }`
2656 2320
2657 The output of a local shell tool call.2321 The output of a local shell tool call.
2658 2322
2680 2344
2681 - `"incomplete"`2345 - `"incomplete"`
2682 2346
26832347 - `ShellCall = object { id, action, call_id, 4 more }` - `ShellCall object { id, action, call_id, 4 more }`
2684 2348
2685 A tool call that executes one or more shell commands in a managed environment.2349 A tool call that executes one or more shell commands in a managed environment.
2686 2350
2710 2374
2711 Represents the use of a local environment to perform shell actions.2375 Represents the use of a local environment to perform shell actions.
2712 2376
27132377 - `ResponseLocalEnvironment = object { type }` - `ResponseLocalEnvironment object { type }`
2714 2378
2715 Represents the use of a local environment to perform shell actions.2379 Represents the use of a local environment to perform shell actions.
2716 2380
2720 2384
2721 - `"local"`2385 - `"local"`
2722 2386
27232387 - `ResponseContainerReference = object { container_id, type }` - `ResponseContainerReference object { container_id, type }`
2724 2388
2725 Represents a container created with /v1/containers.2389 Represents a container created with /v1/containers.
2726 2390
2752 2416
2753 The ID of the entity that created this tool call.2417 The ID of the entity that created this tool call.
2754 2418
27552419 - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - `ShellCallOutput object { id, call_id, max_output_length, 4 more }`
2756 2420
2757 The output of a shell tool call that was emitted.2421 The output of a shell tool call that was emitted.
2758 2422
2776 2440
2777 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.2441 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.
2778 2442
27792443 - `Timeout = object { type }` - `Timeout object { type }`
2780 2444
2781 Indicates that the shell call exceeded its configured time limit.2445 Indicates that the shell call exceeded its configured time limit.
2782 2446
2786 2450
2787 - `"timeout"`2451 - `"timeout"`
2788 2452
27892453 - `Exit = object { exit_code, type }` - `Exit object { exit_code, type }`
2790 2454
2791 Indicates that the shell commands finished and returned an exit code.2455 Indicates that the shell commands finished and returned an exit code.
2792 2456
2832 2496
2833 The identifier of the actor that created the item.2497 The identifier of the actor that created the item.
2834 2498
28352499 - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - `ApplyPatchCall object { id, call_id, operation, 3 more }`
2836 2500
2837 A tool call that applies file diffs by creating, deleting, or updating files.2501 A tool call that applies file diffs by creating, deleting, or updating files.
2838 2502
2848 2512
2849 One of the create_file, delete_file, or update_file operations applied via apply_patch.2513 One of the create_file, delete_file, or update_file operations applied via apply_patch.
2850 2514
28512515 - `CreateFile = object { diff, path, type }` - `CreateFile object { diff, path, type }`
2852 2516
2853 Instruction describing how to create a file via the apply_patch tool.2517 Instruction describing how to create a file via the apply_patch tool.
2854 2518
2866 2530
2867 - `"create_file"`2531 - `"create_file"`
2868 2532
28692533 - `DeleteFile = object { path, type }` - `DeleteFile object { path, type }`
2870 2534
2871 Instruction describing how to delete a file via the apply_patch tool.2535 Instruction describing how to delete a file via the apply_patch tool.
2872 2536
2880 2544
2881 - `"delete_file"`2545 - `"delete_file"`
2882 2546
28832547 - `UpdateFile = object { diff, path, type }` - `UpdateFile object { diff, path, type }`
2884 2548
2885 Instruction describing how to update a file via the apply_patch tool.2549 Instruction describing how to update a file via the apply_patch tool.
2886 2550
2916 2580
2917 The ID of the entity that created this tool call.2581 The ID of the entity that created this tool call.
2918 2582
29192583 - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - `ApplyPatchCallOutput object { id, call_id, status, 3 more }`
2920 2584
2921 The output emitted by an apply patch tool call.2585 The output emitted by an apply patch tool call.
2922 2586
2950 2614
2951 Optional textual output returned by the apply patch tool.2615 Optional textual output returned by the apply patch tool.
2952 2616
29532617 - `McpListTools = object { id, server_label, tools, 2 more }` - `McpListTools object { id, server_label, tools, 2 more }`
2954 2618
2955 A list of tools available on an MCP server.2619 A list of tools available on an MCP server.
2956 2620
2992 2656
2993 Error message if the server could not list tools.2657 Error message if the server could not list tools.
2994 2658
29952659 - `McpApprovalRequest = object { id, arguments, name, 2 more }` - `McpApprovalRequest object { id, arguments, name, 2 more }`
2996 2660
2997 A request for human approval of a tool invocation.2661 A request for human approval of a tool invocation.
2998 2662
3018 2682
3019 - `"mcp_approval_request"`2683 - `"mcp_approval_request"`
3020 2684
30212685 - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }`
3022 2686
3023 A response to an MCP approval request.2687 A response to an MCP approval request.
3024 2688
3044 2708
3045 Optional reason for the decision.2709 Optional reason for the decision.
3046 2710
30472711 - `McpCall = object { id, arguments, name, 6 more }` - `McpCall object { id, arguments, name, 6 more }`
3048 2712
3049 An invocation of a tool on an MCP server.2713 An invocation of a tool on an MCP server.
3050 2714
3097 2761
3098 - `"failed"`2762 - `"failed"`
3099 2763
31002764 - `CustomToolCall = object { call_id, input, name, 3 more }` - `CustomToolCall object { call_id, input, name, 3 more }`
3101 2765
3102 A call to a custom tool created by the model.2766 A call to a custom tool created by the model.
3103 2767
3127 2791
3128 The namespace of the custom tool being called.2792 The namespace of the custom tool being called.
3129 2793
31302794 - `CustomToolCallOutput = object { call_id, output, type, id }` - `CustomToolCallOutput object { call_id, output, type, id }`
3131 2795
3132 The output of a custom tool call from your code, being sent back to the model.2796 The output of a custom tool call from your code, being sent back to the model.
3133 2797
3148 2812
3149 Text, image, or file output of the custom tool call.2813 Text, image, or file output of the custom tool call.
3150 2814
31512815 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
3152 2816
3153 A text input to the model.2817 A text input to the model.
3154 2818
31552819 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
3156
3157 The text input to the model.
3158
3159 - `type: "input_text"`
3160
3161 The type of the input item. Always `input_text`.
3162
3163 - `"input_text"`
3164
3165 - `ResponseInputImage = object { detail, type, file_id, image_url }`
3166 2820
3167 An image input to the model. Learn about [image inputs](/docs/guides/vision).2821 An image input to the model. Learn about [image inputs](/docs/guides/vision).
3168 2822
31692823 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
3170
3171 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
3172
3173 - `"low"`
3174
3175 - `"high"`
3176
3177 - `"auto"`
3178
3179 - `"original"`
3180
3181 - `type: "input_image"`
3182
3183 The type of the input item. Always `input_image`.
3184
3185 - `"input_image"`
3186
3187 - `file_id: optional string`
3188
3189 The ID of the file to be sent to the model.
3190
3191 - `image_url: optional string`
3192
3193 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
3194
3195 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
3196 2824
3197 A file input to the model.2825 A file input to the model.
3198 2826
3199 - `type: "input_file"`
3200
3201 The type of the input item. Always `input_file`.
3202
3203 - `"input_file"`
3204
3205 - `detail: optional "low" or "high"`
3206
3207 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`.
3208
3209 - `"low"`
3210
3211 - `"high"`
3212
3213 - `file_data: optional string`
3214
3215 The content of the file to be sent to the model.
3216
3217 - `file_id: optional string`
3218
3219 The ID of the file to be sent to the model.
3220
3221 - `file_url: optional string`
3222
3223 The URL of the file to be sent to the model.
3224
3225 - `filename: optional string`
3226
3227 The name of the file to be sent to the model.
3228
3229 - `type: "custom_tool_call_output"`2827 - `type: "custom_tool_call_output"`
3230 2828
3231 The type of the custom tool call output. Always `custom_tool_call_output`.2829 The type of the custom tool call output. Always `custom_tool_call_output`.
58 58
59### Returns59### Returns
60 60
6161- `CreateEmbeddingResponse = object { data, model, object, usage }`- `CreateEmbeddingResponse object { data, model, object, usage }`
62 62
63 - `data: array of Embedding`63 - `data: array of Embedding`
64 64
12 12
13 The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation.13 The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation.
14 14
1515 - `CustomDataSourceConfig = object { item_schema, type, include_sample_schema }` - `CustomDataSourceConfig object { item_schema, type, include_sample_schema }`
16 16
17 A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs.17 A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs.
18 This schema is used to define the shape of the data that will be:18 This schema is used to define the shape of the data that will be:
34 34
35 Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)35 Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)
36 36
3737 - `LogsDataSourceConfig = object { type, metadata }` - `LogsDataSourceConfig object { type, metadata }`
38 38
39 A data source config which specifies the metadata property of your logs query.39 A data source config which specifies the metadata property of your logs query.
40 This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.40 This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.
49 49
50 Metadata filters for the logs data source.50 Metadata filters for the logs data source.
51 51
5252 - `StoredCompletionsDataSourceConfig = object { type, metadata }` - `StoredCompletionsDataSourceConfig object { type, metadata }`
53 53
54 Deprecated in favor of LogsDataSourceConfig.54 Deprecated in favor of LogsDataSourceConfig.
55 55
67 67
68 A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`).68 A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`).
69 69
7070 - `LabelModelGrader = object { input, labels, model, 3 more }` - `LabelModelGrader object { input, labels, model, 3 more }`
71 71
72 A LabelModelGrader object which uses a model to assign labels to each item72 A LabelModelGrader object which uses a model to assign labels to each item
73 in the evaluation.73 in the evaluation.
76 76
77 A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.77 A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.
78 78
7979 - `SimpleInputMessage = object { content, role }` - `SimpleInputMessage object { content, role }`
80 80
81 - `content: string`81 - `content: string`
82 82
86 86
87 The role of the message (e.g. "system", "assistant", "user").87 The role of the message (e.g. "system", "assistant", "user").
88 88
8989 - `EvalMessageObject = object { content, role, type }` - `EvalMessageObject object { content, role, type }`
90 90
91 A message input to the model with a role indicating instruction following91 A message input to the model with a role indicating instruction following
92 hierarchy. Instructions given with the `developer` or `system` role take92 hierarchy. Instructions given with the `developer` or `system` role take
102 102
103 A text input to the model.103 A text input to the model.
104 104
105105 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
106 106
107 A text input to the model.107 A text input to the model.
108 108
116 116
117 - `"input_text"`117 - `"input_text"`
118 118
119119 - `OutputText = object { text, type }` - `OutputText object { text, type }`
120 120
121 A text output from the model.121 A text output from the model.
122 122
130 130
131 - `"output_text"`131 - `"output_text"`
132 132
133133 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
134 134
135 An image input block used within EvalItem content arrays.135 An image input block used within EvalItem content arrays.
136 136
148 148
149 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.149 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
150 150
151151 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
152 152
153 An audio input to the model.153 An audio input to the model.
154 154
182 182
183 A text input to the model.183 A text input to the model.
184 184
185185 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
186 186
187 A text input to the model.187 A text input to the model.
188 188
189189 - `text: string` - `OutputText object { text, type }`
190
191 The text input to the model.
192
193 - `type: "input_text"`
194
195 The type of the input item. Always `input_text`.
196
197 - `"input_text"`
198
199 - `OutputText = object { text, type }`
200 190
201 A text output from the model.191 A text output from the model.
202 192
210 200
211 - `"output_text"`201 - `"output_text"`
212 202
213203 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
214 204
215 An image input block used within EvalItem content arrays.205 An image input block used within EvalItem content arrays.
216 206
228 218
229 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.219 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
230 220
231221 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
232 222
233 An audio input to the model.223 An audio input to the model.
234 224
235 - `input_audio: object { data, format }`
236
237 - `data: string`
238
239 Base64-encoded audio data.
240
241 - `format: "mp3" or "wav"`
242
243 The format of the audio data. Currently supported formats are `mp3` and
244 `wav`.
245
246 - `"mp3"`
247
248 - `"wav"`
249
250 - `type: "input_audio"`
251
252 The type of the input item. Always `input_audio`.
253
254 - `"input_audio"`
255
256 - `role: "user" or "assistant" or "system" or "developer"`225 - `role: "user" or "assistant" or "system" or "developer"`
257 226
258 The role of the message input. One of `user`, `assistant`, `system`, or227 The role of the message input. One of `user`, `assistant`, `system`, or
294 263
295 - `"label_model"`264 - `"label_model"`
296 265
297266 - `StringCheckGrader = object { input, name, operation, 2 more }` - `StringCheckGrader object { input, name, operation, 2 more }`
298 267
299 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.268 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
300 269
379 348
380 Configuration of data sources used in runs of the evaluation.349 Configuration of data sources used in runs of the evaluation.
381 350
382351 - `EvalCustomDataSourceConfig = object { schema, type }` - `EvalCustomDataSourceConfig object { schema, type }`
383 352
384 A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.353 A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.
385 The response schema defines the shape of the data that will be:354 The response schema defines the shape of the data that will be:
398 367
399 - `"custom"`368 - `"custom"`
400 369
401370 - `LogsDataSourceConfig = object { schema, type, metadata }` - `LogsDataSourceConfig object { schema, type, metadata }`
402 371
403 A LogsDataSourceConfig which specifies the metadata property of your logs query.372 A LogsDataSourceConfig which specifies the metadata property of your logs query.
404 This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.373 This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.
425 Keys are strings with a maximum length of 64 characters. Values are strings394 Keys are strings with a maximum length of 64 characters. Values are strings
426 with a maximum length of 512 characters.395 with a maximum length of 512 characters.
427 396
428397 - `EvalStoredCompletionsDataSourceConfig = object { schema, type, metadata }` - `EvalStoredCompletionsDataSourceConfig object { schema, type, metadata }`
429 398
430 Deprecated in favor of LogsDataSourceConfig.399 Deprecated in favor of LogsDataSourceConfig.
431 400
472 441
473 A list of testing criteria.442 A list of testing criteria.
474 443
475444 - `LabelModelGrader = object { input, labels, model, 3 more }` - `LabelModelGrader object { input, labels, model, 3 more }`
476 445
477 A LabelModelGrader object which uses a model to assign labels to each item446 A LabelModelGrader object which uses a model to assign labels to each item
478 in the evaluation.447 in the evaluation.
487 456
488 A text input to the model.457 A text input to the model.
489 458
490459 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
491 460
492 A text input to the model.461 A text input to the model.
493 462
501 470
502 - `"input_text"`471 - `"input_text"`
503 472
504473 - `OutputText = object { text, type }` - `OutputText object { text, type }`
505 474
506 A text output from the model.475 A text output from the model.
507 476
515 484
516 - `"output_text"`485 - `"output_text"`
517 486
518487 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
519 488
520 An image input block used within EvalItem content arrays.489 An image input block used within EvalItem content arrays.
521 490
533 502
534 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.503 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
535 504
536505 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
537 506
538 An audio input to the model.507 An audio input to the model.
539 508
567 536
568 A text input to the model.537 A text input to the model.
569 538
570539 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
571 540
572 A text input to the model.541 A text input to the model.
573 542
574543 - `text: string` - `OutputText object { text, type }`
575
576 The text input to the model.
577
578 - `type: "input_text"`
579
580 The type of the input item. Always `input_text`.
581
582 - `"input_text"`
583
584 - `OutputText = object { text, type }`
585 544
586 A text output from the model.545 A text output from the model.
587 546
595 554
596 - `"output_text"`555 - `"output_text"`
597 556
598557 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
599 558
600 An image input block used within EvalItem content arrays.559 An image input block used within EvalItem content arrays.
601 560
613 572
614 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.573 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
615 574
616575 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
617 576
618 An audio input to the model.577 An audio input to the model.
619 578
620 - `input_audio: object { data, format }`
621
622 - `data: string`
623
624 Base64-encoded audio data.
625
626 - `format: "mp3" or "wav"`
627
628 The format of the audio data. Currently supported formats are `mp3` and
629 `wav`.
630
631 - `"mp3"`
632
633 - `"wav"`
634
635 - `type: "input_audio"`
636
637 The type of the input item. Always `input_audio`.
638
639 - `"input_audio"`
640
641 - `role: "user" or "assistant" or "system" or "developer"`579 - `role: "user" or "assistant" or "system" or "developer"`
642 580
643 The role of the message input. One of `user`, `assistant`, `system`, or581 The role of the message input. One of `user`, `assistant`, `system`, or
679 617
680 - `"label_model"`618 - `"label_model"`
681 619
682620 - `StringCheckGrader = object { input, name, operation, 2 more }` - `StringCheckGrader object { input, name, operation, 2 more }`
683 621
684 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.622 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
685 623
49 49
50 Configuration of data sources used in runs of the evaluation.50 Configuration of data sources used in runs of the evaluation.
51 51
5252 - `EvalCustomDataSourceConfig = object { schema, type }` - `EvalCustomDataSourceConfig object { schema, type }`
53 53
54 A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.54 A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.
55 The response schema defines the shape of the data that will be:55 The response schema defines the shape of the data that will be:
68 68
69 - `"custom"`69 - `"custom"`
70 70
7171 - `LogsDataSourceConfig = object { schema, type, metadata }` - `LogsDataSourceConfig object { schema, type, metadata }`
72 72
73 A LogsDataSourceConfig which specifies the metadata property of your logs query.73 A LogsDataSourceConfig which specifies the metadata property of your logs query.
74 This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.74 This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.
95 Keys are strings with a maximum length of 64 characters. Values are strings95 Keys are strings with a maximum length of 64 characters. Values are strings
96 with a maximum length of 512 characters.96 with a maximum length of 512 characters.
97 97
9898 - `EvalStoredCompletionsDataSourceConfig = object { schema, type, metadata }` - `EvalStoredCompletionsDataSourceConfig object { schema, type, metadata }`
99 99
100 Deprecated in favor of LogsDataSourceConfig.100 Deprecated in favor of LogsDataSourceConfig.
101 101
142 142
143 A list of testing criteria.143 A list of testing criteria.
144 144
145145 - `LabelModelGrader = object { input, labels, model, 3 more }` - `LabelModelGrader object { input, labels, model, 3 more }`
146 146
147 A LabelModelGrader object which uses a model to assign labels to each item147 A LabelModelGrader object which uses a model to assign labels to each item
148 in the evaluation.148 in the evaluation.
157 157
158 A text input to the model.158 A text input to the model.
159 159
160160 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
161 161
162 A text input to the model.162 A text input to the model.
163 163
171 171
172 - `"input_text"`172 - `"input_text"`
173 173
174174 - `OutputText = object { text, type }` - `OutputText object { text, type }`
175 175
176 A text output from the model.176 A text output from the model.
177 177
185 185
186 - `"output_text"`186 - `"output_text"`
187 187
188188 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
189 189
190 An image input block used within EvalItem content arrays.190 An image input block used within EvalItem content arrays.
191 191
203 203
204 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.204 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
205 205
206206 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
207 207
208 An audio input to the model.208 An audio input to the model.
209 209
237 237
238 A text input to the model.238 A text input to the model.
239 239
240240 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
241 241
242 A text input to the model.242 A text input to the model.
243 243
244244 - `text: string` - `OutputText object { text, type }`
245
246 The text input to the model.
247
248 - `type: "input_text"`
249
250 The type of the input item. Always `input_text`.
251
252 - `"input_text"`
253
254 - `OutputText = object { text, type }`
255 245
256 A text output from the model.246 A text output from the model.
257 247
265 255
266 - `"output_text"`256 - `"output_text"`
267 257
268258 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
269 259
270 An image input block used within EvalItem content arrays.260 An image input block used within EvalItem content arrays.
271 261
283 273
284 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.274 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
285 275
286276 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
287 277
288 An audio input to the model.278 An audio input to the model.
289 279
290 - `input_audio: object { data, format }`
291
292 - `data: string`
293
294 Base64-encoded audio data.
295
296 - `format: "mp3" or "wav"`
297
298 The format of the audio data. Currently supported formats are `mp3` and
299 `wav`.
300
301 - `"mp3"`
302
303 - `"wav"`
304
305 - `type: "input_audio"`
306
307 The type of the input item. Always `input_audio`.
308
309 - `"input_audio"`
310
311 - `role: "user" or "assistant" or "system" or "developer"`280 - `role: "user" or "assistant" or "system" or "developer"`
312 281
313 The role of the message input. One of `user`, `assistant`, `system`, or282 The role of the message input. One of `user`, `assistant`, `system`, or
349 318
350 - `"label_model"`319 - `"label_model"`
351 320
352321 - `StringCheckGrader = object { input, name, operation, 2 more }` - `StringCheckGrader object { input, name, operation, 2 more }`
353 322
354 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.323 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
355 324
22 22
23 Configuration of data sources used in runs of the evaluation.23 Configuration of data sources used in runs of the evaluation.
24 24
2525 - `EvalCustomDataSourceConfig = object { schema, type }` - `EvalCustomDataSourceConfig object { schema, type }`
26 26
27 A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.27 A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.
28 The response schema defines the shape of the data that will be:28 The response schema defines the shape of the data that will be:
41 41
42 - `"custom"`42 - `"custom"`
43 43
4444 - `LogsDataSourceConfig = object { schema, type, metadata }` - `LogsDataSourceConfig object { schema, type, metadata }`
45 45
46 A LogsDataSourceConfig which specifies the metadata property of your logs query.46 A LogsDataSourceConfig which specifies the metadata property of your logs query.
47 This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.47 This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.
68 Keys are strings with a maximum length of 64 characters. Values are strings68 Keys are strings with a maximum length of 64 characters. Values are strings
69 with a maximum length of 512 characters.69 with a maximum length of 512 characters.
70 70
7171 - `EvalStoredCompletionsDataSourceConfig = object { schema, type, metadata }` - `EvalStoredCompletionsDataSourceConfig object { schema, type, metadata }`
72 72
73 Deprecated in favor of LogsDataSourceConfig.73 Deprecated in favor of LogsDataSourceConfig.
74 74
115 115
116 A list of testing criteria.116 A list of testing criteria.
117 117
118118 - `LabelModelGrader = object { input, labels, model, 3 more }` - `LabelModelGrader object { input, labels, model, 3 more }`
119 119
120 A LabelModelGrader object which uses a model to assign labels to each item120 A LabelModelGrader object which uses a model to assign labels to each item
121 in the evaluation.121 in the evaluation.
130 130
131 A text input to the model.131 A text input to the model.
132 132
133133 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
134 134
135 A text input to the model.135 A text input to the model.
136 136
144 144
145 - `"input_text"`145 - `"input_text"`
146 146
147147 - `OutputText = object { text, type }` - `OutputText object { text, type }`
148 148
149 A text output from the model.149 A text output from the model.
150 150
158 158
159 - `"output_text"`159 - `"output_text"`
160 160
161161 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
162 162
163 An image input block used within EvalItem content arrays.163 An image input block used within EvalItem content arrays.
164 164
176 176
177 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.177 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
178 178
179179 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
180 180
181 An audio input to the model.181 An audio input to the model.
182 182
210 210
211 A text input to the model.211 A text input to the model.
212 212
213213 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
214 214
215 A text input to the model.215 A text input to the model.
216 216
217217 - `text: string` - `OutputText object { text, type }`
218
219 The text input to the model.
220
221 - `type: "input_text"`
222
223 The type of the input item. Always `input_text`.
224
225 - `"input_text"`
226
227 - `OutputText = object { text, type }`
228 218
229 A text output from the model.219 A text output from the model.
230 220
238 228
239 - `"output_text"`229 - `"output_text"`
240 230
241231 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
242 232
243 An image input block used within EvalItem content arrays.233 An image input block used within EvalItem content arrays.
244 234
256 246
257 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.247 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
258 248
259249 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
260 250
261 An audio input to the model.251 An audio input to the model.
262 252
263 - `input_audio: object { data, format }`
264
265 - `data: string`
266
267 Base64-encoded audio data.
268
269 - `format: "mp3" or "wav"`
270
271 The format of the audio data. Currently supported formats are `mp3` and
272 `wav`.
273
274 - `"mp3"`
275
276 - `"wav"`
277
278 - `type: "input_audio"`
279
280 The type of the input item. Always `input_audio`.
281
282 - `"input_audio"`
283
284 - `role: "user" or "assistant" or "system" or "developer"`253 - `role: "user" or "assistant" or "system" or "developer"`
285 254
286 The role of the message input. One of `user`, `assistant`, `system`, or255 The role of the message input. One of `user`, `assistant`, `system`, or
322 291
323 - `"label_model"`292 - `"label_model"`
324 293
325294 - `StringCheckGrader = object { input, name, operation, 2 more }` - `StringCheckGrader object { input, name, operation, 2 more }`
326 295
327 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.296 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
328 297
37 37
38 Configuration of data sources used in runs of the evaluation.38 Configuration of data sources used in runs of the evaluation.
39 39
4040 - `EvalCustomDataSourceConfig = object { schema, type }` - `EvalCustomDataSourceConfig object { schema, type }`
41 41
42 A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.42 A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.
43 The response schema defines the shape of the data that will be:43 The response schema defines the shape of the data that will be:
56 56
57 - `"custom"`57 - `"custom"`
58 58
5959 - `LogsDataSourceConfig = object { schema, type, metadata }` - `LogsDataSourceConfig object { schema, type, metadata }`
60 60
61 A LogsDataSourceConfig which specifies the metadata property of your logs query.61 A LogsDataSourceConfig which specifies the metadata property of your logs query.
62 This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.62 This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.
83 Keys are strings with a maximum length of 64 characters. Values are strings83 Keys are strings with a maximum length of 64 characters. Values are strings
84 with a maximum length of 512 characters.84 with a maximum length of 512 characters.
85 85
8686 - `EvalStoredCompletionsDataSourceConfig = object { schema, type, metadata }` - `EvalStoredCompletionsDataSourceConfig object { schema, type, metadata }`
87 87
88 Deprecated in favor of LogsDataSourceConfig.88 Deprecated in favor of LogsDataSourceConfig.
89 89
130 130
131 A list of testing criteria.131 A list of testing criteria.
132 132
133133 - `LabelModelGrader = object { input, labels, model, 3 more }` - `LabelModelGrader object { input, labels, model, 3 more }`
134 134
135 A LabelModelGrader object which uses a model to assign labels to each item135 A LabelModelGrader object which uses a model to assign labels to each item
136 in the evaluation.136 in the evaluation.
145 145
146 A text input to the model.146 A text input to the model.
147 147
148148 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
149 149
150 A text input to the model.150 A text input to the model.
151 151
159 159
160 - `"input_text"`160 - `"input_text"`
161 161
162162 - `OutputText = object { text, type }` - `OutputText object { text, type }`
163 163
164 A text output from the model.164 A text output from the model.
165 165
173 173
174 - `"output_text"`174 - `"output_text"`
175 175
176176 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
177 177
178 An image input block used within EvalItem content arrays.178 An image input block used within EvalItem content arrays.
179 179
191 191
192 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.192 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
193 193
194194 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
195 195
196 An audio input to the model.196 An audio input to the model.
197 197
225 225
226 A text input to the model.226 A text input to the model.
227 227
228228 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
229 229
230 A text input to the model.230 A text input to the model.
231 231
232232 - `text: string` - `OutputText object { text, type }`
233
234 The text input to the model.
235
236 - `type: "input_text"`
237
238 The type of the input item. Always `input_text`.
239
240 - `"input_text"`
241
242 - `OutputText = object { text, type }`
243 233
244 A text output from the model.234 A text output from the model.
245 235
253 243
254 - `"output_text"`244 - `"output_text"`
255 245
256246 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
257 247
258 An image input block used within EvalItem content arrays.248 An image input block used within EvalItem content arrays.
259 249
271 261
272 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.262 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
273 263
274264 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
275 265
276 An audio input to the model.266 An audio input to the model.
277 267
278 - `input_audio: object { data, format }`
279
280 - `data: string`
281
282 Base64-encoded audio data.
283
284 - `format: "mp3" or "wav"`
285
286 The format of the audio data. Currently supported formats are `mp3` and
287 `wav`.
288
289 - `"mp3"`
290
291 - `"wav"`
292
293 - `type: "input_audio"`
294
295 The type of the input item. Always `input_audio`.
296
297 - `"input_audio"`
298
299 - `role: "user" or "assistant" or "system" or "developer"`268 - `role: "user" or "assistant" or "system" or "developer"`
300 269
301 The role of the message input. One of `user`, `assistant`, `system`, or270 The role of the message input. One of `user`, `assistant`, `system`, or
337 306
338 - `"label_model"`307 - `"label_model"`
339 308
340309 - `StringCheckGrader = object { input, name, operation, 2 more }` - `StringCheckGrader object { input, name, operation, 2 more }`
341 310
342 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.311 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
343 312
24 24
25 Information about the run's data source.25 Information about the run's data source.
26 26
2727 - `CreateEvalJSONLRunDataSource = object { source, type }` - `CreateEvalJSONLRunDataSource object { source, type }`
28 28
29 A JsonlRunDataSource object with that specifies a JSONL file that matches the eval29 A JsonlRunDataSource object with that specifies a JSONL file that matches the eval
30 30
32 32
33 Determines what populates the `item` namespace in the data source.33 Determines what populates the `item` namespace in the data source.
34 34
3535 - `EvalJSONLFileContentSource = object { content, type }` - `EvalJSONLFileContentSource object { content, type }`
36 36
37 - `content: array of object { item, sample }`37 - `content: array of object { item, sample }`
38 38
48 48
49 - `"file_content"`49 - `"file_content"`
50 50
5151 - `EvalJSONLFileIDSource = object { id, type }` - `EvalJSONLFileIDSource object { id, type }`
52 52
53 - `id: string`53 - `id: string`
54 54
66 66
67 - `"jsonl"`67 - `"jsonl"`
68 68
6969 - `CreateEvalCompletionsRunDataSource = object { source, type, input_messages, 2 more }` - `CreateEvalCompletionsRunDataSource object { source, type, input_messages, 2 more }`
70 70
71 A CompletionsRunDataSource object describing a model sampling configuration.71 A CompletionsRunDataSource object describing a model sampling configuration.
72 72
74 74
75 Determines what populates the `item` namespace in this run's data source.75 Determines what populates the `item` namespace in this run's data source.
76 76
7777 - `EvalJSONLFileContentSource = object { content, type }` - `EvalJSONLFileContentSource object { content, type }`
78 78
79 - `content: array of object { item, sample }`79 - `content: array of object { item, sample }`
80 80
90 90
91 - `"file_content"`91 - `"file_content"`
92 92
9393 - `EvalJSONLFileIDSource = object { id, type }` - `EvalJSONLFileIDSource object { id, type }`
94 94
95 - `id: string`95 - `id: string`
96 96
102 102
103 - `"file_id"`103 - `"file_id"`
104 104
105105 - `StoredCompletionsRunDataSource = object { type, created_after, created_before, 3 more }` - `StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more }`
106 106
107 A StoredCompletionsRunDataSource configuration describing a set of filters107 A StoredCompletionsRunDataSource configuration describing a set of filters
108 108
147 147
148 Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.148 Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.
149 149
150150 - `TemplateInputMessages = object { template, type }` - `TemplateInputMessages object { template, type }`
151 151
152 - `template: array of EasyInputMessage or object { content, role, type }`152 - `template: array of EasyInputMessage or object { content, role, type }`
153 153
154 A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.154 A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.
155 155
156156 - `EasyInputMessage = object { content, role, phase, type }` - `EasyInputMessage object { content, role, phase, type }`
157 157
158 A message input to the model with a role indicating instruction following158 A message input to the model with a role indicating instruction following
159 hierarchy. Instructions given with the `developer` or `system` role take159 hierarchy. Instructions given with the `developer` or `system` role take
175 A list of one or many input items to the model, containing different content175 A list of one or many input items to the model, containing different content
176 types.176 types.
177 177
178178 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
179 179
180 A text input to the model.180 A text input to the model.
181 181
189 189
190 - `"input_text"`190 - `"input_text"`
191 191
192192 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
193 193
194 An image input to the model. Learn about [image inputs](/docs/guides/vision).194 An image input to the model. Learn about [image inputs](/docs/guides/vision).
195 195
219 219
220 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.220 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
221 221
222222 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
223 223
224 A file input to the model.224 A file input to the model.
225 225
282 282
283 - `"message"`283 - `"message"`
284 284
285285 - `EvalMessageObject = object { content, role, type }` - `EvalMessageObject object { content, role, type }`
286 286
287 A message input to the model with a role indicating instruction following287 A message input to the model with a role indicating instruction following
288 hierarchy. Instructions given with the `developer` or `system` role take288 hierarchy. Instructions given with the `developer` or `system` role take
298 298
299 A text input to the model.299 A text input to the model.
300 300
301301 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
302 302
303 A text input to the model.303 A text input to the model.
304 304
305305 - `text: string` - `OutputText object { text, type }`
306
307 The text input to the model.
308
309 - `type: "input_text"`
310
311 The type of the input item. Always `input_text`.
312
313 - `"input_text"`
314
315 - `OutputText = object { text, type }`
316 306
317 A text output from the model.307 A text output from the model.
318 308
326 316
327 - `"output_text"`317 - `"output_text"`
328 318
329319 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
330 320
331 An image input block used within EvalItem content arrays.321 An image input block used within EvalItem content arrays.
332 322
344 334
345 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.335 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
346 336
347337 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
348 338
349 An audio input to the model.339 An audio input to the model.
350 340
378 368
379 A text input to the model.369 A text input to the model.
380 370
381371 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
382 372
383 A text input to the model.373 A text input to the model.
384 374
385375 - `text: string` - `OutputText object { text, type }`
386
387 The text input to the model.
388
389 - `type: "input_text"`
390
391 The type of the input item. Always `input_text`.
392
393 - `"input_text"`
394
395 - `OutputText = object { text, type }`
396 376
397 A text output from the model.377 A text output from the model.
398 378
406 386
407 - `"output_text"`387 - `"output_text"`
408 388
409389 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
410 390
411 An image input block used within EvalItem content arrays.391 An image input block used within EvalItem content arrays.
412 392
424 404
425 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.405 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
426 406
427407 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
428 408
429 An audio input to the model.409 An audio input to the model.
430 410
431 - `input_audio: object { data, format }`
432
433 - `data: string`
434
435 Base64-encoded audio data.
436
437 - `format: "mp3" or "wav"`
438
439 The format of the audio data. Currently supported formats are `mp3` and
440 `wav`.
441
442 - `"mp3"`
443
444 - `"wav"`
445
446 - `type: "input_audio"`
447
448 The type of the input item. Always `input_audio`.
449
450 - `"input_audio"`
451
452 - `role: "user" or "assistant" or "system" or "developer"`411 - `role: "user" or "assistant" or "system" or "developer"`
453 412
454 The role of the message input. One of `user`, `assistant`, `system`, or413 The role of the message input. One of `user`, `assistant`, `system`, or
474 433
475 - `"template"`434 - `"template"`
476 435
477436 - `ItemReferenceInputMessages = object { item_reference, type }` - `ItemReferenceInputMessages object { item_reference, type }`
478 437
479 - `item_reference: string`438 - `item_reference: string`
480 439
534 ensures the message the model generates is valid JSON. Using `json_schema`493 ensures the message the model generates is valid JSON. Using `json_schema`
535 is preferred for models that support it.494 is preferred for models that support it.
536 495
537496 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
538 497
539 Default response format. Used to generate text responses.498 Default response format. Used to generate text responses.
540 499
544 503
545 - `"text"`504 - `"text"`
546 505
547506 - `ResponseFormatJSONSchema = object { json_schema, type }` - `ResponseFormatJSONSchema object { json_schema, type }`
548 507
549 JSON Schema response format. Used to generate structured JSON responses.508 JSON Schema response format. Used to generate structured JSON responses.
550 Learn more about [Structured Outputs](/docs/guides/structured-outputs).509 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
582 541
583 - `"json_schema"`542 - `"json_schema"`
584 543
585544 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
586 545
587 JSON object response format. An older method of generating JSON responses.546 JSON object response format. An older method of generating JSON responses.
588 Using `json_schema` is recommended for models that support it. Note that the547 Using `json_schema` is recommended for models that support it. Note that the
637 596
638 An alternative to temperature for nucleus sampling; 1.0 includes all tokens.597 An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
639 598
640599 - `ResponsesRunDataSource = object { source, type, input_messages, 2 more }` - `ResponsesRunDataSource object { source, type, input_messages, 2 more }`
641 600
642 A ResponsesRunDataSource object describing a model sampling configuration.601 A ResponsesRunDataSource object describing a model sampling configuration.
643 602
645 604
646 Determines what populates the `item` namespace in this run's data source.605 Determines what populates the `item` namespace in this run's data source.
647 606
648607 - `EvalJSONLFileContentSource = object { content, type }` - `EvalJSONLFileContentSource object { content, type }`
649 608
650 - `content: array of object { item, sample }`609 - `content: array of object { item, sample }`
651 610
661 620
662 - `"file_content"`621 - `"file_content"`
663 622
664623 - `EvalJSONLFileIDSource = object { id, type }` - `EvalJSONLFileIDSource object { id, type }`
665 624
666 - `id: string`625 - `id: string`
667 626
673 632
674 - `"file_id"`633 - `"file_id"`
675 634
676635 - `EvalResponsesSource = object { type, created_after, created_before, 8 more }` - `EvalResponsesSource object { type, created_after, created_before, 8 more }`
677 636
678 A EvalResponsesSource object describing a run data source configuration.637 A EvalResponsesSource object describing a run data source configuration.
679 638
716 - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.675 - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
717 - `xhigh` is supported for all models after `gpt-5.1-codex-max`.676 - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
718 677
719 - `"none"`
720
721 - `"minimal"`
722
723 - `"low"`
724
725 - `"medium"`
726
727 - `"high"`
728
729 - `"xhigh"`
730
731 - `temperature: optional number`678 - `temperature: optional number`
732 679
733 Sampling temperature. This is a query parameter used to select responses.680 Sampling temperature. This is a query parameter used to select responses.
754 701
755 Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.702 Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.
756 703
757704 - `InputMessagesTemplate = object { template, type }` - `InputMessagesTemplate object { template, type }`
758 705
759 - `template: array of object { content, role } or object { content, role, type }`706 - `template: array of object { content, role } or object { content, role, type }`
760 707
761 A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.708 A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.
762 709
763710 - `ChatMessage = object { content, role }` - `ChatMessage object { content, role }`
764 711
765 - `content: string`712 - `content: string`
766 713
770 717
771 The role of the message (e.g. "system", "assistant", "user").718 The role of the message (e.g. "system", "assistant", "user").
772 719
773720 - `EvalMessageObject = object { content, role, type }` - `EvalMessageObject object { content, role, type }`
774 721
775 A message input to the model with a role indicating instruction following722 A message input to the model with a role indicating instruction following
776 hierarchy. Instructions given with the `developer` or `system` role take723 hierarchy. Instructions given with the `developer` or `system` role take
786 733
787 A text input to the model.734 A text input to the model.
788 735
789736 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
790 737
791 A text input to the model.738 A text input to the model.
792 739
793740 - `text: string` - `OutputText object { text, type }`
794
795 The text input to the model.
796
797 - `type: "input_text"`
798
799 The type of the input item. Always `input_text`.
800
801 - `"input_text"`
802
803 - `OutputText = object { text, type }`
804 741
805 A text output from the model.742 A text output from the model.
806 743
814 751
815 - `"output_text"`752 - `"output_text"`
816 753
817754 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
818 755
819 An image input block used within EvalItem content arrays.756 An image input block used within EvalItem content arrays.
820 757
832 769
833 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.770 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
834 771
835772 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
836 773
837 An audio input to the model.774 An audio input to the model.
838 775
839 - `input_audio: object { data, format }`
840
841 - `data: string`
842
843 Base64-encoded audio data.
844
845 - `format: "mp3" or "wav"`
846
847 The format of the audio data. Currently supported formats are `mp3` and
848 `wav`.
849
850 - `"mp3"`
851
852 - `"wav"`
853
854 - `type: "input_audio"`
855
856 The type of the input item. Always `input_audio`.
857
858 - `"input_audio"`
859
860 - `GraderInputs = array of string or ResponseInputText or object { text, type } or 2 more`776 - `GraderInputs = array of string or ResponseInputText or object { text, type } or 2 more`
861 777
862 A list of inputs, each of which may be either an input text, output text, input778 A list of inputs, each of which may be either an input text, output text, input
863 image, or input audio object.779 image, or input audio object.
864 780
865 - `TextInput = string`
866
867 A text input to the model.
868
869 - `ResponseInputText = object { text, type }`
870
871 A text input to the model.
872
873 - `text: string`
874
875 The text input to the model.
876
877 - `type: "input_text"`
878
879 The type of the input item. Always `input_text`.
880
881 - `"input_text"`
882
883 - `OutputText = object { text, type }`
884
885 A text output from the model.
886
887 - `text: string`
888
889 The text output from the model.
890
891 - `type: "output_text"`
892
893 The type of the output text. Always `output_text`.
894
895 - `"output_text"`
896
897 - `InputImage = object { image_url, type, detail }`
898
899 An image input block used within EvalItem content arrays.
900
901 - `image_url: string`
902
903 The URL of the image input.
904
905 - `type: "input_image"`
906
907 The type of the image input. Always `input_image`.
908
909 - `"input_image"`
910
911 - `detail: optional string`
912
913 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
914
915 - `ResponseInputAudio = object { input_audio, type }`
916
917 An audio input to the model.
918
919 - `input_audio: object { data, format }`
920
921 - `data: string`
922
923 Base64-encoded audio data.
924
925 - `format: "mp3" or "wav"`
926
927 The format of the audio data. Currently supported formats are `mp3` and
928 `wav`.
929
930 - `"mp3"`
931
932 - `"wav"`
933
934 - `type: "input_audio"`
935
936 The type of the input item. Always `input_audio`.
937
938 - `"input_audio"`
939
940 - `role: "user" or "assistant" or "system" or "developer"`781 - `role: "user" or "assistant" or "system" or "developer"`
941 782
942 The role of the message input. One of `user`, `assistant`, `system`, or783 The role of the message input. One of `user`, `assistant`, `system`, or
962 803
963 - `"template"`804 - `"template"`
964 805
965806 - `InputMessagesItemReference = object { item_reference, type }` - `InputMessagesItemReference object { item_reference, type }`
966 807
967 - `item_reference: string`808 - `item_reference: string`
968 809
997 - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.838 - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
998 - `xhigh` is supported for all models after `gpt-5.1-codex-max`.839 - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
999 840
1000 - `"none"`
1001
1002 - `"minimal"`
1003
1004 - `"low"`
1005
1006 - `"medium"`
1007
1008 - `"high"`
1009
1010 - `"xhigh"`
1011
1012 - `seed: optional number`841 - `seed: optional number`
1013 842
1014 A seed value to initialize the randomness, during sampling.843 A seed value to initialize the randomness, during sampling.
1041 ensures the message the model generates is valid JSON. Using `json_schema`870 ensures the message the model generates is valid JSON. Using `json_schema`
1042 is preferred for models that support it.871 is preferred for models that support it.
1043 872
1044873 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
1045 874
1046 Default response format. Used to generate text responses.875 Default response format. Used to generate text responses.
1047 876
1048877 - `type: "text"` - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }`
1049
1050 The type of response format being defined. Always `text`.
1051
1052 - `"text"`
1053
1054 - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }`
1055 878
1056 JSON Schema response format. Used to generate structured JSON responses.879 JSON Schema response format. Used to generate structured JSON responses.
1057 Learn more about [Structured Outputs](/docs/guides/structured-outputs).880 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
1085 `strict` is `true`. To learn more, read the [Structured Outputs908 `strict` is `true`. To learn more, read the [Structured Outputs
1086 guide](/docs/guides/structured-outputs).909 guide](/docs/guides/structured-outputs).
1087 910
1088911 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
1089 912
1090 JSON object response format. An older method of generating JSON responses.913 JSON object response format. An older method of generating JSON responses.
1091 Using `json_schema` is recommended for models that support it. Note that the914 Using `json_schema` is recommended for models that support it. Note that the
1092 model will not generate JSON without a system or user message instructing it915 model will not generate JSON without a system or user message instructing it
1093 to do so.916 to do so.
1094 917
1095 - `type: "json_object"`
1096
1097 The type of response format being defined. Always `json_object`.
1098
1099 - `"json_object"`
1100
1101 - `tools: optional array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`918 - `tools: optional array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
1102 919
1103 An array of tools the model may call while generating a response. You920 An array of tools the model may call while generating a response. You
1113 enabling the model to call your own code. Learn more about930 enabling the model to call your own code. Learn more about
1114 [function calling](/docs/guides/function-calling).931 [function calling](/docs/guides/function-calling).
1115 932
1116933 - `Function = object { name, parameters, strict, 3 more }` - `Function object { name, parameters, strict, 3 more }`
1117 934
1118 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).935 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).
1119 936
1143 960
1144 A description of the function. Used by the model to determine whether or not to call the function.961 A description of the function. Used by the model to determine whether or not to call the function.
1145 962
1146963 - `FileSearch = object { type, vector_store_ids, filters, 2 more }` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
1147 964
1148 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).965 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).
1149 966
1161 978
1162 A filter to apply.979 A filter to apply.
1163 980
1164981 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1165 982
1166 A filter used to compare a specified attribute key to a given value using a defined comparison operation.983 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1167 984
1214 1031
1215 - `number`1032 - `number`
1216 1033
12171034 - `CompoundFilter = object { filters, type }` - `CompoundFilter object { filters, type }`
1218 1035
1219 Combine multiple filters using `and` or `or`.1036 Combine multiple filters using `and` or `or`.
1220 1037
1222 1039
1223 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.1040 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
1224 1041
12251042 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1226 1043
1227 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1044 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1228 1045
1229 - `key: string`
1230
1231 The key to compare against the value.
1232
1233 - `type: "eq" or "ne" or "gt" or 5 more`
1234
1235 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
1236
1237 - `eq`: equals
1238 - `ne`: not equal
1239 - `gt`: greater than
1240 - `gte`: greater than or equal
1241 - `lt`: less than
1242 - `lte`: less than or equal
1243 - `in`: in
1244 - `nin`: not in
1245
1246 - `"eq"`
1247
1248 - `"ne"`
1249
1250 - `"gt"`
1251
1252 - `"gte"`
1253
1254 - `"lt"`
1255
1256 - `"lte"`
1257
1258 - `"in"`
1259
1260 - `"nin"`
1261
1262 - `value: string or number or boolean or array of string or number`
1263
1264 The value to compare against the attribute key; supports string, number, or boolean types.
1265
1266 - `string`
1267
1268 - `number`
1269
1270 - `boolean`
1271
1272 - `array of string or number`
1273
1274 - `string`
1275
1276 - `number`
1277
1278 - `unknown`1046 - `unknown`
1279 1047
1280 - `type: "and" or "or"`1048 - `type: "and" or "or"`
1317 1085
1318 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.1086 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.
1319 1087
13201088 - `Computer = object { type }` - `Computer object { type }`
1321 1089
1322 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1090 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1323 1091
1327 1095
1328 - `"computer"`1096 - `"computer"`
1329 1097
13301098 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
1331 1099
1332 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1100 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1333 1101
1359 1127
1360 - `"computer_use_preview"`1128 - `"computer_use_preview"`
1361 1129
13621130 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
1363 1131
1364 Search the Internet for sources related to the prompt. Learn more about the1132 Search the Internet for sources related to the prompt. Learn more about the
1365 [web search tool](/docs/guides/tools-web-search).1133 [web search tool](/docs/guides/tools-web-search).
1419 1187
1420 - `"approximate"`1188 - `"approximate"`
1421 1189
14221190 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
1423 1191
1424 Give the model access to additional tools via remote Model Context Protocol1192 Give the model access to additional tools via remote Model Context Protocol
1425 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).1193 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
1442 1210
1443 A string array of allowed tool names1211 A string array of allowed tool names
1444 1212
14451213 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
1446 1214
1447 A filter object to specify which tools are allowed.1215 A filter object to specify which tools are allowed.
1448 1216
1508 1276
1509 Specify which of the MCP server's tools require approval.1277 Specify which of the MCP server's tools require approval.
1510 1278
15111279 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
1512 1280
1513 Specify which of the MCP server's tools require approval. Can be1281 Specify which of the MCP server's tools require approval. Can be
1514 `always`, `never`, or a filter object associated with tools1282 `always`, `never`, or a filter object associated with tools
1561 The URL for the MCP server. One of `server_url` or `connector_id` must be1329 The URL for the MCP server. One of `server_url` or `connector_id` must be
1562 provided.1330 provided.
1563 1331
15641332 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
1565 1333
1566 A tool that runs Python code to help generate a response to a prompt.1334 A tool that runs Python code to help generate a response to a prompt.
1567 1335
1575 1343
1576 The container ID.1344 The container ID.
1577 1345
15781346 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
1579 1347
1580 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.1348 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
1581 1349
1605 1373
1606 Network access policy for the container.1374 Network access policy for the container.
1607 1375
16081376 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
1609 1377
1610 - `type: "disabled"`1378 - `type: "disabled"`
1611 1379
1613 1381
1614 - `"disabled"`1382 - `"disabled"`
1615 1383
16161384 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
1617 1385
1618 - `allowed_domains: array of string`1386 - `allowed_domains: array of string`
1619 1387
1647 1415
1648 - `"code_interpreter"`1416 - `"code_interpreter"`
1649 1417
16501418 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
1651 1419
1652 A tool that generates images using the GPT image models.1420 A tool that generates images using the GPT image models.
1653 1421
1768 1536
1769 - `"auto"`1537 - `"auto"`
1770 1538
17711539 - `LocalShell = object { type }` - `LocalShell object { type }`
1772 1540
1773 A tool that allows the model to execute shell commands in a local environment.1541 A tool that allows the model to execute shell commands in a local environment.
1774 1542
1778 1546
1779 - `"local_shell"`1547 - `"local_shell"`
1780 1548
17811549 - `Shell = object { type, environment }` - `Shell object { type, environment }`
1782 1550
1783 A tool that allows the model to execute shell commands.1551 A tool that allows the model to execute shell commands.
1784 1552
1790 1558
1791 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`1559 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
1792 1560
17931561 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
1794 1562
1795 - `type: "container_auto"`1563 - `type: "container_auto"`
1796 1564
1818 1586
1819 Network access policy for the container.1587 Network access policy for the container.
1820 1588
18211589 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
1822
1823 - `type: "disabled"`
1824
1825 Disable outbound network access. Always `disabled`.
1826
1827 - `"disabled"`
1828
1829 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
1830
1831 - `allowed_domains: array of string`
1832
1833 A list of allowed domains when type is `allowlist`.
1834
1835 - `type: "allowlist"`
1836
1837 Allow outbound network access only to specified domains. Always `allowlist`.
1838
1839 - `"allowlist"`
1840
1841 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
1842
1843 Optional domain-scoped secrets for allowlisted domains.
1844
1845 - `domain: string`
1846
1847 The domain associated with the secret.
1848
1849 - `name: string`
1850 1590
18511591 The name of the secret to inject for the domain. - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
1852
1853 - `value: string`
1854
1855 The secret value to inject for the domain.
1856 1592
1857 - `skills: optional array of SkillReference or InlineSkill`1593 - `skills: optional array of SkillReference or InlineSkill`
1858 1594
1859 An optional list of skills referenced by id or inline data.1595 An optional list of skills referenced by id or inline data.
1860 1596
18611597 - `SkillReference = object { skill_id, type, version }` - `SkillReference object { skill_id, type, version }`
1862 1598
1863 - `skill_id: string`1599 - `skill_id: string`
1864 1600
1874 1610
1875 Optional skill version. Use a positive integer or 'latest'. Omit for default.1611 Optional skill version. Use a positive integer or 'latest'. Omit for default.
1876 1612
18771613 - `InlineSkill = object { description, name, source, type }` - `InlineSkill object { description, name, source, type }`
1878 1614
1879 - `description: string`1615 - `description: string`
1880 1616
1910 1646
1911 - `"inline"`1647 - `"inline"`
1912 1648
19131649 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
1914 1650
1915 - `type: "local"`1651 - `type: "local"`
1916 1652
1934 1670
1935 The path to the directory containing the skill.1671 The path to the directory containing the skill.
1936 1672
19371673 - `ContainerReference = object { container_id, type }` - `ContainerReference object { container_id, type }`
1938 1674
1939 - `container_id: string`1675 - `container_id: string`
1940 1676
1946 1682
1947 - `"container_reference"`1683 - `"container_reference"`
1948 1684
19491685 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
1950 1686
1951 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1687 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
1952 1688
1972 1708
1973 The input format for the custom tool. Default is unconstrained text.1709 The input format for the custom tool. Default is unconstrained text.
1974 1710
19751711 - `Text = object { type }` - `Text object { type }`
1976 1712
1977 Unconstrained free-form text.1713 Unconstrained free-form text.
1978 1714
1982 1718
1983 - `"text"`1719 - `"text"`
1984 1720
19851721 - `Grammar = object { definition, syntax, type }` - `Grammar object { definition, syntax, type }`
1986 1722
1987 A grammar defined by the user.1723 A grammar defined by the user.
1988 1724
2004 1740
2005 - `"grammar"`1741 - `"grammar"`
2006 1742
20071743 - `Namespace = object { description, name, tools, type }` - `Namespace object { description, name, tools, type }`
2008 1744
2009 Groups function/custom tools under a shared namespace.1745 Groups function/custom tools under a shared namespace.
2010 1746
2020 1756
2021 The function/custom tools available inside this namespace.1757 The function/custom tools available inside this namespace.
2022 1758
20231759 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
2024 1760
2025 - `name: string`1761 - `name: string`
2026 1762
2038 1774
2039 - `strict: optional boolean`1775 - `strict: optional boolean`
2040 1776
20411777 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2042 1778
2043 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1779 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2044 1780
2064 1800
2065 The input format for the custom tool. Default is unconstrained text.1801 The input format for the custom tool. Default is unconstrained text.
2066 1802
2067 - `Text = object { type }`
2068
2069 Unconstrained free-form text.
2070
2071 - `type: "text"`
2072
2073 Unconstrained text format. Always `text`.
2074
2075 - `"text"`
2076
2077 - `Grammar = object { definition, syntax, type }`
2078
2079 A grammar defined by the user.
2080
2081 - `definition: string`
2082
2083 The grammar definition.
2084
2085 - `syntax: "lark" or "regex"`
2086
2087 The syntax of the grammar definition. One of `lark` or `regex`.
2088
2089 - `"lark"`
2090
2091 - `"regex"`
2092
2093 - `type: "grammar"`
2094
2095 Grammar format. Always `grammar`.
2096
2097 - `"grammar"`
2098
2099 - `type: "namespace"`1803 - `type: "namespace"`
2100 1804
2101 The type of the tool. Always `namespace`.1805 The type of the tool. Always `namespace`.
2102 1806
2103 - `"namespace"`1807 - `"namespace"`
2104 1808
21051809 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
2106 1810
2107 Hosted or BYOT tool search configuration for deferred tools.1811 Hosted or BYOT tool search configuration for deferred tools.
2108 1812
2128 1832
2129 Parameter schema for a client-executed tool search tool.1833 Parameter schema for a client-executed tool search tool.
2130 1834
21311835 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
2132 1836
2133 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).1837 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).
2134 1838
2182 1886
2183 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.1887 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2184 1888
21851889 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
2186 1890
2187 Allows the assistant to create, delete, or update files using unified diffs.1891 Allows the assistant to create, delete, or update files using unified diffs.
2188 1892
22 22
23### Returns23### Returns
24 24
2525- `FileObject = object { id, bytes, created_at, 6 more }`- `FileObject object { id, bytes, created_at, 6 more }`
26 26
27 The `File` object represents a document that has been uploaded to OpenAI.27 The `File` object represents a document that has been uploaded to OpenAI.
28 28
10 10
11### Returns11### Returns
12 12
1313- `FileDeleted = object { id, deleted, object }`- `FileDeleted object { id, deleted, object }`
14 14
15 - `id: string`15 - `id: string`
16 16
10 10
11### Returns11### Returns
12 12
1313- `FileObject = object { id, bytes, created_at, 6 more }`- `FileObject object { id, bytes, created_at, 6 more }`
14 14
15 The `File` object represents a document that has been uploaded to OpenAI.15 The `File` object represents a document that has been uploaded to OpenAI.
16 16
258 258
259 The grader used for the fine-tuning job.259 The grader used for the fine-tuning job.
260 260
261261 - `StringCheckGrader = object { input, name, operation, 2 more }` - `StringCheckGrader object { input, name, operation, 2 more }`
262 262
263 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.263 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
264 264
292 292
293 - `"string_check"`293 - `"string_check"`
294 294
295295 - `TextSimilarityGrader = object { evaluation_metric, input, name, 2 more }` - `TextSimilarityGrader object { evaluation_metric, input, name, 2 more }`
296 296
297 A TextSimilarityGrader object which grades text based on similarity metrics.297 A TextSimilarityGrader object which grades text based on similarity metrics.
298 298
342 342
343 - `"text_similarity"`343 - `"text_similarity"`
344 344
345345 - `PythonGrader = object { name, source, type, image_tag }` - `PythonGrader object { name, source, type, image_tag }`
346 346
347 A PythonGrader object that runs a python script on the input.347 A PythonGrader object that runs a python script on the input.
348 348
364 364
365 The image tag to use for the python script.365 The image tag to use for the python script.
366 366
367367 - `ScoreModelGrader = object { input, model, name, 3 more }` - `ScoreModelGrader object { input, model, name, 3 more }`
368 368
369 A ScoreModelGrader object that uses a model to assign a score to the input.369 A ScoreModelGrader object that uses a model to assign a score to the input.
370 370
380 380
381 A text input to the model.381 A text input to the model.
382 382
383383 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
384 384
385 A text input to the model.385 A text input to the model.
386 386
394 394
395 - `"input_text"`395 - `"input_text"`
396 396
397397 - `OutputText = object { text, type }` - `OutputText object { text, type }`
398 398
399 A text output from the model.399 A text output from the model.
400 400
408 408
409 - `"output_text"`409 - `"output_text"`
410 410
411411 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
412 412
413 An image input block used within EvalItem content arrays.413 An image input block used within EvalItem content arrays.
414 414
426 426
427 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.427 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
428 428
429429 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
430 430
431 An audio input to the model.431 An audio input to the model.
432 432
460 460
461 A text input to the model.461 A text input to the model.
462 462
463463 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
464 464
465 A text input to the model.465 A text input to the model.
466 466
467467 - `text: string` - `OutputText object { text, type }`
468
469 The text input to the model.
470
471 - `type: "input_text"`
472
473 The type of the input item. Always `input_text`.
474
475 - `"input_text"`
476
477 - `OutputText = object { text, type }`
478 468
479 A text output from the model.469 A text output from the model.
480 470
488 478
489 - `"output_text"`479 - `"output_text"`
490 480
491481 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
492 482
493 An image input block used within EvalItem content arrays.483 An image input block used within EvalItem content arrays.
494 484
506 496
507 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.497 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
508 498
509499 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
510 500
511 An audio input to the model.501 An audio input to the model.
512 502
513 - `input_audio: object { data, format }`
514
515 - `data: string`
516
517 Base64-encoded audio data.
518
519 - `format: "mp3" or "wav"`
520
521 The format of the audio data. Currently supported formats are `mp3` and
522 `wav`.
523
524 - `"mp3"`
525
526 - `"wav"`
527
528 - `type: "input_audio"`
529
530 The type of the input item. Always `input_audio`.
531
532 - `"input_audio"`
533
534 - `role: "user" or "assistant" or "system" or "developer"`503 - `role: "user" or "assistant" or "system" or "developer"`
535 504
536 The role of the message input. One of `user`, `assistant`, `system`, or505 The role of the message input. One of `user`, `assistant`, `system`, or
613 582
614 An alternative to temperature for nucleus sampling; 1.0 includes all tokens.583 An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
615 584
616585 - `MultiGrader = object { calculate_output, graders, name, type }` - `MultiGrader object { calculate_output, graders, name, type }`
617 586
618 A MultiGrader object combines the output of multiple graders to produce a single score.587 A MultiGrader object combines the output of multiple graders to produce a single score.
619 588
625 594
626 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.595 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
627 596
628597 - `StringCheckGrader = object { input, name, operation, 2 more }` - `StringCheckGrader object { input, name, operation, 2 more }`
629 598
630 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.599 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
631 600
632601 - `input: string` - `TextSimilarityGrader object { evaluation_metric, input, name, 2 more }`
633
634 The input text. This may include template strings.
635
636 - `name: string`
637
638 The name of the grader.
639
640 - `operation: "eq" or "ne" or "like" or "ilike"`
641
642 The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.
643
644 - `"eq"`
645
646 - `"ne"`
647
648 - `"like"`
649
650 - `"ilike"`
651
652 - `reference: string`
653
654 The reference text. This may include template strings.
655
656 - `type: "string_check"`
657
658 The object type, which is always `string_check`.
659
660 - `"string_check"`
661
662 - `TextSimilarityGrader = object { evaluation_metric, input, name, 2 more }`
663 602
664 A TextSimilarityGrader object which grades text based on similarity metrics.603 A TextSimilarityGrader object which grades text based on similarity metrics.
665 604
666605 - `evaluation_metric: "cosine" or "fuzzy_match" or "bleu" or 8 more` - `PythonGrader object { name, source, type, image_tag }`
667
668 The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,
669 `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,
670 or `rouge_l`.
671
672 - `"cosine"`
673
674 - `"fuzzy_match"`
675
676 - `"bleu"`
677
678 - `"gleu"`
679
680 - `"meteor"`
681
682 - `"rouge_1"`
683
684 - `"rouge_2"`
685
686 - `"rouge_3"`
687
688 - `"rouge_4"`
689
690 - `"rouge_5"`
691
692 - `"rouge_l"`
693
694 - `input: string`
695
696 The text being graded.
697
698 - `name: string`
699
700 The name of the grader.
701
702 - `reference: string`
703
704 The text being graded against.
705
706 - `type: "text_similarity"`
707
708 The type of grader.
709
710 - `"text_similarity"`
711
712 - `PythonGrader = object { name, source, type, image_tag }`
713 606
714 A PythonGrader object that runs a python script on the input.607 A PythonGrader object that runs a python script on the input.
715 608
716609 - `name: string` - `ScoreModelGrader object { input, model, name, 3 more }`
717
718 The name of the grader.
719
720 - `source: string`
721
722 The source code of the python script.
723
724 - `type: "python"`
725
726 The object type, which is always `python`.
727
728 - `"python"`
729
730 - `image_tag: optional string`
731
732 The image tag to use for the python script.
733
734 - `ScoreModelGrader = object { input, model, name, 3 more }`
735 610
736 A ScoreModelGrader object that uses a model to assign a score to the input.611 A ScoreModelGrader object that uses a model to assign a score to the input.
737 612
738613 - `input: array of object { content, role, type }` - `LabelModelGrader object { input, labels, model, 3 more }`
739
740 The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.
741
742 - `content: string or ResponseInputText or object { text, type } or 3 more`
743
744 Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
745
746 - `TextInput = string`
747
748 A text input to the model.
749
750 - `ResponseInputText = object { text, type }`
751
752 A text input to the model.
753
754 - `text: string`
755
756 The text input to the model.
757
758 - `type: "input_text"`
759
760 The type of the input item. Always `input_text`.
761
762 - `"input_text"`
763
764 - `OutputText = object { text, type }`
765
766 A text output from the model.
767
768 - `text: string`
769
770 The text output from the model.
771
772 - `type: "output_text"`
773
774 The type of the output text. Always `output_text`.
775
776 - `"output_text"`
777
778 - `InputImage = object { image_url, type, detail }`
779
780 An image input block used within EvalItem content arrays.
781
782 - `image_url: string`
783
784 The URL of the image input.
785
786 - `type: "input_image"`
787
788 The type of the image input. Always `input_image`.
789
790 - `"input_image"`
791
792 - `detail: optional string`
793
794 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
795
796 - `ResponseInputAudio = object { input_audio, type }`
797
798 An audio input to the model.
799
800 - `input_audio: object { data, format }`
801
802 - `data: string`
803
804 Base64-encoded audio data.
805
806 - `format: "mp3" or "wav"`
807
808 The format of the audio data. Currently supported formats are `mp3` and
809 `wav`.
810
811 - `"mp3"`
812
813 - `"wav"`
814
815 - `type: "input_audio"`
816
817 The type of the input item. Always `input_audio`.
818
819 - `"input_audio"`
820
821 - `GraderInputs = array of string or ResponseInputText or object { text, type } or 2 more`
822
823 A list of inputs, each of which may be either an input text, output text, input
824 image, or input audio object.
825
826 - `TextInput = string`
827
828 A text input to the model.
829
830 - `ResponseInputText = object { text, type }`
831
832 A text input to the model.
833
834 - `text: string`
835
836 The text input to the model.
837
838 - `type: "input_text"`
839
840 The type of the input item. Always `input_text`.
841
842 - `"input_text"`
843
844 - `OutputText = object { text, type }`
845
846 A text output from the model.
847
848 - `text: string`
849
850 The text output from the model.
851
852 - `type: "output_text"`
853
854 The type of the output text. Always `output_text`.
855
856 - `"output_text"`
857
858 - `InputImage = object { image_url, type, detail }`
859
860 An image input block used within EvalItem content arrays.
861
862 - `image_url: string`
863
864 The URL of the image input.
865
866 - `type: "input_image"`
867
868 The type of the image input. Always `input_image`.
869
870 - `"input_image"`
871
872 - `detail: optional string`
873
874 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
875
876 - `ResponseInputAudio = object { input_audio, type }`
877
878 An audio input to the model.
879
880 - `input_audio: object { data, format }`
881
882 - `data: string`
883
884 Base64-encoded audio data.
885
886 - `format: "mp3" or "wav"`
887
888 The format of the audio data. Currently supported formats are `mp3` and
889 `wav`.
890
891 - `"mp3"`
892
893 - `"wav"`
894
895 - `type: "input_audio"`
896
897 The type of the input item. Always `input_audio`.
898
899 - `"input_audio"`
900
901 - `role: "user" or "assistant" or "system" or "developer"`
902
903 The role of the message input. One of `user`, `assistant`, `system`, or
904 `developer`.
905
906 - `"user"`
907
908 - `"assistant"`
909
910 - `"system"`
911
912 - `"developer"`
913
914 - `type: optional "message"`
915
916 The type of the message input. Always `message`.
917
918 - `"message"`
919
920 - `model: string`
921
922 The model to use for the evaluation.
923
924 - `name: string`
925
926 The name of the grader.
927
928 - `type: "score_model"`
929
930 The object type, which is always `score_model`.
931
932 - `"score_model"`
933
934 - `range: optional array of number`
935
936 The range of the score. Defaults to `[0, 1]`.
937
938 - `sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more }`
939
940 The sampling parameters for the model.
941
942 - `max_completions_tokens: optional number`
943
944 The maximum number of tokens the grader model may generate in its response.
945
946 - `reasoning_effort: optional ReasoningEffort`
947
948 Constrains effort on reasoning for
949 [reasoning models](https://platform.openai.com/docs/guides/reasoning).
950 Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing
951 reasoning effort can result in faster responses and fewer tokens used
952 on reasoning in a response.
953
954 - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
955 - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
956 - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
957 - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
958
959 - `"none"`
960
961 - `"minimal"`
962
963 - `"low"`
964
965 - `"medium"`
966
967 - `"high"`
968
969 - `"xhigh"`
970
971 - `seed: optional number`
972
973 A seed value to initialize the randomness, during sampling.
974
975 - `temperature: optional number`
976
977 A higher temperature increases randomness in the outputs.
978
979 - `top_p: optional number`
980
981 An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
982
983 - `LabelModelGrader = object { input, labels, model, 3 more }`
984 614
985 A LabelModelGrader object which uses a model to assign labels to each item615 A LabelModelGrader object which uses a model to assign labels to each item
986 in the evaluation.616 in the evaluation.
995 625
996 A text input to the model.626 A text input to the model.
997 627
998628 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
999 629
1000 A text input to the model.630 A text input to the model.
1001 631
1002632 - `text: string` - `OutputText object { text, type }`
1003
1004 The text input to the model.
1005
1006 - `type: "input_text"`
1007
1008 The type of the input item. Always `input_text`.
1009
1010 - `"input_text"`
1011
1012 - `OutputText = object { text, type }`
1013 633
1014 A text output from the model.634 A text output from the model.
1015 635
1023 643
1024 - `"output_text"`644 - `"output_text"`
1025 645
1026646 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
1027 647
1028 An image input block used within EvalItem content arrays.648 An image input block used within EvalItem content arrays.
1029 649
1041 661
1042 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.662 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
1043 663
1044664 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
1045 665
1046 An audio input to the model.666 An audio input to the model.
1047 667
1048 - `input_audio: object { data, format }`
1049
1050 - `data: string`
1051
1052 Base64-encoded audio data.
1053
1054 - `format: "mp3" or "wav"`
1055
1056 The format of the audio data. Currently supported formats are `mp3` and
1057 `wav`.
1058
1059 - `"mp3"`
1060
1061 - `"wav"`
1062
1063 - `type: "input_audio"`
1064
1065 The type of the input item. Always `input_audio`.
1066
1067 - `"input_audio"`
1068
1069 - `GraderInputs = array of string or ResponseInputText or object { text, type } or 2 more`668 - `GraderInputs = array of string or ResponseInputText or object { text, type } or 2 more`
1070 669
1071 A list of inputs, each of which may be either an input text, output text, input670 A list of inputs, each of which may be either an input text, output text, input
1072 image, or input audio object.671 image, or input audio object.
1073 672
1074 - `TextInput = string`
1075
1076 A text input to the model.
1077
1078 - `ResponseInputText = object { text, type }`
1079
1080 A text input to the model.
1081
1082 - `text: string`
1083
1084 The text input to the model.
1085
1086 - `type: "input_text"`
1087
1088 The type of the input item. Always `input_text`.
1089
1090 - `"input_text"`
1091
1092 - `OutputText = object { text, type }`
1093
1094 A text output from the model.
1095
1096 - `text: string`
1097
1098 The text output from the model.
1099
1100 - `type: "output_text"`
1101
1102 The type of the output text. Always `output_text`.
1103
1104 - `"output_text"`
1105
1106 - `InputImage = object { image_url, type, detail }`
1107
1108 An image input block used within EvalItem content arrays.
1109
1110 - `image_url: string`
1111
1112 The URL of the image input.
1113
1114 - `type: "input_image"`
1115
1116 The type of the image input. Always `input_image`.
1117
1118 - `"input_image"`
1119
1120 - `detail: optional string`
1121
1122 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
1123
1124 - `ResponseInputAudio = object { input_audio, type }`
1125
1126 An audio input to the model.
1127
1128 - `input_audio: object { data, format }`
1129
1130 - `data: string`
1131
1132 Base64-encoded audio data.
1133
1134 - `format: "mp3" or "wav"`
1135
1136 The format of the audio data. Currently supported formats are `mp3` and
1137 `wav`.
1138
1139 - `"mp3"`
1140
1141 - `"wav"`
1142
1143 - `type: "input_audio"`
1144
1145 The type of the input item. Always `input_audio`.
1146
1147 - `"input_audio"`
1148
1149 - `role: "user" or "assistant" or "system" or "developer"`673 - `role: "user" or "assistant" or "system" or "developer"`
1150 674
1151 The role of the message input. One of `user`, `assistant`, `system`, or675 The role of the message input. One of `user`, `assistant`, `system`, or
15 15
16 A text input to the model.16 A text input to the model.
17 17
1818 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
19 19
20 A text input to the model.20 A text input to the model.
21 21
29 29
30 - `"input_text"`30 - `"input_text"`
31 31
3232 - `OutputText = object { text, type }` - `OutputText object { text, type }`
33 33
34 A text output from the model.34 A text output from the model.
35 35
43 43
44 - `"output_text"`44 - `"output_text"`
45 45
4646 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
47 47
48 An image input block used within EvalItem content arrays.48 An image input block used within EvalItem content arrays.
49 49
61 61
62 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.62 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
63 63
6464 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
65 65
66 An audio input to the model.66 An audio input to the model.
67 67
88 88
89### Label Model Grader89### Label Model Grader
90 90
9191- `LabelModelGrader = object { input, labels, model, 3 more }`- `LabelModelGrader object { input, labels, model, 3 more }`
92 92
93 A LabelModelGrader object which uses a model to assign labels to each item93 A LabelModelGrader object which uses a model to assign labels to each item
94 in the evaluation.94 in the evaluation.
103 103
104 A text input to the model.104 A text input to the model.
105 105
106106 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
107 107
108 A text input to the model.108 A text input to the model.
109 109
117 117
118 - `"input_text"`118 - `"input_text"`
119 119
120120 - `OutputText = object { text, type }` - `OutputText object { text, type }`
121 121
122 A text output from the model.122 A text output from the model.
123 123
131 131
132 - `"output_text"`132 - `"output_text"`
133 133
134134 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
135 135
136 An image input block used within EvalItem content arrays.136 An image input block used within EvalItem content arrays.
137 137
149 149
150 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.150 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
151 151
152152 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
153 153
154 An audio input to the model.154 An audio input to the model.
155 155
183 183
184 A text input to the model.184 A text input to the model.
185 185
186186 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
187 187
188 A text input to the model.188 A text input to the model.
189 189
190190 - `text: string` - `OutputText object { text, type }`
191
192 The text input to the model.
193
194 - `type: "input_text"`
195
196 The type of the input item. Always `input_text`.
197
198 - `"input_text"`
199
200 - `OutputText = object { text, type }`
201 191
202 A text output from the model.192 A text output from the model.
203 193
211 201
212 - `"output_text"`202 - `"output_text"`
213 203
214204 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
215 205
216 An image input block used within EvalItem content arrays.206 An image input block used within EvalItem content arrays.
217 207
229 219
230 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.220 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
231 221
232222 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
233 223
234 An audio input to the model.224 An audio input to the model.
235 225
236 - `input_audio: object { data, format }`
237
238 - `data: string`
239
240 Base64-encoded audio data.
241
242 - `format: "mp3" or "wav"`
243
244 The format of the audio data. Currently supported formats are `mp3` and
245 `wav`.
246
247 - `"mp3"`
248
249 - `"wav"`
250
251 - `type: "input_audio"`
252
253 The type of the input item. Always `input_audio`.
254
255 - `"input_audio"`
256
257 - `role: "user" or "assistant" or "system" or "developer"`226 - `role: "user" or "assistant" or "system" or "developer"`
258 227
259 The role of the message input. One of `user`, `assistant`, `system`, or228 The role of the message input. One of `user`, `assistant`, `system`, or
297 266
298### Multi Grader267### Multi Grader
299 268
300269- `MultiGrader = object { calculate_output, graders, name, type }`- `MultiGrader object { calculate_output, graders, name, type }`
301 270
302 A MultiGrader object combines the output of multiple graders to produce a single score.271 A MultiGrader object combines the output of multiple graders to produce a single score.
303 272
309 278
310 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.279 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
311 280
312281 - `StringCheckGrader = object { input, name, operation, 2 more }` - `StringCheckGrader object { input, name, operation, 2 more }`
313 282
314 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.283 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
315 284
343 312
344 - `"string_check"`313 - `"string_check"`
345 314
346315 - `TextSimilarityGrader = object { evaluation_metric, input, name, 2 more }` - `TextSimilarityGrader object { evaluation_metric, input, name, 2 more }`
347 316
348 A TextSimilarityGrader object which grades text based on similarity metrics.317 A TextSimilarityGrader object which grades text based on similarity metrics.
349 318
393 362
394 - `"text_similarity"`363 - `"text_similarity"`
395 364
396365 - `PythonGrader = object { name, source, type, image_tag }` - `PythonGrader object { name, source, type, image_tag }`
397 366
398 A PythonGrader object that runs a python script on the input.367 A PythonGrader object that runs a python script on the input.
399 368
415 384
416 The image tag to use for the python script.385 The image tag to use for the python script.
417 386
418387 - `ScoreModelGrader = object { input, model, name, 3 more }` - `ScoreModelGrader object { input, model, name, 3 more }`
419 388
420 A ScoreModelGrader object that uses a model to assign a score to the input.389 A ScoreModelGrader object that uses a model to assign a score to the input.
421 390
431 400
432 A text input to the model.401 A text input to the model.
433 402
434403 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
435 404
436 A text input to the model.405 A text input to the model.
437 406
445 414
446 - `"input_text"`415 - `"input_text"`
447 416
448417 - `OutputText = object { text, type }` - `OutputText object { text, type }`
449 418
450 A text output from the model.419 A text output from the model.
451 420
459 428
460 - `"output_text"`429 - `"output_text"`
461 430
462431 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
463 432
464 An image input block used within EvalItem content arrays.433 An image input block used within EvalItem content arrays.
465 434
477 446
478 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.447 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
479 448
480449 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
481 450
482 An audio input to the model.451 An audio input to the model.
483 452
511 480
512 A text input to the model.481 A text input to the model.
513 482
514483 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
515 484
516 A text input to the model.485 A text input to the model.
517 486
518487 - `text: string` - `OutputText object { text, type }`
519
520 The text input to the model.
521
522 - `type: "input_text"`
523
524 The type of the input item. Always `input_text`.
525
526 - `"input_text"`
527
528 - `OutputText = object { text, type }`
529 488
530 A text output from the model.489 A text output from the model.
531 490
539 498
540 - `"output_text"`499 - `"output_text"`
541 500
542501 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
543 502
544 An image input block used within EvalItem content arrays.503 An image input block used within EvalItem content arrays.
545 504
557 516
558 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.517 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
559 518
560519 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
561 520
562 An audio input to the model.521 An audio input to the model.
563 522
564 - `input_audio: object { data, format }`
565
566 - `data: string`
567
568 Base64-encoded audio data.
569
570 - `format: "mp3" or "wav"`
571
572 The format of the audio data. Currently supported formats are `mp3` and
573 `wav`.
574
575 - `"mp3"`
576
577 - `"wav"`
578
579 - `type: "input_audio"`
580
581 The type of the input item. Always `input_audio`.
582
583 - `"input_audio"`
584
585 - `role: "user" or "assistant" or "system" or "developer"`523 - `role: "user" or "assistant" or "system" or "developer"`
586 524
587 The role of the message input. One of `user`, `assistant`, `system`, or525 The role of the message input. One of `user`, `assistant`, `system`, or
664 602
665 An alternative to temperature for nucleus sampling; 1.0 includes all tokens.603 An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
666 604
667605 - `LabelModelGrader = object { input, labels, model, 3 more }` - `LabelModelGrader object { input, labels, model, 3 more }`
668 606
669 A LabelModelGrader object which uses a model to assign labels to each item607 A LabelModelGrader object which uses a model to assign labels to each item
670 in the evaluation.608 in the evaluation.
679 617
680 A text input to the model.618 A text input to the model.
681 619
682620 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
683 621
684 A text input to the model.622 A text input to the model.
685 623
686624 - `text: string` - `OutputText object { text, type }`
687
688 The text input to the model.
689
690 - `type: "input_text"`
691
692 The type of the input item. Always `input_text`.
693
694 - `"input_text"`
695
696 - `OutputText = object { text, type }`
697 625
698 A text output from the model.626 A text output from the model.
699 627
707 635
708 - `"output_text"`636 - `"output_text"`
709 637
710638 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
711 639
712 An image input block used within EvalItem content arrays.640 An image input block used within EvalItem content arrays.
713 641
725 653
726 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.654 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
727 655
728656 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
729 657
730 An audio input to the model.658 An audio input to the model.
731 659
732 - `input_audio: object { data, format }`
733
734 - `data: string`
735
736 Base64-encoded audio data.
737
738 - `format: "mp3" or "wav"`
739
740 The format of the audio data. Currently supported formats are `mp3` and
741 `wav`.
742
743 - `"mp3"`
744
745 - `"wav"`
746
747 - `type: "input_audio"`
748
749 The type of the input item. Always `input_audio`.
750
751 - `"input_audio"`
752
753 - `GraderInputs = array of string or ResponseInputText or object { text, type } or 2 more`660 - `GraderInputs = array of string or ResponseInputText or object { text, type } or 2 more`
754 661
755 A list of inputs, each of which may be either an input text, output text, input662 A list of inputs, each of which may be either an input text, output text, input
756 image, or input audio object.663 image, or input audio object.
757 664
758 - `TextInput = string`
759
760 A text input to the model.
761
762 - `ResponseInputText = object { text, type }`
763
764 A text input to the model.
765
766 - `text: string`
767
768 The text input to the model.
769
770 - `type: "input_text"`
771
772 The type of the input item. Always `input_text`.
773
774 - `"input_text"`
775
776 - `OutputText = object { text, type }`
777
778 A text output from the model.
779
780 - `text: string`
781
782 The text output from the model.
783
784 - `type: "output_text"`
785
786 The type of the output text. Always `output_text`.
787
788 - `"output_text"`
789
790 - `InputImage = object { image_url, type, detail }`
791
792 An image input block used within EvalItem content arrays.
793
794 - `image_url: string`
795
796 The URL of the image input.
797
798 - `type: "input_image"`
799
800 The type of the image input. Always `input_image`.
801
802 - `"input_image"`
803
804 - `detail: optional string`
805
806 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
807
808 - `ResponseInputAudio = object { input_audio, type }`
809
810 An audio input to the model.
811
812 - `input_audio: object { data, format }`
813
814 - `data: string`
815
816 Base64-encoded audio data.
817
818 - `format: "mp3" or "wav"`
819
820 The format of the audio data. Currently supported formats are `mp3` and
821 `wav`.
822
823 - `"mp3"`
824
825 - `"wav"`
826
827 - `type: "input_audio"`
828
829 The type of the input item. Always `input_audio`.
830
831 - `"input_audio"`
832
833 - `role: "user" or "assistant" or "system" or "developer"`665 - `role: "user" or "assistant" or "system" or "developer"`
834 666
835 The role of the message input. One of `user`, `assistant`, `system`, or667 The role of the message input. One of `user`, `assistant`, `system`, or
883 715
884### Python Grader716### Python Grader
885 717
886718- `PythonGrader = object { name, source, type, image_tag }`- `PythonGrader object { name, source, type, image_tag }`
887 719
888 A PythonGrader object that runs a python script on the input.720 A PythonGrader object that runs a python script on the input.
889 721
907 739
908### Score Model Grader740### Score Model Grader
909 741
910742- `ScoreModelGrader = object { input, model, name, 3 more }`- `ScoreModelGrader object { input, model, name, 3 more }`
911 743
912 A ScoreModelGrader object that uses a model to assign a score to the input.744 A ScoreModelGrader object that uses a model to assign a score to the input.
913 745
923 755
924 A text input to the model.756 A text input to the model.
925 757
926758 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
927 759
928 A text input to the model.760 A text input to the model.
929 761
937 769
938 - `"input_text"`770 - `"input_text"`
939 771
940772 - `OutputText = object { text, type }` - `OutputText object { text, type }`
941 773
942 A text output from the model.774 A text output from the model.
943 775
951 783
952 - `"output_text"`784 - `"output_text"`
953 785
954786 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
955 787
956 An image input block used within EvalItem content arrays.788 An image input block used within EvalItem content arrays.
957 789
969 801
970 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.802 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
971 803
972804 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
973 805
974 An audio input to the model.806 An audio input to the model.
975 807
1003 835
1004 A text input to the model.836 A text input to the model.
1005 837
1006838 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
1007 839
1008 A text input to the model.840 A text input to the model.
1009 841
1010842 - `text: string` - `OutputText object { text, type }`
1011
1012 The text input to the model.
1013
1014 - `type: "input_text"`
1015
1016 The type of the input item. Always `input_text`.
1017
1018 - `"input_text"`
1019
1020 - `OutputText = object { text, type }`
1021 843
1022 A text output from the model.844 A text output from the model.
1023 845
1031 853
1032 - `"output_text"`854 - `"output_text"`
1033 855
1034856 - `InputImage = object { image_url, type, detail }` - `InputImage object { image_url, type, detail }`
1035 857
1036 An image input block used within EvalItem content arrays.858 An image input block used within EvalItem content arrays.
1037 859
1049 871
1050 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.872 The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.
1051 873
1052874 - `ResponseInputAudio = object { input_audio, type }` - `ResponseInputAudio object { input_audio, type }`
1053 875
1054 An audio input to the model.876 An audio input to the model.
1055 877
1056 - `input_audio: object { data, format }`
1057
1058 - `data: string`
1059
1060 Base64-encoded audio data.
1061
1062 - `format: "mp3" or "wav"`
1063
1064 The format of the audio data. Currently supported formats are `mp3` and
1065 `wav`.
1066
1067 - `"mp3"`
1068
1069 - `"wav"`
1070
1071 - `type: "input_audio"`
1072
1073 The type of the input item. Always `input_audio`.
1074
1075 - `"input_audio"`
1076
1077 - `role: "user" or "assistant" or "system" or "developer"`878 - `role: "user" or "assistant" or "system" or "developer"`
1078 879
1079 The role of the message input. One of `user`, `assistant`, `system`, or880 The role of the message input. One of `user`, `assistant`, `system`, or
1158 959
1159### String Check Grader960### String Check Grader
1160 961
1161962- `StringCheckGrader = object { input, name, operation, 2 more }`- `StringCheckGrader object { input, name, operation, 2 more }`
1162 963
1163 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.964 A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
1164 965
1194 995
1195### Text Similarity Grader996### Text Similarity Grader
1196 997
1197998- `TextSimilarityGrader = object { evaluation_metric, input, name, 2 more }`- `TextSimilarityGrader object { evaluation_metric, input, name, 2 more }`
1198 999
1199 A TextSimilarityGrader object which grades text based on similarity metrics.1000 A TextSimilarityGrader object which grades text based on similarity metrics.
1200 1001
6 6
7### Returns7### Returns
8 8
99- `ImagesResponse = object { created, background, data, 4 more }`- `ImagesResponse object { created, background, data, 4 more }`
10 10
11 The response from the image generation endpoint.11 The response from the image generation endpoint.
12 12
10 10
11### Returns11### Returns
12 12
1313- `ModelDeleted = object { id, deleted, object }`- `ModelDeleted object { id, deleted, object }`
14 14
15 - `id: string`15 - `id: string`
16 16
10 10
11### Returns11### Returns
12 12
1313- `Model = object { id, created, object, owned_by }`- `Model object { id, created, object, owned_by }`
14 14
15 Describes an OpenAI model offering that can be used with the API.15 Describes an OpenAI model offering that can be used with the API.
16 16
Previously: resources/organization/subresources/audit_logs/subresources/admin_api_keys/methods/create/index.md
Previously: resources/organization/subresources/audit_logs/subresources/admin_api_keys/methods/delete/index.md
Previously: resources/organization/subresources/audit_logs/subresources/admin_api_keys/methods/list/index.md
Previously: resources/organization/subresources/audit_logs/subresources/admin_api_keys/methods/retrieve/index.md
36 36
37### Returns37### Returns
38 38
3939- `Invite = object { id, email, expires_at, 6 more }`- `Invite object { id, email, expires_at, 6 more }`
40 40
41 Represents an individual `invite` to the organization.41 Represents an individual `invite` to the organization.
42 42
10 10
11### Returns11### Returns
12 12
1313- `Invite = object { id, email, expires_at, 6 more }`- `Invite object { id, email, expires_at, 6 more }`
14 14
15 Represents an individual `invite` to the organization.15 Represents an individual `invite` to the organization.
16 16
32 32
33### Returns33### Returns
34 34
3535- `Project = object { id, created_at, name, 3 more }`- `Project object { id, created_at, name, 3 more }`
36 36
37 Represents an individual project.37 Represents an individual project.
38 38
10 10
11### Returns11### Returns
12 12
1313- `Project = object { id, created_at, name, 3 more }`- `Project object { id, created_at, name, 3 more }`
14 14
15 Represents an individual project.15 Represents an individual project.
16 16
16 16
17### Returns17### Returns
18 18
1919- `Project = object { id, created_at, name, 3 more }`- `Project object { id, created_at, name, 3 more }`
20 20
21 Represents an individual project.21 Represents an individual project.
22 22
12 12
13### Returns13### Returns
14 14
1515- `ProjectAPIEy = object { id, created_at, last_used_at, 4 more }`- `ProjectAPIEy object { id, created_at, last_used_at, 4 more }`
16 16
17 Represents an individual API key in a project.17 Represents an individual API key in a project.
18 18
Previously: resources/projects/subresources/groups/subresources/roles/methods/create/index.md
Previously: resources/projects/subresources/groups/subresources/roles/methods/delete/index.md
Previously: resources/projects/subresources/groups/subresources/roles/methods/list/index.md
262 "max_images_per_1_minute": 10262 "max_images_per_1_minute": 10
263 }263 }
264```264```
265
266## Domain Types
267
268### Rate Limit List Rate Limits Response
269
270- `RateLimitListRateLimitsResponse object { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }`
271
272 Represents a project rate limit config.
273
274 - `id: string`
275
276 The identifier, which can be referenced in API endpoints.
277
278 - `max_requests_per_1_minute: number`
279
280 The maximum requests per minute.
281
282 - `max_tokens_per_1_minute: number`
283
284 The maximum tokens per minute.
285
286 - `model: string`
287
288 The model this rate limit applies to.
289
290 - `object: "project.rate_limit"`
291
292 The object type, which is always `project.rate_limit`
293
294 - `"project.rate_limit"`
295
296 - `batch_1_day_max_input_tokens: optional number`
297
298 The maximum batch input tokens per day. Only present for relevant models.
299
300 - `max_audio_megabytes_per_1_minute: optional number`
301
302 The maximum audio megabytes per minute. Only present for relevant models.
303
304 - `max_images_per_1_minute: optional number`
305
306 The maximum images per minute. Only present for relevant models.
307
308 - `max_requests_per_1_day: optional number`
309
310 The maximum requests per day. Only present for relevant models.
311
312### Rate Limit Update Rate Limit Response
313
314- `RateLimitUpdateRateLimitResponse object { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }`
315
316 Represents a project rate limit config.
317
318 - `id: string`
319
320 The identifier, which can be referenced in API endpoints.
321
322 - `max_requests_per_1_minute: number`
323
324 The maximum requests per minute.
325
326 - `max_tokens_per_1_minute: number`
327
328 The maximum tokens per minute.
329
330 - `model: string`
331
332 The model this rate limit applies to.
333
334 - `object: "project.rate_limit"`
335
336 The object type, which is always `project.rate_limit`
337
338 - `"project.rate_limit"`
339
340 - `batch_1_day_max_input_tokens: optional number`
341
342 The maximum batch input tokens per day. Only present for relevant models.
343
344 - `max_audio_megabytes_per_1_minute: optional number`
345
346 The maximum audio megabytes per minute. Only present for relevant models.
347
348 - `max_images_per_1_minute: optional number`
349
350 The maximum images per minute. Only present for relevant models.
351
352 - `max_requests_per_1_day: optional number`
353
354 The maximum requests per day. Only present for relevant models.
Previously: resources/projects/subresources/roles/methods/create/index.md
Previously: resources/projects/subresources/roles/methods/delete/index.md
Previously: resources/projects/subresources/roles/methods/list/index.md
Previously: resources/projects/subresources/roles/methods/update/index.md
12 12
13### Returns13### Returns
14 14
1515- `ProjectServiceAccount = object { id, created_at, name, 2 more }`- `ProjectServiceAccount object { id, created_at, name, 2 more }`
16 16
17 Represents an individual service account in a project.17 Represents an individual service account in a project.
18 18
24 24
25### Returns25### Returns
26 26
2727- `ProjectUser = object { id, added_at, email, 3 more }`- `ProjectUser object { id, added_at, email, 3 more }`
28 28
29 Represents an individual user in a project.29 Represents an individual user in a project.
30 30
12 12
13### Returns13### Returns
14 14
1515- `ProjectUser = object { id, added_at, email, 3 more }`- `ProjectUser object { id, added_at, email, 3 more }`
16 16
17 Represents an individual user in a project.17 Represents an individual user in a project.
18 18
22 22
23### Returns23### Returns
24 24
2525- `ProjectUser = object { id, added_at, email, 3 more }`- `ProjectUser object { id, added_at, email, 3 more }`
26 26
27 Represents an individual user in a project.27 Represents an individual user in a project.
28 28
Previously: resources/projects/subresources/users/subresources/roles/methods/create/index.md
Previously: resources/projects/subresources/users/subresources/roles/methods/delete/index.md
Previously: resources/projects/subresources/users/subresources/roles/methods/list/index.md
Previously: resources/organization/subresources/audit_logs/subresources/usage/index.md
78 78
79 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`79 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
80 80
8181 - `UsageCompletionsResult = object { input_tokens, num_model_requests, object, 10 more }` - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
82 82
83 The aggregated completions usage details of the specific time bucket.83 The aggregated completions usage details of the specific time bucket.
84 84
134 134
135 When `group_by=user_id`, this field provides the user ID of the grouped usage result.135 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
136 136
137137 - `UsageEmbeddingsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
138 138
139 The aggregated embeddings usage details of the specific time bucket.139 The aggregated embeddings usage details of the specific time bucket.
140 140
166 166
167 When `group_by=user_id`, this field provides the user ID of the grouped usage result.167 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
168 168
169169 - `UsageModerationsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
170 170
171 The aggregated moderations usage details of the specific time bucket.171 The aggregated moderations usage details of the specific time bucket.
172 172
198 198
199 When `group_by=user_id`, this field provides the user ID of the grouped usage result.199 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
200 200
201201 - `UsageImagesResult = object { images, num_model_requests, object, 6 more }` - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
202 202
203 The aggregated images usage details of the specific time bucket.203 The aggregated images usage details of the specific time bucket.
204 204
238 238
239 When `group_by=user_id`, this field provides the user ID of the grouped usage result.239 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
240 240
241241 - `UsageAudioSpeechesResult = object { characters, num_model_requests, object, 4 more }` - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
242 242
243 The aggregated audio speeches usage details of the specific time bucket.243 The aggregated audio speeches usage details of the specific time bucket.
244 244
270 270
271 When `group_by=user_id`, this field provides the user ID of the grouped usage result.271 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
272 272
273273 - `UsageAudioTranscriptionsResult = object { num_model_requests, object, seconds, 4 more }` - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
274 274
275 The aggregated audio transcriptions usage details of the specific time bucket.275 The aggregated audio transcriptions usage details of the specific time bucket.
276 276
302 302
303 When `group_by=user_id`, this field provides the user ID of the grouped usage result.303 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
304 304
305305 - `UsageVectorStoresResult = object { object, usage_bytes, project_id }` - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
306 306
307 The aggregated vector stores usage details of the specific time bucket.307 The aggregated vector stores usage details of the specific time bucket.
308 308
318 318
319 When `group_by=project_id`, this field provides the project ID of the grouped usage result.319 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
320 320
321321 - `UsageCodeInterpreterSessionsResult = object { object, num_sessions, project_id }` - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
322 322
323 The aggregated code interpreter sessions usage details of the specific time bucket.323 The aggregated code interpreter sessions usage details of the specific time bucket.
324 324
334 334
335 When `group_by=project_id`, this field provides the project ID of the grouped usage result.335 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
336 336
337337 - `CostsResult = object { object, amount, line_item, project_id }` - `CostsResult object { object, amount, line_item, project_id }`
338 338
339 The aggregated costs details of the specific time bucket.339 The aggregated costs details of the specific time bucket.
340 340
527 527
528 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`528 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
529 529
530530 - `UsageCompletionsResult = object { input_tokens, num_model_requests, object, 10 more }` - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
531 531
532 The aggregated completions usage details of the specific time bucket.532 The aggregated completions usage details of the specific time bucket.
533 533
583 583
584 When `group_by=user_id`, this field provides the user ID of the grouped usage result.584 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
585 585
586586 - `UsageEmbeddingsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
587 587
588 The aggregated embeddings usage details of the specific time bucket.588 The aggregated embeddings usage details of the specific time bucket.
589 589
615 615
616 When `group_by=user_id`, this field provides the user ID of the grouped usage result.616 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
617 617
618618 - `UsageModerationsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
619 619
620 The aggregated moderations usage details of the specific time bucket.620 The aggregated moderations usage details of the specific time bucket.
621 621
647 647
648 When `group_by=user_id`, this field provides the user ID of the grouped usage result.648 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
649 649
650650 - `UsageImagesResult = object { images, num_model_requests, object, 6 more }` - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
651 651
652 The aggregated images usage details of the specific time bucket.652 The aggregated images usage details of the specific time bucket.
653 653
687 687
688 When `group_by=user_id`, this field provides the user ID of the grouped usage result.688 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
689 689
690690 - `UsageAudioSpeechesResult = object { characters, num_model_requests, object, 4 more }` - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
691 691
692 The aggregated audio speeches usage details of the specific time bucket.692 The aggregated audio speeches usage details of the specific time bucket.
693 693
719 719
720 When `group_by=user_id`, this field provides the user ID of the grouped usage result.720 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
721 721
722722 - `UsageAudioTranscriptionsResult = object { num_model_requests, object, seconds, 4 more }` - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
723 723
724 The aggregated audio transcriptions usage details of the specific time bucket.724 The aggregated audio transcriptions usage details of the specific time bucket.
725 725
751 751
752 When `group_by=user_id`, this field provides the user ID of the grouped usage result.752 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
753 753
754754 - `UsageVectorStoresResult = object { object, usage_bytes, project_id }` - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
755 755
756 The aggregated vector stores usage details of the specific time bucket.756 The aggregated vector stores usage details of the specific time bucket.
757 757
767 767
768 When `group_by=project_id`, this field provides the project ID of the grouped usage result.768 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
769 769
770770 - `UsageCodeInterpreterSessionsResult = object { object, num_sessions, project_id }` - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
771 771
772 The aggregated code interpreter sessions usage details of the specific time bucket.772 The aggregated code interpreter sessions usage details of the specific time bucket.
773 773
783 783
784 When `group_by=project_id`, this field provides the project ID of the grouped usage result.784 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
785 785
786786 - `CostsResult = object { object, amount, line_item, project_id }` - `CostsResult object { object, amount, line_item, project_id }`
787 787
788 The aggregated costs details of the specific time bucket.788 The aggregated costs details of the specific time bucket.
789 789
958 958
959 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`959 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
960 960
961961 - `UsageCompletionsResult = object { input_tokens, num_model_requests, object, 10 more }` - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
962 962
963 The aggregated completions usage details of the specific time bucket.963 The aggregated completions usage details of the specific time bucket.
964 964
1014 1014
1015 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1015 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1016 1016
10171017 - `UsageEmbeddingsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
1018 1018
1019 The aggregated embeddings usage details of the specific time bucket.1019 The aggregated embeddings usage details of the specific time bucket.
1020 1020
1046 1046
1047 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1047 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1048 1048
10491049 - `UsageModerationsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
1050 1050
1051 The aggregated moderations usage details of the specific time bucket.1051 The aggregated moderations usage details of the specific time bucket.
1052 1052
1078 1078
1079 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1079 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1080 1080
10811081 - `UsageImagesResult = object { images, num_model_requests, object, 6 more }` - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
1082 1082
1083 The aggregated images usage details of the specific time bucket.1083 The aggregated images usage details of the specific time bucket.
1084 1084
1118 1118
1119 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1119 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1120 1120
11211121 - `UsageAudioSpeechesResult = object { characters, num_model_requests, object, 4 more }` - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
1122 1122
1123 The aggregated audio speeches usage details of the specific time bucket.1123 The aggregated audio speeches usage details of the specific time bucket.
1124 1124
1150 1150
1151 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1151 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1152 1152
11531153 - `UsageAudioTranscriptionsResult = object { num_model_requests, object, seconds, 4 more }` - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
1154 1154
1155 The aggregated audio transcriptions usage details of the specific time bucket.1155 The aggregated audio transcriptions usage details of the specific time bucket.
1156 1156
1182 1182
1183 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1183 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1184 1184
11851185 - `UsageVectorStoresResult = object { object, usage_bytes, project_id }` - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
1186 1186
1187 The aggregated vector stores usage details of the specific time bucket.1187 The aggregated vector stores usage details of the specific time bucket.
1188 1188
1198 1198
1199 When `group_by=project_id`, this field provides the project ID of the grouped usage result.1199 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
1200 1200
12011201 - `UsageCodeInterpreterSessionsResult = object { object, num_sessions, project_id }` - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
1202 1202
1203 The aggregated code interpreter sessions usage details of the specific time bucket.1203 The aggregated code interpreter sessions usage details of the specific time bucket.
1204 1204
1214 1214
1215 When `group_by=project_id`, this field provides the project ID of the grouped usage result.1215 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
1216 1216
12171217 - `CostsResult = object { object, amount, line_item, project_id }` - `CostsResult object { object, amount, line_item, project_id }`
1218 1218
1219 The aggregated costs details of the specific time bucket.1219 The aggregated costs details of the specific time bucket.
1220 1220
1411 1411
1412 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`1412 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
1413 1413
14141414 - `UsageCompletionsResult = object { input_tokens, num_model_requests, object, 10 more }` - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
1415 1415
1416 The aggregated completions usage details of the specific time bucket.1416 The aggregated completions usage details of the specific time bucket.
1417 1417
1467 1467
1468 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1468 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1469 1469
14701470 - `UsageEmbeddingsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
1471 1471
1472 The aggregated embeddings usage details of the specific time bucket.1472 The aggregated embeddings usage details of the specific time bucket.
1473 1473
1499 1499
1500 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1500 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1501 1501
15021502 - `UsageModerationsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
1503 1503
1504 The aggregated moderations usage details of the specific time bucket.1504 The aggregated moderations usage details of the specific time bucket.
1505 1505
1531 1531
1532 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1532 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1533 1533
15341534 - `UsageImagesResult = object { images, num_model_requests, object, 6 more }` - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
1535 1535
1536 The aggregated images usage details of the specific time bucket.1536 The aggregated images usage details of the specific time bucket.
1537 1537
1571 1571
1572 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1572 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1573 1573
15741574 - `UsageAudioSpeechesResult = object { characters, num_model_requests, object, 4 more }` - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
1575 1575
1576 The aggregated audio speeches usage details of the specific time bucket.1576 The aggregated audio speeches usage details of the specific time bucket.
1577 1577
1603 1603
1604 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1604 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1605 1605
16061606 - `UsageAudioTranscriptionsResult = object { num_model_requests, object, seconds, 4 more }` - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
1607 1607
1608 The aggregated audio transcriptions usage details of the specific time bucket.1608 The aggregated audio transcriptions usage details of the specific time bucket.
1609 1609
1635 1635
1636 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1636 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1637 1637
16381638 - `UsageVectorStoresResult = object { object, usage_bytes, project_id }` - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
1639 1639
1640 The aggregated vector stores usage details of the specific time bucket.1640 The aggregated vector stores usage details of the specific time bucket.
1641 1641
1651 1651
1652 When `group_by=project_id`, this field provides the project ID of the grouped usage result.1652 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
1653 1653
16541654 - `UsageCodeInterpreterSessionsResult = object { object, num_sessions, project_id }` - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
1655 1655
1656 The aggregated code interpreter sessions usage details of the specific time bucket.1656 The aggregated code interpreter sessions usage details of the specific time bucket.
1657 1657
1667 1667
1668 When `group_by=project_id`, this field provides the project ID of the grouped usage result.1668 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
1669 1669
16701670 - `CostsResult = object { object, amount, line_item, project_id }` - `CostsResult object { object, amount, line_item, project_id }`
1671 1671
1672 The aggregated costs details of the specific time bucket.1672 The aggregated costs details of the specific time bucket.
1673 1673
1866 1866
1867 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`1867 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
1868 1868
18691869 - `UsageCompletionsResult = object { input_tokens, num_model_requests, object, 10 more }` - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
1870 1870
1871 The aggregated completions usage details of the specific time bucket.1871 The aggregated completions usage details of the specific time bucket.
1872 1872
1922 1922
1923 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1923 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1924 1924
19251925 - `UsageEmbeddingsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
1926 1926
1927 The aggregated embeddings usage details of the specific time bucket.1927 The aggregated embeddings usage details of the specific time bucket.
1928 1928
1954 1954
1955 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1955 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1956 1956
19571957 - `UsageModerationsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
1958 1958
1959 The aggregated moderations usage details of the specific time bucket.1959 The aggregated moderations usage details of the specific time bucket.
1960 1960
1986 1986
1987 When `group_by=user_id`, this field provides the user ID of the grouped usage result.1987 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
1988 1988
19891989 - `UsageImagesResult = object { images, num_model_requests, object, 6 more }` - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
1990 1990
1991 The aggregated images usage details of the specific time bucket.1991 The aggregated images usage details of the specific time bucket.
1992 1992
2026 2026
2027 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2027 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2028 2028
20292029 - `UsageAudioSpeechesResult = object { characters, num_model_requests, object, 4 more }` - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
2030 2030
2031 The aggregated audio speeches usage details of the specific time bucket.2031 The aggregated audio speeches usage details of the specific time bucket.
2032 2032
2058 2058
2059 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2059 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2060 2060
20612061 - `UsageAudioTranscriptionsResult = object { num_model_requests, object, seconds, 4 more }` - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
2062 2062
2063 The aggregated audio transcriptions usage details of the specific time bucket.2063 The aggregated audio transcriptions usage details of the specific time bucket.
2064 2064
2090 2090
2091 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2091 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2092 2092
20932093 - `UsageVectorStoresResult = object { object, usage_bytes, project_id }` - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
2094 2094
2095 The aggregated vector stores usage details of the specific time bucket.2095 The aggregated vector stores usage details of the specific time bucket.
2096 2096
2106 2106
2107 When `group_by=project_id`, this field provides the project ID of the grouped usage result.2107 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
2108 2108
21092109 - `UsageCodeInterpreterSessionsResult = object { object, num_sessions, project_id }` - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
2110 2110
2111 The aggregated code interpreter sessions usage details of the specific time bucket.2111 The aggregated code interpreter sessions usage details of the specific time bucket.
2112 2112
2122 2122
2123 When `group_by=project_id`, this field provides the project ID of the grouped usage result.2123 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
2124 2124
21252125 - `CostsResult = object { object, amount, line_item, project_id }` - `CostsResult object { object, amount, line_item, project_id }`
2126 2126
2127 The aggregated costs details of the specific time bucket.2127 The aggregated costs details of the specific time bucket.
2128 2128
2343 2343
2344 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`2344 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
2345 2345
23462346 - `UsageCompletionsResult = object { input_tokens, num_model_requests, object, 10 more }` - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
2347 2347
2348 The aggregated completions usage details of the specific time bucket.2348 The aggregated completions usage details of the specific time bucket.
2349 2349
2399 2399
2400 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2400 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2401 2401
24022402 - `UsageEmbeddingsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
2403 2403
2404 The aggregated embeddings usage details of the specific time bucket.2404 The aggregated embeddings usage details of the specific time bucket.
2405 2405
2431 2431
2432 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2432 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2433 2433
24342434 - `UsageModerationsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
2435 2435
2436 The aggregated moderations usage details of the specific time bucket.2436 The aggregated moderations usage details of the specific time bucket.
2437 2437
2463 2463
2464 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2464 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2465 2465
24662466 - `UsageImagesResult = object { images, num_model_requests, object, 6 more }` - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
2467 2467
2468 The aggregated images usage details of the specific time bucket.2468 The aggregated images usage details of the specific time bucket.
2469 2469
2503 2503
2504 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2504 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2505 2505
25062506 - `UsageAudioSpeechesResult = object { characters, num_model_requests, object, 4 more }` - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
2507 2507
2508 The aggregated audio speeches usage details of the specific time bucket.2508 The aggregated audio speeches usage details of the specific time bucket.
2509 2509
2535 2535
2536 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2536 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2537 2537
25382538 - `UsageAudioTranscriptionsResult = object { num_model_requests, object, seconds, 4 more }` - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
2539 2539
2540 The aggregated audio transcriptions usage details of the specific time bucket.2540 The aggregated audio transcriptions usage details of the specific time bucket.
2541 2541
2567 2567
2568 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2568 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2569 2569
25702570 - `UsageVectorStoresResult = object { object, usage_bytes, project_id }` - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
2571 2571
2572 The aggregated vector stores usage details of the specific time bucket.2572 The aggregated vector stores usage details of the specific time bucket.
2573 2573
2583 2583
2584 When `group_by=project_id`, this field provides the project ID of the grouped usage result.2584 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
2585 2585
25862586 - `UsageCodeInterpreterSessionsResult = object { object, num_sessions, project_id }` - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
2587 2587
2588 The aggregated code interpreter sessions usage details of the specific time bucket.2588 The aggregated code interpreter sessions usage details of the specific time bucket.
2589 2589
2599 2599
2600 When `group_by=project_id`, this field provides the project ID of the grouped usage result.2600 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
2601 2601
26022602 - `CostsResult = object { object, amount, line_item, project_id }` - `CostsResult object { object, amount, line_item, project_id }`
2603 2603
2604 The aggregated costs details of the specific time bucket.2604 The aggregated costs details of the specific time bucket.
2605 2605
2794 2794
2795 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`2795 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
2796 2796
27972797 - `UsageCompletionsResult = object { input_tokens, num_model_requests, object, 10 more }` - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
2798 2798
2799 The aggregated completions usage details of the specific time bucket.2799 The aggregated completions usage details of the specific time bucket.
2800 2800
2850 2850
2851 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2851 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2852 2852
28532853 - `UsageEmbeddingsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
2854 2854
2855 The aggregated embeddings usage details of the specific time bucket.2855 The aggregated embeddings usage details of the specific time bucket.
2856 2856
2882 2882
2883 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2883 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2884 2884
28852885 - `UsageModerationsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
2886 2886
2887 The aggregated moderations usage details of the specific time bucket.2887 The aggregated moderations usage details of the specific time bucket.
2888 2888
2914 2914
2915 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2915 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2916 2916
29172917 - `UsageImagesResult = object { images, num_model_requests, object, 6 more }` - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
2918 2918
2919 The aggregated images usage details of the specific time bucket.2919 The aggregated images usage details of the specific time bucket.
2920 2920
2954 2954
2955 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2955 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2956 2956
29572957 - `UsageAudioSpeechesResult = object { characters, num_model_requests, object, 4 more }` - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
2958 2958
2959 The aggregated audio speeches usage details of the specific time bucket.2959 The aggregated audio speeches usage details of the specific time bucket.
2960 2960
2986 2986
2987 When `group_by=user_id`, this field provides the user ID of the grouped usage result.2987 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
2988 2988
29892989 - `UsageAudioTranscriptionsResult = object { num_model_requests, object, seconds, 4 more }` - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
2990 2990
2991 The aggregated audio transcriptions usage details of the specific time bucket.2991 The aggregated audio transcriptions usage details of the specific time bucket.
2992 2992
3018 3018
3019 When `group_by=user_id`, this field provides the user ID of the grouped usage result.3019 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3020 3020
30213021 - `UsageVectorStoresResult = object { object, usage_bytes, project_id }` - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
3022 3022
3023 The aggregated vector stores usage details of the specific time bucket.3023 The aggregated vector stores usage details of the specific time bucket.
3024 3024
3034 3034
3035 When `group_by=project_id`, this field provides the project ID of the grouped usage result.3035 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3036 3036
30373037 - `UsageCodeInterpreterSessionsResult = object { object, num_sessions, project_id }` - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
3038 3038
3039 The aggregated code interpreter sessions usage details of the specific time bucket.3039 The aggregated code interpreter sessions usage details of the specific time bucket.
3040 3040
3050 3050
3051 When `group_by=project_id`, this field provides the project ID of the grouped usage result.3051 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3052 3052
30533053 - `CostsResult = object { object, amount, line_item, project_id }` - `CostsResult object { object, amount, line_item, project_id }`
3054 3054
3055 The aggregated costs details of the specific time bucket.3055 The aggregated costs details of the specific time bucket.
3056 3056
3225 3225
3226 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`3226 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
3227 3227
32283228 - `UsageCompletionsResult = object { input_tokens, num_model_requests, object, 10 more }` - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
3229 3229
3230 The aggregated completions usage details of the specific time bucket.3230 The aggregated completions usage details of the specific time bucket.
3231 3231
3281 3281
3282 When `group_by=user_id`, this field provides the user ID of the grouped usage result.3282 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3283 3283
32843284 - `UsageEmbeddingsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
3285 3285
3286 The aggregated embeddings usage details of the specific time bucket.3286 The aggregated embeddings usage details of the specific time bucket.
3287 3287
3313 3313
3314 When `group_by=user_id`, this field provides the user ID of the grouped usage result.3314 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3315 3315
33163316 - `UsageModerationsResult = object { input_tokens, num_model_requests, object, 4 more }` - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
3317 3317
3318 The aggregated moderations usage details of the specific time bucket.3318 The aggregated moderations usage details of the specific time bucket.
3319 3319
3345 3345
3346 When `group_by=user_id`, this field provides the user ID of the grouped usage result.3346 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3347 3347
33483348 - `UsageImagesResult = object { images, num_model_requests, object, 6 more }` - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
3349 3349
3350 The aggregated images usage details of the specific time bucket.3350 The aggregated images usage details of the specific time bucket.
3351 3351
3385 3385
3386 When `group_by=user_id`, this field provides the user ID of the grouped usage result.3386 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3387 3387
33883388 - `UsageAudioSpeechesResult = object { characters, num_model_requests, object, 4 more }` - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
3389 3389
3390 The aggregated audio speeches usage details of the specific time bucket.3390 The aggregated audio speeches usage details of the specific time bucket.
3391 3391
3417 3417
3418 When `group_by=user_id`, this field provides the user ID of the grouped usage result.3418 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3419 3419
34203420 - `UsageAudioTranscriptionsResult = object { num_model_requests, object, seconds, 4 more }` - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
3421 3421
3422 The aggregated audio transcriptions usage details of the specific time bucket.3422 The aggregated audio transcriptions usage details of the specific time bucket.
3423 3423
3449 3449
3450 When `group_by=user_id`, this field provides the user ID of the grouped usage result.3450 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3451 3451
34523452 - `UsageVectorStoresResult = object { object, usage_bytes, project_id }` - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
3453 3453
3454 The aggregated vector stores usage details of the specific time bucket.3454 The aggregated vector stores usage details of the specific time bucket.
3455 3455
3465 3465
3466 When `group_by=project_id`, this field provides the project ID of the grouped usage result.3466 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3467 3467
34683468 - `UsageCodeInterpreterSessionsResult = object { object, num_sessions, project_id }` - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
3469 3469
3470 The aggregated code interpreter sessions usage details of the specific time bucket.3470 The aggregated code interpreter sessions usage details of the specific time bucket.
3471 3471
3481 3481
3482 When `group_by=project_id`, this field provides the project ID of the grouped usage result.3482 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3483 3483
34843484 - `CostsResult = object { object, amount, line_item, project_id }` - `CostsResult object { object, amount, line_item, project_id }`
3485 3485
3486 The aggregated costs details of the specific time bucket.3486 The aggregated costs details of the specific time bucket.
3487 3487
3591 "next_page": null3591 "next_page": null
3592}3592}
3593```3593```
3594
3595## Domain Types
3596
3597### Usage Get Audio Speeches Response
3598
3599- `UsageGetAudioSpeechesResponse object { data, has_more, next_page, object }`
3600
3601 - `data: array of object { end_time, object, result, start_time }`
3602
3603 - `end_time: number`
3604
3605 - `object: "bucket"`
3606
3607 - `"bucket"`
3608
3609 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
3610
3611 - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
3612
3613 The aggregated completions usage details of the specific time bucket.
3614
3615 - `input_tokens: number`
3616
3617 The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
3618
3619 - `num_model_requests: number`
3620
3621 The count of requests made to the model.
3622
3623 - `object: "organization.usage.completions.result"`
3624
3625 - `"organization.usage.completions.result"`
3626
3627 - `output_tokens: number`
3628
3629 The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
3630
3631 - `api_key_id: optional string`
3632
3633 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
3634
3635 - `batch: optional boolean`
3636
3637 When `group_by=batch`, this field tells whether the grouped usage result is batch or not.
3638
3639 - `input_audio_tokens: optional number`
3640
3641 The aggregated number of audio input tokens used, including cached tokens.
3642
3643 - `input_cached_tokens: optional number`
3644
3645 The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.
3646
3647 - `model: optional string`
3648
3649 When `group_by=model`, this field provides the model name of the grouped usage result.
3650
3651 - `output_audio_tokens: optional number`
3652
3653 The aggregated number of audio output tokens used.
3654
3655 - `project_id: optional string`
3656
3657 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3658
3659 - `service_tier: optional string`
3660
3661 When `group_by=service_tier`, this field provides the service tier of the grouped usage result.
3662
3663 - `user_id: optional string`
3664
3665 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3666
3667 - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
3668
3669 The aggregated embeddings usage details of the specific time bucket.
3670
3671 - `input_tokens: number`
3672
3673 The aggregated number of input tokens used.
3674
3675 - `num_model_requests: number`
3676
3677 The count of requests made to the model.
3678
3679 - `object: "organization.usage.embeddings.result"`
3680
3681 - `"organization.usage.embeddings.result"`
3682
3683 - `api_key_id: optional string`
3684
3685 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
3686
3687 - `model: optional string`
3688
3689 When `group_by=model`, this field provides the model name of the grouped usage result.
3690
3691 - `project_id: optional string`
3692
3693 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3694
3695 - `user_id: optional string`
3696
3697 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3698
3699 - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
3700
3701 The aggregated moderations usage details of the specific time bucket.
3702
3703 - `input_tokens: number`
3704
3705 The aggregated number of input tokens used.
3706
3707 - `num_model_requests: number`
3708
3709 The count of requests made to the model.
3710
3711 - `object: "organization.usage.moderations.result"`
3712
3713 - `"organization.usage.moderations.result"`
3714
3715 - `api_key_id: optional string`
3716
3717 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
3718
3719 - `model: optional string`
3720
3721 When `group_by=model`, this field provides the model name of the grouped usage result.
3722
3723 - `project_id: optional string`
3724
3725 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3726
3727 - `user_id: optional string`
3728
3729 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3730
3731 - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
3732
3733 The aggregated images usage details of the specific time bucket.
3734
3735 - `images: number`
3736
3737 The number of images processed.
3738
3739 - `num_model_requests: number`
3740
3741 The count of requests made to the model.
3742
3743 - `object: "organization.usage.images.result"`
3744
3745 - `"organization.usage.images.result"`
3746
3747 - `api_key_id: optional string`
3748
3749 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
3750
3751 - `model: optional string`
3752
3753 When `group_by=model`, this field provides the model name of the grouped usage result.
3754
3755 - `project_id: optional string`
3756
3757 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3758
3759 - `size: optional string`
3760
3761 When `group_by=size`, this field provides the image size of the grouped usage result.
3762
3763 - `source: optional string`
3764
3765 When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.
3766
3767 - `user_id: optional string`
3768
3769 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3770
3771 - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
3772
3773 The aggregated audio speeches usage details of the specific time bucket.
3774
3775 - `characters: number`
3776
3777 The number of characters processed.
3778
3779 - `num_model_requests: number`
3780
3781 The count of requests made to the model.
3782
3783 - `object: "organization.usage.audio_speeches.result"`
3784
3785 - `"organization.usage.audio_speeches.result"`
3786
3787 - `api_key_id: optional string`
3788
3789 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
3790
3791 - `model: optional string`
3792
3793 When `group_by=model`, this field provides the model name of the grouped usage result.
3794
3795 - `project_id: optional string`
3796
3797 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3798
3799 - `user_id: optional string`
3800
3801 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3802
3803 - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
3804
3805 The aggregated audio transcriptions usage details of the specific time bucket.
3806
3807 - `num_model_requests: number`
3808
3809 The count of requests made to the model.
3810
3811 - `object: "organization.usage.audio_transcriptions.result"`
3812
3813 - `"organization.usage.audio_transcriptions.result"`
3814
3815 - `seconds: number`
3816
3817 The number of seconds processed.
3818
3819 - `api_key_id: optional string`
3820
3821 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
3822
3823 - `model: optional string`
3824
3825 When `group_by=model`, this field provides the model name of the grouped usage result.
3826
3827 - `project_id: optional string`
3828
3829 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3830
3831 - `user_id: optional string`
3832
3833 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3834
3835 - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
3836
3837 The aggregated vector stores usage details of the specific time bucket.
3838
3839 - `object: "organization.usage.vector_stores.result"`
3840
3841 - `"organization.usage.vector_stores.result"`
3842
3843 - `usage_bytes: number`
3844
3845 The vector stores usage in bytes.
3846
3847 - `project_id: optional string`
3848
3849 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3850
3851 - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
3852
3853 The aggregated code interpreter sessions usage details of the specific time bucket.
3854
3855 - `object: "organization.usage.code_interpreter_sessions.result"`
3856
3857 - `"organization.usage.code_interpreter_sessions.result"`
3858
3859 - `num_sessions: optional number`
3860
3861 The number of code interpreter sessions.
3862
3863 - `project_id: optional string`
3864
3865 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3866
3867 - `CostsResult object { object, amount, line_item, project_id }`
3868
3869 The aggregated costs details of the specific time bucket.
3870
3871 - `object: "organization.costs.result"`
3872
3873 - `"organization.costs.result"`
3874
3875 - `amount: optional object { currency, value }`
3876
3877 The monetary value in its associated currency.
3878
3879 - `currency: optional string`
3880
3881 Lowercase ISO-4217 currency e.g. "usd"
3882
3883 - `value: optional number`
3884
3885 The numeric value of the cost.
3886
3887 - `line_item: optional string`
3888
3889 When `group_by=line_item`, this field provides the line item of the grouped costs result.
3890
3891 - `project_id: optional string`
3892
3893 When `group_by=project_id`, this field provides the project ID of the grouped costs result.
3894
3895 - `start_time: number`
3896
3897 - `has_more: boolean`
3898
3899 - `next_page: string`
3900
3901 - `object: "page"`
3902
3903 - `"page"`
3904
3905### Usage Get Audio Transcriptions Response
3906
3907- `UsageGetAudioTranscriptionsResponse object { data, has_more, next_page, object }`
3908
3909 - `data: array of object { end_time, object, result, start_time }`
3910
3911 - `end_time: number`
3912
3913 - `object: "bucket"`
3914
3915 - `"bucket"`
3916
3917 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
3918
3919 - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
3920
3921 The aggregated completions usage details of the specific time bucket.
3922
3923 - `input_tokens: number`
3924
3925 The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
3926
3927 - `num_model_requests: number`
3928
3929 The count of requests made to the model.
3930
3931 - `object: "organization.usage.completions.result"`
3932
3933 - `"organization.usage.completions.result"`
3934
3935 - `output_tokens: number`
3936
3937 The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
3938
3939 - `api_key_id: optional string`
3940
3941 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
3942
3943 - `batch: optional boolean`
3944
3945 When `group_by=batch`, this field tells whether the grouped usage result is batch or not.
3946
3947 - `input_audio_tokens: optional number`
3948
3949 The aggregated number of audio input tokens used, including cached tokens.
3950
3951 - `input_cached_tokens: optional number`
3952
3953 The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.
3954
3955 - `model: optional string`
3956
3957 When `group_by=model`, this field provides the model name of the grouped usage result.
3958
3959 - `output_audio_tokens: optional number`
3960
3961 The aggregated number of audio output tokens used.
3962
3963 - `project_id: optional string`
3964
3965 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
3966
3967 - `service_tier: optional string`
3968
3969 When `group_by=service_tier`, this field provides the service tier of the grouped usage result.
3970
3971 - `user_id: optional string`
3972
3973 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
3974
3975 - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
3976
3977 The aggregated embeddings usage details of the specific time bucket.
3978
3979 - `input_tokens: number`
3980
3981 The aggregated number of input tokens used.
3982
3983 - `num_model_requests: number`
3984
3985 The count of requests made to the model.
3986
3987 - `object: "organization.usage.embeddings.result"`
3988
3989 - `"organization.usage.embeddings.result"`
3990
3991 - `api_key_id: optional string`
3992
3993 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
3994
3995 - `model: optional string`
3996
3997 When `group_by=model`, this field provides the model name of the grouped usage result.
3998
3999 - `project_id: optional string`
4000
4001 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4002
4003 - `user_id: optional string`
4004
4005 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4006
4007 - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
4008
4009 The aggregated moderations usage details of the specific time bucket.
4010
4011 - `input_tokens: number`
4012
4013 The aggregated number of input tokens used.
4014
4015 - `num_model_requests: number`
4016
4017 The count of requests made to the model.
4018
4019 - `object: "organization.usage.moderations.result"`
4020
4021 - `"organization.usage.moderations.result"`
4022
4023 - `api_key_id: optional string`
4024
4025 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4026
4027 - `model: optional string`
4028
4029 When `group_by=model`, this field provides the model name of the grouped usage result.
4030
4031 - `project_id: optional string`
4032
4033 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4034
4035 - `user_id: optional string`
4036
4037 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4038
4039 - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
4040
4041 The aggregated images usage details of the specific time bucket.
4042
4043 - `images: number`
4044
4045 The number of images processed.
4046
4047 - `num_model_requests: number`
4048
4049 The count of requests made to the model.
4050
4051 - `object: "organization.usage.images.result"`
4052
4053 - `"organization.usage.images.result"`
4054
4055 - `api_key_id: optional string`
4056
4057 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4058
4059 - `model: optional string`
4060
4061 When `group_by=model`, this field provides the model name of the grouped usage result.
4062
4063 - `project_id: optional string`
4064
4065 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4066
4067 - `size: optional string`
4068
4069 When `group_by=size`, this field provides the image size of the grouped usage result.
4070
4071 - `source: optional string`
4072
4073 When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.
4074
4075 - `user_id: optional string`
4076
4077 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4078
4079 - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
4080
4081 The aggregated audio speeches usage details of the specific time bucket.
4082
4083 - `characters: number`
4084
4085 The number of characters processed.
4086
4087 - `num_model_requests: number`
4088
4089 The count of requests made to the model.
4090
4091 - `object: "organization.usage.audio_speeches.result"`
4092
4093 - `"organization.usage.audio_speeches.result"`
4094
4095 - `api_key_id: optional string`
4096
4097 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4098
4099 - `model: optional string`
4100
4101 When `group_by=model`, this field provides the model name of the grouped usage result.
4102
4103 - `project_id: optional string`
4104
4105 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4106
4107 - `user_id: optional string`
4108
4109 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4110
4111 - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
4112
4113 The aggregated audio transcriptions usage details of the specific time bucket.
4114
4115 - `num_model_requests: number`
4116
4117 The count of requests made to the model.
4118
4119 - `object: "organization.usage.audio_transcriptions.result"`
4120
4121 - `"organization.usage.audio_transcriptions.result"`
4122
4123 - `seconds: number`
4124
4125 The number of seconds processed.
4126
4127 - `api_key_id: optional string`
4128
4129 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4130
4131 - `model: optional string`
4132
4133 When `group_by=model`, this field provides the model name of the grouped usage result.
4134
4135 - `project_id: optional string`
4136
4137 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4138
4139 - `user_id: optional string`
4140
4141 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4142
4143 - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
4144
4145 The aggregated vector stores usage details of the specific time bucket.
4146
4147 - `object: "organization.usage.vector_stores.result"`
4148
4149 - `"organization.usage.vector_stores.result"`
4150
4151 - `usage_bytes: number`
4152
4153 The vector stores usage in bytes.
4154
4155 - `project_id: optional string`
4156
4157 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4158
4159 - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
4160
4161 The aggregated code interpreter sessions usage details of the specific time bucket.
4162
4163 - `object: "organization.usage.code_interpreter_sessions.result"`
4164
4165 - `"organization.usage.code_interpreter_sessions.result"`
4166
4167 - `num_sessions: optional number`
4168
4169 The number of code interpreter sessions.
4170
4171 - `project_id: optional string`
4172
4173 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4174
4175 - `CostsResult object { object, amount, line_item, project_id }`
4176
4177 The aggregated costs details of the specific time bucket.
4178
4179 - `object: "organization.costs.result"`
4180
4181 - `"organization.costs.result"`
4182
4183 - `amount: optional object { currency, value }`
4184
4185 The monetary value in its associated currency.
4186
4187 - `currency: optional string`
4188
4189 Lowercase ISO-4217 currency e.g. "usd"
4190
4191 - `value: optional number`
4192
4193 The numeric value of the cost.
4194
4195 - `line_item: optional string`
4196
4197 When `group_by=line_item`, this field provides the line item of the grouped costs result.
4198
4199 - `project_id: optional string`
4200
4201 When `group_by=project_id`, this field provides the project ID of the grouped costs result.
4202
4203 - `start_time: number`
4204
4205 - `has_more: boolean`
4206
4207 - `next_page: string`
4208
4209 - `object: "page"`
4210
4211 - `"page"`
4212
4213### Usage Get Code Interpreter Sessions Response
4214
4215- `UsageGetCodeInterpreterSessionsResponse object { data, has_more, next_page, object }`
4216
4217 - `data: array of object { end_time, object, result, start_time }`
4218
4219 - `end_time: number`
4220
4221 - `object: "bucket"`
4222
4223 - `"bucket"`
4224
4225 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
4226
4227 - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
4228
4229 The aggregated completions usage details of the specific time bucket.
4230
4231 - `input_tokens: number`
4232
4233 The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
4234
4235 - `num_model_requests: number`
4236
4237 The count of requests made to the model.
4238
4239 - `object: "organization.usage.completions.result"`
4240
4241 - `"organization.usage.completions.result"`
4242
4243 - `output_tokens: number`
4244
4245 The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
4246
4247 - `api_key_id: optional string`
4248
4249 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4250
4251 - `batch: optional boolean`
4252
4253 When `group_by=batch`, this field tells whether the grouped usage result is batch or not.
4254
4255 - `input_audio_tokens: optional number`
4256
4257 The aggregated number of audio input tokens used, including cached tokens.
4258
4259 - `input_cached_tokens: optional number`
4260
4261 The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.
4262
4263 - `model: optional string`
4264
4265 When `group_by=model`, this field provides the model name of the grouped usage result.
4266
4267 - `output_audio_tokens: optional number`
4268
4269 The aggregated number of audio output tokens used.
4270
4271 - `project_id: optional string`
4272
4273 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4274
4275 - `service_tier: optional string`
4276
4277 When `group_by=service_tier`, this field provides the service tier of the grouped usage result.
4278
4279 - `user_id: optional string`
4280
4281 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4282
4283 - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
4284
4285 The aggregated embeddings usage details of the specific time bucket.
4286
4287 - `input_tokens: number`
4288
4289 The aggregated number of input tokens used.
4290
4291 - `num_model_requests: number`
4292
4293 The count of requests made to the model.
4294
4295 - `object: "organization.usage.embeddings.result"`
4296
4297 - `"organization.usage.embeddings.result"`
4298
4299 - `api_key_id: optional string`
4300
4301 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4302
4303 - `model: optional string`
4304
4305 When `group_by=model`, this field provides the model name of the grouped usage result.
4306
4307 - `project_id: optional string`
4308
4309 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4310
4311 - `user_id: optional string`
4312
4313 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4314
4315 - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
4316
4317 The aggregated moderations usage details of the specific time bucket.
4318
4319 - `input_tokens: number`
4320
4321 The aggregated number of input tokens used.
4322
4323 - `num_model_requests: number`
4324
4325 The count of requests made to the model.
4326
4327 - `object: "organization.usage.moderations.result"`
4328
4329 - `"organization.usage.moderations.result"`
4330
4331 - `api_key_id: optional string`
4332
4333 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4334
4335 - `model: optional string`
4336
4337 When `group_by=model`, this field provides the model name of the grouped usage result.
4338
4339 - `project_id: optional string`
4340
4341 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4342
4343 - `user_id: optional string`
4344
4345 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4346
4347 - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
4348
4349 The aggregated images usage details of the specific time bucket.
4350
4351 - `images: number`
4352
4353 The number of images processed.
4354
4355 - `num_model_requests: number`
4356
4357 The count of requests made to the model.
4358
4359 - `object: "organization.usage.images.result"`
4360
4361 - `"organization.usage.images.result"`
4362
4363 - `api_key_id: optional string`
4364
4365 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4366
4367 - `model: optional string`
4368
4369 When `group_by=model`, this field provides the model name of the grouped usage result.
4370
4371 - `project_id: optional string`
4372
4373 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4374
4375 - `size: optional string`
4376
4377 When `group_by=size`, this field provides the image size of the grouped usage result.
4378
4379 - `source: optional string`
4380
4381 When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.
4382
4383 - `user_id: optional string`
4384
4385 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4386
4387 - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
4388
4389 The aggregated audio speeches usage details of the specific time bucket.
4390
4391 - `characters: number`
4392
4393 The number of characters processed.
4394
4395 - `num_model_requests: number`
4396
4397 The count of requests made to the model.
4398
4399 - `object: "organization.usage.audio_speeches.result"`
4400
4401 - `"organization.usage.audio_speeches.result"`
4402
4403 - `api_key_id: optional string`
4404
4405 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4406
4407 - `model: optional string`
4408
4409 When `group_by=model`, this field provides the model name of the grouped usage result.
4410
4411 - `project_id: optional string`
4412
4413 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4414
4415 - `user_id: optional string`
4416
4417 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4418
4419 - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
4420
4421 The aggregated audio transcriptions usage details of the specific time bucket.
4422
4423 - `num_model_requests: number`
4424
4425 The count of requests made to the model.
4426
4427 - `object: "organization.usage.audio_transcriptions.result"`
4428
4429 - `"organization.usage.audio_transcriptions.result"`
4430
4431 - `seconds: number`
4432
4433 The number of seconds processed.
4434
4435 - `api_key_id: optional string`
4436
4437 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4438
4439 - `model: optional string`
4440
4441 When `group_by=model`, this field provides the model name of the grouped usage result.
4442
4443 - `project_id: optional string`
4444
4445 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4446
4447 - `user_id: optional string`
4448
4449 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4450
4451 - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
4452
4453 The aggregated vector stores usage details of the specific time bucket.
4454
4455 - `object: "organization.usage.vector_stores.result"`
4456
4457 - `"organization.usage.vector_stores.result"`
4458
4459 - `usage_bytes: number`
4460
4461 The vector stores usage in bytes.
4462
4463 - `project_id: optional string`
4464
4465 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4466
4467 - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
4468
4469 The aggregated code interpreter sessions usage details of the specific time bucket.
4470
4471 - `object: "organization.usage.code_interpreter_sessions.result"`
4472
4473 - `"organization.usage.code_interpreter_sessions.result"`
4474
4475 - `num_sessions: optional number`
4476
4477 The number of code interpreter sessions.
4478
4479 - `project_id: optional string`
4480
4481 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4482
4483 - `CostsResult object { object, amount, line_item, project_id }`
4484
4485 The aggregated costs details of the specific time bucket.
4486
4487 - `object: "organization.costs.result"`
4488
4489 - `"organization.costs.result"`
4490
4491 - `amount: optional object { currency, value }`
4492
4493 The monetary value in its associated currency.
4494
4495 - `currency: optional string`
4496
4497 Lowercase ISO-4217 currency e.g. "usd"
4498
4499 - `value: optional number`
4500
4501 The numeric value of the cost.
4502
4503 - `line_item: optional string`
4504
4505 When `group_by=line_item`, this field provides the line item of the grouped costs result.
4506
4507 - `project_id: optional string`
4508
4509 When `group_by=project_id`, this field provides the project ID of the grouped costs result.
4510
4511 - `start_time: number`
4512
4513 - `has_more: boolean`
4514
4515 - `next_page: string`
4516
4517 - `object: "page"`
4518
4519 - `"page"`
4520
4521### Usage Get Completions Response
4522
4523- `UsageGetCompletionsResponse object { data, has_more, next_page, object }`
4524
4525 - `data: array of object { end_time, object, result, start_time }`
4526
4527 - `end_time: number`
4528
4529 - `object: "bucket"`
4530
4531 - `"bucket"`
4532
4533 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
4534
4535 - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
4536
4537 The aggregated completions usage details of the specific time bucket.
4538
4539 - `input_tokens: number`
4540
4541 The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
4542
4543 - `num_model_requests: number`
4544
4545 The count of requests made to the model.
4546
4547 - `object: "organization.usage.completions.result"`
4548
4549 - `"organization.usage.completions.result"`
4550
4551 - `output_tokens: number`
4552
4553 The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
4554
4555 - `api_key_id: optional string`
4556
4557 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4558
4559 - `batch: optional boolean`
4560
4561 When `group_by=batch`, this field tells whether the grouped usage result is batch or not.
4562
4563 - `input_audio_tokens: optional number`
4564
4565 The aggregated number of audio input tokens used, including cached tokens.
4566
4567 - `input_cached_tokens: optional number`
4568
4569 The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.
4570
4571 - `model: optional string`
4572
4573 When `group_by=model`, this field provides the model name of the grouped usage result.
4574
4575 - `output_audio_tokens: optional number`
4576
4577 The aggregated number of audio output tokens used.
4578
4579 - `project_id: optional string`
4580
4581 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4582
4583 - `service_tier: optional string`
4584
4585 When `group_by=service_tier`, this field provides the service tier of the grouped usage result.
4586
4587 - `user_id: optional string`
4588
4589 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4590
4591 - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
4592
4593 The aggregated embeddings usage details of the specific time bucket.
4594
4595 - `input_tokens: number`
4596
4597 The aggregated number of input tokens used.
4598
4599 - `num_model_requests: number`
4600
4601 The count of requests made to the model.
4602
4603 - `object: "organization.usage.embeddings.result"`
4604
4605 - `"organization.usage.embeddings.result"`
4606
4607 - `api_key_id: optional string`
4608
4609 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4610
4611 - `model: optional string`
4612
4613 When `group_by=model`, this field provides the model name of the grouped usage result.
4614
4615 - `project_id: optional string`
4616
4617 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4618
4619 - `user_id: optional string`
4620
4621 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4622
4623 - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
4624
4625 The aggregated moderations usage details of the specific time bucket.
4626
4627 - `input_tokens: number`
4628
4629 The aggregated number of input tokens used.
4630
4631 - `num_model_requests: number`
4632
4633 The count of requests made to the model.
4634
4635 - `object: "organization.usage.moderations.result"`
4636
4637 - `"organization.usage.moderations.result"`
4638
4639 - `api_key_id: optional string`
4640
4641 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4642
4643 - `model: optional string`
4644
4645 When `group_by=model`, this field provides the model name of the grouped usage result.
4646
4647 - `project_id: optional string`
4648
4649 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4650
4651 - `user_id: optional string`
4652
4653 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4654
4655 - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
4656
4657 The aggregated images usage details of the specific time bucket.
4658
4659 - `images: number`
4660
4661 The number of images processed.
4662
4663 - `num_model_requests: number`
4664
4665 The count of requests made to the model.
4666
4667 - `object: "organization.usage.images.result"`
4668
4669 - `"organization.usage.images.result"`
4670
4671 - `api_key_id: optional string`
4672
4673 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4674
4675 - `model: optional string`
4676
4677 When `group_by=model`, this field provides the model name of the grouped usage result.
4678
4679 - `project_id: optional string`
4680
4681 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4682
4683 - `size: optional string`
4684
4685 When `group_by=size`, this field provides the image size of the grouped usage result.
4686
4687 - `source: optional string`
4688
4689 When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.
4690
4691 - `user_id: optional string`
4692
4693 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4694
4695 - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
4696
4697 The aggregated audio speeches usage details of the specific time bucket.
4698
4699 - `characters: number`
4700
4701 The number of characters processed.
4702
4703 - `num_model_requests: number`
4704
4705 The count of requests made to the model.
4706
4707 - `object: "organization.usage.audio_speeches.result"`
4708
4709 - `"organization.usage.audio_speeches.result"`
4710
4711 - `api_key_id: optional string`
4712
4713 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4714
4715 - `model: optional string`
4716
4717 When `group_by=model`, this field provides the model name of the grouped usage result.
4718
4719 - `project_id: optional string`
4720
4721 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4722
4723 - `user_id: optional string`
4724
4725 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4726
4727 - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
4728
4729 The aggregated audio transcriptions usage details of the specific time bucket.
4730
4731 - `num_model_requests: number`
4732
4733 The count of requests made to the model.
4734
4735 - `object: "organization.usage.audio_transcriptions.result"`
4736
4737 - `"organization.usage.audio_transcriptions.result"`
4738
4739 - `seconds: number`
4740
4741 The number of seconds processed.
4742
4743 - `api_key_id: optional string`
4744
4745 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4746
4747 - `model: optional string`
4748
4749 When `group_by=model`, this field provides the model name of the grouped usage result.
4750
4751 - `project_id: optional string`
4752
4753 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4754
4755 - `user_id: optional string`
4756
4757 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4758
4759 - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
4760
4761 The aggregated vector stores usage details of the specific time bucket.
4762
4763 - `object: "organization.usage.vector_stores.result"`
4764
4765 - `"organization.usage.vector_stores.result"`
4766
4767 - `usage_bytes: number`
4768
4769 The vector stores usage in bytes.
4770
4771 - `project_id: optional string`
4772
4773 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4774
4775 - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
4776
4777 The aggregated code interpreter sessions usage details of the specific time bucket.
4778
4779 - `object: "organization.usage.code_interpreter_sessions.result"`
4780
4781 - `"organization.usage.code_interpreter_sessions.result"`
4782
4783 - `num_sessions: optional number`
4784
4785 The number of code interpreter sessions.
4786
4787 - `project_id: optional string`
4788
4789 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4790
4791 - `CostsResult object { object, amount, line_item, project_id }`
4792
4793 The aggregated costs details of the specific time bucket.
4794
4795 - `object: "organization.costs.result"`
4796
4797 - `"organization.costs.result"`
4798
4799 - `amount: optional object { currency, value }`
4800
4801 The monetary value in its associated currency.
4802
4803 - `currency: optional string`
4804
4805 Lowercase ISO-4217 currency e.g. "usd"
4806
4807 - `value: optional number`
4808
4809 The numeric value of the cost.
4810
4811 - `line_item: optional string`
4812
4813 When `group_by=line_item`, this field provides the line item of the grouped costs result.
4814
4815 - `project_id: optional string`
4816
4817 When `group_by=project_id`, this field provides the project ID of the grouped costs result.
4818
4819 - `start_time: number`
4820
4821 - `has_more: boolean`
4822
4823 - `next_page: string`
4824
4825 - `object: "page"`
4826
4827 - `"page"`
4828
4829### Usage Get Embeddings Response
4830
4831- `UsageGetEmbeddingsResponse object { data, has_more, next_page, object }`
4832
4833 - `data: array of object { end_time, object, result, start_time }`
4834
4835 - `end_time: number`
4836
4837 - `object: "bucket"`
4838
4839 - `"bucket"`
4840
4841 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
4842
4843 - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
4844
4845 The aggregated completions usage details of the specific time bucket.
4846
4847 - `input_tokens: number`
4848
4849 The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
4850
4851 - `num_model_requests: number`
4852
4853 The count of requests made to the model.
4854
4855 - `object: "organization.usage.completions.result"`
4856
4857 - `"organization.usage.completions.result"`
4858
4859 - `output_tokens: number`
4860
4861 The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
4862
4863 - `api_key_id: optional string`
4864
4865 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4866
4867 - `batch: optional boolean`
4868
4869 When `group_by=batch`, this field tells whether the grouped usage result is batch or not.
4870
4871 - `input_audio_tokens: optional number`
4872
4873 The aggregated number of audio input tokens used, including cached tokens.
4874
4875 - `input_cached_tokens: optional number`
4876
4877 The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.
4878
4879 - `model: optional string`
4880
4881 When `group_by=model`, this field provides the model name of the grouped usage result.
4882
4883 - `output_audio_tokens: optional number`
4884
4885 The aggregated number of audio output tokens used.
4886
4887 - `project_id: optional string`
4888
4889 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4890
4891 - `service_tier: optional string`
4892
4893 When `group_by=service_tier`, this field provides the service tier of the grouped usage result.
4894
4895 - `user_id: optional string`
4896
4897 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4898
4899 - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
4900
4901 The aggregated embeddings usage details of the specific time bucket.
4902
4903 - `input_tokens: number`
4904
4905 The aggregated number of input tokens used.
4906
4907 - `num_model_requests: number`
4908
4909 The count of requests made to the model.
4910
4911 - `object: "organization.usage.embeddings.result"`
4912
4913 - `"organization.usage.embeddings.result"`
4914
4915 - `api_key_id: optional string`
4916
4917 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4918
4919 - `model: optional string`
4920
4921 When `group_by=model`, this field provides the model name of the grouped usage result.
4922
4923 - `project_id: optional string`
4924
4925 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4926
4927 - `user_id: optional string`
4928
4929 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4930
4931 - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
4932
4933 The aggregated moderations usage details of the specific time bucket.
4934
4935 - `input_tokens: number`
4936
4937 The aggregated number of input tokens used.
4938
4939 - `num_model_requests: number`
4940
4941 The count of requests made to the model.
4942
4943 - `object: "organization.usage.moderations.result"`
4944
4945 - `"organization.usage.moderations.result"`
4946
4947 - `api_key_id: optional string`
4948
4949 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4950
4951 - `model: optional string`
4952
4953 When `group_by=model`, this field provides the model name of the grouped usage result.
4954
4955 - `project_id: optional string`
4956
4957 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4958
4959 - `user_id: optional string`
4960
4961 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
4962
4963 - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
4964
4965 The aggregated images usage details of the specific time bucket.
4966
4967 - `images: number`
4968
4969 The number of images processed.
4970
4971 - `num_model_requests: number`
4972
4973 The count of requests made to the model.
4974
4975 - `object: "organization.usage.images.result"`
4976
4977 - `"organization.usage.images.result"`
4978
4979 - `api_key_id: optional string`
4980
4981 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
4982
4983 - `model: optional string`
4984
4985 When `group_by=model`, this field provides the model name of the grouped usage result.
4986
4987 - `project_id: optional string`
4988
4989 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
4990
4991 - `size: optional string`
4992
4993 When `group_by=size`, this field provides the image size of the grouped usage result.
4994
4995 - `source: optional string`
4996
4997 When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.
4998
4999 - `user_id: optional string`
5000
5001 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5002
5003 - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
5004
5005 The aggregated audio speeches usage details of the specific time bucket.
5006
5007 - `characters: number`
5008
5009 The number of characters processed.
5010
5011 - `num_model_requests: number`
5012
5013 The count of requests made to the model.
5014
5015 - `object: "organization.usage.audio_speeches.result"`
5016
5017 - `"organization.usage.audio_speeches.result"`
5018
5019 - `api_key_id: optional string`
5020
5021 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5022
5023 - `model: optional string`
5024
5025 When `group_by=model`, this field provides the model name of the grouped usage result.
5026
5027 - `project_id: optional string`
5028
5029 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5030
5031 - `user_id: optional string`
5032
5033 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5034
5035 - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
5036
5037 The aggregated audio transcriptions usage details of the specific time bucket.
5038
5039 - `num_model_requests: number`
5040
5041 The count of requests made to the model.
5042
5043 - `object: "organization.usage.audio_transcriptions.result"`
5044
5045 - `"organization.usage.audio_transcriptions.result"`
5046
5047 - `seconds: number`
5048
5049 The number of seconds processed.
5050
5051 - `api_key_id: optional string`
5052
5053 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5054
5055 - `model: optional string`
5056
5057 When `group_by=model`, this field provides the model name of the grouped usage result.
5058
5059 - `project_id: optional string`
5060
5061 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5062
5063 - `user_id: optional string`
5064
5065 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5066
5067 - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
5068
5069 The aggregated vector stores usage details of the specific time bucket.
5070
5071 - `object: "organization.usage.vector_stores.result"`
5072
5073 - `"organization.usage.vector_stores.result"`
5074
5075 - `usage_bytes: number`
5076
5077 The vector stores usage in bytes.
5078
5079 - `project_id: optional string`
5080
5081 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5082
5083 - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
5084
5085 The aggregated code interpreter sessions usage details of the specific time bucket.
5086
5087 - `object: "organization.usage.code_interpreter_sessions.result"`
5088
5089 - `"organization.usage.code_interpreter_sessions.result"`
5090
5091 - `num_sessions: optional number`
5092
5093 The number of code interpreter sessions.
5094
5095 - `project_id: optional string`
5096
5097 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5098
5099 - `CostsResult object { object, amount, line_item, project_id }`
5100
5101 The aggregated costs details of the specific time bucket.
5102
5103 - `object: "organization.costs.result"`
5104
5105 - `"organization.costs.result"`
5106
5107 - `amount: optional object { currency, value }`
5108
5109 The monetary value in its associated currency.
5110
5111 - `currency: optional string`
5112
5113 Lowercase ISO-4217 currency e.g. "usd"
5114
5115 - `value: optional number`
5116
5117 The numeric value of the cost.
5118
5119 - `line_item: optional string`
5120
5121 When `group_by=line_item`, this field provides the line item of the grouped costs result.
5122
5123 - `project_id: optional string`
5124
5125 When `group_by=project_id`, this field provides the project ID of the grouped costs result.
5126
5127 - `start_time: number`
5128
5129 - `has_more: boolean`
5130
5131 - `next_page: string`
5132
5133 - `object: "page"`
5134
5135 - `"page"`
5136
5137### Usage Get Images Response
5138
5139- `UsageGetImagesResponse object { data, has_more, next_page, object }`
5140
5141 - `data: array of object { end_time, object, result, start_time }`
5142
5143 - `end_time: number`
5144
5145 - `object: "bucket"`
5146
5147 - `"bucket"`
5148
5149 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
5150
5151 - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
5152
5153 The aggregated completions usage details of the specific time bucket.
5154
5155 - `input_tokens: number`
5156
5157 The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
5158
5159 - `num_model_requests: number`
5160
5161 The count of requests made to the model.
5162
5163 - `object: "organization.usage.completions.result"`
5164
5165 - `"organization.usage.completions.result"`
5166
5167 - `output_tokens: number`
5168
5169 The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
5170
5171 - `api_key_id: optional string`
5172
5173 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5174
5175 - `batch: optional boolean`
5176
5177 When `group_by=batch`, this field tells whether the grouped usage result is batch or not.
5178
5179 - `input_audio_tokens: optional number`
5180
5181 The aggregated number of audio input tokens used, including cached tokens.
5182
5183 - `input_cached_tokens: optional number`
5184
5185 The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.
5186
5187 - `model: optional string`
5188
5189 When `group_by=model`, this field provides the model name of the grouped usage result.
5190
5191 - `output_audio_tokens: optional number`
5192
5193 The aggregated number of audio output tokens used.
5194
5195 - `project_id: optional string`
5196
5197 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5198
5199 - `service_tier: optional string`
5200
5201 When `group_by=service_tier`, this field provides the service tier of the grouped usage result.
5202
5203 - `user_id: optional string`
5204
5205 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5206
5207 - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
5208
5209 The aggregated embeddings usage details of the specific time bucket.
5210
5211 - `input_tokens: number`
5212
5213 The aggregated number of input tokens used.
5214
5215 - `num_model_requests: number`
5216
5217 The count of requests made to the model.
5218
5219 - `object: "organization.usage.embeddings.result"`
5220
5221 - `"organization.usage.embeddings.result"`
5222
5223 - `api_key_id: optional string`
5224
5225 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5226
5227 - `model: optional string`
5228
5229 When `group_by=model`, this field provides the model name of the grouped usage result.
5230
5231 - `project_id: optional string`
5232
5233 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5234
5235 - `user_id: optional string`
5236
5237 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5238
5239 - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
5240
5241 The aggregated moderations usage details of the specific time bucket.
5242
5243 - `input_tokens: number`
5244
5245 The aggregated number of input tokens used.
5246
5247 - `num_model_requests: number`
5248
5249 The count of requests made to the model.
5250
5251 - `object: "organization.usage.moderations.result"`
5252
5253 - `"organization.usage.moderations.result"`
5254
5255 - `api_key_id: optional string`
5256
5257 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5258
5259 - `model: optional string`
5260
5261 When `group_by=model`, this field provides the model name of the grouped usage result.
5262
5263 - `project_id: optional string`
5264
5265 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5266
5267 - `user_id: optional string`
5268
5269 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5270
5271 - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
5272
5273 The aggregated images usage details of the specific time bucket.
5274
5275 - `images: number`
5276
5277 The number of images processed.
5278
5279 - `num_model_requests: number`
5280
5281 The count of requests made to the model.
5282
5283 - `object: "organization.usage.images.result"`
5284
5285 - `"organization.usage.images.result"`
5286
5287 - `api_key_id: optional string`
5288
5289 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5290
5291 - `model: optional string`
5292
5293 When `group_by=model`, this field provides the model name of the grouped usage result.
5294
5295 - `project_id: optional string`
5296
5297 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5298
5299 - `size: optional string`
5300
5301 When `group_by=size`, this field provides the image size of the grouped usage result.
5302
5303 - `source: optional string`
5304
5305 When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.
5306
5307 - `user_id: optional string`
5308
5309 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5310
5311 - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
5312
5313 The aggregated audio speeches usage details of the specific time bucket.
5314
5315 - `characters: number`
5316
5317 The number of characters processed.
5318
5319 - `num_model_requests: number`
5320
5321 The count of requests made to the model.
5322
5323 - `object: "organization.usage.audio_speeches.result"`
5324
5325 - `"organization.usage.audio_speeches.result"`
5326
5327 - `api_key_id: optional string`
5328
5329 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5330
5331 - `model: optional string`
5332
5333 When `group_by=model`, this field provides the model name of the grouped usage result.
5334
5335 - `project_id: optional string`
5336
5337 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5338
5339 - `user_id: optional string`
5340
5341 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5342
5343 - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
5344
5345 The aggregated audio transcriptions usage details of the specific time bucket.
5346
5347 - `num_model_requests: number`
5348
5349 The count of requests made to the model.
5350
5351 - `object: "organization.usage.audio_transcriptions.result"`
5352
5353 - `"organization.usage.audio_transcriptions.result"`
5354
5355 - `seconds: number`
5356
5357 The number of seconds processed.
5358
5359 - `api_key_id: optional string`
5360
5361 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5362
5363 - `model: optional string`
5364
5365 When `group_by=model`, this field provides the model name of the grouped usage result.
5366
5367 - `project_id: optional string`
5368
5369 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5370
5371 - `user_id: optional string`
5372
5373 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5374
5375 - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
5376
5377 The aggregated vector stores usage details of the specific time bucket.
5378
5379 - `object: "organization.usage.vector_stores.result"`
5380
5381 - `"organization.usage.vector_stores.result"`
5382
5383 - `usage_bytes: number`
5384
5385 The vector stores usage in bytes.
5386
5387 - `project_id: optional string`
5388
5389 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5390
5391 - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
5392
5393 The aggregated code interpreter sessions usage details of the specific time bucket.
5394
5395 - `object: "organization.usage.code_interpreter_sessions.result"`
5396
5397 - `"organization.usage.code_interpreter_sessions.result"`
5398
5399 - `num_sessions: optional number`
5400
5401 The number of code interpreter sessions.
5402
5403 - `project_id: optional string`
5404
5405 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5406
5407 - `CostsResult object { object, amount, line_item, project_id }`
5408
5409 The aggregated costs details of the specific time bucket.
5410
5411 - `object: "organization.costs.result"`
5412
5413 - `"organization.costs.result"`
5414
5415 - `amount: optional object { currency, value }`
5416
5417 The monetary value in its associated currency.
5418
5419 - `currency: optional string`
5420
5421 Lowercase ISO-4217 currency e.g. "usd"
5422
5423 - `value: optional number`
5424
5425 The numeric value of the cost.
5426
5427 - `line_item: optional string`
5428
5429 When `group_by=line_item`, this field provides the line item of the grouped costs result.
5430
5431 - `project_id: optional string`
5432
5433 When `group_by=project_id`, this field provides the project ID of the grouped costs result.
5434
5435 - `start_time: number`
5436
5437 - `has_more: boolean`
5438
5439 - `next_page: string`
5440
5441 - `object: "page"`
5442
5443 - `"page"`
5444
5445### Usage Get Moderations Response
5446
5447- `UsageGetModerationsResponse object { data, has_more, next_page, object }`
5448
5449 - `data: array of object { end_time, object, result, start_time }`
5450
5451 - `end_time: number`
5452
5453 - `object: "bucket"`
5454
5455 - `"bucket"`
5456
5457 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
5458
5459 - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
5460
5461 The aggregated completions usage details of the specific time bucket.
5462
5463 - `input_tokens: number`
5464
5465 The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
5466
5467 - `num_model_requests: number`
5468
5469 The count of requests made to the model.
5470
5471 - `object: "organization.usage.completions.result"`
5472
5473 - `"organization.usage.completions.result"`
5474
5475 - `output_tokens: number`
5476
5477 The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
5478
5479 - `api_key_id: optional string`
5480
5481 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5482
5483 - `batch: optional boolean`
5484
5485 When `group_by=batch`, this field tells whether the grouped usage result is batch or not.
5486
5487 - `input_audio_tokens: optional number`
5488
5489 The aggregated number of audio input tokens used, including cached tokens.
5490
5491 - `input_cached_tokens: optional number`
5492
5493 The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.
5494
5495 - `model: optional string`
5496
5497 When `group_by=model`, this field provides the model name of the grouped usage result.
5498
5499 - `output_audio_tokens: optional number`
5500
5501 The aggregated number of audio output tokens used.
5502
5503 - `project_id: optional string`
5504
5505 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5506
5507 - `service_tier: optional string`
5508
5509 When `group_by=service_tier`, this field provides the service tier of the grouped usage result.
5510
5511 - `user_id: optional string`
5512
5513 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5514
5515 - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
5516
5517 The aggregated embeddings usage details of the specific time bucket.
5518
5519 - `input_tokens: number`
5520
5521 The aggregated number of input tokens used.
5522
5523 - `num_model_requests: number`
5524
5525 The count of requests made to the model.
5526
5527 - `object: "organization.usage.embeddings.result"`
5528
5529 - `"organization.usage.embeddings.result"`
5530
5531 - `api_key_id: optional string`
5532
5533 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5534
5535 - `model: optional string`
5536
5537 When `group_by=model`, this field provides the model name of the grouped usage result.
5538
5539 - `project_id: optional string`
5540
5541 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5542
5543 - `user_id: optional string`
5544
5545 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5546
5547 - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
5548
5549 The aggregated moderations usage details of the specific time bucket.
5550
5551 - `input_tokens: number`
5552
5553 The aggregated number of input tokens used.
5554
5555 - `num_model_requests: number`
5556
5557 The count of requests made to the model.
5558
5559 - `object: "organization.usage.moderations.result"`
5560
5561 - `"organization.usage.moderations.result"`
5562
5563 - `api_key_id: optional string`
5564
5565 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5566
5567 - `model: optional string`
5568
5569 When `group_by=model`, this field provides the model name of the grouped usage result.
5570
5571 - `project_id: optional string`
5572
5573 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5574
5575 - `user_id: optional string`
5576
5577 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5578
5579 - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
5580
5581 The aggregated images usage details of the specific time bucket.
5582
5583 - `images: number`
5584
5585 The number of images processed.
5586
5587 - `num_model_requests: number`
5588
5589 The count of requests made to the model.
5590
5591 - `object: "organization.usage.images.result"`
5592
5593 - `"organization.usage.images.result"`
5594
5595 - `api_key_id: optional string`
5596
5597 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5598
5599 - `model: optional string`
5600
5601 When `group_by=model`, this field provides the model name of the grouped usage result.
5602
5603 - `project_id: optional string`
5604
5605 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5606
5607 - `size: optional string`
5608
5609 When `group_by=size`, this field provides the image size of the grouped usage result.
5610
5611 - `source: optional string`
5612
5613 When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.
5614
5615 - `user_id: optional string`
5616
5617 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5618
5619 - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
5620
5621 The aggregated audio speeches usage details of the specific time bucket.
5622
5623 - `characters: number`
5624
5625 The number of characters processed.
5626
5627 - `num_model_requests: number`
5628
5629 The count of requests made to the model.
5630
5631 - `object: "organization.usage.audio_speeches.result"`
5632
5633 - `"organization.usage.audio_speeches.result"`
5634
5635 - `api_key_id: optional string`
5636
5637 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5638
5639 - `model: optional string`
5640
5641 When `group_by=model`, this field provides the model name of the grouped usage result.
5642
5643 - `project_id: optional string`
5644
5645 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5646
5647 - `user_id: optional string`
5648
5649 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5650
5651 - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
5652
5653 The aggregated audio transcriptions usage details of the specific time bucket.
5654
5655 - `num_model_requests: number`
5656
5657 The count of requests made to the model.
5658
5659 - `object: "organization.usage.audio_transcriptions.result"`
5660
5661 - `"organization.usage.audio_transcriptions.result"`
5662
5663 - `seconds: number`
5664
5665 The number of seconds processed.
5666
5667 - `api_key_id: optional string`
5668
5669 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5670
5671 - `model: optional string`
5672
5673 When `group_by=model`, this field provides the model name of the grouped usage result.
5674
5675 - `project_id: optional string`
5676
5677 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5678
5679 - `user_id: optional string`
5680
5681 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5682
5683 - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
5684
5685 The aggregated vector stores usage details of the specific time bucket.
5686
5687 - `object: "organization.usage.vector_stores.result"`
5688
5689 - `"organization.usage.vector_stores.result"`
5690
5691 - `usage_bytes: number`
5692
5693 The vector stores usage in bytes.
5694
5695 - `project_id: optional string`
5696
5697 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5698
5699 - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
5700
5701 The aggregated code interpreter sessions usage details of the specific time bucket.
5702
5703 - `object: "organization.usage.code_interpreter_sessions.result"`
5704
5705 - `"organization.usage.code_interpreter_sessions.result"`
5706
5707 - `num_sessions: optional number`
5708
5709 The number of code interpreter sessions.
5710
5711 - `project_id: optional string`
5712
5713 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5714
5715 - `CostsResult object { object, amount, line_item, project_id }`
5716
5717 The aggregated costs details of the specific time bucket.
5718
5719 - `object: "organization.costs.result"`
5720
5721 - `"organization.costs.result"`
5722
5723 - `amount: optional object { currency, value }`
5724
5725 The monetary value in its associated currency.
5726
5727 - `currency: optional string`
5728
5729 Lowercase ISO-4217 currency e.g. "usd"
5730
5731 - `value: optional number`
5732
5733 The numeric value of the cost.
5734
5735 - `line_item: optional string`
5736
5737 When `group_by=line_item`, this field provides the line item of the grouped costs result.
5738
5739 - `project_id: optional string`
5740
5741 When `group_by=project_id`, this field provides the project ID of the grouped costs result.
5742
5743 - `start_time: number`
5744
5745 - `has_more: boolean`
5746
5747 - `next_page: string`
5748
5749 - `object: "page"`
5750
5751 - `"page"`
5752
5753### Usage Get Vector Stores Response
5754
5755- `UsageGetVectorStoresResponse object { data, has_more, next_page, object }`
5756
5757 - `data: array of object { end_time, object, result, start_time }`
5758
5759 - `end_time: number`
5760
5761 - `object: "bucket"`
5762
5763 - `"bucket"`
5764
5765 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`
5766
5767 - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`
5768
5769 The aggregated completions usage details of the specific time bucket.
5770
5771 - `input_tokens: number`
5772
5773 The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
5774
5775 - `num_model_requests: number`
5776
5777 The count of requests made to the model.
5778
5779 - `object: "organization.usage.completions.result"`
5780
5781 - `"organization.usage.completions.result"`
5782
5783 - `output_tokens: number`
5784
5785 The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
5786
5787 - `api_key_id: optional string`
5788
5789 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5790
5791 - `batch: optional boolean`
5792
5793 When `group_by=batch`, this field tells whether the grouped usage result is batch or not.
5794
5795 - `input_audio_tokens: optional number`
5796
5797 The aggregated number of audio input tokens used, including cached tokens.
5798
5799 - `input_cached_tokens: optional number`
5800
5801 The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.
5802
5803 - `model: optional string`
5804
5805 When `group_by=model`, this field provides the model name of the grouped usage result.
5806
5807 - `output_audio_tokens: optional number`
5808
5809 The aggregated number of audio output tokens used.
5810
5811 - `project_id: optional string`
5812
5813 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5814
5815 - `service_tier: optional string`
5816
5817 When `group_by=service_tier`, this field provides the service tier of the grouped usage result.
5818
5819 - `user_id: optional string`
5820
5821 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5822
5823 - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`
5824
5825 The aggregated embeddings usage details of the specific time bucket.
5826
5827 - `input_tokens: number`
5828
5829 The aggregated number of input tokens used.
5830
5831 - `num_model_requests: number`
5832
5833 The count of requests made to the model.
5834
5835 - `object: "organization.usage.embeddings.result"`
5836
5837 - `"organization.usage.embeddings.result"`
5838
5839 - `api_key_id: optional string`
5840
5841 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5842
5843 - `model: optional string`
5844
5845 When `group_by=model`, this field provides the model name of the grouped usage result.
5846
5847 - `project_id: optional string`
5848
5849 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5850
5851 - `user_id: optional string`
5852
5853 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5854
5855 - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`
5856
5857 The aggregated moderations usage details of the specific time bucket.
5858
5859 - `input_tokens: number`
5860
5861 The aggregated number of input tokens used.
5862
5863 - `num_model_requests: number`
5864
5865 The count of requests made to the model.
5866
5867 - `object: "organization.usage.moderations.result"`
5868
5869 - `"organization.usage.moderations.result"`
5870
5871 - `api_key_id: optional string`
5872
5873 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5874
5875 - `model: optional string`
5876
5877 When `group_by=model`, this field provides the model name of the grouped usage result.
5878
5879 - `project_id: optional string`
5880
5881 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5882
5883 - `user_id: optional string`
5884
5885 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5886
5887 - `UsageImagesResult object { images, num_model_requests, object, 6 more }`
5888
5889 The aggregated images usage details of the specific time bucket.
5890
5891 - `images: number`
5892
5893 The number of images processed.
5894
5895 - `num_model_requests: number`
5896
5897 The count of requests made to the model.
5898
5899 - `object: "organization.usage.images.result"`
5900
5901 - `"organization.usage.images.result"`
5902
5903 - `api_key_id: optional string`
5904
5905 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5906
5907 - `model: optional string`
5908
5909 When `group_by=model`, this field provides the model name of the grouped usage result.
5910
5911 - `project_id: optional string`
5912
5913 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5914
5915 - `size: optional string`
5916
5917 When `group_by=size`, this field provides the image size of the grouped usage result.
5918
5919 - `source: optional string`
5920
5921 When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.
5922
5923 - `user_id: optional string`
5924
5925 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5926
5927 - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`
5928
5929 The aggregated audio speeches usage details of the specific time bucket.
5930
5931 - `characters: number`
5932
5933 The number of characters processed.
5934
5935 - `num_model_requests: number`
5936
5937 The count of requests made to the model.
5938
5939 - `object: "organization.usage.audio_speeches.result"`
5940
5941 - `"organization.usage.audio_speeches.result"`
5942
5943 - `api_key_id: optional string`
5944
5945 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5946
5947 - `model: optional string`
5948
5949 When `group_by=model`, this field provides the model name of the grouped usage result.
5950
5951 - `project_id: optional string`
5952
5953 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5954
5955 - `user_id: optional string`
5956
5957 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5958
5959 - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`
5960
5961 The aggregated audio transcriptions usage details of the specific time bucket.
5962
5963 - `num_model_requests: number`
5964
5965 The count of requests made to the model.
5966
5967 - `object: "organization.usage.audio_transcriptions.result"`
5968
5969 - `"organization.usage.audio_transcriptions.result"`
5970
5971 - `seconds: number`
5972
5973 The number of seconds processed.
5974
5975 - `api_key_id: optional string`
5976
5977 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
5978
5979 - `model: optional string`
5980
5981 When `group_by=model`, this field provides the model name of the grouped usage result.
5982
5983 - `project_id: optional string`
5984
5985 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
5986
5987 - `user_id: optional string`
5988
5989 When `group_by=user_id`, this field provides the user ID of the grouped usage result.
5990
5991 - `UsageVectorStoresResult object { object, usage_bytes, project_id }`
5992
5993 The aggregated vector stores usage details of the specific time bucket.
5994
5995 - `object: "organization.usage.vector_stores.result"`
5996
5997 - `"organization.usage.vector_stores.result"`
5998
5999 - `usage_bytes: number`
6000
6001 The vector stores usage in bytes.
6002
6003 - `project_id: optional string`
6004
6005 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
6006
6007 - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`
6008
6009 The aggregated code interpreter sessions usage details of the specific time bucket.
6010
6011 - `object: "organization.usage.code_interpreter_sessions.result"`
6012
6013 - `"organization.usage.code_interpreter_sessions.result"`
6014
6015 - `num_sessions: optional number`
6016
6017 The number of code interpreter sessions.
6018
6019 - `project_id: optional string`
6020
6021 When `group_by=project_id`, this field provides the project ID of the grouped usage result.
6022
6023 - `CostsResult object { object, amount, line_item, project_id }`
6024
6025 The aggregated costs details of the specific time bucket.
6026
6027 - `object: "organization.costs.result"`
6028
6029 - `"organization.costs.result"`
6030
6031 - `amount: optional object { currency, value }`
6032
6033 The monetary value in its associated currency.
6034
6035 - `currency: optional string`
6036
6037 Lowercase ISO-4217 currency e.g. "usd"
6038
6039 - `value: optional number`
6040
6041 The numeric value of the cost.
6042
6043 - `line_item: optional string`
6044
6045 When `group_by=line_item`, this field provides the line item of the grouped costs result.
6046
6047 - `project_id: optional string`
6048
6049 When `group_by=project_id`, this field provides the project ID of the grouped costs result.
6050
6051 - `start_time: number`
6052
6053 - `has_more: boolean`
6054
6055 - `next_page: string`
6056
6057 - `object: "page"`
6058
6059 - `"page"`
10 10
11### Returns11### Returns
12 12
1313- `User = object { id, added_at, email, 3 more }`- `User object { id, added_at, email, 3 more }`
14 14
15 Represents an individual `user` within an organization.15 Represents an individual `user` within an organization.
16 16
20 20
21### Returns21### Returns
22 22
2323- `User = object { id, added_at, email, 3 more }`- `User object { id, added_at, email, 3 more }`
24 24
25 Represents an individual `user` within an organization.25 Represents an individual `user` within an organization.
26 26
27 27
28 The format of the input audio.28 The format of the input audio.
29 29
3030 - `PCMAudioFormat = object { rate, type }` - `PCMAudioFormat object { rate, type }`
31 31
32 The PCM audio format. Only a 24kHz sample rate is supported.32 The PCM audio format. Only a 24kHz sample rate is supported.
33 33
43 43
44 - `"audio/pcm"`44 - `"audio/pcm"`
45 45
4646 - `PCMUAudioFormat = object { type }` - `PCMUAudioFormat object { type }`
47 47
48 The G.711 μ-law format.48 The G.711 μ-law format.
49 49
53 53
54 - `"audio/pcmu"`54 - `"audio/pcmu"`
55 55
5656 - `PCMAAudioFormat = object { type }` - `PCMAAudioFormat object { type }`
57 57
58 The G.711 A-law format.58 The G.711 A-law format.
59 59
122 122
123 Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.123 Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.
124 124
125125 - `ServerVad = object { type, create_response, idle_timeout_ms, 4 more }` - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`
126 126
127 Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.127 Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.
128 128
176 higher threshold will require louder audio to activate the model, and176 higher threshold will require louder audio to activate the model, and
177 thus might perform better in noisy environments.177 thus might perform better in noisy environments.
178 178
179179 - `SemanticVad = object { type, create_response, eagerness, interrupt_response }` - `SemanticVad object { type, create_response, eagerness, interrupt_response }`
180 180
181 Server-side semantic turn detection which uses a model to determine when the user has finished speaking.181 Server-side semantic turn detection which uses a model to determine when the user has finished speaking.
182 182
213 213
214 The format of the output audio.214 The format of the output audio.
215 215
216 - `PCMAudioFormat = object { rate, type }`
217
218 The PCM audio format. Only a 24kHz sample rate is supported.
219
220 - `rate: optional 24000`
221
222 The sample rate of the audio. Always `24000`.
223
224 - `24000`
225
226 - `type: optional "audio/pcm"`
227
228 The audio format. Always `audio/pcm`.
229
230 - `"audio/pcm"`
231
232 - `PCMUAudioFormat = object { type }`
233
234 The G.711 μ-law format.
235
236 - `type: optional "audio/pcmu"`
237
238 The audio format. Always `audio/pcmu`.
239
240 - `"audio/pcmu"`
241
242 - `PCMAAudioFormat = object { type }`
243
244 The G.711 A-law format.
245
246 - `type: optional "audio/pcma"`
247
248 The audio format. Always `audio/pcma`.
249
250 - `"audio/pcma"`
251
252 - `speed: optional number`216 - `speed: optional number`
253 217
254 The speed of the model's spoken response as a multiple of the original speed.218 The speed of the model's spoken response as a multiple of the original speed.
290 254
291 - `"cedar"`255 - `"cedar"`
292 256
293257 - `ID = object { id }` - `ID object { id }`
294 258
295 Custom voice reference.259 Custom voice reference.
296 260
394 358
395 - `string`359 - `string`
396 360
397361 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
398 362
399 A text input to the model.363 A text input to the model.
400 364
408 372
409 - `"input_text"`373 - `"input_text"`
410 374
411375 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
412 376
413 An image input to the model. Learn about [image inputs](/docs/guides/vision).377 An image input to the model. Learn about [image inputs](/docs/guides/vision).
414 378
438 402
439 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.403 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
440 404
441405 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
442 406
443 A file input to the model.407 A file input to the model.
444 408
498 462
499 - `"required"`463 - `"required"`
500 464
501465 - `ToolChoiceFunction = object { name, type }` - `ToolChoiceFunction object { name, type }`
502 466
503 Use this option to force the model to call a specific function.467 Use this option to force the model to call a specific function.
504 468
512 476
513 - `"function"`477 - `"function"`
514 478
515479 - `ToolChoiceMcp = object { server_label, type, name }` - `ToolChoiceMcp object { server_label, type, name }`
516 480
517 Use this option to force the model to call a specific tool on a remote MCP server.481 Use this option to force the model to call a specific tool on a remote MCP server.
518 482
534 498
535 Tools available to the model.499 Tools available to the model.
536 500
537501 - `RealtimeFunctionTool = object { description, name, parameters, type }` - `RealtimeFunctionTool object { description, name, parameters, type }`
538 502
539 - `description: optional string`503 - `description: optional string`
540 504
556 520
557 - `"function"`521 - `"function"`
558 522
559523 - `McpTool = object { server_label, type, allowed_tools, 7 more }` - `McpTool object { server_label, type, allowed_tools, 7 more }`
560 524
561 Give the model access to additional tools via remote Model Context Protocol525 Give the model access to additional tools via remote Model Context Protocol
562 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).526 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
579 543
580 A string array of allowed tool names544 A string array of allowed tool names
581 545
582546 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
583 547
584 A filter object to specify which tools are allowed.548 A filter object to specify which tools are allowed.
585 549
645 609
646 Specify which of the MCP server's tools require approval.610 Specify which of the MCP server's tools require approval.
647 611
648612 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
649 613
650 Specify which of the MCP server's tools require approval. Can be614 Specify which of the MCP server's tools require approval. Can be
651 `always`, `never`, or a filter object associated with tools615 `always`, `never`, or a filter object associated with tools
712 676
713 - `"auto"`677 - `"auto"`
714 678
715679 - `TracingConfiguration = object { group_id, metadata, workflow_name }` - `TracingConfiguration object { group_id, metadata, workflow_name }`
716 680
717 Granular configuration for tracing.681 Granular configuration for tracing.
718 682
749 713
750 - `"disabled"`714 - `"disabled"`
751 715
752716 - `RetentionRatioTruncation = object { retention_ratio, type, token_limits }` - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`
753 717
754 Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.718 Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.
755 719
40 Session configuration to use for the client secret. Choose either a realtime40 Session configuration to use for the client secret. Choose either a realtime
41 session or a transcription session.41 session or a transcription session.
42 42
4343 - `RealtimeSessionCreateRequest = object { type, audio, include, 9 more }` - `RealtimeSessionCreateRequest object { type, audio, include, 9 more }`
44 44
45 Realtime session object configuration.45 Realtime session object configuration.
46 46
60 60
61 The format of the input audio.61 The format of the input audio.
62 62
6363 - `PCMAudioFormat = object { rate, type }` - `PCMAudioFormat object { rate, type }`
64 64
65 The PCM audio format. Only a 24kHz sample rate is supported.65 The PCM audio format. Only a 24kHz sample rate is supported.
66 66
76 76
77 - `"audio/pcm"`77 - `"audio/pcm"`
78 78
7979 - `PCMUAudioFormat = object { type }` - `PCMUAudioFormat object { type }`
80 80
81 The G.711 μ-law format.81 The G.711 μ-law format.
82 82
86 86
87 - `"audio/pcmu"`87 - `"audio/pcmu"`
88 88
8989 - `PCMAAudioFormat = object { type }` - `PCMAAudioFormat object { type }`
90 90
91 The G.711 A-law format.91 The G.711 A-law format.
92 92
155 155
156 Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.156 Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.
157 157
158158 - `ServerVad = object { type, create_response, idle_timeout_ms, 4 more }` - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`
159 159
160 Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.160 Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.
161 161
209 higher threshold will require louder audio to activate the model, and209 higher threshold will require louder audio to activate the model, and
210 thus might perform better in noisy environments.210 thus might perform better in noisy environments.
211 211
212212 - `SemanticVad = object { type, create_response, eagerness, interrupt_response }` - `SemanticVad object { type, create_response, eagerness, interrupt_response }`
213 213
214 Server-side semantic turn detection which uses a model to determine when the user has finished speaking.214 Server-side semantic turn detection which uses a model to determine when the user has finished speaking.
215 215
246 246
247 The format of the output audio.247 The format of the output audio.
248 248
249 - `PCMAudioFormat = object { rate, type }`
250
251 The PCM audio format. Only a 24kHz sample rate is supported.
252
253 - `rate: optional 24000`
254
255 The sample rate of the audio. Always `24000`.
256
257 - `24000`
258
259 - `type: optional "audio/pcm"`
260
261 The audio format. Always `audio/pcm`.
262
263 - `"audio/pcm"`
264
265 - `PCMUAudioFormat = object { type }`
266
267 The G.711 μ-law format.
268
269 - `type: optional "audio/pcmu"`
270
271 The audio format. Always `audio/pcmu`.
272
273 - `"audio/pcmu"`
274
275 - `PCMAAudioFormat = object { type }`
276
277 The G.711 A-law format.
278
279 - `type: optional "audio/pcma"`
280
281 The audio format. Always `audio/pcma`.
282
283 - `"audio/pcma"`
284
285 - `speed: optional number`249 - `speed: optional number`
286 250
287 The speed of the model's spoken response as a multiple of the original speed.251 The speed of the model's spoken response as a multiple of the original speed.
323 287
324 - `"cedar"`288 - `"cedar"`
325 289
326290 - `ID = object { id }` - `ID object { id }`
327 291
328 Custom voice reference.292 Custom voice reference.
329 293
427 391
428 - `string`392 - `string`
429 393
430394 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
431 395
432 A text input to the model.396 A text input to the model.
433 397
441 405
442 - `"input_text"`406 - `"input_text"`
443 407
444408 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
445 409
446 An image input to the model. Learn about [image inputs](/docs/guides/vision).410 An image input to the model. Learn about [image inputs](/docs/guides/vision).
447 411
471 435
472 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.436 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
473 437
474438 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
475 439
476 A file input to the model.440 A file input to the model.
477 441
531 495
532 - `"required"`496 - `"required"`
533 497
534498 - `ToolChoiceFunction = object { name, type }` - `ToolChoiceFunction object { name, type }`
535 499
536 Use this option to force the model to call a specific function.500 Use this option to force the model to call a specific function.
537 501
545 509
546 - `"function"`510 - `"function"`
547 511
548512 - `ToolChoiceMcp = object { server_label, type, name }` - `ToolChoiceMcp object { server_label, type, name }`
549 513
550 Use this option to force the model to call a specific tool on a remote MCP server.514 Use this option to force the model to call a specific tool on a remote MCP server.
551 515
567 531
568 Tools available to the model.532 Tools available to the model.
569 533
570534 - `RealtimeFunctionTool = object { description, name, parameters, type }` - `RealtimeFunctionTool object { description, name, parameters, type }`
571 535
572 - `description: optional string`536 - `description: optional string`
573 537
589 553
590 - `"function"`554 - `"function"`
591 555
592556 - `McpTool = object { server_label, type, allowed_tools, 7 more }` - `McpTool object { server_label, type, allowed_tools, 7 more }`
593 557
594 Give the model access to additional tools via remote Model Context Protocol558 Give the model access to additional tools via remote Model Context Protocol
595 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).559 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
612 576
613 A string array of allowed tool names577 A string array of allowed tool names
614 578
615579 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
616 580
617 A filter object to specify which tools are allowed.581 A filter object to specify which tools are allowed.
618 582
678 642
679 Specify which of the MCP server's tools require approval.643 Specify which of the MCP server's tools require approval.
680 644
681645 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
682 646
683 Specify which of the MCP server's tools require approval. Can be647 Specify which of the MCP server's tools require approval. Can be
684 `always`, `never`, or a filter object associated with tools648 `always`, `never`, or a filter object associated with tools
745 709
746 - `"auto"`710 - `"auto"`
747 711
748712 - `TracingConfiguration = object { group_id, metadata, workflow_name }` - `TracingConfiguration object { group_id, metadata, workflow_name }`
749 713
750 Granular configuration for tracing.714 Granular configuration for tracing.
751 715
782 746
783 - `"disabled"`747 - `"disabled"`
784 748
785749 - `RetentionRatioTruncation = object { retention_ratio, type, token_limits }` - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`
786 750
787 Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.751 Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.
788 752
804 768
805 Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.769 Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.
806 770
807771 - `RealtimeTranscriptionSessionCreateRequest = object { type, audio, include }` - `RealtimeTranscriptionSessionCreateRequest object { type, audio, include }`
808 772
809 Realtime transcription session object configuration.773 Realtime transcription session object configuration.
810 774
824 788
825 The PCM audio format. Only a 24kHz sample rate is supported.789 The PCM audio format. Only a 24kHz sample rate is supported.
826 790
827 - `PCMAudioFormat = object { rate, type }`
828
829 The PCM audio format. Only a 24kHz sample rate is supported.
830
831 - `rate: optional 24000`
832
833 The sample rate of the audio. Always `24000`.
834
835 - `24000`
836
837 - `type: optional "audio/pcm"`
838
839 The audio format. Always `audio/pcm`.
840
841 - `"audio/pcm"`
842
843 - `PCMUAudioFormat = object { type }`
844
845 The G.711 μ-law format.
846
847 - `type: optional "audio/pcmu"`
848
849 The audio format. Always `audio/pcmu`.
850
851 - `"audio/pcmu"`
852
853 - `PCMAAudioFormat = object { type }`
854
855 The G.711 A-law format.
856
857 - `type: optional "audio/pcma"`
858
859 The audio format. Always `audio/pcma`.
860
861 - `"audio/pcma"`
862
863 - `noise_reduction: optional object { type }`791 - `noise_reduction: optional object { type }`
864 792
865 Configuration for input audio noise reduction. This can be set to `null` to turn off.793 Configuration for input audio noise reduction. This can be set to `null` to turn off.
870 798
871 Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.799 Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.
872 800
873 - `"near_field"`
874
875 - `"far_field"`
876
877 - `transcription: optional AudioTranscription`801 - `transcription: optional AudioTranscription`
878 802
879 Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.803 Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.
880 804
881 - `language: optional string`
882
883 The language of the input audio. Supplying the input language in
884 [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format
885 will improve accuracy and latency.
886
887 - `model: optional string or "whisper-1" or "gpt-4o-mini-transcribe" or "gpt-4o-mini-transcribe-2025-12-15" or 2 more`
888
889 The model to use for transcription. Current options are `whisper-1`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, and `gpt-4o-transcribe-diarize`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
890
891 - `string`
892
893 - `"whisper-1" or "gpt-4o-mini-transcribe" or "gpt-4o-mini-transcribe-2025-12-15" or 2 more`
894
895 The model to use for transcription. Current options are `whisper-1`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, and `gpt-4o-transcribe-diarize`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
896
897 - `"whisper-1"`
898
899 - `"gpt-4o-mini-transcribe"`
900
901 - `"gpt-4o-mini-transcribe-2025-12-15"`
902
903 - `"gpt-4o-transcribe"`
904
905 - `"gpt-4o-transcribe-diarize"`
906
907 - `prompt: optional string`
908
909 An optional text to guide the model's style or continue a previous audio
910 segment.
911 For `whisper-1`, the [prompt is a list of keywords](/docs/guides/speech-to-text#prompting).
912 For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".
913
914 - `turn_detection: optional RealtimeTranscriptionSessionAudioInputTurnDetection`805 - `turn_detection: optional RealtimeTranscriptionSessionAudioInputTurnDetection`
915 806
916 Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.807 Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.
919 810
920 Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.811 Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.
921 812
922813 - `ServerVad = object { type, create_response, idle_timeout_ms, 4 more }` - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`
923 814
924 Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.815 Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.
925 816
973 higher threshold will require louder audio to activate the model, and864 higher threshold will require louder audio to activate the model, and
974 thus might perform better in noisy environments.865 thus might perform better in noisy environments.
975 866
976867 - `SemanticVad = object { type, create_response, eagerness, interrupt_response }` - `SemanticVad object { type, create_response, eagerness, interrupt_response }`
977 868
978 Server-side semantic turn detection which uses a model to determine when the user has finished speaking.869 Server-side semantic turn detection which uses a model to determine when the user has finished speaking.
979 870
1022 913
1023 The session configuration for either a realtime or transcription session.914 The session configuration for either a realtime or transcription session.
1024 915
1025916 - `RealtimeSessionCreateResponse = object { client_secret, type, audio, 10 more }` - `RealtimeSessionCreateResponse object { client_secret, type, audio, 10 more }`
1026 917
1027 A new Realtime session configuration, with an ephemeral key. Default TTL918 A new Realtime session configuration, with an ephemeral key. Default TTL
1028 for keys is one minute.919 for keys is one minute.
1056 947
1057 The format of the input audio.948 The format of the input audio.
1058 949
1059950 - `PCMAudioFormat = object { rate, type }` - `PCMAudioFormat object { rate, type }`
1060 951
1061 The PCM audio format. Only a 24kHz sample rate is supported.952 The PCM audio format. Only a 24kHz sample rate is supported.
1062 953
1072 963
1073 - `"audio/pcm"`964 - `"audio/pcm"`
1074 965
1075966 - `PCMUAudioFormat = object { type }` - `PCMUAudioFormat object { type }`
1076 967
1077 The G.711 μ-law format.968 The G.711 μ-law format.
1078 969
1082 973
1083 - `"audio/pcmu"`974 - `"audio/pcmu"`
1084 975
1085976 - `PCMAAudioFormat = object { type }` - `PCMAAudioFormat object { type }`
1086 977
1087 The G.711 A-law format.978 The G.711 A-law format.
1088 979
1151 1042
1152 Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.1043 Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.
1153 1044
11541045 - `ServerVad = object { type, create_response, idle_timeout_ms, 4 more }` - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`
1155 1046
1156 Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.1047 Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.
1157 1048
1205 higher threshold will require louder audio to activate the model, and1096 higher threshold will require louder audio to activate the model, and
1206 thus might perform better in noisy environments.1097 thus might perform better in noisy environments.
1207 1098
12081099 - `SemanticVad = object { type, create_response, eagerness, interrupt_response }` - `SemanticVad object { type, create_response, eagerness, interrupt_response }`
1209 1100
1210 Server-side semantic turn detection which uses a model to determine when the user has finished speaking.1101 Server-side semantic turn detection which uses a model to determine when the user has finished speaking.
1211 1102
1242 1133
1243 The format of the output audio.1134 The format of the output audio.
1244 1135
1245 - `PCMAudioFormat = object { rate, type }`
1246
1247 The PCM audio format. Only a 24kHz sample rate is supported.
1248
1249 - `rate: optional 24000`
1250
1251 The sample rate of the audio. Always `24000`.
1252
1253 - `24000`
1254
1255 - `type: optional "audio/pcm"`
1256
1257 The audio format. Always `audio/pcm`.
1258
1259 - `"audio/pcm"`
1260
1261 - `PCMUAudioFormat = object { type }`
1262
1263 The G.711 μ-law format.
1264
1265 - `type: optional "audio/pcmu"`
1266
1267 The audio format. Always `audio/pcmu`.
1268
1269 - `"audio/pcmu"`
1270
1271 - `PCMAAudioFormat = object { type }`
1272
1273 The G.711 A-law format.
1274
1275 - `type: optional "audio/pcma"`
1276
1277 The audio format. Always `audio/pcma`.
1278
1279 - `"audio/pcma"`
1280
1281 - `speed: optional number`1136 - `speed: optional number`
1282 1137
1283 The speed of the model's spoken response as a multiple of the original speed.1138 The speed of the model's spoken response as a multiple of the original speed.
1420 1275
1421 - `string`1276 - `string`
1422 1277
14231278 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
1424 1279
1425 A text input to the model.1280 A text input to the model.
1426 1281
1434 1289
1435 - `"input_text"`1290 - `"input_text"`
1436 1291
14371292 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
1438 1293
1439 An image input to the model. Learn about [image inputs](/docs/guides/vision).1294 An image input to the model. Learn about [image inputs](/docs/guides/vision).
1440 1295
1464 1319
1465 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.1320 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
1466 1321
14671322 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
1468 1323
1469 A file input to the model.1324 A file input to the model.
1470 1325
1524 1379
1525 - `"required"`1380 - `"required"`
1526 1381
15271382 - `ToolChoiceFunction = object { name, type }` - `ToolChoiceFunction object { name, type }`
1528 1383
1529 Use this option to force the model to call a specific function.1384 Use this option to force the model to call a specific function.
1530 1385
1538 1393
1539 - `"function"`1394 - `"function"`
1540 1395
15411396 - `ToolChoiceMcp = object { server_label, type, name }` - `ToolChoiceMcp object { server_label, type, name }`
1542 1397
1543 Use this option to force the model to call a specific tool on a remote MCP server.1398 Use this option to force the model to call a specific tool on a remote MCP server.
1544 1399
1560 1415
1561 Tools available to the model.1416 Tools available to the model.
1562 1417
15631418 - `RealtimeFunctionTool = object { description, name, parameters, type }` - `RealtimeFunctionTool object { description, name, parameters, type }`
1564 1419
1565 - `description: optional string`1420 - `description: optional string`
1566 1421
1582 1437
1583 - `"function"`1438 - `"function"`
1584 1439
15851440 - `McpTool = object { server_label, type, allowed_tools, 7 more }` - `McpTool object { server_label, type, allowed_tools, 7 more }`
1586 1441
1587 Give the model access to additional tools via remote Model Context Protocol1442 Give the model access to additional tools via remote Model Context Protocol
1588 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).1443 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
1605 1460
1606 A string array of allowed tool names1461 A string array of allowed tool names
1607 1462
16081463 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
1609 1464
1610 A filter object to specify which tools are allowed.1465 A filter object to specify which tools are allowed.
1611 1466
1671 1526
1672 Specify which of the MCP server's tools require approval.1527 Specify which of the MCP server's tools require approval.
1673 1528
16741529 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
1675 1530
1676 Specify which of the MCP server's tools require approval. Can be1531 Specify which of the MCP server's tools require approval. Can be
1677 `always`, `never`, or a filter object associated with tools1532 `always`, `never`, or a filter object associated with tools
1738 1593
1739 - `"auto"`1594 - `"auto"`
1740 1595
17411596 - `TracingConfiguration = object { group_id, metadata, workflow_name }` - `TracingConfiguration object { group_id, metadata, workflow_name }`
1742 1597
1743 Granular configuration for tracing.1598 Granular configuration for tracing.
1744 1599
1775 1630
1776 - `"disabled"`1631 - `"disabled"`
1777 1632
17781633 - `RetentionRatioTruncation = object { retention_ratio, type, token_limits }` - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`
1779 1634
1780 Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.1635 Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.
1781 1636
1797 1652
1798 Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.1653 Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.
1799 1654
18001655 - `RealtimeTranscriptionSessionCreateResponse = object { id, object, type, 3 more }` - `RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more }`
1801 1656
1802 A Realtime transcription session configuration object.1657 A Realtime transcription session configuration object.
1803 1658
1825 1680
1826 The PCM audio format. Only a 24kHz sample rate is supported.1681 The PCM audio format. Only a 24kHz sample rate is supported.
1827 1682
1828 - `PCMAudioFormat = object { rate, type }`
1829
1830 The PCM audio format. Only a 24kHz sample rate is supported.
1831
1832 - `rate: optional 24000`
1833
1834 The sample rate of the audio. Always `24000`.
1835
1836 - `24000`
1837
1838 - `type: optional "audio/pcm"`
1839
1840 The audio format. Always `audio/pcm`.
1841
1842 - `"audio/pcm"`
1843
1844 - `PCMUAudioFormat = object { type }`
1845
1846 The G.711 μ-law format.
1847
1848 - `type: optional "audio/pcmu"`
1849
1850 The audio format. Always `audio/pcmu`.
1851
1852 - `"audio/pcmu"`
1853
1854 - `PCMAAudioFormat = object { type }`
1855
1856 The G.711 A-law format.
1857
1858 - `type: optional "audio/pcma"`
1859
1860 The audio format. Always `audio/pcma`.
1861
1862 - `"audio/pcma"`
1863
1864 - `noise_reduction: optional object { type }`1683 - `noise_reduction: optional object { type }`
1865 1684
1866 Configuration for input audio noise reduction.1685 Configuration for input audio noise reduction.
1869 1688
1870 Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1689 Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.
1871 1690
1872 - `"near_field"`
1873
1874 - `"far_field"`
1875
1876 - `transcription: optional AudioTranscription`1691 - `transcription: optional AudioTranscription`
1877 1692
1878 Configuration of the transcription model.1693 Configuration of the transcription model.
1879 1694
1880 - `language: optional string`
1881
1882 The language of the input audio. Supplying the input language in
1883 [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format
1884 will improve accuracy and latency.
1885
1886 - `model: optional string or "whisper-1" or "gpt-4o-mini-transcribe" or "gpt-4o-mini-transcribe-2025-12-15" or 2 more`
1887
1888 The model to use for transcription. Current options are `whisper-1`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, and `gpt-4o-transcribe-diarize`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
1889
1890 - `string`
1891
1892 - `"whisper-1" or "gpt-4o-mini-transcribe" or "gpt-4o-mini-transcribe-2025-12-15" or 2 more`
1893
1894 The model to use for transcription. Current options are `whisper-1`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, and `gpt-4o-transcribe-diarize`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
1895
1896 - `"whisper-1"`
1897
1898 - `"gpt-4o-mini-transcribe"`
1899
1900 - `"gpt-4o-mini-transcribe-2025-12-15"`
1901
1902 - `"gpt-4o-transcribe"`
1903
1904 - `"gpt-4o-transcribe-diarize"`
1905
1906 - `prompt: optional string`
1907
1908 An optional text to guide the model's style or continue a previous audio
1909 segment.
1910 For `whisper-1`, the [prompt is a list of keywords](/docs/guides/speech-to-text#prompting).
1911 For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".
1912
1913 - `turn_detection: optional RealtimeTranscriptionSessionTurnDetection`1695 - `turn_detection: optional RealtimeTranscriptionSessionTurnDetection`
1914 1696
1915 Configuration for turn detection. Can be set to `null` to turn off. Server1697 Configuration for turn detection. Can be set to `null` to turn off. Server
12 12
13### Returns13### Returns
14 14
1515- `Response = object { id, created_at, error, 30 more }`- `Response object { id, created_at, error, 30 more }`
16 16
17 - `id: string`17 - `id: string`
18 18
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.
102 102
103103 - `EasyInputMessage = object { content, role, phase, type }` - `EasyInputMessage object { content, role, phase, type }`
104 104
105 A message input to the model with a role indicating instruction following105 A message input to the model with a role indicating instruction following
106 hierarchy. Instructions given with the `developer` or `system` role take106 hierarchy. Instructions given with the `developer` or `system` role take
122 A list of one or many input items to the model, containing different content122 A list of one or many input items to the model, containing different content
123 types.123 types.
124 124
125125 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
126 126
127 A text input to the model.127 A text input to the model.
128 128
136 136
137 - `"input_text"`137 - `"input_text"`
138 138
139139 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
140 140
141 An image input to the model. Learn about [image inputs](/docs/guides/vision).141 An image input to the model. Learn about [image inputs](/docs/guides/vision).
142 142
166 166
167 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.167 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
168 168
169169 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
170 170
171 A file input to the model.171 A file input to the model.
172 172
229 229
230 - `"message"`230 - `"message"`
231 231
232232 - `Message = object { content, role, status, type }` - `Message object { content, role, status, type }`
233 233
234 A message input to the model with a role indicating instruction following234 A message input to the model with a role indicating instruction following
235 hierarchy. Instructions given with the `developer` or `system` role take235 hierarchy. Instructions given with the `developer` or `system` role take
240 A list of one or many input items to the model, containing different content240 A list of one or many input items to the model, containing different content
241 types.241 types.
242 242
243 - `ResponseInputText = object { text, type }`
244
245 A text input to the model.
246
247 - `text: string`
248
249 The text input to the model.
250
251 - `type: "input_text"`
252
253 The type of the input item. Always `input_text`.
254
255 - `"input_text"`
256
257 - `ResponseInputImage = object { detail, type, file_id, image_url }`
258
259 An image input to the model. Learn about [image inputs](/docs/guides/vision).
260
261 - `detail: "low" or "high" or "auto" or "original"`
262
263 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
264
265 - `"low"`
266
267 - `"high"`
268
269 - `"auto"`
270
271 - `"original"`
272
273 - `type: "input_image"`
274
275 The type of the input item. Always `input_image`.
276
277 - `"input_image"`
278
279 - `file_id: optional string`
280
281 The ID of the file to be sent to the model.
282
283 - `image_url: optional string`
284
285 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
286
287 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
288
289 A file input to the model.
290
291 - `type: "input_file"`
292
293 The type of the input item. Always `input_file`.
294
295 - `"input_file"`
296
297 - `detail: optional "low" or "high"`
298
299 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`.
300
301 - `"low"`
302
303 - `"high"`
304
305 - `file_data: optional string`
306
307 The content of the file to be sent to the model.
308
309 - `file_id: optional string`
310
311 The ID of the file to be sent to the model.
312
313 - `file_url: optional string`
314
315 The URL of the file to be sent to the model.
316
317 - `filename: optional string`
318
319 The name of the file to be sent to the model.
320
321 - `role: "user" or "system" or "developer"`243 - `role: "user" or "system" or "developer"`
322 244
323 The role of the message input. One of `user`, `system`, or `developer`.245 The role of the message input. One of `user`, `system`, or `developer`.
345 267
346 - `"message"`268 - `"message"`
347 269
348270 - `ResponseOutputMessage = object { id, content, role, 3 more }` - `ResponseOutputMessage object { id, content, role, 3 more }`
349 271
350 An output message from the model.272 An output message from the model.
351 273
357 279
358 The content of the output message.280 The content of the output message.
359 281
360282 - `ResponseOutputText = object { annotations, logprobs, text, type }` - `ResponseOutputText object { annotations, logprobs, text, type }`
361 283
362 A text output from the model.284 A text output from the model.
363 285
365 287
366 The annotations of the text output.288 The annotations of the text output.
367 289
368290 - `FileCitation = object { file_id, filename, index, type }` - `FileCitation object { file_id, filename, index, type }`
369 291
370 A citation to a file.292 A citation to a file.
371 293
387 309
388 - `"file_citation"`310 - `"file_citation"`
389 311
390312 - `URLCitation = object { end_index, start_index, title, 2 more }` - `URLCitation object { end_index, start_index, title, 2 more }`
391 313
392 A citation for a web resource used to generate a model response.314 A citation for a web resource used to generate a model response.
393 315
413 335
414 The URL of the web resource.336 The URL of the web resource.
415 337
416338 - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`
417 339
418 A citation for a container file used to generate a model response.340 A citation for a container file used to generate a model response.
419 341
443 365
444 - `"container_file_citation"`366 - `"container_file_citation"`
445 367
446368 - `FilePath = object { file_id, index, type }` - `FilePath object { file_id, index, type }`
447 369
448 A path to a file.370 A path to a file.
449 371
487 409
488 - `"output_text"`410 - `"output_text"`
489 411
490412 - `ResponseOutputRefusal = object { refusal, type }` - `ResponseOutputRefusal object { refusal, type }`
491 413
492 A refusal from the model.414 A refusal from the model.
493 415
534 456
535 - `"final_answer"`457 - `"final_answer"`
536 458
537459 - `FileSearchCall = object { id, queries, status, 2 more }` - `FileSearchCall object { id, queries, status, 2 more }`
538 460
539 The results of a file search tool call. See the461 The results of a file search tool call. See the
540 [file search guide](/docs/guides/tools-file-search) for more information.462 [file search guide](/docs/guides/tools-file-search) for more information.
602 524
603 The text that was retrieved from the file.525 The text that was retrieved from the file.
604 526
605527 - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`
606 528
607 A tool call to a computer use tool. See the529 A tool call to a computer use tool. See the
608 [computer use guide](/docs/guides/tools-computer-use) for more information.530 [computer use guide](/docs/guides/tools-computer-use) for more information.
652 574
653 A click action.575 A click action.
654 576
655577 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
656 578
657 A click action.579 A click action.
658 580
688 610
689 The keys being held while clicking.611 The keys being held while clicking.
690 612
691613 - `DoubleClick = object { keys, type, x, y }` - `DoubleClick object { keys, type, x, y }`
692 614
693 A double click action.615 A double click action.
694 616
710 632
711 The y-coordinate where the double click occurred.633 The y-coordinate where the double click occurred.
712 634
713635 - `Drag = object { path, type, keys }` - `Drag object { path, type, keys }`
714 636
715 A drag action.637 A drag action.
716 638
743 665
744 The keys being held while dragging the mouse.666 The keys being held while dragging the mouse.
745 667
746668 - `Keypress = object { keys, type }` - `Keypress object { keys, type }`
747 669
748 A collection of keypresses the model would like to perform.670 A collection of keypresses the model would like to perform.
749 671
757 679
758 - `"keypress"`680 - `"keypress"`
759 681
760682 - `Move = object { type, x, y, keys }` - `Move object { type, x, y, keys }`
761 683
762 A mouse move action.684 A mouse move action.
763 685
779 701
780 The keys being held while moving the mouse.702 The keys being held while moving the mouse.
781 703
782704 - `Screenshot = object { type }` - `Screenshot object { type }`
783 705
784 A screenshot action.706 A screenshot action.
785 707
789 711
790 - `"screenshot"`712 - `"screenshot"`
791 713
792714 - `Scroll = object { scroll_x, scroll_y, type, 3 more }` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
793 715
794 A scroll action.716 A scroll action.
795 717
819 741
820 The keys being held while scrolling.742 The keys being held while scrolling.
821 743
822744 - `Type = object { text, type }` - `Type object { text, type }`
823 745
824 An action to type in text.746 An action to type in text.
825 747
833 755
834 - `"type"`756 - `"type"`
835 757
836758 - `Wait = object { type }` - `Wait object { type }`
837 759
838 A wait action.760 A wait action.
839 761
848 Flattened batched actions for `computer_use`. Each action includes an770 Flattened batched actions for `computer_use`. Each action includes an
849 `type` discriminator and action-specific fields.771 `type` discriminator and action-specific fields.
850 772
851773 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
852 774
853 A click action.775 A click action.
854 776
855777 - `button: "left" or "right" or "wheel" or 2 more` - `DoubleClick object { keys, type, x, y }`
856
857 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
858
859 - `"left"`
860
861 - `"right"`
862
863 - `"wheel"`
864
865 - `"back"`
866
867 - `"forward"`
868
869 - `type: "click"`
870
871 Specifies the event type. For a click action, this property is always `click`.
872
873 - `"click"`
874
875 - `x: number`
876
877 The x-coordinate where the click occurred.
878
879 - `y: number`
880
881 The y-coordinate where the click occurred.
882
883 - `keys: optional array of string`
884
885 The keys being held while clicking.
886
887 - `DoubleClick = object { keys, type, x, y }`
888 778
889 A double click action.779 A double click action.
890 780
891781 - `keys: array of string` - `Drag object { path, type, keys }`
892
893 The keys being held while double-clicking.
894
895 - `type: "double_click"`
896
897 Specifies the event type. For a double click action, this property is always set to `double_click`.
898
899 - `"double_click"`
900
901 - `x: number`
902
903 The x-coordinate where the double click occurred.
904
905 - `y: number`
906
907 The y-coordinate where the double click occurred.
908
909 - `Drag = object { path, type, keys }`
910 782
911 A drag action.783 A drag action.
912 784
913785 - `path: array of object { x, y }` - `Keypress object { keys, type }`
914
915 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
916
917 ```
918 [
919 { x: 100, y: 200 },
920 { x: 200, y: 300 }
921 ]
922 ```
923
924 - `x: number`
925
926 The x-coordinate.
927
928 - `y: number`
929
930 The y-coordinate.
931
932 - `type: "drag"`
933
934 Specifies the event type. For a drag action, this property is always set to `drag`.
935
936 - `"drag"`
937
938 - `keys: optional array of string`
939
940 The keys being held while dragging the mouse.
941
942 - `Keypress = object { keys, type }`
943 786
944 A collection of keypresses the model would like to perform.787 A collection of keypresses the model would like to perform.
945 788
946789 - `keys: array of string` - `Move object { type, x, y, keys }`
947
948 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
949
950 - `type: "keypress"`
951
952 Specifies the event type. For a keypress action, this property is always set to `keypress`.
953
954 - `"keypress"`
955
956 - `Move = object { type, x, y, keys }`
957 790
958 A mouse move action.791 A mouse move action.
959 792
960793 - `type: "move"` - `Screenshot object { type }`
961
962 Specifies the event type. For a move action, this property is always set to `move`.
963
964 - `"move"`
965
966 - `x: number`
967
968 The x-coordinate to move to.
969
970 - `y: number`
971
972 The y-coordinate to move to.
973
974 - `keys: optional array of string`
975
976 The keys being held while moving the mouse.
977
978 - `Screenshot = object { type }`
979 794
980 A screenshot action.795 A screenshot action.
981 796
982797 - `type: "screenshot"` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
983
984 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
985
986 - `"screenshot"`
987
988 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
989 798
990 A scroll action.799 A scroll action.
991 800
992801 - `scroll_x: number` - `Type object { text, type }`
993
994 The horizontal scroll distance.
995
996 - `scroll_y: number`
997
998 The vertical scroll distance.
999
1000 - `type: "scroll"`
1001
1002 Specifies the event type. For a scroll action, this property is always set to `scroll`.
1003
1004 - `"scroll"`
1005
1006 - `x: number`
1007
1008 The x-coordinate where the scroll occurred.
1009
1010 - `y: number`
1011
1012 The y-coordinate where the scroll occurred.
1013
1014 - `keys: optional array of string`
1015
1016 The keys being held while scrolling.
1017
1018 - `Type = object { text, type }`
1019 802
1020 An action to type in text.803 An action to type in text.
1021 804
1022805 - `text: string` - `Wait object { type }`
1023
1024 The text to type.
1025
1026 - `type: "type"`
1027
1028 Specifies the event type. For a type action, this property is always set to `type`.
1029
1030 - `"type"`
1031
1032 - `Wait = object { type }`
1033 806
1034 A wait action.807 A wait action.
1035 808
1036809 - `type: "wait"` - `ComputerCallOutput object { call_id, output, type, 3 more }`
1037
1038 Specifies the event type. For a wait action, this property is always set to `wait`.
1039
1040 - `"wait"`
1041
1042 - `ComputerCallOutput = object { call_id, output, type, 3 more }`
1043 810
1044 The output of a computer tool call.811 The output of a computer tool call.
1045 812
1102 869
1103 - `"incomplete"`870 - `"incomplete"`
1104 871
1105872 - `WebSearchCall = object { id, action, status, type }` - `WebSearchCall object { id, action, status, type }`
1106 873
1107 The results of a web search tool call. See the874 The results of a web search tool call. See the
1108 [web search guide](/docs/guides/tools-web-search) for more information.875 [web search guide](/docs/guides/tools-web-search) for more information.
1116 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.
1117 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).
1118 885
1119886 - `Search = object { query, type, queries, sources }` - `Search object { query, type, queries, sources }`
1120 887
1121 Action type "search" - Performs a web search query.888 Action type "search" - Performs a web search query.
1122 889
1148 915
1149 The URL of the source.916 The URL of the source.
1150 917
1151918 - `OpenPage = object { type, url }` - `OpenPage object { type, url }`
1152 919
1153 Action type "open_page" - Opens a specific URL from search results.920 Action type "open_page" - Opens a specific URL from search results.
1154 921
1162 929
1163 The URL opened by the model.930 The URL opened by the model.
1164 931
1165932 - `FindInPage = object { pattern, type, url }` - `FindInPage object { pattern, type, url }`
1166 933
1167 Action type "find_in_page": Searches for a pattern within a loaded page.934 Action type "find_in_page": Searches for a pattern within a loaded page.
1168 935
1198 965
1199 - `"web_search_call"`966 - `"web_search_call"`
1200 967
1201968 - `FunctionCall = object { arguments, call_id, name, 4 more }` - `FunctionCall object { arguments, call_id, name, 4 more }`
1202 969
1203 A tool call to run a function. See the970 A tool call to run a function. See the
1204 [function calling guide](/docs/guides/function-calling) for more information.971 [function calling guide](/docs/guides/function-calling) for more information.
1240 1007
1241 - `"incomplete"`1008 - `"incomplete"`
1242 1009
12431010 - `FunctionCallOutput = object { call_id, output, type, 2 more }` - `FunctionCallOutput object { call_id, output, type, 2 more }`
1244 1011
1245 The output of a function tool call.1012 The output of a function tool call.
1246 1013
1260 1027
1261 An array of content outputs (text, image, file) for the function tool call.1028 An array of content outputs (text, image, file) for the function tool call.
1262 1029
12631030 - `ResponseInputTextContent = object { text, type }` - `ResponseInputTextContent object { text, type }`
1264 1031
1265 A text input to the model.1032 A text input to the model.
1266 1033
1274 1041
1275 - `"input_text"`1042 - `"input_text"`
1276 1043
12771044 - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - `ResponseInputImageContent object { type, detail, file_id, image_url }`
1278 1045
1279 An image input to the model. Learn about [image inputs](/docs/guides/vision)1046 An image input to the model. Learn about [image inputs](/docs/guides/vision)
1280 1047
1304 1071
1305 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.1072 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
1306 1073
13071074 - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - `ResponseInputFileContent object { type, detail, file_data, 3 more }`
1308 1075
1309 A file input to the model.1076 A file input to the model.
1310 1077
1358 1125
1359 - `"incomplete"`1126 - `"incomplete"`
1360 1127
13611128 - `ToolSearchCall = object { arguments, type, id, 3 more }` - `ToolSearchCall object { arguments, type, id, 3 more }`
1362 1129
1363 - `arguments: unknown`1130 - `arguments: unknown`
1364 1131
1396 1163
1397 - `"incomplete"`1164 - `"incomplete"`
1398 1165
13991166 - `ToolSearchOutput = object { tools, type, id, 3 more }` - `ToolSearchOutput object { tools, type, id, 3 more }`
1400 1167
1401 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`1168 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
1402 1169
1403 The loaded tool definitions returned by the tool search output.1170 The loaded tool definitions returned by the tool search output.
1404 1171
14051172 - `Function = object { name, parameters, strict, 3 more }` - `Function object { name, parameters, strict, 3 more }`
1406 1173
1407 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).1174 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).
1408 1175
1432 1199
1433 A description of the function. Used by the model to determine whether or not to call the function.1200 A description of the function. Used by the model to determine whether or not to call the function.
1434 1201
14351202 - `FileSearch = object { type, vector_store_ids, filters, 2 more }` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
1436 1203
1437 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).1204 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).
1438 1205
1450 1217
1451 A filter to apply.1218 A filter to apply.
1452 1219
14531220 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1454 1221
1455 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1222 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1456 1223
1503 1270
1504 - `number`1271 - `number`
1505 1272
15061273 - `CompoundFilter = object { filters, type }` - `CompoundFilter object { filters, type }`
1507 1274
1508 Combine multiple filters using `and` or `or`.1275 Combine multiple filters using `and` or `or`.
1509 1276
1511 1278
1512 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.1279 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
1513 1280
15141281 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1515 1282
1516 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1283 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1517 1284
15181285 - `key: string` - `unknown`
1519 1286
15201287 The key to compare against the value. - `type: "and" or "or"`
1521 1288
15221289 - `type: "eq" or "ne" or "gt" or 5 more` Type of operation: `and` or `or`.
1523 1290
15241291 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - `"and"`
1525 1292
15261293 - `eq`: equals - `"or"`
1527 - `ne`: not equal
1528 - `gt`: greater than
1529 - `gte`: greater than or equal
1530 - `lt`: less than
1531 - `lte`: less than or equal
1532 - `in`: in
1533 - `nin`: not in
1534 1294
15351295 - `"eq"` - `max_num_results: optional number`
1536 1296
15371297 - `"ne"` The maximum number of results to return. This number should be between 1 and 50 inclusive.
1538 1298
15391299 - `"gt"` - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
1540 1300
15411301 - `"gte"` Ranking options for search.
1542
1543 - `"lt"`
1544
1545 - `"lte"`
1546
1547 - `"in"`
1548
1549 - `"nin"`
1550
1551 - `value: string or number or boolean or array of string or number`
1552
1553 The value to compare against the attribute key; supports string, number, or boolean types.
1554
1555 - `string`
1556
1557 - `number`
1558
1559 - `boolean`
1560
1561 - `array of string or number`
1562
1563 - `string`
1564
1565 - `number`
1566
1567 - `unknown`
1568
1569 - `type: "and" or "or"`
1570
1571 Type of operation: `and` or `or`.
1572
1573 - `"and"`
1574
1575 - `"or"`
1576
1577 - `max_num_results: optional number`
1578
1579 The maximum number of results to return. This number should be between 1 and 50 inclusive.
1580
1581 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
1582
1583 Ranking options for search.
1584 1302
1585 - `hybrid_search: optional object { embedding_weight, text_weight }`1303 - `hybrid_search: optional object { embedding_weight, text_weight }`
1586 1304
1606 1324
1607 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.1325 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.
1608 1326
16091327 - `Computer = object { type }` - `Computer object { type }`
1610 1328
1611 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1329 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1612 1330
1616 1334
1617 - `"computer"`1335 - `"computer"`
1618 1336
16191337 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
1620 1338
1621 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1339 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1622 1340
1648 1366
1649 - `"computer_use_preview"`1367 - `"computer_use_preview"`
1650 1368
16511369 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
1652 1370
1653 Search the Internet for sources related to the prompt. Learn more about the1371 Search the Internet for sources related to the prompt. Learn more about the
1654 [web search tool](/docs/guides/tools-web-search).1372 [web search tool](/docs/guides/tools-web-search).
1708 1426
1709 - `"approximate"`1427 - `"approximate"`
1710 1428
17111429 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
1712 1430
1713 Give the model access to additional tools via remote Model Context Protocol1431 Give the model access to additional tools via remote Model Context Protocol
1714 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).1432 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
1731 1449
1732 A string array of allowed tool names1450 A string array of allowed tool names
1733 1451
17341452 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
1735 1453
1736 A filter object to specify which tools are allowed.1454 A filter object to specify which tools are allowed.
1737 1455
1797 1515
1798 Specify which of the MCP server's tools require approval.1516 Specify which of the MCP server's tools require approval.
1799 1517
18001518 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
1801 1519
1802 Specify which of the MCP server's tools require approval. Can be1520 Specify which of the MCP server's tools require approval. Can be
1803 `always`, `never`, or a filter object associated with tools1521 `always`, `never`, or a filter object associated with tools
1850 The URL for the MCP server. One of `server_url` or `connector_id` must be1568 The URL for the MCP server. One of `server_url` or `connector_id` must be
1851 provided.1569 provided.
1852 1570
18531571 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
1854 1572
1855 A tool that runs Python code to help generate a response to a prompt.1573 A tool that runs Python code to help generate a response to a prompt.
1856 1574
1864 1582
1865 The container ID.1583 The container ID.
1866 1584
18671585 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
1868 1586
1869 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.1587 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
1870 1588
1894 1612
1895 Network access policy for the container.1613 Network access policy for the container.
1896 1614
18971615 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
1898 1616
1899 - `type: "disabled"`1617 - `type: "disabled"`
1900 1618
1902 1620
1903 - `"disabled"`1621 - `"disabled"`
1904 1622
19051623 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
1906 1624
1907 - `allowed_domains: array of string`1625 - `allowed_domains: array of string`
1908 1626
1936 1654
1937 - `"code_interpreter"`1655 - `"code_interpreter"`
1938 1656
19391657 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
1940 1658
1941 A tool that generates images using the GPT image models.1659 A tool that generates images using the GPT image models.
1942 1660
2057 1775
2058 - `"auto"`1776 - `"auto"`
2059 1777
20601778 - `LocalShell = object { type }` - `LocalShell object { type }`
2061 1779
2062 A tool that allows the model to execute shell commands in a local environment.1780 A tool that allows the model to execute shell commands in a local environment.
2063 1781
2067 1785
2068 - `"local_shell"`1786 - `"local_shell"`
2069 1787
20701788 - `Shell = object { type, environment }` - `Shell object { type, environment }`
2071 1789
2072 A tool that allows the model to execute shell commands.1790 A tool that allows the model to execute shell commands.
2073 1791
2079 1797
2080 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`1798 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
2081 1799
20821800 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
2083 1801
2084 - `type: "container_auto"`1802 - `type: "container_auto"`
2085 1803
2107 1825
2108 Network access policy for the container.1826 Network access policy for the container.
2109 1827
21101828 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
2111
2112 - `type: "disabled"`
2113
2114 Disable outbound network access. Always `disabled`.
2115
2116 - `"disabled"`
2117
2118 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
2119
2120 - `allowed_domains: array of string`
2121
2122 A list of allowed domains when type is `allowlist`.
2123
2124 - `type: "allowlist"`
2125
2126 Allow outbound network access only to specified domains. Always `allowlist`.
2127
2128 - `"allowlist"`
2129
2130 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
2131
2132 Optional domain-scoped secrets for allowlisted domains.
2133
2134 - `domain: string`
2135
2136 The domain associated with the secret.
2137
2138 - `name: string`
2139
2140 The name of the secret to inject for the domain.
2141
2142 - `value: string`
2143 1829
21441830 The secret value to inject for the domain. - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
2145 1831
2146 - `skills: optional array of SkillReference or InlineSkill`1832 - `skills: optional array of SkillReference or InlineSkill`
2147 1833
2148 An optional list of skills referenced by id or inline data.1834 An optional list of skills referenced by id or inline data.
2149 1835
21501836 - `SkillReference = object { skill_id, type, version }` - `SkillReference object { skill_id, type, version }`
2151 1837
2152 - `skill_id: string`1838 - `skill_id: string`
2153 1839
2163 1849
2164 Optional skill version. Use a positive integer or 'latest'. Omit for default.1850 Optional skill version. Use a positive integer or 'latest'. Omit for default.
2165 1851
21661852 - `InlineSkill = object { description, name, source, type }` - `InlineSkill object { description, name, source, type }`
2167 1853
2168 - `description: string`1854 - `description: string`
2169 1855
2199 1885
2200 - `"inline"`1886 - `"inline"`
2201 1887
22021888 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
2203 1889
2204 - `type: "local"`1890 - `type: "local"`
2205 1891
2223 1909
2224 The path to the directory containing the skill.1910 The path to the directory containing the skill.
2225 1911
22261912 - `ContainerReference = object { container_id, type }` - `ContainerReference object { container_id, type }`
2227 1913
2228 - `container_id: string`1914 - `container_id: string`
2229 1915
2235 1921
2236 - `"container_reference"`1922 - `"container_reference"`
2237 1923
22381924 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2239 1925
2240 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1926 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2241 1927
2261 1947
2262 The input format for the custom tool. Default is unconstrained text.1948 The input format for the custom tool. Default is unconstrained text.
2263 1949
22641950 - `Text = object { type }` - `Text object { type }`
2265 1951
2266 Unconstrained free-form text.1952 Unconstrained free-form text.
2267 1953
2271 1957
2272 - `"text"`1958 - `"text"`
2273 1959
22741960 - `Grammar = object { definition, syntax, type }` - `Grammar object { definition, syntax, type }`
2275 1961
2276 A grammar defined by the user.1962 A grammar defined by the user.
2277 1963
2293 1979
2294 - `"grammar"`1980 - `"grammar"`
2295 1981
22961982 - `Namespace = object { description, name, tools, type }` - `Namespace object { description, name, tools, type }`
2297 1983
2298 Groups function/custom tools under a shared namespace.1984 Groups function/custom tools under a shared namespace.
2299 1985
2309 1995
2310 The function/custom tools available inside this namespace.1996 The function/custom tools available inside this namespace.
2311 1997
23121998 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
2313 1999
2314 - `name: string`2000 - `name: string`
2315 2001
2327 2013
2328 - `strict: optional boolean`2014 - `strict: optional boolean`
2329 2015
23302016 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2331 2017
2332 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)2018 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2333 2019
2353 2039
2354 The input format for the custom tool. Default is unconstrained text.2040 The input format for the custom tool. Default is unconstrained text.
2355 2041
2356 - `Text = object { type }`
2357
2358 Unconstrained free-form text.
2359
2360 - `type: "text"`
2361
2362 Unconstrained text format. Always `text`.
2363
2364 - `"text"`
2365
2366 - `Grammar = object { definition, syntax, type }`
2367
2368 A grammar defined by the user.
2369
2370 - `definition: string`
2371
2372 The grammar definition.
2373
2374 - `syntax: "lark" or "regex"`
2375
2376 The syntax of the grammar definition. One of `lark` or `regex`.
2377
2378 - `"lark"`
2379
2380 - `"regex"`
2381
2382 - `type: "grammar"`
2383
2384 Grammar format. Always `grammar`.
2385
2386 - `"grammar"`
2387
2388 - `type: "namespace"`2042 - `type: "namespace"`
2389 2043
2390 The type of the tool. Always `namespace`.2044 The type of the tool. Always `namespace`.
2391 2045
2392 - `"namespace"`2046 - `"namespace"`
2393 2047
23942048 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
2395 2049
2396 Hosted or BYOT tool search configuration for deferred tools.2050 Hosted or BYOT tool search configuration for deferred tools.
2397 2051
2417 2071
2418 Parameter schema for a client-executed tool search tool.2072 Parameter schema for a client-executed tool search tool.
2419 2073
24202074 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
2421 2075
2422 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).2076 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).
2423 2077
2471 2125
2472 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.2126 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2473 2127
24742128 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
2475 2129
2476 Allows the assistant to create, delete, or update files using unified diffs.2130 Allows the assistant to create, delete, or update files using unified diffs.
2477 2131
2513 2167
2514 - `"incomplete"`2168 - `"incomplete"`
2515 2169
25162170 - `Reasoning = object { id, summary, type, 3 more }` - `Reasoning object { id, summary, type, 3 more }`
2517 2171
2518 A description of the chain of thought used by a reasoning model while generating2172 A description of the chain of thought used by a reasoning model while generating
2519 a response. Be sure to include these items in your `input` to the Responses API2173 a response. Be sure to include these items in your `input` to the Responses API
2574 2228
2575 - `"incomplete"`2229 - `"incomplete"`
2576 2230
25772231 - `Compaction = object { encrypted_content, type, id }` - `Compaction object { encrypted_content, type, id }`
2578 2232
2579 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).2233 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
2580 2234
2592 2246
2593 The ID of the compaction item.2247 The ID of the compaction item.
2594 2248
25952249 - `ImageGenerationCall = object { id, result, status, type }` - `ImageGenerationCall object { id, result, status, type }`
2596 2250
2597 An image generation request made by the model.2251 An image generation request made by the model.
2598 2252
2622 2276
2623 - `"image_generation_call"`2277 - `"image_generation_call"`
2624 2278
26252279 - `CodeInterpreterCall = object { id, code, container_id, 3 more }` - `CodeInterpreterCall object { id, code, container_id, 3 more }`
2626 2280
2627 A tool call to run code.2281 A tool call to run code.
2628 2282
2643 The outputs generated by the code interpreter, such as logs or images.2297 The outputs generated by the code interpreter, such as logs or images.
2644 Can be null if no outputs are available.2298 Can be null if no outputs are available.
2645 2299
26462300 - `Logs = object { logs, type }` - `Logs object { logs, type }`
2647 2301
2648 The logs output from the code interpreter.2302 The logs output from the code interpreter.
2649 2303
2657 2311
2658 - `"logs"`2312 - `"logs"`
2659 2313
26602314 - `Image = object { type, url }` - `Image object { type, url }`
2661 2315
2662 The image output from the code interpreter.2316 The image output from the code interpreter.
2663 2317
2691 2345
2692 - `"code_interpreter_call"`2346 - `"code_interpreter_call"`
2693 2347
26942348 - `LocalShellCall = object { id, action, call_id, 2 more }` - `LocalShellCall object { id, action, call_id, 2 more }`
2695 2349
2696 A tool call to run a command on the local shell.2350 A tool call to run a command on the local shell.
2697 2351
2749 2403
2750 - `"local_shell_call"`2404 - `"local_shell_call"`
2751 2405
27522406 - `LocalShellCallOutput = object { id, output, type, status }` - `LocalShellCallOutput object { id, output, type, status }`
2753 2407
2754 The output of a local shell tool call.2408 The output of a local shell tool call.
2755 2409
2777 2431
2778 - `"incomplete"`2432 - `"incomplete"`
2779 2433
27802434 - `ShellCall = object { action, call_id, type, 3 more }` - `ShellCall object { action, call_id, type, 3 more }`
2781 2435
2782 A tool representing a request to execute one or more shell commands.2436 A tool representing a request to execute one or more shell commands.
2783 2437
2815 2469
2816 The environment to execute the shell commands in.2470 The environment to execute the shell commands in.
2817 2471
28182472 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
2819
2820 - `type: "local"`
2821
2822 Use a local computer environment.
2823
2824 - `"local"`
2825
2826 - `skills: optional array of LocalSkill`
2827
2828 An optional list of skills.
2829
2830 - `description: string`
2831
2832 The description of the skill.
2833
2834 - `name: string`
2835
2836 The name of the skill.
2837
2838 - `path: string`
2839
2840 The path to the directory containing the skill.
2841
2842 - `ContainerReference = object { container_id, type }`
2843
2844 - `container_id: string`
2845
2846 The ID of the referenced container.
2847
2848 - `type: "container_reference"`
2849
2850 References a container created with the /v1/containers endpoint
2851 2473
28522474 - `"container_reference"` - `ContainerReference object { container_id, type }`
2853 2475
2854 - `status: optional "in_progress" or "completed" or "incomplete"`2476 - `status: optional "in_progress" or "completed" or "incomplete"`
2855 2477
2861 2483
2862 - `"incomplete"`2484 - `"incomplete"`
2863 2485
28642486 - `ShellCallOutput = object { call_id, output, type, 3 more }` - `ShellCallOutput object { call_id, output, type, 3 more }`
2865 2487
2866 The streamed output items emitted by a shell tool call.2488 The streamed output items emitted by a shell tool call.
2867 2489
2877 2499
2878 The exit or timeout outcome associated with this shell call.2500 The exit or timeout outcome associated with this shell call.
2879 2501
28802502 - `Timeout = object { type }` - `Timeout object { type }`
2881 2503
2882 Indicates that the shell call exceeded its configured time limit.2504 Indicates that the shell call exceeded its configured time limit.
2883 2505
2887 2509
2888 - `"timeout"`2510 - `"timeout"`
2889 2511
28902512 - `Exit = object { exit_code, type }` - `Exit object { exit_code, type }`
2891 2513
2892 Indicates that the shell commands finished and returned an exit code.2514 Indicates that the shell commands finished and returned an exit code.
2893 2515
2933 2555
2934 - `"incomplete"`2556 - `"incomplete"`
2935 2557
29362558 - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - `ApplyPatchCall object { call_id, operation, status, 2 more }`
2937 2559
2938 A tool call representing a request to create, delete, or update files using diff patches.2560 A tool call representing a request to create, delete, or update files using diff patches.
2939 2561
2945 2567
2946 The specific create, delete, or update instruction for the apply_patch tool call.2568 The specific create, delete, or update instruction for the apply_patch tool call.
2947 2569
29482570 - `CreateFile = object { diff, path, type }` - `CreateFile object { diff, path, type }`
2949 2571
2950 Instruction for creating a new file via the apply_patch tool.2572 Instruction for creating a new file via the apply_patch tool.
2951 2573
2963 2585
2964 - `"create_file"`2586 - `"create_file"`
2965 2587
29662588 - `DeleteFile = object { path, type }` - `DeleteFile object { path, type }`
2967 2589
2968 Instruction for deleting an existing file via the apply_patch tool.2590 Instruction for deleting an existing file via the apply_patch tool.
2969 2591
2977 2599
2978 - `"delete_file"`2600 - `"delete_file"`
2979 2601
29802602 - `UpdateFile = object { diff, path, type }` - `UpdateFile object { diff, path, type }`
2981 2603
2982 Instruction for updating an existing file via the apply_patch tool.2604 Instruction for updating an existing file via the apply_patch tool.
2983 2605
3013 2635
3014 The unique ID of the apply patch tool call. Populated when this item is returned via API.2636 The unique ID of the apply patch tool call. Populated when this item is returned via API.
3015 2637
30162638 - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`
3017 2639
3018 The streamed output emitted by an apply patch tool call.2640 The streamed output emitted by an apply patch tool call.
3019 2641
3043 2665
3044 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).2666 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).
3045 2667
30462668 - `McpListTools = object { id, server_label, tools, 2 more }` - `McpListTools object { id, server_label, tools, 2 more }`
3047 2669
3048 A list of tools available on an MCP server.2670 A list of tools available on an MCP server.
3049 2671
3085 2707
3086 Error message if the server could not list tools.2708 Error message if the server could not list tools.
3087 2709
30882710 - `McpApprovalRequest = object { id, arguments, name, 2 more }` - `McpApprovalRequest object { id, arguments, name, 2 more }`
3089 2711
3090 A request for human approval of a tool invocation.2712 A request for human approval of a tool invocation.
3091 2713
3111 2733
3112 - `"mcp_approval_request"`2734 - `"mcp_approval_request"`
3113 2735
31142736 - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`
3115 2737
3116 A response to an MCP approval request.2738 A response to an MCP approval request.
3117 2739
3137 2759
3138 Optional reason for the decision.2760 Optional reason for the decision.
3139 2761
31402762 - `McpCall = object { id, arguments, name, 6 more }` - `McpCall object { id, arguments, name, 6 more }`
3141 2763
3142 An invocation of a tool on an MCP server.2764 An invocation of a tool on an MCP server.
3143 2765
3190 2812
3191 - `"failed"`2813 - `"failed"`
3192 2814
31932815 - `CustomToolCallOutput = object { call_id, output, type, id }` - `CustomToolCallOutput object { call_id, output, type, id }`
3194 2816
3195 The output of a custom tool call from your code, being sent back to the model.2817 The output of a custom tool call from your code, being sent back to the model.
3196 2818
3211 2833
3212 Text, image, or file output of the custom tool call.2834 Text, image, or file output of the custom tool call.
3213 2835
32142836 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
3215 2837
3216 A text input to the model.2838 A text input to the model.
3217 2839
32182840 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
3219
3220 The text input to the model.
3221
3222 - `type: "input_text"`
3223
3224 The type of the input item. Always `input_text`.
3225
3226 - `"input_text"`
3227
3228 - `ResponseInputImage = object { detail, type, file_id, image_url }`
3229 2841
3230 An image input to the model. Learn about [image inputs](/docs/guides/vision).2842 An image input to the model. Learn about [image inputs](/docs/guides/vision).
3231 2843
32322844 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
3233
3234 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
3235
3236 - `"low"`
3237
3238 - `"high"`
3239
3240 - `"auto"`
3241
3242 - `"original"`
3243
3244 - `type: "input_image"`
3245
3246 The type of the input item. Always `input_image`.
3247
3248 - `"input_image"`
3249
3250 - `file_id: optional string`
3251
3252 The ID of the file to be sent to the model.
3253
3254 - `image_url: optional string`
3255
3256 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
3257
3258 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
3259 2845
3260 A file input to the model.2846 A file input to the model.
3261 2847
3262 - `type: "input_file"`
3263
3264 The type of the input item. Always `input_file`.
3265
3266 - `"input_file"`
3267
3268 - `detail: optional "low" or "high"`
3269
3270 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`.
3271
3272 - `"low"`
3273
3274 - `"high"`
3275
3276 - `file_data: optional string`
3277
3278 The content of the file to be sent to the model.
3279
3280 - `file_id: optional string`
3281
3282 The ID of the file to be sent to the model.
3283
3284 - `file_url: optional string`
3285
3286 The URL of the file to be sent to the model.
3287
3288 - `filename: optional string`
3289
3290 The name of the file to be sent to the model.
3291
3292 - `type: "custom_tool_call_output"`2848 - `type: "custom_tool_call_output"`
3293 2849
3294 The type of the custom tool call output. Always `custom_tool_call_output`.2850 The type of the custom tool call output. Always `custom_tool_call_output`.
3299 2855
3300 The unique ID of the custom tool call output in the OpenAI platform.2856 The unique ID of the custom tool call output in the OpenAI platform.
3301 2857
33022858 - `CustomToolCall = object { call_id, input, name, 3 more }` - `CustomToolCall object { call_id, input, name, 3 more }`
3303 2859
3304 A call to a custom tool created by the model.2860 A call to a custom tool created by the model.
3305 2861
3329 2885
3330 The namespace of the custom tool being called.2886 The namespace of the custom tool being called.
3331 2887
33322888 - `ItemReference = object { id, type }` - `ItemReference object { id, type }`
3333 2889
3334 An internal identifier for an item to reference.2890 An internal identifier for an item to reference.
3335 2891
3566 the model, you might consider using the `output_text` property where3122 the model, you might consider using the `output_text` property where
3567 supported in SDKs.3123 supported in SDKs.
3568 3124
35693125 - `ResponseOutputMessage = object { id, content, role, 3 more }` - `ResponseOutputMessage object { id, content, role, 3 more }`
3570 3126
3571 An output message from the model.3127 An output message from the model.
3572 3128
35733129 - `id: string` - `FileSearchCall object { id, queries, status, 2 more }`
3574 3130
35753131 The unique ID of the output message. The results of a file search tool call. See the
3132 [file search guide](/docs/guides/tools-file-search) for more information.
3576 3133
35773134 - `content: array of ResponseOutputText or ResponseOutputRefusal` - `id: string`
3578 3135
35793136 The content of the output message. The unique ID of the file search tool call.
3580 3137
35813138 - `ResponseOutputText = object { annotations, logprobs, text, type }` - `queries: array of string`
3582 3139
35833140 A text output from the model. The queries used to search for files.
3584 3141
35853142 - `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 }` - `status: "in_progress" or "searching" or "completed" or 2 more`
3586 3143
35873144 The annotations of the text output. The status of the file search tool call. One of `in_progress`,
3145 `searching`, `incomplete` or `failed`,
3588 3146
35893147 - `FileCitation = object { file_id, filename, index, type }` - `"in_progress"`
3590 3148
35913149 A citation to a file. - `"searching"`
3592 3150
35933151 - `file_id: string` - `"completed"`
3594 3152
35953153 The ID of the file. - `"incomplete"`
3596 3154
35973155 - `filename: string` - `"failed"`
3598 3156
35993157 The filename of the file cited. - `type: "file_search_call"`
3600 3158
36013159 - `index: number` The type of the file search tool call. Always `file_search_call`.
3602 3160
36033161 The index of the file in the list of files. - `"file_search_call"`
3604 3162
36053163 - `type: "file_citation"` - `results: optional array of object { attributes, file_id, filename, 2 more }`
3606 3164
36073165 The type of the file citation. Always `file_citation`. The results of the file search tool call.
3608 3166
36093167 - `"file_citation"` - `attributes: optional map[string or number or boolean]`
3610 3168
36113169 - `URLCitation = object { end_index, start_index, title, 2 more }` Set of 16 key-value pairs that can be attached to an object. This can be
3170 useful for storing additional information about the object in a structured
3171 format, and querying for objects via API or the dashboard. Keys are strings
3172 with a maximum length of 64 characters. Values are strings with a maximum
3173 length of 512 characters, booleans, or numbers.
3612 3174
36133175 A citation for a web resource used to generate a model response. - `string`
3614 3176
36153177 - `end_index: number` - `number`
3616 3178
36173179 The index of the last character of the URL citation in the message. - `boolean`
3618 3180
36193181 - `start_index: number` - `file_id: optional string`
3620 3182
36213183 The index of the first character of the URL citation in the message. The unique ID of the file.
3622 3184
36233185 - `title: string` - `filename: optional string`
3624
3625 The title of the web resource.
3626
3627 - `type: "url_citation"`
3628
3629 The type of the URL citation. Always `url_citation`.
3630
3631 - `"url_citation"`
3632
3633 - `url: string`
3634
3635 The URL of the web resource.
3636
3637 - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }`
3638
3639 A citation for a container file used to generate a model response.
3640
3641 - `container_id: string`
3642
3643 The ID of the container file.
3644
3645 - `end_index: number`
3646
3647 The index of the last character of the container file citation in the message.
3648
3649 - `file_id: string`
3650
3651 The ID of the file.
3652
3653 - `filename: string`
3654
3655 The filename of the container file cited.
3656
3657 - `start_index: number`
3658
3659 The index of the first character of the container file citation in the message.
3660
3661 - `type: "container_file_citation"`
3662
3663 The type of the container file citation. Always `container_file_citation`.
3664
3665 - `"container_file_citation"`
3666
3667 - `FilePath = object { file_id, index, type }`
3668
3669 A path to a file.
3670
3671 - `file_id: string`
3672
3673 The ID of the file.
3674
3675 - `index: number`
3676
3677 The index of the file in the list of files.
3678
3679 - `type: "file_path"`
3680
3681 The type of the file path. Always `file_path`.
3682
3683 - `"file_path"`
3684
3685 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`
3686
3687 - `token: string`
3688
3689 - `bytes: array of number`
3690
3691 - `logprob: number`
3692
3693 - `top_logprobs: array of object { token, bytes, logprob }`
3694
3695 - `token: string`
3696
3697 - `bytes: array of number`
3698
3699 - `logprob: number`
3700
3701 - `text: string`
3702
3703 The text output from the model.
3704
3705 - `type: "output_text"`
3706
3707 The type of the output text. Always `output_text`.
3708
3709 - `"output_text"`
3710
3711 - `ResponseOutputRefusal = object { refusal, type }`
3712
3713 A refusal from the model.
3714
3715 - `refusal: string`
3716
3717 The refusal explanation from the model.
3718
3719 - `type: "refusal"`
3720
3721 The type of the refusal. Always `refusal`.
3722
3723 - `"refusal"`
3724
3725 - `role: "assistant"`
3726
3727 The role of the output message. Always `assistant`.
3728
3729 - `"assistant"`
3730
3731 - `status: "in_progress" or "completed" or "incomplete"`
3732
3733 The status of the message input. One of `in_progress`, `completed`, or
3734 `incomplete`. Populated when input items are returned via API.
3735
3736 - `"in_progress"`
3737
3738 - `"completed"`
3739
3740 - `"incomplete"`
3741
3742 - `type: "message"`
3743
3744 The type of the output message. Always `message`.
3745
3746 - `"message"`
3747
3748 - `phase: optional "commentary" or "final_answer"`
3749
3750 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).
3751 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend
3752 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.
3753
3754 - `"commentary"`
3755
3756 - `"final_answer"`
3757
3758 - `FileSearchCall = object { id, queries, status, 2 more }`
3759
3760 The results of a file search tool call. See the
3761 [file search guide](/docs/guides/tools-file-search) for more information.
3762
3763 - `id: string`
3764
3765 The unique ID of the file search tool call.
3766
3767 - `queries: array of string`
3768
3769 The queries used to search for files.
3770
3771 - `status: "in_progress" or "searching" or "completed" or 2 more`
3772
3773 The status of the file search tool call. One of `in_progress`,
3774 `searching`, `incomplete` or `failed`,
3775
3776 - `"in_progress"`
3777
3778 - `"searching"`
3779
3780 - `"completed"`
3781
3782 - `"incomplete"`
3783
3784 - `"failed"`
3785
3786 - `type: "file_search_call"`
3787
3788 The type of the file search tool call. Always `file_search_call`.
3789
3790 - `"file_search_call"`
3791
3792 - `results: optional array of object { attributes, file_id, filename, 2 more }`
3793
3794 The results of the file search tool call.
3795
3796 - `attributes: optional map[string or number or boolean]`
3797
3798 Set of 16 key-value pairs that can be attached to an object. This can be
3799 useful for storing additional information about the object in a structured
3800 format, and querying for objects via API or the dashboard. Keys are strings
3801 with a maximum length of 64 characters. Values are strings with a maximum
3802 length of 512 characters, booleans, or numbers.
3803
3804 - `string`
3805
3806 - `number`
3807
3808 - `boolean`
3809
3810 - `file_id: optional string`
3811
3812 The unique ID of the file.
3813
3814 - `filename: optional string`
3815 3186
3816 The name of the file.3187 The name of the file.
3817 3188
3823 3194
3824 The text that was retrieved from the file.3195 The text that was retrieved from the file.
3825 3196
38263197 - `FunctionCall = object { arguments, call_id, name, 4 more }` - `FunctionCall object { arguments, call_id, name, 4 more }`
3827 3198
3828 A tool call to run a function. See the3199 A tool call to run a function. See the
3829 [function calling guide](/docs/guides/function-calling) for more information.3200 [function calling guide](/docs/guides/function-calling) for more information.
3865 3236
3866 - `"incomplete"`3237 - `"incomplete"`
3867 3238
38683239 - `FunctionCallOutput = object { id, call_id, output, 3 more }` - `FunctionCallOutput object { id, call_id, output, 3 more }`
3869 3240
3870 - `id: string`3241 - `id: string`
3871 3242
3888 3259
3889 Text, image, or file output of the function call.3260 Text, image, or file output of the function call.
3890 3261
38913262 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
3892 3263
3893 A text input to the model.3264 A text input to the model.
3894 3265
38953266 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
3896
3897 The text input to the model.
3898
3899 - `type: "input_text"`
3900
3901 The type of the input item. Always `input_text`.
3902
3903 - `"input_text"`
3904
3905 - `ResponseInputImage = object { detail, type, file_id, image_url }`
3906 3267
3907 An image input to the model. Learn about [image inputs](/docs/guides/vision).3268 An image input to the model. Learn about [image inputs](/docs/guides/vision).
3908 3269
39093270 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
3910
3911 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
3912
3913 - `"low"`
3914
3915 - `"high"`
3916
3917 - `"auto"`
3918
3919 - `"original"`
3920
3921 - `type: "input_image"`
3922
3923 The type of the input item. Always `input_image`.
3924
3925 - `"input_image"`
3926
3927 - `file_id: optional string`
3928
3929 The ID of the file to be sent to the model.
3930
3931 - `image_url: optional string`
3932
3933 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
3934
3935 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
3936 3271
3937 A file input to the model.3272 A file input to the model.
3938 3273
3939 - `type: "input_file"`
3940
3941 The type of the input item. Always `input_file`.
3942
3943 - `"input_file"`
3944
3945 - `detail: optional "low" or "high"`
3946
3947 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`.
3948
3949 - `"low"`
3950
3951 - `"high"`
3952
3953 - `file_data: optional string`
3954
3955 The content of the file to be sent to the model.
3956
3957 - `file_id: optional string`
3958
3959 The ID of the file to be sent to the model.
3960
3961 - `file_url: optional string`
3962
3963 The URL of the file to be sent to the model.
3964
3965 - `filename: optional string`
3966
3967 The name of the file to be sent to the model.
3968
3969 - `status: "in_progress" or "completed" or "incomplete"`3274 - `status: "in_progress" or "completed" or "incomplete"`
3970 3275
3971 The status of the item. One of `in_progress`, `completed`, or3276 The status of the item. One of `in_progress`, `completed`, or
3987 3292
3988 The identifier of the actor that created the item.3293 The identifier of the actor that created the item.
3989 3294
39903295 - `WebSearchCall = object { id, action, status, type }` - `WebSearchCall object { id, action, status, type }`
3991 3296
3992 The results of a web search tool call. See the3297 The results of a web search tool call. See the
3993 [web search guide](/docs/guides/tools-web-search) for more information.3298 [web search guide](/docs/guides/tools-web-search) for more information.
4001 An object describing the specific action taken in this web search call.3306 An object describing the specific action taken in this web search call.
4002 Includes details on how the model used the web (search, open_page, find_in_page).3307 Includes details on how the model used the web (search, open_page, find_in_page).
4003 3308
40043309 - `Search = object { query, type, queries, sources }` - `Search object { query, type, queries, sources }`
4005 3310
4006 Action type "search" - Performs a web search query.3311 Action type "search" - Performs a web search query.
4007 3312
4033 3338
4034 The URL of the source.3339 The URL of the source.
4035 3340
40363341 - `OpenPage = object { type, url }` - `OpenPage object { type, url }`
4037 3342
4038 Action type "open_page" - Opens a specific URL from search results.3343 Action type "open_page" - Opens a specific URL from search results.
4039 3344
4047 3352
4048 The URL opened by the model.3353 The URL opened by the model.
4049 3354
40503355 - `FindInPage = object { pattern, type, url }` - `FindInPage object { pattern, type, url }`
4051 3356
4052 Action type "find_in_page": Searches for a pattern within a loaded page.3357 Action type "find_in_page": Searches for a pattern within a loaded page.
4053 3358
4083 3388
4084 - `"web_search_call"`3389 - `"web_search_call"`
4085 3390
40863391 - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`
4087 3392
4088 A tool call to a computer use tool. See the3393 A tool call to a computer use tool. See the
4089 [computer use guide](/docs/guides/tools-computer-use) for more information.3394 [computer use guide](/docs/guides/tools-computer-use) for more information.
4133 3438
4134 A click action.3439 A click action.
4135 3440
41363441 - `Click = object { button, type, x, 2 more }` - `actions: optional ComputerActionList`
4137 3442
41383443 A click action. Flattened batched actions for `computer_use`. Each action includes an
3444 `type` discriminator and action-specific fields.
4139 3445
41403446 - `button: "left" or "right" or "wheel" or 2 more` - `ComputerCallOutput object { id, call_id, output, 4 more }`
4141
4142 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
4143
4144 - `"left"`
4145
4146 - `"right"`
4147
4148 - `"wheel"`
4149
4150 - `"back"`
4151
4152 - `"forward"`
4153
4154 - `type: "click"`
4155
4156 Specifies the event type. For a click action, this property is always `click`.
4157
4158 - `"click"`
4159
4160 - `x: number`
4161
4162 The x-coordinate where the click occurred.
4163
4164 - `y: number`
4165
4166 The y-coordinate where the click occurred.
4167
4168 - `keys: optional array of string`
4169
4170 The keys being held while clicking.
4171
4172 - `DoubleClick = object { keys, type, x, y }`
4173
4174 A double click action.
4175
4176 - `keys: array of string`
4177
4178 The keys being held while double-clicking.
4179
4180 - `type: "double_click"`
4181
4182 Specifies the event type. For a double click action, this property is always set to `double_click`.
4183
4184 - `"double_click"`
4185
4186 - `x: number`
4187
4188 The x-coordinate where the double click occurred.
4189
4190 - `y: number`
4191
4192 The y-coordinate where the double click occurred.
4193
4194 - `Drag = object { path, type, keys }`
4195
4196 A drag action.
4197
4198 - `path: array of object { x, y }`
4199
4200 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
4201
4202 ```
4203 [
4204 { x: 100, y: 200 },
4205 { x: 200, y: 300 }
4206 ]
4207 ```
4208
4209 - `x: number`
4210
4211 The x-coordinate.
4212
4213 - `y: number`
4214
4215 The y-coordinate.
4216
4217 - `type: "drag"`
4218
4219 Specifies the event type. For a drag action, this property is always set to `drag`.
4220
4221 - `"drag"`
4222
4223 - `keys: optional array of string`
4224
4225 The keys being held while dragging the mouse.
4226
4227 - `Keypress = object { keys, type }`
4228
4229 A collection of keypresses the model would like to perform.
4230
4231 - `keys: array of string`
4232
4233 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
4234
4235 - `type: "keypress"`
4236
4237 Specifies the event type. For a keypress action, this property is always set to `keypress`.
4238
4239 - `"keypress"`
4240
4241 - `Move = object { type, x, y, keys }`
4242
4243 A mouse move action.
4244
4245 - `type: "move"`
4246
4247 Specifies the event type. For a move action, this property is always set to `move`.
4248
4249 - `"move"`
4250
4251 - `x: number`
4252
4253 The x-coordinate to move to.
4254
4255 - `y: number`
4256
4257 The y-coordinate to move to.
4258
4259 - `keys: optional array of string`
4260
4261 The keys being held while moving the mouse.
4262
4263 - `Screenshot = object { type }`
4264
4265 A screenshot action.
4266
4267 - `type: "screenshot"`
4268
4269 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
4270
4271 - `"screenshot"`
4272
4273 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
4274
4275 A scroll action.
4276
4277 - `scroll_x: number`
4278
4279 The horizontal scroll distance.
4280
4281 - `scroll_y: number`
4282
4283 The vertical scroll distance.
4284
4285 - `type: "scroll"`
4286
4287 Specifies the event type. For a scroll action, this property is always set to `scroll`.
4288
4289 - `"scroll"`
4290
4291 - `x: number`
4292
4293 The x-coordinate where the scroll occurred.
4294
4295 - `y: number`
4296
4297 The y-coordinate where the scroll occurred.
4298
4299 - `keys: optional array of string`
4300
4301 The keys being held while scrolling.
4302
4303 - `Type = object { text, type }`
4304
4305 An action to type in text.
4306
4307 - `text: string`
4308
4309 The text to type.
4310
4311 - `type: "type"`
4312
4313 Specifies the event type. For a type action, this property is always set to `type`.
4314
4315 - `"type"`
4316
4317 - `Wait = object { type }`
4318
4319 A wait action.
4320
4321 - `type: "wait"`
4322
4323 Specifies the event type. For a wait action, this property is always set to `wait`.
4324
4325 - `"wait"`
4326
4327 - `actions: optional ComputerActionList`
4328
4329 Flattened batched actions for `computer_use`. Each action includes an
4330 `type` discriminator and action-specific fields.
4331
4332 - `Click = object { button, type, x, 2 more }`
4333
4334 A click action.
4335
4336 - `button: "left" or "right" or "wheel" or 2 more`
4337
4338 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
4339
4340 - `"left"`
4341
4342 - `"right"`
4343
4344 - `"wheel"`
4345
4346 - `"back"`
4347
4348 - `"forward"`
4349
4350 - `type: "click"`
4351
4352 Specifies the event type. For a click action, this property is always `click`.
4353
4354 - `"click"`
4355
4356 - `x: number`
4357
4358 The x-coordinate where the click occurred.
4359
4360 - `y: number`
4361
4362 The y-coordinate where the click occurred.
4363
4364 - `keys: optional array of string`
4365
4366 The keys being held while clicking.
4367
4368 - `DoubleClick = object { keys, type, x, y }`
4369
4370 A double click action.
4371
4372 - `keys: array of string`
4373
4374 The keys being held while double-clicking.
4375
4376 - `type: "double_click"`
4377
4378 Specifies the event type. For a double click action, this property is always set to `double_click`.
4379
4380 - `"double_click"`
4381
4382 - `x: number`
4383
4384 The x-coordinate where the double click occurred.
4385
4386 - `y: number`
4387
4388 The y-coordinate where the double click occurred.
4389
4390 - `Drag = object { path, type, keys }`
4391
4392 A drag action.
4393
4394 - `path: array of object { x, y }`
4395
4396 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
4397
4398 ```
4399 [
4400 { x: 100, y: 200 },
4401 { x: 200, y: 300 }
4402 ]
4403 ```
4404
4405 - `x: number`
4406
4407 The x-coordinate.
4408
4409 - `y: number`
4410
4411 The y-coordinate.
4412
4413 - `type: "drag"`
4414
4415 Specifies the event type. For a drag action, this property is always set to `drag`.
4416
4417 - `"drag"`
4418
4419 - `keys: optional array of string`
4420
4421 The keys being held while dragging the mouse.
4422
4423 - `Keypress = object { keys, type }`
4424
4425 A collection of keypresses the model would like to perform.
4426
4427 - `keys: array of string`
4428
4429 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
4430
4431 - `type: "keypress"`
4432
4433 Specifies the event type. For a keypress action, this property is always set to `keypress`.
4434
4435 - `"keypress"`
4436
4437 - `Move = object { type, x, y, keys }`
4438
4439 A mouse move action.
4440
4441 - `type: "move"`
4442
4443 Specifies the event type. For a move action, this property is always set to `move`.
4444
4445 - `"move"`
4446
4447 - `x: number`
4448
4449 The x-coordinate to move to.
4450
4451 - `y: number`
4452
4453 The y-coordinate to move to.
4454
4455 - `keys: optional array of string`
4456
4457 The keys being held while moving the mouse.
4458
4459 - `Screenshot = object { type }`
4460
4461 A screenshot action.
4462
4463 - `type: "screenshot"`
4464
4465 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
4466
4467 - `"screenshot"`
4468
4469 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
4470
4471 A scroll action.
4472
4473 - `scroll_x: number`
4474
4475 The horizontal scroll distance.
4476
4477 - `scroll_y: number`
4478
4479 The vertical scroll distance.
4480
4481 - `type: "scroll"`
4482
4483 Specifies the event type. For a scroll action, this property is always set to `scroll`.
4484
4485 - `"scroll"`
4486
4487 - `x: number`
4488
4489 The x-coordinate where the scroll occurred.
4490
4491 - `y: number`
4492
4493 The y-coordinate where the scroll occurred.
4494
4495 - `keys: optional array of string`
4496
4497 The keys being held while scrolling.
4498
4499 - `Type = object { text, type }`
4500
4501 An action to type in text.
4502
4503 - `text: string`
4504
4505 The text to type.
4506
4507 - `type: "type"`
4508
4509 Specifies the event type. For a type action, this property is always set to `type`.
4510
4511 - `"type"`
4512
4513 - `Wait = object { type }`
4514
4515 A wait action.
4516
4517 - `type: "wait"`
4518
4519 Specifies the event type. For a wait action, this property is always set to `wait`.
4520
4521 - `"wait"`
4522
4523 - `ComputerCallOutput = object { id, call_id, output, 4 more }`
4524 3447
4525 - `id: string`3448 - `id: string`
4526 3449
4534 3457
4535 A computer screenshot image used with the computer use tool.3458 A computer screenshot image used with the computer use tool.
4536 3459
4537 - `type: "computer_screenshot"`
4538
4539 Specifies the event type. For a computer screenshot, this property is
4540 always set to `computer_screenshot`.
4541
4542 - `"computer_screenshot"`
4543
4544 - `file_id: optional string`
4545
4546 The identifier of an uploaded file that contains the screenshot.
4547
4548 - `image_url: optional string`
4549
4550 The URL of the screenshot image.
4551
4552 - `status: "completed" or "incomplete" or "failed" or "in_progress"`3460 - `status: "completed" or "incomplete" or "failed" or "in_progress"`
4553 3461
4554 The status of the message input. One of `in_progress`, `completed`, or3462 The status of the message input. One of `in_progress`, `completed`, or
4589 3497
4590 The identifier of the actor that created the item.3498 The identifier of the actor that created the item.
4591 3499
45923500 - `Reasoning = object { id, summary, type, 3 more }` - `Reasoning object { id, summary, type, 3 more }`
4593 3501
4594 A description of the chain of thought used by a reasoning model while generating3502 A description of the chain of thought used by a reasoning model while generating
4595 a response. Be sure to include these items in your `input` to the Responses API3503 a response. Be sure to include these items in your `input` to the Responses API
4612 3520
4613 The type of the object. Always `summary_text`.3521 The type of the object. Always `summary_text`.
4614 3522
4615 - `"summary_text"`
4616
4617 - `type: "reasoning"`3523 - `type: "reasoning"`
4618 3524
4619 The type of the object. Always `reasoning`.3525 The type of the object. Always `reasoning`.
4650 3556
4651 - `"incomplete"`3557 - `"incomplete"`
4652 3558
46533559 - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - `ToolSearchCall object { id, arguments, call_id, 4 more }`
4654 3560
4655 - `id: string`3561 - `id: string`
4656 3562
4692 3598
4693 The identifier of the actor that created the item.3599 The identifier of the actor that created the item.
4694 3600
46953601 - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - `ToolSearchOutput object { id, call_id, execution, 4 more }`
4696 3602
4697 - `id: string`3603 - `id: string`
4698 3604
4700 3606
4701 - `call_id: string`3607 - `call_id: string`
4702 3608
47033609 The unique ID of the tool search call generated by the model. The unique ID of the tool search call generated by the model.
4704
4705 - `execution: "server" or "client"`
4706
4707 Whether tool search was executed by the server or by the client.
4708
4709 - `"server"`
4710
4711 - `"client"`
4712
4713 - `status: "in_progress" or "completed" or "incomplete"`
4714
4715 The status of the tool search output item that was recorded.
4716
4717 - `"in_progress"`
4718
4719 - `"completed"`
4720
4721 - `"incomplete"`
4722
4723 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
4724
4725 The loaded tool definitions returned by tool search.
4726
4727 - `Function = object { name, parameters, strict, 3 more }`
4728
4729 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).
4730
4731 - `name: string`
4732
4733 The name of the function to call.
4734
4735 - `parameters: map[unknown]`
4736
4737 A JSON schema object describing the parameters of the function.
4738
4739 - `strict: boolean`
4740
4741 Whether to enforce strict parameter validation. Default `true`.
4742
4743 - `type: "function"`
4744
4745 The type of the function tool. Always `function`.
4746
4747 - `"function"`
4748
4749 - `defer_loading: optional boolean`
4750
4751 Whether this function is deferred and loaded via tool search.
4752
4753 - `description: optional string`
4754
4755 A description of the function. Used by the model to determine whether or not to call the function.
4756
4757 - `FileSearch = object { type, vector_store_ids, filters, 2 more }`
4758
4759 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).
4760
4761 - `type: "file_search"`
4762
4763 The type of the file search tool. Always `file_search`.
4764
4765 - `"file_search"`
4766
4767 - `vector_store_ids: array of string`
4768
4769 The IDs of the vector stores to search.
4770
4771 - `filters: optional ComparisonFilter or CompoundFilter`
4772
4773 A filter to apply.
4774
4775 - `ComparisonFilter = object { key, type, value }`
4776
4777 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
4778
4779 - `key: string`
4780
4781 The key to compare against the value.
4782
4783 - `type: "eq" or "ne" or "gt" or 5 more`
4784
4785 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
4786
4787 - `eq`: equals
4788 - `ne`: not equal
4789 - `gt`: greater than
4790 - `gte`: greater than or equal
4791 - `lt`: less than
4792 - `lte`: less than or equal
4793 - `in`: in
4794 - `nin`: not in
4795
4796 - `"eq"`
4797
4798 - `"ne"`
4799
4800 - `"gt"`
4801
4802 - `"gte"`
4803
4804 - `"lt"`
4805
4806 - `"lte"`
4807
4808 - `"in"`
4809
4810 - `"nin"`
4811
4812 - `value: string or number or boolean or array of string or number`
4813 3610
48143611 The value to compare against the attribute key; supports string, number, or boolean types. - `execution: "server" or "client"`
4815 3612
48163613 - `string` Whether tool search was executed by the server or by the client.
4817 3614
48183615 - `number` - `"server"`
4819 3616
48203617 - `boolean` - `"client"`
4821 3618
48223619 - `array of string or number` - `status: "in_progress" or "completed" or "incomplete"`
4823 3620
48243621 - `string` The status of the tool search output item that was recorded.
4825 3622
48263623 - `number` - `"in_progress"`
4827 3624
48283625 - `CompoundFilter = object { filters, type }` - `"completed"`
4829 3626
48303627 Combine multiple filters using `and` or `or`. - `"incomplete"`
4831 3628
48323629 - `filters: array of ComparisonFilter or unknown` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
4833 3630
48343631 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. The loaded tool definitions returned by tool search.
4835 3632
48363633 - `ComparisonFilter = object { key, type, value }` - `Function object { name, parameters, strict, 3 more }`
4837 3634
48383635 A filter used to compare a specified attribute key to a given value using a defined comparison operation. 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).
4839 3636
48403637 - `key: string` - `name: string`
4841 3638
48423639 The key to compare against the value. The name of the function to call.
4843 3640
48443641 - `type: "eq" or "ne" or "gt" or 5 more` - `parameters: map[unknown]`
4845 3642
48463643 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. A JSON schema object describing the parameters of the function.
4847 3644
48483645 - `eq`: equals - `strict: boolean`
4849 - `ne`: not equal
4850 - `gt`: greater than
4851 - `gte`: greater than or equal
4852 - `lt`: less than
4853 - `lte`: less than or equal
4854 - `in`: in
4855 - `nin`: not in
4856 3646
48573647 - `"eq"` Whether to enforce strict parameter validation. Default `true`.
4858 3648
48593649 - `"ne"` - `type: "function"`
4860 3650
48613651 - `"gt"` The type of the function tool. Always `function`.
4862 3652
48633653 - `"gte"` - `"function"`
4864 3654
48653655 - `"lt"` - `defer_loading: optional boolean`
4866 3656
48673657 - `"lte"` Whether this function is deferred and loaded via tool search.
4868 3658
48693659 - `"in"` - `description: optional string`
4870 3660
48713661 - `"nin"` A description of the function. Used by the model to determine whether or not to call the function.
4872 3662
48733663 - `value: string or number or boolean or array of string or number` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
4874 3664
48753665 The value to compare against the attribute key; supports string, number, or boolean types. 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).
4876 3666
48773667 - `string` - `type: "file_search"`
4878 3668
48793669 - `number` The type of the file search tool. Always `file_search`.
4880 3670
48813671 - `boolean` - `"file_search"`
4882 3672
48833673 - `array of string or number` - `vector_store_ids: array of string`
4884 3674
48853675 - `string` The IDs of the vector stores to search.
4886 3676
48873677 - `number` - `filters: optional ComparisonFilter or CompoundFilter`
4888 3678
48893679 - `unknown` A filter to apply.
4890 3680
48913681 - `type: "and" or "or"` - `ComparisonFilter object { key, type, value }`
4892 3682
48933683 Type of operation: `and` or `or`. A filter used to compare a specified attribute key to a given value using a defined comparison operation.
4894 3684
48953685 - `"and"` - `CompoundFilter object { filters, type }`
4896 3686
48973687 - `"or"` Combine multiple filters using `and` or `or`.
4898 3688
4899 - `max_num_results: optional number`3689 - `max_num_results: optional number`
4900 3690
4928 3718
4929 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.3719 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.
4930 3720
49313721 - `Computer = object { type }` - `Computer object { type }`
4932 3722
4933 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).3723 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
4934 3724
4938 3728
4939 - `"computer"`3729 - `"computer"`
4940 3730
49413731 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
4942 3732
4943 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).3733 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
4944 3734
4970 3760
4971 - `"computer_use_preview"`3761 - `"computer_use_preview"`
4972 3762
49733763 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
4974 3764
4975 Search the Internet for sources related to the prompt. Learn more about the3765 Search the Internet for sources related to the prompt. Learn more about the
4976 [web search tool](/docs/guides/tools-web-search).3766 [web search tool](/docs/guides/tools-web-search).
5030 3820
5031 - `"approximate"`3821 - `"approximate"`
5032 3822
50333823 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
5034 3824
5035 Give the model access to additional tools via remote Model Context Protocol3825 Give the model access to additional tools via remote Model Context Protocol
5036 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).3826 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
5053 3843
5054 A string array of allowed tool names3844 A string array of allowed tool names
5055 3845
50563846 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
5057 3847
5058 A filter object to specify which tools are allowed.3848 A filter object to specify which tools are allowed.
5059 3849
5119 3909
5120 Specify which of the MCP server's tools require approval.3910 Specify which of the MCP server's tools require approval.
5121 3911
51223912 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
5123 3913
5124 Specify which of the MCP server's tools require approval. Can be3914 Specify which of the MCP server's tools require approval. Can be
5125 `always`, `never`, or a filter object associated with tools3915 `always`, `never`, or a filter object associated with tools
5172 The URL for the MCP server. One of `server_url` or `connector_id` must be3962 The URL for the MCP server. One of `server_url` or `connector_id` must be
5173 provided.3963 provided.
5174 3964
51753965 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
5176 3966
5177 A tool that runs Python code to help generate a response to a prompt.3967 A tool that runs Python code to help generate a response to a prompt.
5178 3968
5186 3976
5187 The container ID.3977 The container ID.
5188 3978
51893979 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
5190 3980
5191 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.3981 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
5192 3982
5216 4006
5217 Network access policy for the container.4007 Network access policy for the container.
5218 4008
52194009 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
5220
5221 - `type: "disabled"`
5222
5223 Disable outbound network access. Always `disabled`.
5224
5225 - `"disabled"`
5226
5227 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
5228
5229 - `allowed_domains: array of string`
5230
5231 A list of allowed domains when type is `allowlist`.
5232
5233 - `type: "allowlist"`
5234
5235 Allow outbound network access only to specified domains. Always `allowlist`.
5236
5237 - `"allowlist"`
5238
5239 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
5240
5241 Optional domain-scoped secrets for allowlisted domains.
5242
5243 - `domain: string`
5244
5245 The domain associated with the secret.
5246
5247 - `name: string`
5248
5249 The name of the secret to inject for the domain.
5250
5251 - `value: string`
5252 4010
52534011 The secret value to inject for the domain. - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
5254 4012
5255 - `type: "code_interpreter"`4013 - `type: "code_interpreter"`
5256 4014
5258 4016
5259 - `"code_interpreter"`4017 - `"code_interpreter"`
5260 4018
52614019 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
5262 4020
5263 A tool that generates images using the GPT image models.4021 A tool that generates images using the GPT image models.
5264 4022
5379 4137
5380 - `"auto"`4138 - `"auto"`
5381 4139
53824140 - `LocalShell = object { type }` - `LocalShell object { type }`
5383 4141
5384 A tool that allows the model to execute shell commands in a local environment.4142 A tool that allows the model to execute shell commands in a local environment.
5385 4143
5389 4147
5390 - `"local_shell"`4148 - `"local_shell"`
5391 4149
53924150 - `Shell = object { type, environment }` - `Shell object { type, environment }`
5393
5394 A tool that allows the model to execute shell commands.
5395
5396 - `type: "shell"`
5397
5398 The type of the shell tool. Always `shell`.
5399
5400 - `"shell"`
5401
5402 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
5403
5404 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }`
5405
5406 - `type: "container_auto"`
5407
5408 Automatically creates a container for this request
5409
5410 - `"container_auto"`
5411
5412 - `file_ids: optional array of string`
5413
5414 An optional list of uploaded files to make available to your code.
5415
5416 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`
5417
5418 The memory limit for the container.
5419
5420 - `"1g"`
5421
5422 - `"4g"`
5423
5424 - `"16g"`
5425
5426 - `"64g"`
5427
5428 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`
5429
5430 Network access policy for the container.
5431
5432 - `ContainerNetworkPolicyDisabled = object { type }`
5433
5434 - `type: "disabled"`
5435
5436 Disable outbound network access. Always `disabled`.
5437
5438 - `"disabled"`
5439
5440 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
5441
5442 - `allowed_domains: array of string`
5443
5444 A list of allowed domains when type is `allowlist`.
5445
5446 - `type: "allowlist"`
5447
5448 Allow outbound network access only to specified domains. Always `allowlist`.
5449
5450 - `"allowlist"`
5451
5452 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
5453
5454 Optional domain-scoped secrets for allowlisted domains.
5455
5456 - `domain: string`
5457
5458 The domain associated with the secret.
5459
5460 - `name: string`
5461
5462 The name of the secret to inject for the domain.
5463
5464 - `value: string`
5465
5466 The secret value to inject for the domain.
5467
5468 - `skills: optional array of SkillReference or InlineSkill`
5469
5470 An optional list of skills referenced by id or inline data.
5471
5472 - `SkillReference = object { skill_id, type, version }`
5473
5474 - `skill_id: string`
5475
5476 The ID of the referenced skill.
5477
5478 - `type: "skill_reference"`
5479
5480 References a skill created with the /v1/skills endpoint.
5481
5482 - `"skill_reference"`
5483
5484 - `version: optional string`
5485
5486 Optional skill version. Use a positive integer or 'latest'. Omit for default.
5487
5488 - `InlineSkill = object { description, name, source, type }`
5489
5490 - `description: string`
5491
5492 The description of the skill.
5493
5494 - `name: string`
5495
5496 The name of the skill.
5497
5498 - `source: InlineSkillSource`
5499
5500 Inline skill payload
5501
5502 - `data: string`
5503
5504 Base64-encoded skill zip bundle.
5505
5506 - `media_type: "application/zip"`
5507
5508 The media type of the inline skill payload. Must be `application/zip`.
5509
5510 - `"application/zip"`
5511
5512 - `type: "base64"`
5513
5514 The type of the inline skill source. Must be `base64`.
5515
5516 - `"base64"`
5517
5518 - `type: "inline"`
5519
5520 Defines an inline skill for this request.
5521
5522 - `"inline"`
5523
5524 - `LocalEnvironment = object { type, skills }`
5525
5526 - `type: "local"`
5527
5528 Use a local computer environment.
5529
5530 - `"local"`
5531
5532 - `skills: optional array of LocalSkill`
5533
5534 An optional list of skills.
5535
5536 - `description: string`
5537
5538 The description of the skill.
5539
5540 - `name: string`
5541
5542 The name of the skill.
5543 4151
55444152 - `path: string` A tool that allows the model to execute shell commands.
5545 4153
55464154 The path to the directory containing the skill. - `type: "shell"`
5547 4155
55484156 - `ContainerReference = object { container_id, type }` The type of the shell tool. Always `shell`.
5549 4157
55504158 - `container_id: string` - `"shell"`
5551 4159
55524160 The ID of the referenced container. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
5553 4161
55544162 - `type: "container_reference"` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
5555 4163
55564164 References a container created with the /v1/containers endpoint - `LocalEnvironment object { type, skills }`
5557 4165
55584166 - `"container_reference"` - `ContainerReference object { container_id, type }`
5559 4167
55604168 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
5561 4169
5562 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)4170 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
5563 4171
5583 4191
5584 The input format for the custom tool. Default is unconstrained text.4192 The input format for the custom tool. Default is unconstrained text.
5585 4193
55864194 - `Text = object { type }` - `Namespace object { description, name, tools, type }`
5587
5588 Unconstrained free-form text.
5589
5590 - `type: "text"`
5591
5592 Unconstrained text format. Always `text`.
5593
5594 - `"text"`
5595
5596 - `Grammar = object { definition, syntax, type }`
5597
5598 A grammar defined by the user.
5599
5600 - `definition: string`
5601
5602 The grammar definition.
5603
5604 - `syntax: "lark" or "regex"`
5605
5606 The syntax of the grammar definition. One of `lark` or `regex`.
5607
5608 - `"lark"`
5609
5610 - `"regex"`
5611
5612 - `type: "grammar"`
5613
5614 Grammar format. Always `grammar`.
5615
5616 - `"grammar"`
5617
5618 - `Namespace = object { description, name, tools, type }`
5619 4195
5620 Groups function/custom tools under a shared namespace.4196 Groups function/custom tools under a shared namespace.
5621 4197
5631 4207
5632 The function/custom tools available inside this namespace.4208 The function/custom tools available inside this namespace.
5633 4209
56344210 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
5635 4211
5636 - `name: string`4212 - `name: string`
5637 4213
5649 4225
5650 - `strict: optional boolean`4226 - `strict: optional boolean`
5651 4227
56524228 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
5653 4229
5654 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)4230 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
5655 4231
5675 4251
5676 The input format for the custom tool. Default is unconstrained text.4252 The input format for the custom tool. Default is unconstrained text.
5677 4253
5678 - `Text = object { type }`
5679
5680 Unconstrained free-form text.
5681
5682 - `type: "text"`
5683
5684 Unconstrained text format. Always `text`.
5685
5686 - `"text"`
5687
5688 - `Grammar = object { definition, syntax, type }`
5689
5690 A grammar defined by the user.
5691
5692 - `definition: string`
5693
5694 The grammar definition.
5695
5696 - `syntax: "lark" or "regex"`
5697
5698 The syntax of the grammar definition. One of `lark` or `regex`.
5699
5700 - `"lark"`
5701
5702 - `"regex"`
5703
5704 - `type: "grammar"`
5705
5706 Grammar format. Always `grammar`.
5707
5708 - `"grammar"`
5709
5710 - `type: "namespace"`4254 - `type: "namespace"`
5711 4255
5712 The type of the tool. Always `namespace`.4256 The type of the tool. Always `namespace`.
5713 4257
5714 - `"namespace"`4258 - `"namespace"`
5715 4259
57164260 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
5717 4261
5718 Hosted or BYOT tool search configuration for deferred tools.4262 Hosted or BYOT tool search configuration for deferred tools.
5719 4263
5739 4283
5740 Parameter schema for a client-executed tool search tool.4284 Parameter schema for a client-executed tool search tool.
5741 4285
57424286 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
5743 4287
5744 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).4288 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).
5745 4289
5793 4337
5794 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.4338 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
5795 4339
57964340 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
5797 4341
5798 Allows the assistant to create, delete, or update files using unified diffs.4342 Allows the assistant to create, delete, or update files using unified diffs.
5799 4343
5813 4357
5814 The identifier of the actor that created the item.4358 The identifier of the actor that created the item.
5815 4359
58164360 - `Compaction = object { id, encrypted_content, type, created_by }` - `Compaction object { id, encrypted_content, type, created_by }`
5817 4361
5818 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).4362 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
5819 4363
5835 4379
5836 The identifier of the actor that created the item.4380 The identifier of the actor that created the item.
5837 4381
58384382 - `ImageGenerationCall = object { id, result, status, type }` - `ImageGenerationCall object { id, result, status, type }`
5839 4383
5840 An image generation request made by the model.4384 An image generation request made by the model.
5841 4385
5865 4409
5866 - `"image_generation_call"`4410 - `"image_generation_call"`
5867 4411
58684412 - `CodeInterpreterCall = object { id, code, container_id, 3 more }` - `CodeInterpreterCall object { id, code, container_id, 3 more }`
5869 4413
5870 A tool call to run code.4414 A tool call to run code.
5871 4415
5886 The outputs generated by the code interpreter, such as logs or images.4430 The outputs generated by the code interpreter, such as logs or images.
5887 Can be null if no outputs are available.4431 Can be null if no outputs are available.
5888 4432
58894433 - `Logs = object { logs, type }` - `Logs object { logs, type }`
5890 4434
5891 The logs output from the code interpreter.4435 The logs output from the code interpreter.
5892 4436
5900 4444
5901 - `"logs"`4445 - `"logs"`
5902 4446
59034447 - `Image = object { type, url }` - `Image object { type, url }`
5904 4448
5905 The image output from the code interpreter.4449 The image output from the code interpreter.
5906 4450
5934 4478
5935 - `"code_interpreter_call"`4479 - `"code_interpreter_call"`
5936 4480
59374481 - `LocalShellCall = object { id, action, call_id, 2 more }` - `LocalShellCall object { id, action, call_id, 2 more }`
5938 4482
5939 A tool call to run a command on the local shell.4483 A tool call to run a command on the local shell.
5940 4484
5992 4536
5993 - `"local_shell_call"`4537 - `"local_shell_call"`
5994 4538
59954539 - `LocalShellCallOutput = object { id, output, type, status }` - `LocalShellCallOutput object { id, output, type, status }`
5996 4540
5997 The output of a local shell tool call.4541 The output of a local shell tool call.
5998 4542
6020 4564
6021 - `"incomplete"`4565 - `"incomplete"`
6022 4566
60234567 - `ShellCall = object { id, action, call_id, 4 more }` - `ShellCall object { id, action, call_id, 4 more }`
6024 4568
6025 A tool call that executes one or more shell commands in a managed environment.4569 A tool call that executes one or more shell commands in a managed environment.
6026 4570
6050 4594
6051 Represents the use of a local environment to perform shell actions.4595 Represents the use of a local environment to perform shell actions.
6052 4596
60534597 - `ResponseLocalEnvironment = object { type }` - `ResponseLocalEnvironment object { type }`
6054 4598
6055 Represents the use of a local environment to perform shell actions.4599 Represents the use of a local environment to perform shell actions.
6056 4600
6060 4604
6061 - `"local"`4605 - `"local"`
6062 4606
60634607 - `ResponseContainerReference = object { container_id, type }` - `ResponseContainerReference object { container_id, type }`
6064 4608
6065 Represents a container created with /v1/containers.4609 Represents a container created with /v1/containers.
6066 4610
6092 4636
6093 The ID of the entity that created this tool call.4637 The ID of the entity that created this tool call.
6094 4638
60954639 - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - `ShellCallOutput object { id, call_id, max_output_length, 4 more }`
6096 4640
6097 The output of a shell tool call that was emitted.4641 The output of a shell tool call that was emitted.
6098 4642
6116 4660
6117 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.4661 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.
6118 4662
61194663 - `Timeout = object { type }` - `Timeout object { type }`
6120 4664
6121 Indicates that the shell call exceeded its configured time limit.4665 Indicates that the shell call exceeded its configured time limit.
6122 4666
6126 4670
6127 - `"timeout"`4671 - `"timeout"`
6128 4672
61294673 - `Exit = object { exit_code, type }` - `Exit object { exit_code, type }`
6130 4674
6131 Indicates that the shell commands finished and returned an exit code.4675 Indicates that the shell commands finished and returned an exit code.
6132 4676
6172 4716
6173 The identifier of the actor that created the item.4717 The identifier of the actor that created the item.
6174 4718
61754719 - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - `ApplyPatchCall object { id, call_id, operation, 3 more }`
6176 4720
6177 A tool call that applies file diffs by creating, deleting, or updating files.4721 A tool call that applies file diffs by creating, deleting, or updating files.
6178 4722
6188 4732
6189 One of the create_file, delete_file, or update_file operations applied via apply_patch.4733 One of the create_file, delete_file, or update_file operations applied via apply_patch.
6190 4734
61914735 - `CreateFile = object { diff, path, type }` - `CreateFile object { diff, path, type }`
6192 4736
6193 Instruction describing how to create a file via the apply_patch tool.4737 Instruction describing how to create a file via the apply_patch tool.
6194 4738
6206 4750
6207 - `"create_file"`4751 - `"create_file"`
6208 4752
62094753 - `DeleteFile = object { path, type }` - `DeleteFile object { path, type }`
6210 4754
6211 Instruction describing how to delete a file via the apply_patch tool.4755 Instruction describing how to delete a file via the apply_patch tool.
6212 4756
6220 4764
6221 - `"delete_file"`4765 - `"delete_file"`
6222 4766
62234767 - `UpdateFile = object { diff, path, type }` - `UpdateFile object { diff, path, type }`
6224 4768
6225 Instruction describing how to update a file via the apply_patch tool.4769 Instruction describing how to update a file via the apply_patch tool.
6226 4770
6256 4800
6257 The ID of the entity that created this tool call.4801 The ID of the entity that created this tool call.
6258 4802
62594803 - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - `ApplyPatchCallOutput object { id, call_id, status, 3 more }`
6260 4804
6261 The output emitted by an apply patch tool call.4805 The output emitted by an apply patch tool call.
6262 4806
6290 4834
6291 Optional textual output returned by the apply patch tool.4835 Optional textual output returned by the apply patch tool.
6292 4836
62934837 - `McpCall = object { id, arguments, name, 6 more }` - `McpCall object { id, arguments, name, 6 more }`
6294 4838
6295 An invocation of a tool on an MCP server.4839 An invocation of a tool on an MCP server.
6296 4840
6343 4887
6344 - `"failed"`4888 - `"failed"`
6345 4889
63464890 - `McpListTools = object { id, server_label, tools, 2 more }` - `McpListTools object { id, server_label, tools, 2 more }`
6347 4891
6348 A list of tools available on an MCP server.4892 A list of tools available on an MCP server.
6349 4893
6385 4929
6386 Error message if the server could not list tools.4930 Error message if the server could not list tools.
6387 4931
63884932 - `McpApprovalRequest = object { id, arguments, name, 2 more }` - `McpApprovalRequest object { id, arguments, name, 2 more }`
6389 4933
6390 A request for human approval of a tool invocation.4934 A request for human approval of a tool invocation.
6391 4935
6411 4955
6412 - `"mcp_approval_request"`4956 - `"mcp_approval_request"`
6413 4957
64144958 - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }`
6415 4959
6416 A response to an MCP approval request.4960 A response to an MCP approval request.
6417 4961
6437 4981
6438 Optional reason for the decision.4982 Optional reason for the decision.
6439 4983
64404984 - `CustomToolCall = object { call_id, input, name, 3 more }` - `CustomToolCall object { call_id, input, name, 3 more }`
6441 4985
6442 A call to a custom tool created by the model.4986 A call to a custom tool created by the model.
6443 4987
6467 5011
6468 The namespace of the custom tool being called.5012 The namespace of the custom tool being called.
6469 5013
64705014 - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - `CustomToolCallOutput object { id, call_id, output, 3 more }`
6471 5015
6472 - `id: string`5016 - `id: string`
6473 5017
6490 5034
6491 Text, image, or file output of the custom tool call.5035 Text, image, or file output of the custom tool call.
6492 5036
64935037 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
6494 5038
6495 A text input to the model.5039 A text input to the model.
6496 5040
64975041 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
6498
6499 The text input to the model.
6500
6501 - `type: "input_text"`
6502
6503 The type of the input item. Always `input_text`.
6504
6505 - `"input_text"`
6506
6507 - `ResponseInputImage = object { detail, type, file_id, image_url }`
6508 5042
6509 An image input to the model. Learn about [image inputs](/docs/guides/vision).5043 An image input to the model. Learn about [image inputs](/docs/guides/vision).
6510 5044
65115045 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
6512
6513 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
6514
6515 - `"low"`
6516
6517 - `"high"`
6518
6519 - `"auto"`
6520
6521 - `"original"`
6522
6523 - `type: "input_image"`
6524
6525 The type of the input item. Always `input_image`.
6526
6527 - `"input_image"`
6528
6529 - `file_id: optional string`
6530
6531 The ID of the file to be sent to the model.
6532
6533 - `image_url: optional string`
6534
6535 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
6536
6537 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
6538 5046
6539 A file input to the model.5047 A file input to the model.
6540 5048
6541 - `type: "input_file"`
6542
6543 The type of the input item. Always `input_file`.
6544
6545 - `"input_file"`
6546
6547 - `detail: optional "low" or "high"`
6548
6549 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`.
6550
6551 - `"low"`
6552
6553 - `"high"`
6554
6555 - `file_data: optional string`
6556
6557 The content of the file to be sent to the model.
6558
6559 - `file_id: optional string`
6560
6561 The ID of the file to be sent to the model.
6562
6563 - `file_url: optional string`
6564
6565 The URL of the file to be sent to the model.
6566
6567 - `filename: optional string`
6568
6569 The name of the file to be sent to the model.
6570
6571 - `status: "in_progress" or "completed" or "incomplete"`5049 - `status: "in_progress" or "completed" or "incomplete"`
6572 5050
6573 The status of the item. One of `in_progress`, `completed`, or5051 The status of the item. One of `in_progress`, `completed`, or
6621 5099
6622 - `"required"`5100 - `"required"`
6623 5101
66245102 - `ToolChoiceAllowed = object { mode, tools, type }` - `ToolChoiceAllowed object { mode, tools, type }`
6625 5103
6626 Constrains the tools available to the model to a pre-defined set.5104 Constrains the tools available to the model to a pre-defined set.
6627 5105
6658 5136
6659 - `"allowed_tools"`5137 - `"allowed_tools"`
6660 5138
66615139 - `ToolChoiceTypes = object { type }` - `ToolChoiceTypes object { type }`
6662 5140
6663 Indicates that the model should use a built-in tool to generate a response.5141 Indicates that the model should use a built-in tool to generate a response.
6664 [Learn more about built-in tools](/docs/guides/tools).5142 [Learn more about built-in tools](/docs/guides/tools).
6694 5172
6695 - `"code_interpreter"`5173 - `"code_interpreter"`
6696 5174
66975175 - `ToolChoiceFunction = object { name, type }` - `ToolChoiceFunction object { name, type }`
6698 5176
6699 Use this option to force the model to call a specific function.5177 Use this option to force the model to call a specific function.
6700 5178
6708 5186
6709 - `"function"`5187 - `"function"`
6710 5188
67115189 - `ToolChoiceMcp = object { server_label, type, name }` - `ToolChoiceMcp object { server_label, type, name }`
6712 5190
6713 Use this option to force the model to call a specific tool on a remote MCP server.5191 Use this option to force the model to call a specific tool on a remote MCP server.
6714 5192
6726 5204
6727 The name of the tool to call on the server.5205 The name of the tool to call on the server.
6728 5206
67295207 - `ToolChoiceCustom = object { name, type }` - `ToolChoiceCustom object { name, type }`
6730 5208
6731 Use this option to force the model to call a specific custom tool.5209 Use this option to force the model to call a specific custom tool.
6732 5210
6740 5218
6741 - `"custom"`5219 - `"custom"`
6742 5220
67435221 - `ToolChoiceApplyPatch = object { type }` - `ToolChoiceApplyPatch object { type }`
6744 5222
6745 Forces the model to call the apply_patch tool when executing a tool call.5223 Forces the model to call the apply_patch tool when executing a tool call.
6746 5224
6750 5228
6751 - `"apply_patch"`5229 - `"apply_patch"`
6752 5230
67535231 - `ToolChoiceShell = object { type }` - `ToolChoiceShell object { type }`
6754 5232
6755 Forces the model to call the shell tool when a tool call is required.5233 Forces the model to call the shell tool when a tool call is required.
6756 5234
6765 An array of tools the model may call while generating a response. You5243 An array of tools the model may call while generating a response. You
6766 can specify which tool to use by setting the `tool_choice` parameter.5244 can specify which tool to use by setting the `tool_choice` parameter.
6767 5245
67685246 We support the following categories of tools: We support the following categories of tools:
6769
6770 - **Built-in tools**: Tools that are provided by OpenAI that extend the
6771 model's capabilities, like [web search](/docs/guides/tools-web-search)
6772 or [file search](/docs/guides/tools-file-search). Learn more about
6773 [built-in tools](/docs/guides/tools).
6774 - **MCP Tools**: Integrations with third-party systems via custom MCP servers
6775 or predefined connectors such as Google Drive and SharePoint. Learn more about
6776 [MCP Tools](/docs/guides/tools-connectors-mcp).
6777 - **Function calls (custom tools)**: Functions that are defined by you,
6778 enabling the model to call your own code with strongly typed arguments
6779 and outputs. Learn more about
6780 [function calling](/docs/guides/function-calling). You can also use
6781 custom tools to call your own code.
6782
6783 - `Function = object { name, parameters, strict, 3 more }`
6784
6785 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).
6786
6787 - `name: string`
6788
6789 The name of the function to call.
6790
6791 - `parameters: map[unknown]`
6792
6793 A JSON schema object describing the parameters of the function.
6794
6795 - `strict: boolean`
6796
6797 Whether to enforce strict parameter validation. Default `true`.
6798
6799 - `type: "function"`
6800
6801 The type of the function tool. Always `function`.
6802
6803 - `"function"`
6804
6805 - `defer_loading: optional boolean`
6806
6807 Whether this function is deferred and loaded via tool search.
6808
6809 - `description: optional string`
6810
6811 A description of the function. Used by the model to determine whether or not to call the function.
6812
6813 - `FileSearch = object { type, vector_store_ids, filters, 2 more }`
6814
6815 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).
6816
6817 - `type: "file_search"`
6818
6819 The type of the file search tool. Always `file_search`.
6820
6821 - `"file_search"`
6822
6823 - `vector_store_ids: array of string`
6824
6825 The IDs of the vector stores to search.
6826
6827 - `filters: optional ComparisonFilter or CompoundFilter`
6828
6829 A filter to apply.
6830
6831 - `ComparisonFilter = object { key, type, value }`
6832
6833 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
6834
6835 - `key: string`
6836
6837 The key to compare against the value.
6838
6839 - `type: "eq" or "ne" or "gt" or 5 more`
6840
6841 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
6842
6843 - `eq`: equals
6844 - `ne`: not equal
6845 - `gt`: greater than
6846 - `gte`: greater than or equal
6847 - `lt`: less than
6848 - `lte`: less than or equal
6849 - `in`: in
6850 - `nin`: not in
6851
6852 - `"eq"`
6853
6854 - `"ne"`
6855
6856 - `"gt"`
6857
6858 - `"gte"`
6859
6860 - `"lt"`
6861
6862 - `"lte"`
6863
6864 - `"in"`
6865
6866 - `"nin"`
6867
6868 - `value: string or number or boolean or array of string or number`
6869
6870 The value to compare against the attribute key; supports string, number, or boolean types.
6871
6872 - `string`
6873
6874 - `number`
6875
6876 - `boolean`
6877
6878 - `array of string or number`
6879
6880 - `string`
6881
6882 - `number`
6883
6884 - `CompoundFilter = object { filters, type }`
6885
6886 Combine multiple filters using `and` or `or`.
6887
6888 - `filters: array of ComparisonFilter or unknown`
6889 5247
68905248 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - **Built-in tools**: Tools that are provided by OpenAI that extend the
5249 model's capabilities, like [web search](/docs/guides/tools-web-search)
5250 or [file search](/docs/guides/tools-file-search). Learn more about
5251 [built-in tools](/docs/guides/tools).
5252 - **MCP Tools**: Integrations with third-party systems via custom MCP servers
5253 or predefined connectors such as Google Drive and SharePoint. Learn more about
5254 [MCP Tools](/docs/guides/tools-connectors-mcp).
5255 - **Function calls (custom tools)**: Functions that are defined by you,
5256 enabling the model to call your own code with strongly typed arguments
5257 and outputs. Learn more about
5258 [function calling](/docs/guides/function-calling). You can also use
5259 custom tools to call your own code.
6891 5260
68925261 - `ComparisonFilter = object { key, type, value }` - `Function object { name, parameters, strict, 3 more }`
6893 5262
68945263 A filter used to compare a specified attribute key to a given value using a defined comparison operation. 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).
6895 5264
68965265 - `key: string` - `name: string`
6897 5266
68985267 The key to compare against the value. The name of the function to call.
6899 5268
69005269 - `type: "eq" or "ne" or "gt" or 5 more` - `parameters: map[unknown]`
6901 5270
69025271 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. A JSON schema object describing the parameters of the function.
6903 5272
69045273 - `eq`: equals - `strict: boolean`
6905 - `ne`: not equal
6906 - `gt`: greater than
6907 - `gte`: greater than or equal
6908 - `lt`: less than
6909 - `lte`: less than or equal
6910 - `in`: in
6911 - `nin`: not in
6912 5274
69135275 - `"eq"` Whether to enforce strict parameter validation. Default `true`.
6914 5276
69155277 - `"ne"` - `type: "function"`
6916 5278
69175279 - `"gt"` The type of the function tool. Always `function`.
6918 5280
69195281 - `"gte"` - `"function"`
6920 5282
69215283 - `"lt"` - `defer_loading: optional boolean`
6922 5284
69235285 - `"lte"` Whether this function is deferred and loaded via tool search.
6924 5286
69255287 - `"in"` - `description: optional string`
6926 5288
69275289 - `"nin"` A description of the function. Used by the model to determine whether or not to call the function.
6928 5290
69295291 - `value: string or number or boolean or array of string or number` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
6930 5292
69315293 The value to compare against the attribute key; supports string, number, or boolean types. 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).
6932 5294
69335295 - `string` - `type: "file_search"`
6934 5296
69355297 - `number` The type of the file search tool. Always `file_search`.
6936 5298
69375299 - `boolean` - `"file_search"`
6938 5300
69395301 - `array of string or number` - `vector_store_ids: array of string`
6940 5302
69415303 - `string` The IDs of the vector stores to search.
6942 5304
69435305 - `number` - `filters: optional ComparisonFilter or CompoundFilter`
6944 5306
69455307 - `unknown` A filter to apply.
6946 5308
69475309 - `type: "and" or "or"` - `ComparisonFilter object { key, type, value }`
6948 5310
69495311 Type of operation: `and` or `or`. A filter used to compare a specified attribute key to a given value using a defined comparison operation.
6950 5312
69515313 - `"and"` - `CompoundFilter object { filters, type }`
6952 5314
69535315 - `"or"` Combine multiple filters using `and` or `or`.
6954 5316
6955 - `max_num_results: optional number`5317 - `max_num_results: optional number`
6956 5318
6984 5346
6985 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.5347 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.
6986 5348
69875349 - `Computer = object { type }` - `Computer object { type }`
6988 5350
6989 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).5351 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
6990 5352
6994 5356
6995 - `"computer"`5357 - `"computer"`
6996 5358
69975359 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
6998 5360
6999 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).5361 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
7000 5362
7026 5388
7027 - `"computer_use_preview"`5389 - `"computer_use_preview"`
7028 5390
70295391 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
7030 5392
7031 Search the Internet for sources related to the prompt. Learn more about the5393 Search the Internet for sources related to the prompt. Learn more about the
7032 [web search tool](/docs/guides/tools-web-search).5394 [web search tool](/docs/guides/tools-web-search).
7086 5448
7087 - `"approximate"`5449 - `"approximate"`
7088 5450
70895451 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
7090 5452
7091 Give the model access to additional tools via remote Model Context Protocol5453 Give the model access to additional tools via remote Model Context Protocol
7092 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).5454 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
7109 5471
7110 A string array of allowed tool names5472 A string array of allowed tool names
7111 5473
71125474 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
7113 5475
7114 A filter object to specify which tools are allowed.5476 A filter object to specify which tools are allowed.
7115 5477
7175 5537
7176 Specify which of the MCP server's tools require approval.5538 Specify which of the MCP server's tools require approval.
7177 5539
71785540 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
7179 5541
7180 Specify which of the MCP server's tools require approval. Can be5542 Specify which of the MCP server's tools require approval. Can be
7181 `always`, `never`, or a filter object associated with tools5543 `always`, `never`, or a filter object associated with tools
7228 The URL for the MCP server. One of `server_url` or `connector_id` must be5590 The URL for the MCP server. One of `server_url` or `connector_id` must be
7229 provided.5591 provided.
7230 5592
72315593 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
7232 5594
7233 A tool that runs Python code to help generate a response to a prompt.5595 A tool that runs Python code to help generate a response to a prompt.
7234 5596
7242 5604
7243 The container ID.5605 The container ID.
7244 5606
72455607 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
7246 5608
7247 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.5609 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
7248 5610
7272 5634
7273 Network access policy for the container.5635 Network access policy for the container.
7274 5636
72755637 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
7276
7277 - `type: "disabled"`
7278
7279 Disable outbound network access. Always `disabled`.
7280
7281 - `"disabled"`
7282
7283 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
7284
7285 - `allowed_domains: array of string`
7286
7287 A list of allowed domains when type is `allowlist`.
7288
7289 - `type: "allowlist"`
7290
7291 Allow outbound network access only to specified domains. Always `allowlist`.
7292
7293 - `"allowlist"`
7294
7295 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
7296
7297 Optional domain-scoped secrets for allowlisted domains.
7298
7299 - `domain: string`
7300
7301 The domain associated with the secret.
7302
7303 - `name: string`
7304
7305 The name of the secret to inject for the domain.
7306
7307 - `value: string`
7308 5638
73095639 The secret value to inject for the domain. - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
7310 5640
7311 - `type: "code_interpreter"`5641 - `type: "code_interpreter"`
7312 5642
7314 5644
7315 - `"code_interpreter"`5645 - `"code_interpreter"`
7316 5646
73175647 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
7318 5648
7319 A tool that generates images using the GPT image models.5649 A tool that generates images using the GPT image models.
7320 5650
7322 5652
7323 The type of the image generation tool. Always `image_generation`.5653 The type of the image generation tool. Always `image_generation`.
7324 5654
73255655 - `"image_generation"` - `"image_generation"`
7326
7327 - `action: optional "generate" or "edit" or "auto"`
7328
7329 Whether to generate a new image or edit an existing image. Default: `auto`.
7330
7331 - `"generate"`
7332
7333 - `"edit"`
7334
7335 - `"auto"`
7336
7337 - `background: optional "transparent" or "opaque" or "auto"`
7338
7339 Background type for the generated image. One of `transparent`,
7340 `opaque`, or `auto`. Default: `auto`.
7341
7342 - `"transparent"`
7343
7344 - `"opaque"`
7345
7346 - `"auto"`
7347
7348 - `input_fidelity: optional "high" or "low"`
7349
7350 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`.
7351
7352 - `"high"`
7353
7354 - `"low"`
7355
7356 - `input_image_mask: optional object { file_id, image_url }`
7357
7358 Optional mask for inpainting. Contains `image_url`
7359 (string, optional) and `file_id` (string, optional).
7360
7361 - `file_id: optional string`
7362
7363 File ID for the mask image.
7364
7365 - `image_url: optional string`
7366
7367 Base64-encoded mask image.
7368
7369 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
7370
7371 The image generation model to use. Default: `gpt-image-1`.
7372
7373 - `string`
7374
7375 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
7376
7377 The image generation model to use. Default: `gpt-image-1`.
7378
7379 - `"gpt-image-1"`
7380
7381 - `"gpt-image-1-mini"`
7382
7383 - `"gpt-image-1.5"`
7384
7385 - `moderation: optional "auto" or "low"`
7386
7387 Moderation level for the generated image. Default: `auto`.
7388
7389 - `"auto"`
7390
7391 - `"low"`
7392
7393 - `output_compression: optional number`
7394
7395 Compression level for the output image. Default: 100.
7396
7397 - `output_format: optional "png" or "webp" or "jpeg"`
7398
7399 The output format of the generated image. One of `png`, `webp`, or
7400 `jpeg`. Default: `png`.
7401
7402 - `"png"`
7403
7404 - `"webp"`
7405
7406 - `"jpeg"`
7407
7408 - `partial_images: optional number`
7409
7410 Number of partial images to generate in streaming mode, from 0 (default value) to 3.
7411
7412 - `quality: optional "low" or "medium" or "high" or "auto"`
7413
7414 The quality of the generated image. One of `low`, `medium`, `high`,
7415 or `auto`. Default: `auto`.
7416
7417 - `"low"`
7418
7419 - `"medium"`
7420
7421 - `"high"`
7422
7423 - `"auto"`
7424
7425 - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"`
7426
7427 The size of the generated image. One of `1024x1024`, `1024x1536`,
7428 `1536x1024`, or `auto`. Default: `auto`.
7429
7430 - `"1024x1024"`
7431
7432 - `"1024x1536"`
7433
7434 - `"1536x1024"`
7435
7436 - `"auto"`
7437
7438 - `LocalShell = object { type }`
7439
7440 A tool that allows the model to execute shell commands in a local environment.
7441
7442 - `type: "local_shell"`
7443
7444 The type of the local shell tool. Always `local_shell`.
7445
7446 - `"local_shell"`
7447
7448 - `Shell = object { type, environment }`
7449
7450 A tool that allows the model to execute shell commands.
7451
7452 - `type: "shell"`
7453
7454 The type of the shell tool. Always `shell`.
7455
7456 - `"shell"`
7457
7458 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
7459
7460 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }`
7461
7462 - `type: "container_auto"`
7463
7464 Automatically creates a container for this request
7465
7466 - `"container_auto"`
7467
7468 - `file_ids: optional array of string`
7469
7470 An optional list of uploaded files to make available to your code.
7471
7472 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`
7473
7474 The memory limit for the container.
7475
7476 - `"1g"`
7477
7478 - `"4g"`
7479
7480 - `"16g"`
7481 5656
74825657 - `"64g"` - `action: optional "generate" or "edit" or "auto"`
7483 5658
74845659 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist` Whether to generate a new image or edit an existing image. Default: `auto`.
7485 5660
74865661 Network access policy for the container. - `"generate"`
7487 5662
74885663 - `ContainerNetworkPolicyDisabled = object { type }` - `"edit"`
7489 5664
74905665 - `type: "disabled"` - `"auto"`
7491 5666
74925667 Disable outbound network access. Always `disabled`. - `background: optional "transparent" or "opaque" or "auto"`
7493 5668
74945669 - `"disabled"` Background type for the generated image. One of `transparent`,
5670 `opaque`, or `auto`. Default: `auto`.
7495 5671
74965672 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `"transparent"`
7497 5673
74985674 - `allowed_domains: array of string` - `"opaque"`
7499 5675
75005676 A list of allowed domains when type is `allowlist`. - `"auto"`
7501 5677
75025678 - `type: "allowlist"` - `input_fidelity: optional "high" or "low"`
7503 5679
75045680 Allow outbound network access only to specified domains. Always `allowlist`. 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`.
7505 5681
75065682 - `"allowlist"` - `"high"`
7507 5683
75085684 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret` - `"low"`
7509 5685
75105686 Optional domain-scoped secrets for allowlisted domains. - `input_image_mask: optional object { file_id, image_url }`
7511 5687
75125688 - `domain: string` Optional mask for inpainting. Contains `image_url`
5689 (string, optional) and `file_id` (string, optional).
7513 5690
75145691 The domain associated with the secret. - `file_id: optional string`
7515 5692
75165693 - `name: string` File ID for the mask image.
7517 5694
75185695 The name of the secret to inject for the domain. - `image_url: optional string`
7519 5696
75205697 - `value: string` Base64-encoded mask image.
7521 5698
75225699 The secret value to inject for the domain. - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
7523 5700
75245701 - `skills: optional array of SkillReference or InlineSkill` The image generation model to use. Default: `gpt-image-1`.
7525 5702
75265703 An optional list of skills referenced by id or inline data. - `string`
7527 5704
75285705 - `SkillReference = object { skill_id, type, version }` - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
7529 5706
75305707 - `skill_id: string` The image generation model to use. Default: `gpt-image-1`.
7531 5708
75325709 The ID of the referenced skill. - `"gpt-image-1"`
7533 5710
75345711 - `type: "skill_reference"` - `"gpt-image-1-mini"`
7535 5712
75365713 References a skill created with the /v1/skills endpoint. - `"gpt-image-1.5"`
7537 5714
75385715 - `"skill_reference"` - `moderation: optional "auto" or "low"`
7539 5716
75405717 - `version: optional string` Moderation level for the generated image. Default: `auto`.
7541 5718
75425719 Optional skill version. Use a positive integer or 'latest'. Omit for default. - `"auto"`
7543 5720
75445721 - `InlineSkill = object { description, name, source, type }` - `"low"`
7545 5722
75465723 - `description: string` - `output_compression: optional number`
7547 5724
75485725 The description of the skill. Compression level for the output image. Default: 100.
7549 5726
75505727 - `name: string` - `output_format: optional "png" or "webp" or "jpeg"`
7551 5728
75525729 The name of the skill. The output format of the generated image. One of `png`, `webp`, or
5730 `jpeg`. Default: `png`.
7553 5731
75545732 - `source: InlineSkillSource` - `"png"`
7555 5733
75565734 Inline skill payload - `"webp"`
7557 5735
75585736 - `data: string` - `"jpeg"`
7559 5737
75605738 Base64-encoded skill zip bundle. - `partial_images: optional number`
7561 5739
75625740 - `media_type: "application/zip"` Number of partial images to generate in streaming mode, from 0 (default value) to 3.
7563 5741
75645742 The media type of the inline skill payload. Must be `application/zip`. - `quality: optional "low" or "medium" or "high" or "auto"`
7565 5743
75665744 - `"application/zip"` The quality of the generated image. One of `low`, `medium`, `high`,
5745 or `auto`. Default: `auto`.
7567 5746
75685747 - `type: "base64"` - `"low"`
7569 5748
75705749 The type of the inline skill source. Must be `base64`. - `"medium"`
7571 5750
75725751 - `"base64"` - `"high"`
7573 5752
75745753 - `type: "inline"` - `"auto"`
7575 5754
75765755 Defines an inline skill for this request. - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"`
7577 5756
75785757 - `"inline"` The size of the generated image. One of `1024x1024`, `1024x1536`,
5758 `1536x1024`, or `auto`. Default: `auto`.
7579 5759
75805760 - `LocalEnvironment = object { type, skills }` - `"1024x1024"`
7581 5761
75825762 - `type: "local"` - `"1024x1536"`
7583 5763
75845764 Use a local computer environment. - `"1536x1024"`
7585 5765
75865766 - `"local"` - `"auto"`
7587 5767
75885768 - `skills: optional array of LocalSkill` - `LocalShell object { type }`
7589 5769
75905770 An optional list of skills. A tool that allows the model to execute shell commands in a local environment.
7591 5771
75925772 - `description: string` - `type: "local_shell"`
7593 5773
75945774 The description of the skill. The type of the local shell tool. Always `local_shell`.
7595 5775
75965776 - `name: string` - `"local_shell"`
7597 5777
75985778 The name of the skill. - `Shell object { type, environment }`
7599 5779
76005780 - `path: string` A tool that allows the model to execute shell commands.
7601 5781
76025782 The path to the directory containing the skill. - `type: "shell"`
7603 5783
76045784 - `ContainerReference = object { container_id, type }` The type of the shell tool. Always `shell`.
7605 5785
76065786 - `container_id: string` - `"shell"`
7607 5787
76085788 The ID of the referenced container. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
7609 5789
76105790 - `type: "container_reference"` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
7611 5791
76125792 References a container created with the /v1/containers endpoint - `LocalEnvironment object { type, skills }`
7613 5793
76145794 - `"container_reference"` - `ContainerReference object { container_id, type }`
7615 5795
76165796 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
7617 5797
7618 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)5798 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
7619 5799
7639 5819
7640 The input format for the custom tool. Default is unconstrained text.5820 The input format for the custom tool. Default is unconstrained text.
7641 5821
76425822 - `Text = object { type }` - `Namespace object { description, name, tools, type }`
7643
7644 Unconstrained free-form text.
7645
7646 - `type: "text"`
7647
7648 Unconstrained text format. Always `text`.
7649
7650 - `"text"`
7651
7652 - `Grammar = object { definition, syntax, type }`
7653
7654 A grammar defined by the user.
7655
7656 - `definition: string`
7657
7658 The grammar definition.
7659
7660 - `syntax: "lark" or "regex"`
7661
7662 The syntax of the grammar definition. One of `lark` or `regex`.
7663
7664 - `"lark"`
7665
7666 - `"regex"`
7667
7668 - `type: "grammar"`
7669
7670 Grammar format. Always `grammar`.
7671
7672 - `"grammar"`
7673
7674 - `Namespace = object { description, name, tools, type }`
7675 5823
7676 Groups function/custom tools under a shared namespace.5824 Groups function/custom tools under a shared namespace.
7677 5825
7687 5835
7688 The function/custom tools available inside this namespace.5836 The function/custom tools available inside this namespace.
7689 5837
76905838 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
7691 5839
7692 - `name: string`5840 - `name: string`
7693 5841
7705 5853
7706 - `strict: optional boolean`5854 - `strict: optional boolean`
7707 5855
77085856 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
7709 5857
7710 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)5858 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
7711 5859
7731 5879
7732 The input format for the custom tool. Default is unconstrained text.5880 The input format for the custom tool. Default is unconstrained text.
7733 5881
7734 - `Text = object { type }`
7735
7736 Unconstrained free-form text.
7737
7738 - `type: "text"`
7739
7740 Unconstrained text format. Always `text`.
7741
7742 - `"text"`
7743
7744 - `Grammar = object { definition, syntax, type }`
7745
7746 A grammar defined by the user.
7747
7748 - `definition: string`
7749
7750 The grammar definition.
7751
7752 - `syntax: "lark" or "regex"`
7753
7754 The syntax of the grammar definition. One of `lark` or `regex`.
7755
7756 - `"lark"`
7757
7758 - `"regex"`
7759
7760 - `type: "grammar"`
7761
7762 Grammar format. Always `grammar`.
7763
7764 - `"grammar"`
7765
7766 - `type: "namespace"`5882 - `type: "namespace"`
7767 5883
7768 The type of the tool. Always `namespace`.5884 The type of the tool. Always `namespace`.
7769 5885
7770 - `"namespace"`5886 - `"namespace"`
7771 5887
77725888 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
7773 5889
7774 Hosted or BYOT tool search configuration for deferred tools.5890 Hosted or BYOT tool search configuration for deferred tools.
7775 5891
7795 5911
7796 Parameter schema for a client-executed tool search tool.5912 Parameter schema for a client-executed tool search tool.
7797 5913
77985914 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
7799 5915
7800 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).5916 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).
7801 5917
7849 5965
7850 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.5966 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
7851 5967
78525968 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
7853 5969
7854 Allows the assistant to create, delete, or update files using unified diffs.5970 Allows the assistant to create, delete, or update files using unified diffs.
7855 5971
7923 6039
7924 - `string`6040 - `string`
7925 6041
79266042 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
7927 6043
7928 A text input to the model.6044 A text input to the model.
7929 6045
79306046 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
7931
7932 The text input to the model.
7933
7934 - `type: "input_text"`
7935
7936 The type of the input item. Always `input_text`.
7937
7938 - `"input_text"`
7939
7940 - `ResponseInputImage = object { detail, type, file_id, image_url }`
7941 6047
7942 An image input to the model. Learn about [image inputs](/docs/guides/vision).6048 An image input to the model. Learn about [image inputs](/docs/guides/vision).
7943 6049
79446050 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
7945
7946 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
7947
7948 - `"low"`
7949
7950 - `"high"`
7951
7952 - `"auto"`
7953
7954 - `"original"`
7955
7956 - `type: "input_image"`
7957
7958 The type of the input item. Always `input_image`.
7959
7960 - `"input_image"`
7961
7962 - `file_id: optional string`
7963
7964 The ID of the file to be sent to the model.
7965
7966 - `image_url: optional string`
7967
7968 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
7969
7970 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
7971 6051
7972 A file input to the model.6052 A file input to the model.
7973 6053
7974 - `type: "input_file"`
7975
7976 The type of the input item. Always `input_file`.
7977
7978 - `"input_file"`
7979
7980 - `detail: optional "low" or "high"`
7981
7982 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`.
7983
7984 - `"low"`
7985
7986 - `"high"`
7987
7988 - `file_data: optional string`
7989
7990 The content of the file to be sent to the model.
7991
7992 - `file_id: optional string`
7993
7994 The ID of the file to be sent to the model.
7995
7996 - `file_url: optional string`
7997
7998 The URL of the file to be sent to the model.
7999
8000 - `filename: optional string`
8001
8002 The name of the file to be sent to the model.
8003
8004 - `version: optional string`6054 - `version: optional string`
8005 6055
8006 Optional version of the prompt template.6056 Optional version of the prompt template.
8144 ensures the message the model generates is valid JSON. Using `json_schema`6194 ensures the message the model generates is valid JSON. Using `json_schema`
8145 is preferred for models that support it.6195 is preferred for models that support it.
8146 6196
81476197 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
8148 6198
8149 Default response format. Used to generate text responses.6199 Default response format. Used to generate text responses.
8150 6200
8154 6204
8155 - `"text"`6205 - `"text"`
8156 6206
81576207 - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }`
8158 6208
8159 JSON Schema response format. Used to generate structured JSON responses.6209 JSON Schema response format. Used to generate structured JSON responses.
8160 Learn more about [Structured Outputs](/docs/guides/structured-outputs).6210 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
8188 `strict` is `true`. To learn more, read the [Structured Outputs6238 `strict` is `true`. To learn more, read the [Structured Outputs
8189 guide](/docs/guides/structured-outputs).6239 guide](/docs/guides/structured-outputs).
8190 6240
81916241 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
8192 6242
8193 JSON object response format. An older method of generating JSON responses.6243 JSON object response format. An older method of generating JSON responses.
8194 Using `json_schema` is recommended for models that support it. Note that the6244 Using `json_schema` is recommended for models that support it. Note that the
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
217217 - `EasyInputMessage = object { content, role, phase, type }` - `EasyInputMessage object { content, role, phase, type }`
218 218
219 A message input to the model with a role indicating instruction following219 A message input to the model with a role indicating instruction following
220 hierarchy. Instructions given with the `developer` or `system` role take220 hierarchy. Instructions given with the `developer` or `system` role take
236 A list of one or many input items to the model, containing different content236 A list of one or many input items to the model, containing different content
237 types.237 types.
238 238
239239 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
240 240
241 A text input to the model.241 A text input to the model.
242 242
250 250
251 - `"input_text"`251 - `"input_text"`
252 252
253253 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
254 254
255 An image input to the model. Learn about [image inputs](/docs/guides/vision).255 An image input to the model. Learn about [image inputs](/docs/guides/vision).
256 256
280 280
281 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.281 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
282 282
283283 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
284 284
285 A file input to the model.285 A file input to the model.
286 286
343 343
344 - `"message"`344 - `"message"`
345 345
346346 - `Message = object { content, role, status, type }` - `Message object { content, role, status, type }`
347 347
348 A message input to the model with a role indicating instruction following348 A message input to the model with a role indicating instruction following
349 hierarchy. Instructions given with the `developer` or `system` role take349 hierarchy. Instructions given with the `developer` or `system` role take
354 A list of one or many input items to the model, containing different content354 A list of one or many input items to the model, containing different content
355 types.355 types.
356 356
357 - `ResponseInputText = object { text, type }`
358
359 A text input to the model.
360
361 - `text: string`
362
363 The text input to the model.
364
365 - `type: "input_text"`
366
367 The type of the input item. Always `input_text`.
368
369 - `"input_text"`
370
371 - `ResponseInputImage = object { detail, type, file_id, image_url }`
372
373 An image input to the model. Learn about [image inputs](/docs/guides/vision).
374
375 - `detail: "low" or "high" or "auto" or "original"`
376
377 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
378
379 - `"low"`
380
381 - `"high"`
382
383 - `"auto"`
384
385 - `"original"`
386
387 - `type: "input_image"`
388
389 The type of the input item. Always `input_image`.
390
391 - `"input_image"`
392
393 - `file_id: optional string`
394
395 The ID of the file to be sent to the model.
396
397 - `image_url: optional string`
398
399 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
400
401 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
402
403 A file input to the model.
404
405 - `type: "input_file"`
406
407 The type of the input item. Always `input_file`.
408
409 - `"input_file"`
410
411 - `detail: optional "low" or "high"`
412
413 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`.
414
415 - `"low"`
416
417 - `"high"`
418
419 - `file_data: optional string`
420
421 The content of the file to be sent to the model.
422
423 - `file_id: optional string`
424
425 The ID of the file to be sent to the model.
426
427 - `file_url: optional string`
428
429 The URL of the file to be sent to the model.
430
431 - `filename: optional string`
432
433 The name of the file to be sent to the model.
434
435 - `role: "user" or "system" or "developer"`357 - `role: "user" or "system" or "developer"`
436 358
437 The role of the message input. One of `user`, `system`, or `developer`.359 The role of the message input. One of `user`, `system`, or `developer`.
459 381
460 - `"message"`382 - `"message"`
461 383
462384 - `ResponseOutputMessage = object { id, content, role, 3 more }` - `ResponseOutputMessage object { id, content, role, 3 more }`
463 385
464 An output message from the model.386 An output message from the model.
465 387
471 393
472 The content of the output message.394 The content of the output message.
473 395
474396 - `ResponseOutputText = object { annotations, logprobs, text, type }` - `ResponseOutputText object { annotations, logprobs, text, type }`
475 397
476 A text output from the model.398 A text output from the model.
477 399
479 401
480 The annotations of the text output.402 The annotations of the text output.
481 403
482404 - `FileCitation = object { file_id, filename, index, type }` - `FileCitation object { file_id, filename, index, type }`
483 405
484 A citation to a file.406 A citation to a file.
485 407
501 423
502 - `"file_citation"`424 - `"file_citation"`
503 425
504426 - `URLCitation = object { end_index, start_index, title, 2 more }` - `URLCitation object { end_index, start_index, title, 2 more }`
505 427
506 A citation for a web resource used to generate a model response.428 A citation for a web resource used to generate a model response.
507 429
527 449
528 The URL of the web resource.450 The URL of the web resource.
529 451
530452 - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`
531 453
532 A citation for a container file used to generate a model response.454 A citation for a container file used to generate a model response.
533 455
557 479
558 - `"container_file_citation"`480 - `"container_file_citation"`
559 481
560482 - `FilePath = object { file_id, index, type }` - `FilePath object { file_id, index, type }`
561 483
562 A path to a file.484 A path to a file.
563 485
601 523
602 - `"output_text"`524 - `"output_text"`
603 525
604526 - `ResponseOutputRefusal = object { refusal, type }` - `ResponseOutputRefusal object { refusal, type }`
605 527
606 A refusal from the model.528 A refusal from the model.
607 529
648 570
649 - `"final_answer"`571 - `"final_answer"`
650 572
651573 - `FileSearchCall = object { id, queries, status, 2 more }` - `FileSearchCall object { id, queries, status, 2 more }`
652 574
653 The results of a file search tool call. See the575 The results of a file search tool call. See the
654 [file search guide](/docs/guides/tools-file-search) for more information.576 [file search guide](/docs/guides/tools-file-search) for more information.
716 638
717 The text that was retrieved from the file.639 The text that was retrieved from the file.
718 640
719641 - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`
720 642
721 A tool call to a computer use tool. See the643 A tool call to a computer use tool. See the
722 [computer use guide](/docs/guides/tools-computer-use) for more information.644 [computer use guide](/docs/guides/tools-computer-use) for more information.
766 688
767 A click action.689 A click action.
768 690
769691 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
770 692
771 A click action.693 A click action.
772 694
802 724
803 The keys being held while clicking.725 The keys being held while clicking.
804 726
805727 - `DoubleClick = object { keys, type, x, y }` - `DoubleClick object { keys, type, x, y }`
806 728
807 A double click action.729 A double click action.
808 730
824 746
825 The y-coordinate where the double click occurred.747 The y-coordinate where the double click occurred.
826 748
827749 - `Drag = object { path, type, keys }` - `Drag object { path, type, keys }`
828 750
829 A drag action.751 A drag action.
830 752
857 779
858 The keys being held while dragging the mouse.780 The keys being held while dragging the mouse.
859 781
860782 - `Keypress = object { keys, type }` - `Keypress object { keys, type }`
861 783
862 A collection of keypresses the model would like to perform.784 A collection of keypresses the model would like to perform.
863 785
871 793
872 - `"keypress"`794 - `"keypress"`
873 795
874796 - `Move = object { type, x, y, keys }` - `Move object { type, x, y, keys }`
875 797
876 A mouse move action.798 A mouse move action.
877 799
893 815
894 The keys being held while moving the mouse.816 The keys being held while moving the mouse.
895 817
896818 - `Screenshot = object { type }` - `Screenshot object { type }`
897 819
898 A screenshot action.820 A screenshot action.
899 821
903 825
904 - `"screenshot"`826 - `"screenshot"`
905 827
906828 - `Scroll = object { scroll_x, scroll_y, type, 3 more }` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
907 829
908 A scroll action.830 A scroll action.
909 831
933 855
934 The keys being held while scrolling.856 The keys being held while scrolling.
935 857
936858 - `Type = object { text, type }` - `Type object { text, type }`
937 859
938 An action to type in text.860 An action to type in text.
939 861
947 869
948 - `"type"`870 - `"type"`
949 871
950872 - `Wait = object { type }` - `Wait object { type }`
951 873
952 A wait action.874 A wait action.
953 875
962 Flattened batched actions for `computer_use`. Each action includes an884 Flattened batched actions for `computer_use`. Each action includes an
963 `type` discriminator and action-specific fields.885 `type` discriminator and action-specific fields.
964 886
965887 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
966 888
967 A click action.889 A click action.
968 890
969891 - `button: "left" or "right" or "wheel" or 2 more` - `DoubleClick object { keys, type, x, y }`
970
971 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
972
973 - `"left"`
974
975 - `"right"`
976
977 - `"wheel"`
978
979 - `"back"`
980
981 - `"forward"`
982
983 - `type: "click"`
984
985 Specifies the event type. For a click action, this property is always `click`.
986
987 - `"click"`
988
989 - `x: number`
990
991 The x-coordinate where the click occurred.
992
993 - `y: number`
994
995 The y-coordinate where the click occurred.
996
997 - `keys: optional array of string`
998
999 The keys being held while clicking.
1000
1001 - `DoubleClick = object { keys, type, x, y }`
1002 892
1003 A double click action.893 A double click action.
1004 894
1005895 - `keys: array of string` - `Drag object { path, type, keys }`
1006
1007 The keys being held while double-clicking.
1008
1009 - `type: "double_click"`
1010
1011 Specifies the event type. For a double click action, this property is always set to `double_click`.
1012
1013 - `"double_click"`
1014
1015 - `x: number`
1016
1017 The x-coordinate where the double click occurred.
1018
1019 - `y: number`
1020
1021 The y-coordinate where the double click occurred.
1022
1023 - `Drag = object { path, type, keys }`
1024 896
1025 A drag action.897 A drag action.
1026 898
1027899 - `path: array of object { x, y }` - `Keypress object { keys, type }`
1028
1029 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
1030
1031 ```
1032 [
1033 { x: 100, y: 200 },
1034 { x: 200, y: 300 }
1035 ]
1036 ```
1037
1038 - `x: number`
1039
1040 The x-coordinate.
1041
1042 - `y: number`
1043
1044 The y-coordinate.
1045
1046 - `type: "drag"`
1047
1048 Specifies the event type. For a drag action, this property is always set to `drag`.
1049
1050 - `"drag"`
1051
1052 - `keys: optional array of string`
1053
1054 The keys being held while dragging the mouse.
1055
1056 - `Keypress = object { keys, type }`
1057 900
1058 A collection of keypresses the model would like to perform.901 A collection of keypresses the model would like to perform.
1059 902
1060903 - `keys: array of string` - `Move object { type, x, y, keys }`
1061
1062 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
1063
1064 - `type: "keypress"`
1065
1066 Specifies the event type. For a keypress action, this property is always set to `keypress`.
1067
1068 - `"keypress"`
1069
1070 - `Move = object { type, x, y, keys }`
1071 904
1072 A mouse move action.905 A mouse move action.
1073 906
1074907 - `type: "move"` - `Screenshot object { type }`
1075
1076 Specifies the event type. For a move action, this property is always set to `move`.
1077
1078 - `"move"`
1079
1080 - `x: number`
1081
1082 The x-coordinate to move to.
1083
1084 - `y: number`
1085
1086 The y-coordinate to move to.
1087
1088 - `keys: optional array of string`
1089
1090 The keys being held while moving the mouse.
1091
1092 - `Screenshot = object { type }`
1093 908
1094 A screenshot action.909 A screenshot action.
1095 910
1096911 - `type: "screenshot"` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
1097
1098 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
1099
1100 - `"screenshot"`
1101
1102 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
1103 912
1104 A scroll action.913 A scroll action.
1105 914
1106915 - `scroll_x: number` - `Type object { text, type }`
1107
1108 The horizontal scroll distance.
1109
1110 - `scroll_y: number`
1111
1112 The vertical scroll distance.
1113
1114 - `type: "scroll"`
1115
1116 Specifies the event type. For a scroll action, this property is always set to `scroll`.
1117
1118 - `"scroll"`
1119
1120 - `x: number`
1121
1122 The x-coordinate where the scroll occurred.
1123
1124 - `y: number`
1125
1126 The y-coordinate where the scroll occurred.
1127
1128 - `keys: optional array of string`
1129
1130 The keys being held while scrolling.
1131
1132 - `Type = object { text, type }`
1133 916
1134 An action to type in text.917 An action to type in text.
1135 918
1136919 - `text: string` - `Wait object { type }`
1137
1138 The text to type.
1139
1140 - `type: "type"`
1141
1142 Specifies the event type. For a type action, this property is always set to `type`.
1143
1144 - `"type"`
1145
1146 - `Wait = object { type }`
1147 920
1148 A wait action.921 A wait action.
1149 922
1150923 - `type: "wait"` - `ComputerCallOutput object { call_id, output, type, 3 more }`
1151
1152 Specifies the event type. For a wait action, this property is always set to `wait`.
1153
1154 - `"wait"`
1155
1156 - `ComputerCallOutput = object { call_id, output, type, 3 more }`
1157 924
1158 The output of a computer tool call.925 The output of a computer tool call.
1159 926
1216 983
1217 - `"incomplete"`984 - `"incomplete"`
1218 985
1219986 - `WebSearchCall = object { id, action, status, type }` - `WebSearchCall object { id, action, status, type }`
1220 987
1221 The results of a web search tool call. See the988 The results of a web search tool call. See the
1222 [web search guide](/docs/guides/tools-web-search) for more information.989 [web search guide](/docs/guides/tools-web-search) for more information.
1230 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.
1231 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).
1232 999
12331000 - `Search = object { query, type, queries, sources }` - `Search object { query, type, queries, sources }`
1234 1001
1235 Action type "search" - Performs a web search query.1002 Action type "search" - Performs a web search query.
1236 1003
1262 1029
1263 The URL of the source.1030 The URL of the source.
1264 1031
12651032 - `OpenPage = object { type, url }` - `OpenPage object { type, url }`
1266 1033
1267 Action type "open_page" - Opens a specific URL from search results.1034 Action type "open_page" - Opens a specific URL from search results.
1268 1035
1276 1043
1277 The URL opened by the model.1044 The URL opened by the model.
1278 1045
12791046 - `FindInPage = object { pattern, type, url }` - `FindInPage object { pattern, type, url }`
1280 1047
1281 Action type "find_in_page": Searches for a pattern within a loaded page.1048 Action type "find_in_page": Searches for a pattern within a loaded page.
1282 1049
1312 1079
1313 - `"web_search_call"`1080 - `"web_search_call"`
1314 1081
13151082 - `FunctionCall = object { arguments, call_id, name, 4 more }` - `FunctionCall object { arguments, call_id, name, 4 more }`
1316 1083
1317 A tool call to run a function. See the1084 A tool call to run a function. See the
1318 [function calling guide](/docs/guides/function-calling) for more information.1085 [function calling guide](/docs/guides/function-calling) for more information.
1354 1121
1355 - `"incomplete"`1122 - `"incomplete"`
1356 1123
13571124 - `FunctionCallOutput = object { call_id, output, type, 2 more }` - `FunctionCallOutput object { call_id, output, type, 2 more }`
1358 1125
1359 The output of a function tool call.1126 The output of a function tool call.
1360 1127
1374 1141
1375 An array of content outputs (text, image, file) for the function tool call.1142 An array of content outputs (text, image, file) for the function tool call.
1376 1143
13771144 - `ResponseInputTextContent = object { text, type }` - `ResponseInputTextContent object { text, type }`
1378 1145
1379 A text input to the model.1146 A text input to the model.
1380 1147
1388 1155
1389 - `"input_text"`1156 - `"input_text"`
1390 1157
13911158 - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - `ResponseInputImageContent object { type, detail, file_id, image_url }`
1392 1159
1393 An image input to the model. Learn about [image inputs](/docs/guides/vision)1160 An image input to the model. Learn about [image inputs](/docs/guides/vision)
1394 1161
1418 1185
1419 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.1186 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
1420 1187
14211188 - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - `ResponseInputFileContent object { type, detail, file_data, 3 more }`
1422 1189
1423 A file input to the model.1190 A file input to the model.
1424 1191
1472 1239
1473 - `"incomplete"`1240 - `"incomplete"`
1474 1241
14751242 - `ToolSearchCall = object { arguments, type, id, 3 more }` - `ToolSearchCall object { arguments, type, id, 3 more }`
1476 1243
1477 - `arguments: unknown`1244 - `arguments: unknown`
1478 1245
1510 1277
1511 - `"incomplete"`1278 - `"incomplete"`
1512 1279
15131280 - `ToolSearchOutput = object { tools, type, id, 3 more }` - `ToolSearchOutput object { tools, type, id, 3 more }`
1514 1281
1515 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`1282 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
1516 1283
1517 The loaded tool definitions returned by the tool search output.1284 The loaded tool definitions returned by the tool search output.
1518 1285
15191286 - `Function = object { name, parameters, strict, 3 more }` - `Function object { name, parameters, strict, 3 more }`
1520 1287
1521 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).1288 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).
1522 1289
1546 1313
1547 A description of the function. Used by the model to determine whether or not to call the function.1314 A description of the function. Used by the model to determine whether or not to call the function.
1548 1315
15491316 - `FileSearch = object { type, vector_store_ids, filters, 2 more }` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
1550 1317
1551 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).1318 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).
1552 1319
1564 1331
1565 A filter to apply.1332 A filter to apply.
1566 1333
15671334 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1568 1335
1569 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1336 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1570 1337
1617 1384
1618 - `number`1385 - `number`
1619 1386
16201387 - `CompoundFilter = object { filters, type }` - `CompoundFilter object { filters, type }`
1621 1388
1622 Combine multiple filters using `and` or `or`.1389 Combine multiple filters using `and` or `or`.
1623 1390
1625 1392
1626 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.1393 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
1627 1394
16281395 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1629 1396
1630 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1397 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1631 1398
1632 - `key: string`
1633
1634 The key to compare against the value.
1635
1636 - `type: "eq" or "ne" or "gt" or 5 more`
1637
1638 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
1639
1640 - `eq`: equals
1641 - `ne`: not equal
1642 - `gt`: greater than
1643 - `gte`: greater than or equal
1644 - `lt`: less than
1645 - `lte`: less than or equal
1646 - `in`: in
1647 - `nin`: not in
1648
1649 - `"eq"`
1650
1651 - `"ne"`
1652
1653 - `"gt"`
1654
1655 - `"gte"`
1656
1657 - `"lt"`
1658
1659 - `"lte"`
1660
1661 - `"in"`
1662
1663 - `"nin"`
1664
1665 - `value: string or number or boolean or array of string or number`
1666
1667 The value to compare against the attribute key; supports string, number, or boolean types.
1668
1669 - `string`
1670
1671 - `number`
1672
1673 - `boolean`
1674
1675 - `array of string or number`
1676
1677 - `string`
1678
1679 - `number`
1680
1681 - `unknown`1399 - `unknown`
1682 1400
1683 - `type: "and" or "or"`1401 - `type: "and" or "or"`
1720 1438
1721 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.1439 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.
1722 1440
17231441 - `Computer = object { type }` - `Computer object { type }`
1724 1442
1725 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1443 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1726 1444
1730 1448
1731 - `"computer"`1449 - `"computer"`
1732 1450
17331451 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
1734 1452
1735 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1453 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1736 1454
1762 1480
1763 - `"computer_use_preview"`1481 - `"computer_use_preview"`
1764 1482
17651483 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
1766 1484
1767 Search the Internet for sources related to the prompt. Learn more about the1485 Search the Internet for sources related to the prompt. Learn more about the
1768 [web search tool](/docs/guides/tools-web-search).1486 [web search tool](/docs/guides/tools-web-search).
1822 1540
1823 - `"approximate"`1541 - `"approximate"`
1824 1542
18251543 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
1826 1544
1827 Give the model access to additional tools via remote Model Context Protocol1545 Give the model access to additional tools via remote Model Context Protocol
1828 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).1546 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
1845 1563
1846 A string array of allowed tool names1564 A string array of allowed tool names
1847 1565
18481566 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
1849 1567
1850 A filter object to specify which tools are allowed.1568 A filter object to specify which tools are allowed.
1851 1569
1911 1629
1912 Specify which of the MCP server's tools require approval.1630 Specify which of the MCP server's tools require approval.
1913 1631
19141632 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
1915 1633
1916 Specify which of the MCP server's tools require approval. Can be1634 Specify which of the MCP server's tools require approval. Can be
1917 `always`, `never`, or a filter object associated with tools1635 `always`, `never`, or a filter object associated with tools
1964 The URL for the MCP server. One of `server_url` or `connector_id` must be1682 The URL for the MCP server. One of `server_url` or `connector_id` must be
1965 provided.1683 provided.
1966 1684
19671685 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
1968 1686
1969 A tool that runs Python code to help generate a response to a prompt.1687 A tool that runs Python code to help generate a response to a prompt.
1970 1688
1978 1696
1979 The container ID.1697 The container ID.
1980 1698
19811699 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
1982 1700
1983 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.1701 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
1984 1702
2008 1726
2009 Network access policy for the container.1727 Network access policy for the container.
2010 1728
20111729 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
2012 1730
2013 - `type: "disabled"`1731 - `type: "disabled"`
2014 1732
2016 1734
2017 - `"disabled"`1735 - `"disabled"`
2018 1736
20191737 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
2020 1738
2021 - `allowed_domains: array of string`1739 - `allowed_domains: array of string`
2022 1740
2050 1768
2051 - `"code_interpreter"`1769 - `"code_interpreter"`
2052 1770
20531771 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
2054 1772
2055 A tool that generates images using the GPT image models.1773 A tool that generates images using the GPT image models.
2056 1774
2171 1889
2172 - `"auto"`1890 - `"auto"`
2173 1891
21741892 - `LocalShell = object { type }` - `LocalShell object { type }`
2175 1893
2176 A tool that allows the model to execute shell commands in a local environment.1894 A tool that allows the model to execute shell commands in a local environment.
2177 1895
2181 1899
2182 - `"local_shell"`1900 - `"local_shell"`
2183 1901
21841902 - `Shell = object { type, environment }` - `Shell object { type, environment }`
2185 1903
2186 A tool that allows the model to execute shell commands.1904 A tool that allows the model to execute shell commands.
2187 1905
2193 1911
2194 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`1912 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
2195 1913
21961914 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
2197 1915
2198 - `type: "container_auto"`1916 - `type: "container_auto"`
2199 1917
2221 1939
2222 Network access policy for the container.1940 Network access policy for the container.
2223 1941
22241942 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
2225
2226 - `type: "disabled"`
2227
2228 Disable outbound network access. Always `disabled`.
2229
2230 - `"disabled"`
2231
2232 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
2233
2234 - `allowed_domains: array of string`
2235
2236 A list of allowed domains when type is `allowlist`.
2237
2238 - `type: "allowlist"`
2239 1943
22401944 Allow outbound network access only to specified domains. Always `allowlist`. - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
2241
2242 - `"allowlist"`
2243
2244 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
2245
2246 Optional domain-scoped secrets for allowlisted domains.
2247
2248 - `domain: string`
2249
2250 The domain associated with the secret.
2251
2252 - `name: string`
2253
2254 The name of the secret to inject for the domain.
2255
2256 - `value: string`
2257
2258 The secret value to inject for the domain.
2259 1945
2260 - `skills: optional array of SkillReference or InlineSkill`1946 - `skills: optional array of SkillReference or InlineSkill`
2261 1947
2262 An optional list of skills referenced by id or inline data.1948 An optional list of skills referenced by id or inline data.
2263 1949
22641950 - `SkillReference = object { skill_id, type, version }` - `SkillReference object { skill_id, type, version }`
2265 1951
2266 - `skill_id: string`1952 - `skill_id: string`
2267 1953
2277 1963
2278 Optional skill version. Use a positive integer or 'latest'. Omit for default.1964 Optional skill version. Use a positive integer or 'latest'. Omit for default.
2279 1965
22801966 - `InlineSkill = object { description, name, source, type }` - `InlineSkill object { description, name, source, type }`
2281 1967
2282 - `description: string`1968 - `description: string`
2283 1969
2313 1999
2314 - `"inline"`2000 - `"inline"`
2315 2001
23162002 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
2317 2003
2318 - `type: "local"`2004 - `type: "local"`
2319 2005
2337 2023
2338 The path to the directory containing the skill.2024 The path to the directory containing the skill.
2339 2025
23402026 - `ContainerReference = object { container_id, type }` - `ContainerReference object { container_id, type }`
2341 2027
2342 - `container_id: string`2028 - `container_id: string`
2343 2029
2349 2035
2350 - `"container_reference"`2036 - `"container_reference"`
2351 2037
23522038 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2353 2039
2354 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)2040 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2355 2041
2375 2061
2376 The input format for the custom tool. Default is unconstrained text.2062 The input format for the custom tool. Default is unconstrained text.
2377 2063
23782064 - `Text = object { type }` - `Text object { type }`
2379 2065
2380 Unconstrained free-form text.2066 Unconstrained free-form text.
2381 2067
2385 2071
2386 - `"text"`2072 - `"text"`
2387 2073
23882074 - `Grammar = object { definition, syntax, type }` - `Grammar object { definition, syntax, type }`
2389 2075
2390 A grammar defined by the user.2076 A grammar defined by the user.
2391 2077
2407 2093
2408 - `"grammar"`2094 - `"grammar"`
2409 2095
24102096 - `Namespace = object { description, name, tools, type }` - `Namespace object { description, name, tools, type }`
2411 2097
2412 Groups function/custom tools under a shared namespace.2098 Groups function/custom tools under a shared namespace.
2413 2099
2423 2109
2424 The function/custom tools available inside this namespace.2110 The function/custom tools available inside this namespace.
2425 2111
24262112 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
2427 2113
2428 - `name: string`2114 - `name: string`
2429 2115
2441 2127
2442 - `strict: optional boolean`2128 - `strict: optional boolean`
2443 2129
24442130 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2445 2131
2446 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)2132 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2447 2133
2467 2153
2468 The input format for the custom tool. Default is unconstrained text.2154 The input format for the custom tool. Default is unconstrained text.
2469 2155
2470 - `Text = object { type }`
2471
2472 Unconstrained free-form text.
2473
2474 - `type: "text"`
2475
2476 Unconstrained text format. Always `text`.
2477
2478 - `"text"`
2479
2480 - `Grammar = object { definition, syntax, type }`
2481
2482 A grammar defined by the user.
2483
2484 - `definition: string`
2485
2486 The grammar definition.
2487
2488 - `syntax: "lark" or "regex"`
2489
2490 The syntax of the grammar definition. One of `lark` or `regex`.
2491
2492 - `"lark"`
2493
2494 - `"regex"`
2495
2496 - `type: "grammar"`
2497
2498 Grammar format. Always `grammar`.
2499
2500 - `"grammar"`
2501
2502 - `type: "namespace"`2156 - `type: "namespace"`
2503 2157
2504 The type of the tool. Always `namespace`.2158 The type of the tool. Always `namespace`.
2505 2159
2506 - `"namespace"`2160 - `"namespace"`
2507 2161
25082162 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
2509 2163
2510 Hosted or BYOT tool search configuration for deferred tools.2164 Hosted or BYOT tool search configuration for deferred tools.
2511 2165
2531 2185
2532 Parameter schema for a client-executed tool search tool.2186 Parameter schema for a client-executed tool search tool.
2533 2187
25342188 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
2535 2189
2536 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).2190 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).
2537 2191
2585 2239
2586 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.2240 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2587 2241
25882242 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
2589 2243
2590 Allows the assistant to create, delete, or update files using unified diffs.2244 Allows the assistant to create, delete, or update files using unified diffs.
2591 2245
2627 2281
2628 - `"incomplete"`2282 - `"incomplete"`
2629 2283
26302284 - `Reasoning = object { id, summary, type, 3 more }` - `Reasoning object { id, summary, type, 3 more }`
2631 2285
2632 A description of the chain of thought used by a reasoning model while generating2286 A description of the chain of thought used by a reasoning model while generating
2633 a response. Be sure to include these items in your `input` to the Responses API2287 a response. Be sure to include these items in your `input` to the Responses API
2688 2342
2689 - `"incomplete"`2343 - `"incomplete"`
2690 2344
26912345 - `Compaction = object { encrypted_content, type, id }` - `Compaction object { encrypted_content, type, id }`
2692 2346
2693 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).2347 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
2694 2348
2706 2360
2707 The ID of the compaction item.2361 The ID of the compaction item.
2708 2362
27092363 - `ImageGenerationCall = object { id, result, status, type }` - `ImageGenerationCall object { id, result, status, type }`
2710 2364
2711 An image generation request made by the model.2365 An image generation request made by the model.
2712 2366
2736 2390
2737 - `"image_generation_call"`2391 - `"image_generation_call"`
2738 2392
27392393 - `CodeInterpreterCall = object { id, code, container_id, 3 more }` - `CodeInterpreterCall object { id, code, container_id, 3 more }`
2740 2394
2741 A tool call to run code.2395 A tool call to run code.
2742 2396
2757 The outputs generated by the code interpreter, such as logs or images.2411 The outputs generated by the code interpreter, such as logs or images.
2758 Can be null if no outputs are available.2412 Can be null if no outputs are available.
2759 2413
27602414 - `Logs = object { logs, type }` - `Logs object { logs, type }`
2761 2415
2762 The logs output from the code interpreter.2416 The logs output from the code interpreter.
2763 2417
2771 2425
2772 - `"logs"`2426 - `"logs"`
2773 2427
27742428 - `Image = object { type, url }` - `Image object { type, url }`
2775 2429
2776 The image output from the code interpreter.2430 The image output from the code interpreter.
2777 2431
2805 2459
2806 - `"code_interpreter_call"`2460 - `"code_interpreter_call"`
2807 2461
28082462 - `LocalShellCall = object { id, action, call_id, 2 more }` - `LocalShellCall object { id, action, call_id, 2 more }`
2809 2463
2810 A tool call to run a command on the local shell.2464 A tool call to run a command on the local shell.
2811 2465
2863 2517
2864 - `"local_shell_call"`2518 - `"local_shell_call"`
2865 2519
28662520 - `LocalShellCallOutput = object { id, output, type, status }` - `LocalShellCallOutput object { id, output, type, status }`
2867 2521
2868 The output of a local shell tool call.2522 The output of a local shell tool call.
2869 2523
2891 2545
2892 - `"incomplete"`2546 - `"incomplete"`
2893 2547
28942548 - `ShellCall = object { action, call_id, type, 3 more }` - `ShellCall object { action, call_id, type, 3 more }`
2895 2549
2896 A tool representing a request to execute one or more shell commands.2550 A tool representing a request to execute one or more shell commands.
2897 2551
2919 2573
2920 The type of the item. Always `shell_call`.2574 The type of the item. Always `shell_call`.
2921 2575
29222576 - `"shell_call"` - `"shell_call"`
2923
2924 - `id: optional string`
2925
2926 The unique ID of the shell tool call. Populated when this item is returned via API.
2927
2928 - `environment: optional LocalEnvironment or ContainerReference`
2929
2930 The environment to execute the shell commands in.
2931
2932 - `LocalEnvironment = object { type, skills }`
2933
2934 - `type: "local"`
2935
2936 Use a local computer environment.
2937
2938 - `"local"`
2939
2940 - `skills: optional array of LocalSkill`
2941
2942 An optional list of skills.
2943
2944 - `description: string`
2945
2946 The description of the skill.
2947
2948 - `name: string`
2949
2950 The name of the skill.
2951
2952 - `path: string`
2953
2954 The path to the directory containing the skill.
2955 2577
29562578 - `ContainerReference = object { container_id, type }` - `id: optional string`
2957 2579
29582580 - `container_id: string` The unique ID of the shell tool call. Populated when this item is returned via API.
2959 2581
29602582 The ID of the referenced container. - `environment: optional LocalEnvironment or ContainerReference`
2961 2583
29622584 - `type: "container_reference"` The environment to execute the shell commands in.
2963 2585
29642586 References a container created with the /v1/containers endpoint - `LocalEnvironment object { type, skills }`
2965 2587
29662588 - `"container_reference"` - `ContainerReference object { container_id, type }`
2967 2589
2968 - `status: optional "in_progress" or "completed" or "incomplete"`2590 - `status: optional "in_progress" or "completed" or "incomplete"`
2969 2591
2975 2597
2976 - `"incomplete"`2598 - `"incomplete"`
2977 2599
29782600 - `ShellCallOutput = object { call_id, output, type, 3 more }` - `ShellCallOutput object { call_id, output, type, 3 more }`
2979 2601
2980 The streamed output items emitted by a shell tool call.2602 The streamed output items emitted by a shell tool call.
2981 2603
2991 2613
2992 The exit or timeout outcome associated with this shell call.2614 The exit or timeout outcome associated with this shell call.
2993 2615
29942616 - `Timeout = object { type }` - `Timeout object { type }`
2995 2617
2996 Indicates that the shell call exceeded its configured time limit.2618 Indicates that the shell call exceeded its configured time limit.
2997 2619
3001 2623
3002 - `"timeout"`2624 - `"timeout"`
3003 2625
30042626 - `Exit = object { exit_code, type }` - `Exit object { exit_code, type }`
3005 2627
3006 Indicates that the shell commands finished and returned an exit code.2628 Indicates that the shell commands finished and returned an exit code.
3007 2629
3047 2669
3048 - `"incomplete"`2670 - `"incomplete"`
3049 2671
30502672 - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - `ApplyPatchCall object { call_id, operation, status, 2 more }`
3051 2673
3052 A tool call representing a request to create, delete, or update files using diff patches.2674 A tool call representing a request to create, delete, or update files using diff patches.
3053 2675
3059 2681
3060 The specific create, delete, or update instruction for the apply_patch tool call.2682 The specific create, delete, or update instruction for the apply_patch tool call.
3061 2683
30622684 - `CreateFile = object { diff, path, type }` - `CreateFile object { diff, path, type }`
3063 2685
3064 Instruction for creating a new file via the apply_patch tool.2686 Instruction for creating a new file via the apply_patch tool.
3065 2687
3077 2699
3078 - `"create_file"`2700 - `"create_file"`
3079 2701
30802702 - `DeleteFile = object { path, type }` - `DeleteFile object { path, type }`
3081 2703
3082 Instruction for deleting an existing file via the apply_patch tool.2704 Instruction for deleting an existing file via the apply_patch tool.
3083 2705
3091 2713
3092 - `"delete_file"`2714 - `"delete_file"`
3093 2715
30942716 - `UpdateFile = object { diff, path, type }` - `UpdateFile object { diff, path, type }`
3095 2717
3096 Instruction for updating an existing file via the apply_patch tool.2718 Instruction for updating an existing file via the apply_patch tool.
3097 2719
3127 2749
3128 The unique ID of the apply patch tool call. Populated when this item is returned via API.2750 The unique ID of the apply patch tool call. Populated when this item is returned via API.
3129 2751
31302752 - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`
3131 2753
3132 The streamed output emitted by an apply patch tool call.2754 The streamed output emitted by an apply patch tool call.
3133 2755
3157 2779
3158 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).2780 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).
3159 2781
31602782 - `McpListTools = object { id, server_label, tools, 2 more }` - `McpListTools object { id, server_label, tools, 2 more }`
3161 2783
3162 A list of tools available on an MCP server.2784 A list of tools available on an MCP server.
3163 2785
3199 2821
3200 Error message if the server could not list tools.2822 Error message if the server could not list tools.
3201 2823
32022824 - `McpApprovalRequest = object { id, arguments, name, 2 more }` - `McpApprovalRequest object { id, arguments, name, 2 more }`
3203 2825
3204 A request for human approval of a tool invocation.2826 A request for human approval of a tool invocation.
3205 2827
3225 2847
3226 - `"mcp_approval_request"`2848 - `"mcp_approval_request"`
3227 2849
32282850 - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`
3229 2851
3230 A response to an MCP approval request.2852 A response to an MCP approval request.
3231 2853
3251 2873
3252 Optional reason for the decision.2874 Optional reason for the decision.
3253 2875
32542876 - `McpCall = object { id, arguments, name, 6 more }` - `McpCall object { id, arguments, name, 6 more }`
3255 2877
3256 An invocation of a tool on an MCP server.2878 An invocation of a tool on an MCP server.
3257 2879
3304 2926
3305 - `"failed"`2927 - `"failed"`
3306 2928
33072929 - `CustomToolCallOutput = object { call_id, output, type, id }` - `CustomToolCallOutput object { call_id, output, type, id }`
3308 2930
3309 The output of a custom tool call from your code, being sent back to the model.2931 The output of a custom tool call from your code, being sent back to the model.
3310 2932
3325 2947
3326 Text, image, or file output of the custom tool call.2948 Text, image, or file output of the custom tool call.
3327 2949
33282950 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
3329 2951
3330 A text input to the model.2952 A text input to the model.
3331 2953
33322954 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
3333
3334 The text input to the model.
3335
3336 - `type: "input_text"`
3337
3338 The type of the input item. Always `input_text`.
3339
3340 - `"input_text"`
3341
3342 - `ResponseInputImage = object { detail, type, file_id, image_url }`
3343 2955
3344 An image input to the model. Learn about [image inputs](/docs/guides/vision).2956 An image input to the model. Learn about [image inputs](/docs/guides/vision).
3345 2957
33462958 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
3347
3348 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
3349
3350 - `"low"`
3351
3352 - `"high"`
3353
3354 - `"auto"`
3355
3356 - `"original"`
3357
3358 - `type: "input_image"`
3359
3360 The type of the input item. Always `input_image`.
3361
3362 - `"input_image"`
3363
3364 - `file_id: optional string`
3365
3366 The ID of the file to be sent to the model.
3367
3368 - `image_url: optional string`
3369
3370 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
3371
3372 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
3373 2959
3374 A file input to the model.2960 A file input to the model.
3375 2961
3376 - `type: "input_file"`
3377
3378 The type of the input item. Always `input_file`.
3379
3380 - `"input_file"`
3381
3382 - `detail: optional "low" or "high"`
3383
3384 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`.
3385
3386 - `"low"`
3387
3388 - `"high"`
3389
3390 - `file_data: optional string`
3391
3392 The content of the file to be sent to the model.
3393
3394 - `file_id: optional string`
3395
3396 The ID of the file to be sent to the model.
3397
3398 - `file_url: optional string`
3399
3400 The URL of the file to be sent to the model.
3401
3402 - `filename: optional string`
3403
3404 The name of the file to be sent to the model.
3405
3406 - `type: "custom_tool_call_output"`2962 - `type: "custom_tool_call_output"`
3407 2963
3408 The type of the custom tool call output. Always `custom_tool_call_output`.2964 The type of the custom tool call output. Always `custom_tool_call_output`.
3413 2969
3414 The unique ID of the custom tool call output in the OpenAI platform.2970 The unique ID of the custom tool call output in the OpenAI platform.
3415 2971
34162972 - `CustomToolCall = object { call_id, input, name, 3 more }` - `CustomToolCall object { call_id, input, name, 3 more }`
3417 2973
3418 A call to a custom tool created by the model.2974 A call to a custom tool created by the model.
3419 2975
3443 2999
3444 The namespace of the custom tool being called.3000 The namespace of the custom tool being called.
3445 3001
34463002 - `ItemReference = object { id, type }` - `ItemReference object { id, type }`
3447 3003
3448 An internal identifier for an item to reference.3004 An internal identifier for an item to reference.
3449 3005
3470 3026
3471 A key to use when reading from or writing to the prompt cache.3027 A key to use when reading from or writing to the prompt cache.
3472 3028
3029- `prompt_cache_retention: optional "in_memory" or "24h"`
3030
3031 How long to retain a prompt cache entry created by this request.
3032
3033 - `"in_memory"`
3034
3035 - `"24h"`
3036
3473### Returns3037### Returns
3474 3038
34753039- `CompactedResponse = object { id, created_at, object, 2 more }`- `CompactedResponse object { id, created_at, object, 2 more }`
3476 3040
3477 - `id: string`3041 - `id: string`
3478 3042
3492 3056
3493 The compacted list of output items.3057 The compacted list of output items.
3494 3058
34953059 - `Message = object { id, content, role, 3 more }` - `Message object { id, content, role, 3 more }`
3496 3060
3497 A message to or from the model.3061 A message to or from the model.
3498 3062
3504 3068
3505 The content of the message3069 The content of the message
3506 3070
35073071 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
3508 3072
3509 A text input to the model.3073 A text input to the model.
3510 3074
3518 3082
3519 - `"input_text"`3083 - `"input_text"`
3520 3084
35213085 - `ResponseOutputText = object { annotations, logprobs, text, type }` - `ResponseOutputText object { annotations, logprobs, text, type }`
3522 3086
3523 A text output from the model.3087 A text output from the model.
3524 3088
3526 3090
3527 The annotations of the text output.3091 The annotations of the text output.
3528 3092
35293093 - `FileCitation = object { file_id, filename, index, type }` - `FileCitation object { file_id, filename, index, type }`
3530 3094
3531 A citation to a file.3095 A citation to a file.
3532 3096
3548 3112
3549 - `"file_citation"`3113 - `"file_citation"`
3550 3114
35513115 - `URLCitation = object { end_index, start_index, title, 2 more }` - `URLCitation object { end_index, start_index, title, 2 more }`
3552 3116
3553 A citation for a web resource used to generate a model response.3117 A citation for a web resource used to generate a model response.
3554 3118
3574 3138
3575 The URL of the web resource.3139 The URL of the web resource.
3576 3140
35773141 - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`
3578 3142
3579 A citation for a container file used to generate a model response.3143 A citation for a container file used to generate a model response.
3580 3144
3604 3168
3605 - `"container_file_citation"`3169 - `"container_file_citation"`
3606 3170
36073171 - `FilePath = object { file_id, index, type }` - `FilePath object { file_id, index, type }`
3608 3172
3609 A path to a file.3173 A path to a file.
3610 3174
3648 3212
3649 - `"output_text"`3213 - `"output_text"`
3650 3214
36513215 - `TextContent = object { text, type }` - `TextContent object { text, type }`
3652 3216
3653 A text content.3217 A text content.
3654 3218
3658 3222
3659 - `"text"`3223 - `"text"`
3660 3224
36613225 - `SummaryTextContent = object { text, type }` - `SummaryTextContent object { text, type }`
3662 3226
3663 A summary text from the model.3227 A summary text from the model.
3664 3228
3672 3236
3673 - `"summary_text"`3237 - `"summary_text"`
3674 3238
36753239 - `ReasoningText = object { text, type }` - `ReasoningText object { text, type }`
3676 3240
3677 Reasoning text from the model.3241 Reasoning text from the model.
3678 3242
3686 3250
3687 - `"reasoning_text"`3251 - `"reasoning_text"`
3688 3252
36893253 - `ResponseOutputRefusal = object { refusal, type }` - `ResponseOutputRefusal object { refusal, type }`
3690 3254
3691 A refusal from the model.3255 A refusal from the model.
3692 3256
3700 3264
3701 - `"refusal"`3265 - `"refusal"`
3702 3266
37033267 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
3704 3268
3705 An image input to the model. Learn about [image inputs](/docs/guides/vision).3269 An image input to the model. Learn about [image inputs](/docs/guides/vision).
3706 3270
3730 3294
3731 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.3295 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
3732 3296
37333297 - `ComputerScreenshotContent = object { detail, file_id, image_url, type }` - `ComputerScreenshotContent object { detail, file_id, image_url, type }`
3734 3298
3735 A screenshot of a computer.3299 A screenshot of a computer.
3736 3300
3760 3324
3761 - `"computer_screenshot"`3325 - `"computer_screenshot"`
3762 3326
37633327 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
3764 3328
3765 A file input to the model.3329 A file input to the model.
3766 3330
3838 3402
3839 - `"final_answer"`3403 - `"final_answer"`
3840 3404
38413405 - `FunctionCall = object { arguments, call_id, name, 4 more }` - `FunctionCall object { arguments, call_id, name, 4 more }`
3842 3406
3843 A tool call to run a function. See the3407 A tool call to run a function. See the
3844 [function calling guide](/docs/guides/function-calling) for more information.3408 [function calling guide](/docs/guides/function-calling) for more information.
3880 3444
3881 - `"incomplete"`3445 - `"incomplete"`
3882 3446
38833447 - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - `ToolSearchCall object { id, arguments, call_id, 4 more }`
3884 3448
3885 - `id: string`3449 - `id: string`
3886 3450
3922 3486
3923 The identifier of the actor that created the item.3487 The identifier of the actor that created the item.
3924 3488
39253489 - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - `ToolSearchOutput object { id, call_id, execution, 4 more }`
3926 3490
3927 - `id: string`3491 - `id: string`
3928 3492
3954 3518
3955 The loaded tool definitions returned by tool search.3519 The loaded tool definitions returned by tool search.
3956 3520
39573521 - `Function = object { name, parameters, strict, 3 more }` - `Function object { name, parameters, strict, 3 more }`
3958 3522
3959 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).3523 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).
3960 3524
3984 3548
3985 A description of the function. Used by the model to determine whether or not to call the function.3549 A description of the function. Used by the model to determine whether or not to call the function.
3986 3550
39873551 - `FileSearch = object { type, vector_store_ids, filters, 2 more }` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
3988 3552
3989 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).3553 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).
3990 3554
4002 3566
4003 A filter to apply.3567 A filter to apply.
4004 3568
40053569 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
4006 3570
4007 A filter used to compare a specified attribute key to a given value using a defined comparison operation.3571 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
4008 3572
4055 3619
4056 - `number`3620 - `number`
4057 3621
40583622 - `CompoundFilter = object { filters, type }` - `CompoundFilter object { filters, type }`
4059 3623
4060 Combine multiple filters using `and` or `or`.3624 Combine multiple filters using `and` or `or`.
4061 3625
4063 3627
4064 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.3628 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
4065 3629
40663630 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
4067 3631
4068 A filter used to compare a specified attribute key to a given value using a defined comparison operation.3632 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
4069 3633
4070 - `key: string`
4071
4072 The key to compare against the value.
4073
4074 - `type: "eq" or "ne" or "gt" or 5 more`
4075
4076 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
4077
4078 - `eq`: equals
4079 - `ne`: not equal
4080 - `gt`: greater than
4081 - `gte`: greater than or equal
4082 - `lt`: less than
4083 - `lte`: less than or equal
4084 - `in`: in
4085 - `nin`: not in
4086
4087 - `"eq"`
4088
4089 - `"ne"`
4090
4091 - `"gt"`
4092
4093 - `"gte"`
4094
4095 - `"lt"`
4096
4097 - `"lte"`
4098
4099 - `"in"`
4100
4101 - `"nin"`
4102
4103 - `value: string or number or boolean or array of string or number`
4104
4105 The value to compare against the attribute key; supports string, number, or boolean types.
4106
4107 - `string`
4108
4109 - `number`
4110
4111 - `boolean`
4112
4113 - `array of string or number`
4114
4115 - `string`
4116
4117 - `number`
4118
4119 - `unknown`3634 - `unknown`
4120 3635
4121 - `type: "and" or "or"`3636 - `type: "and" or "or"`
4158 3673
4159 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.3674 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.
4160 3675
41613676 - `Computer = object { type }` - `Computer object { type }`
4162 3677
4163 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).3678 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
4164 3679
4168 3683
4169 - `"computer"`3684 - `"computer"`
4170 3685
41713686 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
4172 3687
4173 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).3688 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
4174 3689
4200 3715
4201 - `"computer_use_preview"`3716 - `"computer_use_preview"`
4202 3717
42033718 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
4204 3719
4205 Search the Internet for sources related to the prompt. Learn more about the3720 Search the Internet for sources related to the prompt. Learn more about the
4206 [web search tool](/docs/guides/tools-web-search).3721 [web search tool](/docs/guides/tools-web-search).
4260 3775
4261 - `"approximate"`3776 - `"approximate"`
4262 3777
42633778 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
4264 3779
4265 Give the model access to additional tools via remote Model Context Protocol3780 Give the model access to additional tools via remote Model Context Protocol
4266 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).3781 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
4283 3798
4284 A string array of allowed tool names3799 A string array of allowed tool names
4285 3800
42863801 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
4287 3802
4288 A filter object to specify which tools are allowed.3803 A filter object to specify which tools are allowed.
4289 3804
4349 3864
4350 Specify which of the MCP server's tools require approval.3865 Specify which of the MCP server's tools require approval.
4351 3866
43523867 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
4353 3868
4354 Specify which of the MCP server's tools require approval. Can be3869 Specify which of the MCP server's tools require approval. Can be
4355 `always`, `never`, or a filter object associated with tools3870 `always`, `never`, or a filter object associated with tools
4402 The URL for the MCP server. One of `server_url` or `connector_id` must be3917 The URL for the MCP server. One of `server_url` or `connector_id` must be
4403 provided.3918 provided.
4404 3919
44053920 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
4406 3921
4407 A tool that runs Python code to help generate a response to a prompt.3922 A tool that runs Python code to help generate a response to a prompt.
4408 3923
4416 3931
4417 The container ID.3932 The container ID.
4418 3933
44193934 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
4420 3935
4421 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.3936 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
4422 3937
4446 3961
4447 Network access policy for the container.3962 Network access policy for the container.
4448 3963
44493964 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
4450 3965
4451 - `type: "disabled"`3966 - `type: "disabled"`
4452 3967
4454 3969
4455 - `"disabled"`3970 - `"disabled"`
4456 3971
44573972 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
4458 3973
4459 - `allowed_domains: array of string`3974 - `allowed_domains: array of string`
4460 3975
4488 4003
4489 - `"code_interpreter"`4004 - `"code_interpreter"`
4490 4005
44914006 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
4492 4007
4493 A tool that generates images using the GPT image models.4008 A tool that generates images using the GPT image models.
4494 4009
4609 4124
4610 - `"auto"`4125 - `"auto"`
4611 4126
46124127 - `LocalShell = object { type }` - `LocalShell object { type }`
4613 4128
4614 A tool that allows the model to execute shell commands in a local environment.4129 A tool that allows the model to execute shell commands in a local environment.
4615 4130
4619 4134
4620 - `"local_shell"`4135 - `"local_shell"`
4621 4136
46224137 - `Shell = object { type, environment }` - `Shell object { type, environment }`
4623 4138
4624 A tool that allows the model to execute shell commands.4139 A tool that allows the model to execute shell commands.
4625 4140
4631 4146
4632 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`4147 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
4633 4148
46344149 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
4635 4150
4636 - `type: "container_auto"`4151 - `type: "container_auto"`
4637 4152
4659 4174
4660 Network access policy for the container.4175 Network access policy for the container.
4661 4176
46624177 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
4663
4664 - `type: "disabled"`
4665
4666 Disable outbound network access. Always `disabled`.
4667
4668 - `"disabled"`
4669
4670 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
4671
4672 - `allowed_domains: array of string`
4673
4674 A list of allowed domains when type is `allowlist`.
4675
4676 - `type: "allowlist"`
4677
4678 Allow outbound network access only to specified domains. Always `allowlist`.
4679
4680 - `"allowlist"`
4681
4682 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
4683
4684 Optional domain-scoped secrets for allowlisted domains.
4685
4686 - `domain: string`
4687
4688 The domain associated with the secret.
4689
4690 - `name: string`
4691
4692 The name of the secret to inject for the domain.
4693
4694 - `value: string`
4695 4178
46964179 The secret value to inject for the domain. - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
4697 4180
4698 - `skills: optional array of SkillReference or InlineSkill`4181 - `skills: optional array of SkillReference or InlineSkill`
4699 4182
4700 An optional list of skills referenced by id or inline data.4183 An optional list of skills referenced by id or inline data.
4701 4184
47024185 - `SkillReference = object { skill_id, type, version }` - `SkillReference object { skill_id, type, version }`
4703 4186
4704 - `skill_id: string`4187 - `skill_id: string`
4705 4188
4715 4198
4716 Optional skill version. Use a positive integer or 'latest'. Omit for default.4199 Optional skill version. Use a positive integer or 'latest'. Omit for default.
4717 4200
47184201 - `InlineSkill = object { description, name, source, type }` - `InlineSkill object { description, name, source, type }`
4719 4202
4720 - `description: string`4203 - `description: string`
4721 4204
4751 4234
4752 - `"inline"`4235 - `"inline"`
4753 4236
47544237 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
4755 4238
4756 - `type: "local"`4239 - `type: "local"`
4757 4240
4775 4258
4776 The path to the directory containing the skill.4259 The path to the directory containing the skill.
4777 4260
47784261 - `ContainerReference = object { container_id, type }` - `ContainerReference object { container_id, type }`
4779 4262
4780 - `container_id: string`4263 - `container_id: string`
4781 4264
4787 4270
4788 - `"container_reference"`4271 - `"container_reference"`
4789 4272
47904273 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
4791 4274
4792 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)4275 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
4793 4276
4813 4296
4814 The input format for the custom tool. Default is unconstrained text.4297 The input format for the custom tool. Default is unconstrained text.
4815 4298
48164299 - `Text = object { type }` - `Text object { type }`
4817 4300
4818 Unconstrained free-form text.4301 Unconstrained free-form text.
4819 4302
4823 4306
4824 - `"text"`4307 - `"text"`
4825 4308
48264309 - `Grammar = object { definition, syntax, type }` - `Grammar object { definition, syntax, type }`
4827 4310
4828 A grammar defined by the user.4311 A grammar defined by the user.
4829 4312
4845 4328
4846 - `"grammar"`4329 - `"grammar"`
4847 4330
48484331 - `Namespace = object { description, name, tools, type }` - `Namespace object { description, name, tools, type }`
4849 4332
4850 Groups function/custom tools under a shared namespace.4333 Groups function/custom tools under a shared namespace.
4851 4334
4861 4344
4862 The function/custom tools available inside this namespace.4345 The function/custom tools available inside this namespace.
4863 4346
48644347 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
4865 4348
4866 - `name: string`4349 - `name: string`
4867 4350
4879 4362
4880 - `strict: optional boolean`4363 - `strict: optional boolean`
4881 4364
48824365 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
4883 4366
4884 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)4367 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
4885 4368
4905 4388
4906 The input format for the custom tool. Default is unconstrained text.4389 The input format for the custom tool. Default is unconstrained text.
4907 4390
4908 - `Text = object { type }`
4909
4910 Unconstrained free-form text.
4911
4912 - `type: "text"`
4913
4914 Unconstrained text format. Always `text`.
4915
4916 - `"text"`
4917
4918 - `Grammar = object { definition, syntax, type }`
4919
4920 A grammar defined by the user.
4921
4922 - `definition: string`
4923
4924 The grammar definition.
4925
4926 - `syntax: "lark" or "regex"`
4927
4928 The syntax of the grammar definition. One of `lark` or `regex`.
4929
4930 - `"lark"`
4931
4932 - `"regex"`
4933
4934 - `type: "grammar"`
4935
4936 Grammar format. Always `grammar`.
4937
4938 - `"grammar"`
4939
4940 - `type: "namespace"`4391 - `type: "namespace"`
4941 4392
4942 The type of the tool. Always `namespace`.4393 The type of the tool. Always `namespace`.
4943 4394
4944 - `"namespace"`4395 - `"namespace"`
4945 4396
49464397 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
4947 4398
4948 Hosted or BYOT tool search configuration for deferred tools.4399 Hosted or BYOT tool search configuration for deferred tools.
4949 4400
4969 4420
4970 Parameter schema for a client-executed tool search tool.4421 Parameter schema for a client-executed tool search tool.
4971 4422
49724423 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
4973 4424
4974 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).4425 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).
4975 4426
5023 4474
5024 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.4475 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
5025 4476
50264477 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
5027 4478
5028 Allows the assistant to create, delete, or update files using unified diffs.4479 Allows the assistant to create, delete, or update files using unified diffs.
5029 4480
5037 4488
5038 The type of the item. Always `tool_search_output`.4489 The type of the item. Always `tool_search_output`.
5039 4490
50404491 - `"tool_search_output"` - `"tool_search_output"`
5041
5042 - `created_by: optional string`
5043
5044 The identifier of the actor that created the item.
5045
5046 - `FunctionCallOutput = object { call_id, output, type, 2 more }`
5047
5048 The output of a function tool call.
5049
5050 - `call_id: string`
5051
5052 The unique ID of the function tool call generated by the model.
5053
5054 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`
5055
5056 The output from the function call generated by your code.
5057 Can be a string or an list of output content.
5058
5059 - `StringOutput = string`
5060
5061 A string of the output of the function call.
5062
5063 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`
5064
5065 Text, image, or file output of the function call.
5066
5067 - `ResponseInputText = object { text, type }`
5068
5069 A text input to the model.
5070
5071 - `text: string`
5072
5073 The text input to the model.
5074
5075 - `type: "input_text"`
5076
5077 The type of the input item. Always `input_text`.
5078
5079 - `"input_text"`
5080
5081 - `ResponseInputImage = object { detail, type, file_id, image_url }`
5082
5083 An image input to the model. Learn about [image inputs](/docs/guides/vision).
5084
5085 - `detail: "low" or "high" or "auto" or "original"`
5086
5087 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
5088
5089 - `"low"`
5090
5091 - `"high"`
5092
5093 - `"auto"`
5094
5095 - `"original"`
5096
5097 - `type: "input_image"`
5098
5099 The type of the input item. Always `input_image`.
5100
5101 - `"input_image"`
5102
5103 - `file_id: optional string`
5104
5105 The ID of the file to be sent to the model.
5106
5107 - `image_url: optional string`
5108 4492
51094493 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - `created_by: optional string`
5110 4494
51114495 - `ResponseInputFile = object { type, detail, file_data, 3 more }` The identifier of the actor that created the item.
5112 4496
51134497 A file input to the model. - `FunctionCallOutput object { call_id, output, type, 2 more }`
5114 4498
51154499 - `type: "input_file"` The output of a function tool call.
5116 4500
51174501 The type of the input item. Always `input_file`. - `call_id: string`
5118 4502
51194503 - `"input_file"` The unique ID of the function tool call generated by the model.
5120 4504
51214505 - `detail: optional "low" or "high"` - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`
5122 4506
51234507 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`. The output from the function call generated by your code.
4508 Can be a string or an list of output content.
5124 4509
51254510 - `"low"` - `StringOutput = string`
5126 4511
51274512 - `"high"` A string of the output of the function call.
5128 4513
51294514 - `file_data: optional string` - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`
5130 4515
51314516 The content of the file to be sent to the model. Text, image, or file output of the function call.
5132 4517
51334518 - `file_id: optional string` - `ResponseInputText object { text, type }`
5134 4519
51354520 The ID of the file to be sent to the model. A text input to the model.
5136 4521
51374522 - `file_url: optional string` - `ResponseInputImage object { detail, type, file_id, image_url }`
5138 4523
51394524 The URL of the file to be sent to the model. An image input to the model. Learn about [image inputs](/docs/guides/vision).
5140 4525
51414526 - `filename: optional string` - `ResponseInputFile object { type, detail, file_data, 3 more }`
5142 4527
51434528 The name of the file to be sent to the model. A file input to the model.
5144 4529
5145 - `type: "function_call_output"`4530 - `type: "function_call_output"`
5146 4531
5164 4549
5165 - `"incomplete"`4550 - `"incomplete"`
5166 4551
51674552 - `FileSearchCall = object { id, queries, status, 2 more }` - `FileSearchCall object { id, queries, status, 2 more }`
5168 4553
5169 The results of a file search tool call. See the4554 The results of a file search tool call. See the
5170 [file search guide](/docs/guides/tools-file-search) for more information.4555 [file search guide](/docs/guides/tools-file-search) for more information.
5232 4617
5233 The text that was retrieved from the file.4618 The text that was retrieved from the file.
5234 4619
52354620 - `WebSearchCall = object { id, action, status, type }` - `WebSearchCall object { id, action, status, type }`
5236 4621
5237 The results of a web search tool call. See the4622 The results of a web search tool call. See the
5238 [web search guide](/docs/guides/tools-web-search) for more information.4623 [web search guide](/docs/guides/tools-web-search) for more information.
5246 An object describing the specific action taken in this web search call.4631 An object describing the specific action taken in this web search call.
5247 Includes details on how the model used the web (search, open_page, find_in_page).4632 Includes details on how the model used the web (search, open_page, find_in_page).
5248 4633
52494634 - `Search = object { query, type, queries, sources }` - `Search object { query, type, queries, sources }`
5250 4635
5251 Action type "search" - Performs a web search query.4636 Action type "search" - Performs a web search query.
5252 4637
5278 4663
5279 The URL of the source.4664 The URL of the source.
5280 4665
52814666 - `OpenPage = object { type, url }` - `OpenPage object { type, url }`
5282 4667
5283 Action type "open_page" - Opens a specific URL from search results.4668 Action type "open_page" - Opens a specific URL from search results.
5284 4669
5292 4677
5293 The URL opened by the model.4678 The URL opened by the model.
5294 4679
52954680 - `FindInPage = object { pattern, type, url }` - `FindInPage object { pattern, type, url }`
5296 4681
5297 Action type "find_in_page": Searches for a pattern within a loaded page.4682 Action type "find_in_page": Searches for a pattern within a loaded page.
5298 4683
5328 4713
5329 - `"web_search_call"`4714 - `"web_search_call"`
5330 4715
53314716 - `ImageGenerationCall = object { id, result, status, type }` - `ImageGenerationCall object { id, result, status, type }`
5332 4717
5333 An image generation request made by the model.4718 An image generation request made by the model.
5334 4719
5358 4743
5359 - `"image_generation_call"`4744 - `"image_generation_call"`
5360 4745
53614746 - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`
5362 4747
5363 A tool call to a computer use tool. See the4748 A tool call to a computer use tool. See the
5364 [computer use guide](/docs/guides/tools-computer-use) for more information.4749 [computer use guide](/docs/guides/tools-computer-use) for more information.
5408 4793
5409 A click action.4794 A click action.
5410 4795
54114796 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
5412 4797
5413 A click action.4798 A click action.
5414 4799
5444 4829
5445 The keys being held while clicking.4830 The keys being held while clicking.
5446 4831
54474832 - `DoubleClick = object { keys, type, x, y }` - `DoubleClick object { keys, type, x, y }`
5448 4833
5449 A double click action.4834 A double click action.
5450 4835
5466 4851
5467 The y-coordinate where the double click occurred.4852 The y-coordinate where the double click occurred.
5468 4853
54694854 - `Drag = object { path, type, keys }` - `Drag object { path, type, keys }`
5470 4855
5471 A drag action.4856 A drag action.
5472 4857
5499 4884
5500 The keys being held while dragging the mouse.4885 The keys being held while dragging the mouse.
5501 4886
55024887 - `Keypress = object { keys, type }` - `Keypress object { keys, type }`
5503 4888
5504 A collection of keypresses the model would like to perform.4889 A collection of keypresses the model would like to perform.
5505 4890
5513 4898
5514 - `"keypress"`4899 - `"keypress"`
5515 4900
55164901 - `Move = object { type, x, y, keys }` - `Move object { type, x, y, keys }`
5517 4902
5518 A mouse move action.4903 A mouse move action.
5519 4904
5535 4920
5536 The keys being held while moving the mouse.4921 The keys being held while moving the mouse.
5537 4922
55384923 - `Screenshot = object { type }` - `Screenshot object { type }`
5539 4924
5540 A screenshot action.4925 A screenshot action.
5541 4926
5545 4930
5546 - `"screenshot"`4931 - `"screenshot"`
5547 4932
55484933 - `Scroll = object { scroll_x, scroll_y, type, 3 more }` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
5549 4934
5550 A scroll action.4935 A scroll action.
5551 4936
5575 4960
5576 The keys being held while scrolling.4961 The keys being held while scrolling.
5577 4962
55784963 - `Type = object { text, type }` - `Type object { text, type }`
5579 4964
5580 An action to type in text.4965 An action to type in text.
5581 4966
5589 4974
5590 - `"type"`4975 - `"type"`
5591 4976
55924977 - `Wait = object { type }` - `Wait object { type }`
5593 4978
5594 A wait action.4979 A wait action.
5595 4980
5604 Flattened batched actions for `computer_use`. Each action includes an4989 Flattened batched actions for `computer_use`. Each action includes an
5605 `type` discriminator and action-specific fields.4990 `type` discriminator and action-specific fields.
5606 4991
56074992 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
5608 4993
5609 A click action.4994 A click action.
5610 4995
56114996 - `button: "left" or "right" or "wheel" or 2 more` - `DoubleClick object { keys, type, x, y }`
5612
5613 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
5614
5615 - `"left"`
5616
5617 - `"right"`
5618
5619 - `"wheel"`
5620
5621 - `"back"`
5622
5623 - `"forward"`
5624
5625 - `type: "click"`
5626
5627 Specifies the event type. For a click action, this property is always `click`.
5628
5629 - `"click"`
5630
5631 - `x: number`
5632
5633 The x-coordinate where the click occurred.
5634
5635 - `y: number`
5636
5637 The y-coordinate where the click occurred.
5638
5639 - `keys: optional array of string`
5640
5641 The keys being held while clicking.
5642
5643 - `DoubleClick = object { keys, type, x, y }`
5644 4997
5645 A double click action.4998 A double click action.
5646 4999
56475000 - `keys: array of string` - `Drag object { path, type, keys }`
5648
5649 The keys being held while double-clicking.
5650
5651 - `type: "double_click"`
5652
5653 Specifies the event type. For a double click action, this property is always set to `double_click`.
5654
5655 - `"double_click"`
5656
5657 - `x: number`
5658
5659 The x-coordinate where the double click occurred.
5660
5661 - `y: number`
5662
5663 The y-coordinate where the double click occurred.
5664
5665 - `Drag = object { path, type, keys }`
5666 5001
5667 A drag action.5002 A drag action.
5668 5003
56695004 - `path: array of object { x, y }` - `Keypress object { keys, type }`
5670
5671 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
5672
5673 ```
5674 [
5675 { x: 100, y: 200 },
5676 { x: 200, y: 300 }
5677 ]
5678 ```
5679
5680 - `x: number`
5681
5682 The x-coordinate.
5683
5684 - `y: number`
5685
5686 The y-coordinate.
5687
5688 - `type: "drag"`
5689
5690 Specifies the event type. For a drag action, this property is always set to `drag`.
5691
5692 - `"drag"`
5693
5694 - `keys: optional array of string`
5695
5696 The keys being held while dragging the mouse.
5697
5698 - `Keypress = object { keys, type }`
5699 5005
5700 A collection of keypresses the model would like to perform.5006 A collection of keypresses the model would like to perform.
5701 5007
57025008 - `keys: array of string` - `Move object { type, x, y, keys }`
5703
5704 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
5705
5706 - `type: "keypress"`
5707
5708 Specifies the event type. For a keypress action, this property is always set to `keypress`.
5709
5710 - `"keypress"`
5711
5712 - `Move = object { type, x, y, keys }`
5713 5009
5714 A mouse move action.5010 A mouse move action.
5715 5011
57165012 - `type: "move"` - `Screenshot object { type }`
5717
5718 Specifies the event type. For a move action, this property is always set to `move`.
5719
5720 - `"move"`
5721
5722 - `x: number`
5723
5724 The x-coordinate to move to.
5725
5726 - `y: number`
5727
5728 The y-coordinate to move to.
5729
5730 - `keys: optional array of string`
5731
5732 The keys being held while moving the mouse.
5733
5734 - `Screenshot = object { type }`
5735 5013
5736 A screenshot action.5014 A screenshot action.
5737 5015
57385016 - `type: "screenshot"` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
5739
5740 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
5741
5742 - `"screenshot"`
5743
5744 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
5745 5017
5746 A scroll action.5018 A scroll action.
5747 5019
57485020 - `scroll_x: number` - `Type object { text, type }`
5749
5750 The horizontal scroll distance.
5751
5752 - `scroll_y: number`
5753
5754 The vertical scroll distance.
5755
5756 - `type: "scroll"`
5757
5758 Specifies the event type. For a scroll action, this property is always set to `scroll`.
5759
5760 - `"scroll"`
5761
5762 - `x: number`
5763
5764 The x-coordinate where the scroll occurred.
5765
5766 - `y: number`
5767
5768 The y-coordinate where the scroll occurred.
5769
5770 - `keys: optional array of string`
5771
5772 The keys being held while scrolling.
5773
5774 - `Type = object { text, type }`
5775 5021
5776 An action to type in text.5022 An action to type in text.
5777 5023
57785024 - `text: string` - `Wait object { type }`
5779
5780 The text to type.
5781
5782 - `type: "type"`
5783
5784 Specifies the event type. For a type action, this property is always set to `type`.
5785
5786 - `"type"`
5787
5788 - `Wait = object { type }`
5789 5025
5790 A wait action.5026 A wait action.
5791 5027
57925028 - `type: "wait"` - `ComputerCallOutput object { id, call_id, output, 4 more }`
5793
5794 Specifies the event type. For a wait action, this property is always set to `wait`.
5795
5796 - `"wait"`
5797
5798 - `ComputerCallOutput = object { id, call_id, output, 4 more }`
5799 5029
5800 - `id: string`5030 - `id: string`
5801 5031
5864 5094
5865 The identifier of the actor that created the item.5095 The identifier of the actor that created the item.
5866 5096
58675097 - `Reasoning = object { id, summary, type, 3 more }` - `Reasoning object { id, summary, type, 3 more }`
5868 5098
5869 A description of the chain of thought used by a reasoning model while generating5099 A description of the chain of thought used by a reasoning model while generating
5870 a response. Be sure to include these items in your `input` to the Responses API5100 a response. Be sure to include these items in your `input` to the Responses API
5887 5117
5888 The type of the object. Always `summary_text`.5118 The type of the object. Always `summary_text`.
5889 5119
5890 - `"summary_text"`
5891
5892 - `type: "reasoning"`5120 - `type: "reasoning"`
5893 5121
5894 The type of the object. Always `reasoning`.5122 The type of the object. Always `reasoning`.
5925 5153
5926 - `"incomplete"`5154 - `"incomplete"`
5927 5155
59285156 - `Compaction = object { id, encrypted_content, type, created_by }` - `Compaction object { id, encrypted_content, type, created_by }`
5929 5157
5930 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).5158 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
5931 5159
5947 5175
5948 The identifier of the actor that created the item.5176 The identifier of the actor that created the item.
5949 5177
59505178 - `CodeInterpreterCall = object { id, code, container_id, 3 more }` - `CodeInterpreterCall object { id, code, container_id, 3 more }`
5951 5179
5952 A tool call to run code.5180 A tool call to run code.
5953 5181
5968 The outputs generated by the code interpreter, such as logs or images.5196 The outputs generated by the code interpreter, such as logs or images.
5969 Can be null if no outputs are available.5197 Can be null if no outputs are available.
5970 5198
59715199 - `Logs = object { logs, type }` - `Logs object { logs, type }`
5972 5200
5973 The logs output from the code interpreter.5201 The logs output from the code interpreter.
5974 5202
5982 5210
5983 - `"logs"`5211 - `"logs"`
5984 5212
59855213 - `Image = object { type, url }` - `Image object { type, url }`
5986 5214
5987 The image output from the code interpreter.5215 The image output from the code interpreter.
5988 5216
6016 5244
6017 - `"code_interpreter_call"`5245 - `"code_interpreter_call"`
6018 5246
60195247 - `LocalShellCall = object { id, action, call_id, 2 more }` - `LocalShellCall object { id, action, call_id, 2 more }`
6020 5248
6021 A tool call to run a command on the local shell.5249 A tool call to run a command on the local shell.
6022 5250
6074 5302
6075 - `"local_shell_call"`5303 - `"local_shell_call"`
6076 5304
60775305 - `LocalShellCallOutput = object { id, output, type, status }` - `LocalShellCallOutput object { id, output, type, status }`
6078 5306
6079 The output of a local shell tool call.5307 The output of a local shell tool call.
6080 5308
6102 5330
6103 - `"incomplete"`5331 - `"incomplete"`
6104 5332
61055333 - `ShellCall = object { id, action, call_id, 4 more }` - `ShellCall object { id, action, call_id, 4 more }`
6106 5334
6107 A tool call that executes one or more shell commands in a managed environment.5335 A tool call that executes one or more shell commands in a managed environment.
6108 5336
6132 5360
6133 Represents the use of a local environment to perform shell actions.5361 Represents the use of a local environment to perform shell actions.
6134 5362
61355363 - `ResponseLocalEnvironment = object { type }` - `ResponseLocalEnvironment object { type }`
6136 5364
6137 Represents the use of a local environment to perform shell actions.5365 Represents the use of a local environment to perform shell actions.
6138 5366
6142 5370
6143 - `"local"`5371 - `"local"`
6144 5372
61455373 - `ResponseContainerReference = object { container_id, type }` - `ResponseContainerReference object { container_id, type }`
6146 5374
6147 Represents a container created with /v1/containers.5375 Represents a container created with /v1/containers.
6148 5376
6174 5402
6175 The ID of the entity that created this tool call.5403 The ID of the entity that created this tool call.
6176 5404
61775405 - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - `ShellCallOutput object { id, call_id, max_output_length, 4 more }`
6178 5406
6179 The output of a shell tool call that was emitted.5407 The output of a shell tool call that was emitted.
6180 5408
6198 5426
6199 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.5427 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.
6200 5428
62015429 - `Timeout = object { type }` - `Timeout object { type }`
6202 5430
6203 Indicates that the shell call exceeded its configured time limit.5431 Indicates that the shell call exceeded its configured time limit.
6204 5432
6208 5436
6209 - `"timeout"`5437 - `"timeout"`
6210 5438
62115439 - `Exit = object { exit_code, type }` - `Exit object { exit_code, type }`
6212 5440
6213 Indicates that the shell commands finished and returned an exit code.5441 Indicates that the shell commands finished and returned an exit code.
6214 5442
6254 5482
6255 The identifier of the actor that created the item.5483 The identifier of the actor that created the item.
6256 5484
62575485 - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - `ApplyPatchCall object { id, call_id, operation, 3 more }`
6258 5486
6259 A tool call that applies file diffs by creating, deleting, or updating files.5487 A tool call that applies file diffs by creating, deleting, or updating files.
6260 5488
6270 5498
6271 One of the create_file, delete_file, or update_file operations applied via apply_patch.5499 One of the create_file, delete_file, or update_file operations applied via apply_patch.
6272 5500
62735501 - `CreateFile = object { diff, path, type }` - `CreateFile object { diff, path, type }`
6274 5502
6275 Instruction describing how to create a file via the apply_patch tool.5503 Instruction describing how to create a file via the apply_patch tool.
6276 5504
6288 5516
6289 - `"create_file"`5517 - `"create_file"`
6290 5518
62915519 - `DeleteFile = object { path, type }` - `DeleteFile object { path, type }`
6292 5520
6293 Instruction describing how to delete a file via the apply_patch tool.5521 Instruction describing how to delete a file via the apply_patch tool.
6294 5522
6302 5530
6303 - `"delete_file"`5531 - `"delete_file"`
6304 5532
63055533 - `UpdateFile = object { diff, path, type }` - `UpdateFile object { diff, path, type }`
6306 5534
6307 Instruction describing how to update a file via the apply_patch tool.5535 Instruction describing how to update a file via the apply_patch tool.
6308 5536
6338 5566
6339 The ID of the entity that created this tool call.5567 The ID of the entity that created this tool call.
6340 5568
63415569 - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - `ApplyPatchCallOutput object { id, call_id, status, 3 more }`
6342 5570
6343 The output emitted by an apply patch tool call.5571 The output emitted by an apply patch tool call.
6344 5572
6372 5600
6373 Optional textual output returned by the apply patch tool.5601 Optional textual output returned by the apply patch tool.
6374 5602
63755603 - `McpListTools = object { id, server_label, tools, 2 more }` - `McpListTools object { id, server_label, tools, 2 more }`
6376 5604
6377 A list of tools available on an MCP server.5605 A list of tools available on an MCP server.
6378 5606
6414 5642
6415 Error message if the server could not list tools.5643 Error message if the server could not list tools.
6416 5644
64175645 - `McpApprovalRequest = object { id, arguments, name, 2 more }` - `McpApprovalRequest object { id, arguments, name, 2 more }`
6418 5646
6419 A request for human approval of a tool invocation.5647 A request for human approval of a tool invocation.
6420 5648
6440 5668
6441 - `"mcp_approval_request"`5669 - `"mcp_approval_request"`
6442 5670
64435671 - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }`
6444 5672
6445 A response to an MCP approval request.5673 A response to an MCP approval request.
6446 5674
6466 5694
6467 Optional reason for the decision.5695 Optional reason for the decision.
6468 5696
64695697 - `McpCall = object { id, arguments, name, 6 more }` - `McpCall object { id, arguments, name, 6 more }`
6470 5698
6471 An invocation of a tool on an MCP server.5699 An invocation of a tool on an MCP server.
6472 5700
6519 5747
6520 - `"failed"`5748 - `"failed"`
6521 5749
65225750 - `CustomToolCall = object { call_id, input, name, 3 more }` - `CustomToolCall object { call_id, input, name, 3 more }`
6523 5751
6524 A call to a custom tool created by the model.5752 A call to a custom tool created by the model.
6525 5753
6549 5777
6550 The namespace of the custom tool being called.5778 The namespace of the custom tool being called.
6551 5779
65525780 - `CustomToolCallOutput = object { call_id, output, type, id }` - `CustomToolCallOutput object { call_id, output, type, id }`
6553 5781
6554 The output of a custom tool call from your code, being sent back to the model.5782 The output of a custom tool call from your code, being sent back to the model.
6555 5783
6570 5798
6571 Text, image, or file output of the custom tool call.5799 Text, image, or file output of the custom tool call.
6572 5800
65735801 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
6574 5802
6575 A text input to the model.5803 A text input to the model.
6576 5804
65775805 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
6578
6579 The text input to the model.
6580
6581 - `type: "input_text"`
6582
6583 The type of the input item. Always `input_text`.
6584
6585 - `"input_text"`
6586
6587 - `ResponseInputImage = object { detail, type, file_id, image_url }`
6588 5806
6589 An image input to the model. Learn about [image inputs](/docs/guides/vision).5807 An image input to the model. Learn about [image inputs](/docs/guides/vision).
6590 5808
65915809 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
6592
6593 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
6594
6595 - `"low"`
6596
6597 - `"high"`
6598
6599 - `"auto"`
6600
6601 - `"original"`
6602
6603 - `type: "input_image"`
6604
6605 The type of the input item. Always `input_image`.
6606
6607 - `"input_image"`
6608
6609 - `file_id: optional string`
6610
6611 The ID of the file to be sent to the model.
6612
6613 - `image_url: optional string`
6614
6615 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
6616
6617 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
6618 5810
6619 A file input to the model.5811 A file input to the model.
6620 5812
6621 - `type: "input_file"`
6622
6623 The type of the input item. Always `input_file`.
6624
6625 - `"input_file"`
6626
6627 - `detail: optional "low" or "high"`
6628
6629 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`.
6630
6631 - `"low"`
6632
6633 - `"high"`
6634
6635 - `file_data: optional string`
6636
6637 The content of the file to be sent to the model.
6638
6639 - `file_id: optional string`
6640
6641 The ID of the file to be sent to the model.
6642
6643 - `file_url: optional string`
6644
6645 The URL of the file to be sent to the model.
6646
6647 - `filename: optional string`
6648
6649 The name of the file to be sent to the model.
6650
6651 - `type: "custom_tool_call_output"`5813 - `type: "custom_tool_call_output"`
6652 5814
6653 The type of the custom tool call output. Always `custom_tool_call_output`.5815 The type of the custom tool call output. Always `custom_tool_call_output`.
56 56
57### Returns57### Returns
58 58
5959- `Response = object { id, created_at, error, 30 more }`- `Response object { id, created_at, error, 30 more }`
60 60
61 - `id: string`61 - `id: string`
62 62
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.
146 146
147147 - `EasyInputMessage = object { content, role, phase, type }` - `EasyInputMessage object { content, role, phase, type }`
148 148
149 A message input to the model with a role indicating instruction following149 A message input to the model with a role indicating instruction following
150 hierarchy. Instructions given with the `developer` or `system` role take150 hierarchy. Instructions given with the `developer` or `system` role take
166 A list of one or many input items to the model, containing different content166 A list of one or many input items to the model, containing different content
167 types.167 types.
168 168
169169 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
170 170
171 A text input to the model.171 A text input to the model.
172 172
180 180
181 - `"input_text"`181 - `"input_text"`
182 182
183183 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
184 184
185 An image input to the model. Learn about [image inputs](/docs/guides/vision).185 An image input to the model. Learn about [image inputs](/docs/guides/vision).
186 186
210 210
211 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.211 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
212 212
213213 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
214 214
215 A file input to the model.215 A file input to the model.
216 216
273 273
274 - `"message"`274 - `"message"`
275 275
276276 - `Message = object { content, role, status, type }` - `Message object { content, role, status, type }`
277 277
278 A message input to the model with a role indicating instruction following278 A message input to the model with a role indicating instruction following
279 hierarchy. Instructions given with the `developer` or `system` role take279 hierarchy. Instructions given with the `developer` or `system` role take
284 A list of one or many input items to the model, containing different content284 A list of one or many input items to the model, containing different content
285 types.285 types.
286 286
287 - `ResponseInputText = object { text, type }`
288
289 A text input to the model.
290
291 - `text: string`
292
293 The text input to the model.
294
295 - `type: "input_text"`
296
297 The type of the input item. Always `input_text`.
298
299 - `"input_text"`
300
301 - `ResponseInputImage = object { detail, type, file_id, image_url }`
302
303 An image input to the model. Learn about [image inputs](/docs/guides/vision).
304
305 - `detail: "low" or "high" or "auto" or "original"`
306
307 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
308
309 - `"low"`
310
311 - `"high"`
312
313 - `"auto"`
314
315 - `"original"`
316
317 - `type: "input_image"`
318
319 The type of the input item. Always `input_image`.
320
321 - `"input_image"`
322
323 - `file_id: optional string`
324
325 The ID of the file to be sent to the model.
326
327 - `image_url: optional string`
328
329 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
330
331 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
332
333 A file input to the model.
334
335 - `type: "input_file"`
336
337 The type of the input item. Always `input_file`.
338
339 - `"input_file"`
340
341 - `detail: optional "low" or "high"`
342
343 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`.
344
345 - `"low"`
346
347 - `"high"`
348
349 - `file_data: optional string`
350
351 The content of the file to be sent to the model.
352
353 - `file_id: optional string`
354
355 The ID of the file to be sent to the model.
356
357 - `file_url: optional string`
358
359 The URL of the file to be sent to the model.
360
361 - `filename: optional string`
362
363 The name of the file to be sent to the model.
364
365 - `role: "user" or "system" or "developer"`287 - `role: "user" or "system" or "developer"`
366 288
367 The role of the message input. One of `user`, `system`, or `developer`.289 The role of the message input. One of `user`, `system`, or `developer`.
389 311
390 - `"message"`312 - `"message"`
391 313
392314 - `ResponseOutputMessage = object { id, content, role, 3 more }` - `ResponseOutputMessage object { id, content, role, 3 more }`
393 315
394 An output message from the model.316 An output message from the model.
395 317
401 323
402 The content of the output message.324 The content of the output message.
403 325
404326 - `ResponseOutputText = object { annotations, logprobs, text, type }` - `ResponseOutputText object { annotations, logprobs, text, type }`
405 327
406 A text output from the model.328 A text output from the model.
407 329
409 331
410 The annotations of the text output.332 The annotations of the text output.
411 333
412334 - `FileCitation = object { file_id, filename, index, type }` - `FileCitation object { file_id, filename, index, type }`
413 335
414 A citation to a file.336 A citation to a file.
415 337
431 353
432 - `"file_citation"`354 - `"file_citation"`
433 355
434356 - `URLCitation = object { end_index, start_index, title, 2 more }` - `URLCitation object { end_index, start_index, title, 2 more }`
435 357
436 A citation for a web resource used to generate a model response.358 A citation for a web resource used to generate a model response.
437 359
457 379
458 The URL of the web resource.380 The URL of the web resource.
459 381
460382 - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`
461 383
462 A citation for a container file used to generate a model response.384 A citation for a container file used to generate a model response.
463 385
487 409
488 - `"container_file_citation"`410 - `"container_file_citation"`
489 411
490412 - `FilePath = object { file_id, index, type }` - `FilePath object { file_id, index, type }`
491 413
492 A path to a file.414 A path to a file.
493 415
531 453
532 - `"output_text"`454 - `"output_text"`
533 455
534456 - `ResponseOutputRefusal = object { refusal, type }` - `ResponseOutputRefusal object { refusal, type }`
535 457
536 A refusal from the model.458 A refusal from the model.
537 459
578 500
579 - `"final_answer"`501 - `"final_answer"`
580 502
581503 - `FileSearchCall = object { id, queries, status, 2 more }` - `FileSearchCall object { id, queries, status, 2 more }`
582 504
583 The results of a file search tool call. See the505 The results of a file search tool call. See the
584 [file search guide](/docs/guides/tools-file-search) for more information.506 [file search guide](/docs/guides/tools-file-search) for more information.
646 568
647 The text that was retrieved from the file.569 The text that was retrieved from the file.
648 570
649571 - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`
650 572
651 A tool call to a computer use tool. See the573 A tool call to a computer use tool. See the
652 [computer use guide](/docs/guides/tools-computer-use) for more information.574 [computer use guide](/docs/guides/tools-computer-use) for more information.
696 618
697 A click action.619 A click action.
698 620
699621 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
700 622
701 A click action.623 A click action.
702 624
732 654
733 The keys being held while clicking.655 The keys being held while clicking.
734 656
735657 - `DoubleClick = object { keys, type, x, y }` - `DoubleClick object { keys, type, x, y }`
736 658
737 A double click action.659 A double click action.
738 660
754 676
755 The y-coordinate where the double click occurred.677 The y-coordinate where the double click occurred.
756 678
757679 - `Drag = object { path, type, keys }` - `Drag object { path, type, keys }`
758 680
759 A drag action.681 A drag action.
760 682
787 709
788 The keys being held while dragging the mouse.710 The keys being held while dragging the mouse.
789 711
790712 - `Keypress = object { keys, type }` - `Keypress object { keys, type }`
791 713
792 A collection of keypresses the model would like to perform.714 A collection of keypresses the model would like to perform.
793 715
801 723
802 - `"keypress"`724 - `"keypress"`
803 725
804726 - `Move = object { type, x, y, keys }` - `Move object { type, x, y, keys }`
805 727
806 A mouse move action.728 A mouse move action.
807 729
823 745
824 The keys being held while moving the mouse.746 The keys being held while moving the mouse.
825 747
826748 - `Screenshot = object { type }` - `Screenshot object { type }`
827 749
828 A screenshot action.750 A screenshot action.
829 751
833 755
834 - `"screenshot"`756 - `"screenshot"`
835 757
836758 - `Scroll = object { scroll_x, scroll_y, type, 3 more }` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
837 759
838 A scroll action.760 A scroll action.
839 761
863 785
864 The keys being held while scrolling.786 The keys being held while scrolling.
865 787
866788 - `Type = object { text, type }` - `Type object { text, type }`
867 789
868 An action to type in text.790 An action to type in text.
869 791
877 799
878 - `"type"`800 - `"type"`
879 801
880802 - `Wait = object { type }` - `Wait object { type }`
881 803
882 A wait action.804 A wait action.
883 805
892 Flattened batched actions for `computer_use`. Each action includes an814 Flattened batched actions for `computer_use`. Each action includes an
893 `type` discriminator and action-specific fields.815 `type` discriminator and action-specific fields.
894 816
895817 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
896 818
897 A click action.819 A click action.
898 820
899821 - `button: "left" or "right" or "wheel" or 2 more` - `DoubleClick object { keys, type, x, y }`
900
901 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
902
903 - `"left"`
904
905 - `"right"`
906
907 - `"wheel"`
908
909 - `"back"`
910
911 - `"forward"`
912
913 - `type: "click"`
914
915 Specifies the event type. For a click action, this property is always `click`.
916
917 - `"click"`
918
919 - `x: number`
920
921 The x-coordinate where the click occurred.
922
923 - `y: number`
924
925 The y-coordinate where the click occurred.
926
927 - `keys: optional array of string`
928
929 The keys being held while clicking.
930
931 - `DoubleClick = object { keys, type, x, y }`
932 822
933 A double click action.823 A double click action.
934 824
935825 - `keys: array of string` - `Drag object { path, type, keys }`
936
937 The keys being held while double-clicking.
938
939 - `type: "double_click"`
940
941 Specifies the event type. For a double click action, this property is always set to `double_click`.
942
943 - `"double_click"`
944
945 - `x: number`
946
947 The x-coordinate where the double click occurred.
948
949 - `y: number`
950
951 The y-coordinate where the double click occurred.
952
953 - `Drag = object { path, type, keys }`
954 826
955 A drag action.827 A drag action.
956 828
957829 - `path: array of object { x, y }` - `Keypress object { keys, type }`
958
959 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
960
961 ```
962 [
963 { x: 100, y: 200 },
964 { x: 200, y: 300 }
965 ]
966 ```
967
968 - `x: number`
969
970 The x-coordinate.
971
972 - `y: number`
973
974 The y-coordinate.
975
976 - `type: "drag"`
977
978 Specifies the event type. For a drag action, this property is always set to `drag`.
979
980 - `"drag"`
981
982 - `keys: optional array of string`
983
984 The keys being held while dragging the mouse.
985
986 - `Keypress = object { keys, type }`
987 830
988 A collection of keypresses the model would like to perform.831 A collection of keypresses the model would like to perform.
989 832
990833 - `keys: array of string` - `Move object { type, x, y, keys }`
991
992 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
993
994 - `type: "keypress"`
995
996 Specifies the event type. For a keypress action, this property is always set to `keypress`.
997
998 - `"keypress"`
999
1000 - `Move = object { type, x, y, keys }`
1001 834
1002 A mouse move action.835 A mouse move action.
1003 836
1004837 - `type: "move"` - `Screenshot object { type }`
1005
1006 Specifies the event type. For a move action, this property is always set to `move`.
1007
1008 - `"move"`
1009
1010 - `x: number`
1011
1012 The x-coordinate to move to.
1013
1014 - `y: number`
1015
1016 The y-coordinate to move to.
1017
1018 - `keys: optional array of string`
1019
1020 The keys being held while moving the mouse.
1021
1022 - `Screenshot = object { type }`
1023 838
1024 A screenshot action.839 A screenshot action.
1025 840
1026841 - `type: "screenshot"` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
1027
1028 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
1029
1030 - `"screenshot"`
1031
1032 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
1033 842
1034 A scroll action.843 A scroll action.
1035 844
1036845 - `scroll_x: number` - `Type object { text, type }`
1037
1038 The horizontal scroll distance.
1039
1040 - `scroll_y: number`
1041
1042 The vertical scroll distance.
1043
1044 - `type: "scroll"`
1045
1046 Specifies the event type. For a scroll action, this property is always set to `scroll`.
1047
1048 - `"scroll"`
1049
1050 - `x: number`
1051
1052 The x-coordinate where the scroll occurred.
1053
1054 - `y: number`
1055
1056 The y-coordinate where the scroll occurred.
1057
1058 - `keys: optional array of string`
1059
1060 The keys being held while scrolling.
1061
1062 - `Type = object { text, type }`
1063 846
1064 An action to type in text.847 An action to type in text.
1065 848
1066849 - `text: string` - `Wait object { type }`
1067
1068 The text to type.
1069
1070 - `type: "type"`
1071
1072 Specifies the event type. For a type action, this property is always set to `type`.
1073
1074 - `"type"`
1075
1076 - `Wait = object { type }`
1077 850
1078 A wait action.851 A wait action.
1079 852
1080853 - `type: "wait"` - `ComputerCallOutput object { call_id, output, type, 3 more }`
1081
1082 Specifies the event type. For a wait action, this property is always set to `wait`.
1083
1084 - `"wait"`
1085
1086 - `ComputerCallOutput = object { call_id, output, type, 3 more }`
1087 854
1088 The output of a computer tool call.855 The output of a computer tool call.
1089 856
1146 913
1147 - `"incomplete"`914 - `"incomplete"`
1148 915
1149916 - `WebSearchCall = object { id, action, status, type }` - `WebSearchCall object { id, action, status, type }`
1150 917
1151 The results of a web search tool call. See the918 The results of a web search tool call. See the
1152 [web search guide](/docs/guides/tools-web-search) for more information.919 [web search guide](/docs/guides/tools-web-search) for more information.
1160 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.
1161 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).
1162 929
1163930 - `Search = object { query, type, queries, sources }` - `Search object { query, type, queries, sources }`
1164 931
1165 Action type "search" - Performs a web search query.932 Action type "search" - Performs a web search query.
1166 933
1192 959
1193 The URL of the source.960 The URL of the source.
1194 961
1195962 - `OpenPage = object { type, url }` - `OpenPage object { type, url }`
1196 963
1197 Action type "open_page" - Opens a specific URL from search results.964 Action type "open_page" - Opens a specific URL from search results.
1198 965
1206 973
1207 The URL opened by the model.974 The URL opened by the model.
1208 975
1209976 - `FindInPage = object { pattern, type, url }` - `FindInPage object { pattern, type, url }`
1210 977
1211 Action type "find_in_page": Searches for a pattern within a loaded page.978 Action type "find_in_page": Searches for a pattern within a loaded page.
1212 979
1242 1009
1243 - `"web_search_call"`1010 - `"web_search_call"`
1244 1011
12451012 - `FunctionCall = object { arguments, call_id, name, 4 more }` - `FunctionCall object { arguments, call_id, name, 4 more }`
1246 1013
1247 A tool call to run a function. See the1014 A tool call to run a function. See the
1248 [function calling guide](/docs/guides/function-calling) for more information.1015 [function calling guide](/docs/guides/function-calling) for more information.
1284 1051
1285 - `"incomplete"`1052 - `"incomplete"`
1286 1053
12871054 - `FunctionCallOutput = object { call_id, output, type, 2 more }` - `FunctionCallOutput object { call_id, output, type, 2 more }`
1288 1055
1289 The output of a function tool call.1056 The output of a function tool call.
1290 1057
1304 1071
1305 An array of content outputs (text, image, file) for the function tool call.1072 An array of content outputs (text, image, file) for the function tool call.
1306 1073
13071074 - `ResponseInputTextContent = object { text, type }` - `ResponseInputTextContent object { text, type }`
1308 1075
1309 A text input to the model.1076 A text input to the model.
1310 1077
1318 1085
1319 - `"input_text"`1086 - `"input_text"`
1320 1087
13211088 - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - `ResponseInputImageContent object { type, detail, file_id, image_url }`
1322 1089
1323 An image input to the model. Learn about [image inputs](/docs/guides/vision)1090 An image input to the model. Learn about [image inputs](/docs/guides/vision)
1324 1091
1348 1115
1349 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.1116 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
1350 1117
13511118 - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - `ResponseInputFileContent object { type, detail, file_data, 3 more }`
1352 1119
1353 A file input to the model.1120 A file input to the model.
1354 1121
1402 1169
1403 - `"incomplete"`1170 - `"incomplete"`
1404 1171
14051172 - `ToolSearchCall = object { arguments, type, id, 3 more }` - `ToolSearchCall object { arguments, type, id, 3 more }`
1406 1173
1407 - `arguments: unknown`1174 - `arguments: unknown`
1408 1175
1440 1207
1441 - `"incomplete"`1208 - `"incomplete"`
1442 1209
14431210 - `ToolSearchOutput = object { tools, type, id, 3 more }` - `ToolSearchOutput object { tools, type, id, 3 more }`
1444 1211
1445 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`1212 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
1446 1213
1447 The loaded tool definitions returned by the tool search output.1214 The loaded tool definitions returned by the tool search output.
1448 1215
14491216 - `Function = object { name, parameters, strict, 3 more }` - `Function object { name, parameters, strict, 3 more }`
1450 1217
1451 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).1218 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).
1452 1219
1476 1243
1477 A description of the function. Used by the model to determine whether or not to call the function.1244 A description of the function. Used by the model to determine whether or not to call the function.
1478 1245
14791246 - `FileSearch = object { type, vector_store_ids, filters, 2 more }` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
1480 1247
1481 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).1248 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).
1482 1249
1494 1261
1495 A filter to apply.1262 A filter to apply.
1496 1263
14971264 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1498 1265
1499 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1266 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1500 1267
1547 1314
1548 - `number`1315 - `number`
1549 1316
15501317 - `CompoundFilter = object { filters, type }` - `CompoundFilter object { filters, type }`
1551 1318
1552 Combine multiple filters using `and` or `or`.1319 Combine multiple filters using `and` or `or`.
1553 1320
1555 1322
1556 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.1323 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
1557 1324
15581325 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1559 1326
1560 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1327 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1561 1328
15621329 - `key: string` - `unknown`
1563 1330
15641331 The key to compare against the value. - `type: "and" or "or"`
1565 1332
15661333 - `type: "eq" or "ne" or "gt" or 5 more` Type of operation: `and` or `or`.
1567 1334
15681335 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - `"and"`
1569 1336
15701337 - `eq`: equals - `"or"`
1571 - `ne`: not equal
1572 - `gt`: greater than
1573 - `gte`: greater than or equal
1574 - `lt`: less than
1575 - `lte`: less than or equal
1576 - `in`: in
1577 - `nin`: not in
1578 1338
15791339 - `"eq"` - `max_num_results: optional number`
1580 1340
15811341 - `"ne"` The maximum number of results to return. This number should be between 1 and 50 inclusive.
1582 1342
15831343 - `"gt"` - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
1584 1344
15851345 - `"gte"` Ranking options for search.
1586
1587 - `"lt"`
1588
1589 - `"lte"`
1590
1591 - `"in"`
1592
1593 - `"nin"`
1594
1595 - `value: string or number or boolean or array of string or number`
1596
1597 The value to compare against the attribute key; supports string, number, or boolean types.
1598
1599 - `string`
1600
1601 - `number`
1602
1603 - `boolean`
1604
1605 - `array of string or number`
1606
1607 - `string`
1608
1609 - `number`
1610
1611 - `unknown`
1612
1613 - `type: "and" or "or"`
1614
1615 Type of operation: `and` or `or`.
1616
1617 - `"and"`
1618
1619 - `"or"`
1620
1621 - `max_num_results: optional number`
1622
1623 The maximum number of results to return. This number should be between 1 and 50 inclusive.
1624
1625 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
1626
1627 Ranking options for search.
1628 1346
1629 - `hybrid_search: optional object { embedding_weight, text_weight }`1347 - `hybrid_search: optional object { embedding_weight, text_weight }`
1630 1348
1650 1368
1651 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.1369 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.
1652 1370
16531371 - `Computer = object { type }` - `Computer object { type }`
1654 1372
1655 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1373 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1656 1374
1660 1378
1661 - `"computer"`1379 - `"computer"`
1662 1380
16631381 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
1664 1382
1665 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1383 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1666 1384
1692 1410
1693 - `"computer_use_preview"`1411 - `"computer_use_preview"`
1694 1412
16951413 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
1696 1414
1697 Search the Internet for sources related to the prompt. Learn more about the1415 Search the Internet for sources related to the prompt. Learn more about the
1698 [web search tool](/docs/guides/tools-web-search).1416 [web search tool](/docs/guides/tools-web-search).
1752 1470
1753 - `"approximate"`1471 - `"approximate"`
1754 1472
17551473 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
1756 1474
1757 Give the model access to additional tools via remote Model Context Protocol1475 Give the model access to additional tools via remote Model Context Protocol
1758 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).1476 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
1775 1493
1776 A string array of allowed tool names1494 A string array of allowed tool names
1777 1495
17781496 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
1779 1497
1780 A filter object to specify which tools are allowed.1498 A filter object to specify which tools are allowed.
1781 1499
1841 1559
1842 Specify which of the MCP server's tools require approval.1560 Specify which of the MCP server's tools require approval.
1843 1561
18441562 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
1845 1563
1846 Specify which of the MCP server's tools require approval. Can be1564 Specify which of the MCP server's tools require approval. Can be
1847 `always`, `never`, or a filter object associated with tools1565 `always`, `never`, or a filter object associated with tools
1894 The URL for the MCP server. One of `server_url` or `connector_id` must be1612 The URL for the MCP server. One of `server_url` or `connector_id` must be
1895 provided.1613 provided.
1896 1614
18971615 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
1898 1616
1899 A tool that runs Python code to help generate a response to a prompt.1617 A tool that runs Python code to help generate a response to a prompt.
1900 1618
1908 1626
1909 The container ID.1627 The container ID.
1910 1628
19111629 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
1912 1630
1913 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.1631 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
1914 1632
1938 1656
1939 Network access policy for the container.1657 Network access policy for the container.
1940 1658
19411659 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
1942 1660
1943 - `type: "disabled"`1661 - `type: "disabled"`
1944 1662
1946 1664
1947 - `"disabled"`1665 - `"disabled"`
1948 1666
19491667 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
1950 1668
1951 - `allowed_domains: array of string`1669 - `allowed_domains: array of string`
1952 1670
1980 1698
1981 - `"code_interpreter"`1699 - `"code_interpreter"`
1982 1700
19831701 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
1984 1702
1985 A tool that generates images using the GPT image models.1703 A tool that generates images using the GPT image models.
1986 1704
2101 1819
2102 - `"auto"`1820 - `"auto"`
2103 1821
21041822 - `LocalShell = object { type }` - `LocalShell object { type }`
2105 1823
2106 A tool that allows the model to execute shell commands in a local environment.1824 A tool that allows the model to execute shell commands in a local environment.
2107 1825
2111 1829
2112 - `"local_shell"`1830 - `"local_shell"`
2113 1831
21141832 - `Shell = object { type, environment }` - `Shell object { type, environment }`
2115 1833
2116 A tool that allows the model to execute shell commands.1834 A tool that allows the model to execute shell commands.
2117 1835
2123 1841
2124 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`1842 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
2125 1843
21261844 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
2127 1845
2128 - `type: "container_auto"`1846 - `type: "container_auto"`
2129 1847
2151 1869
2152 Network access policy for the container.1870 Network access policy for the container.
2153 1871
21541872 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
2155
2156 - `type: "disabled"`
2157
2158 Disable outbound network access. Always `disabled`.
2159
2160 - `"disabled"`
2161
2162 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
2163
2164 - `allowed_domains: array of string`
2165
2166 A list of allowed domains when type is `allowlist`.
2167
2168 - `type: "allowlist"`
2169
2170 Allow outbound network access only to specified domains. Always `allowlist`.
2171
2172 - `"allowlist"`
2173
2174 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
2175
2176 Optional domain-scoped secrets for allowlisted domains.
2177
2178 - `domain: string`
2179
2180 The domain associated with the secret.
2181
2182 - `name: string`
2183
2184 The name of the secret to inject for the domain.
2185
2186 - `value: string`
2187 1873
21881874 The secret value to inject for the domain. - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
2189 1875
2190 - `skills: optional array of SkillReference or InlineSkill`1876 - `skills: optional array of SkillReference or InlineSkill`
2191 1877
2192 An optional list of skills referenced by id or inline data.1878 An optional list of skills referenced by id or inline data.
2193 1879
21941880 - `SkillReference = object { skill_id, type, version }` - `SkillReference object { skill_id, type, version }`
2195 1881
2196 - `skill_id: string`1882 - `skill_id: string`
2197 1883
2207 1893
2208 Optional skill version. Use a positive integer or 'latest'. Omit for default.1894 Optional skill version. Use a positive integer or 'latest'. Omit for default.
2209 1895
22101896 - `InlineSkill = object { description, name, source, type }` - `InlineSkill object { description, name, source, type }`
2211 1897
2212 - `description: string`1898 - `description: string`
2213 1899
2243 1929
2244 - `"inline"`1930 - `"inline"`
2245 1931
22461932 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
2247 1933
2248 - `type: "local"`1934 - `type: "local"`
2249 1935
2267 1953
2268 The path to the directory containing the skill.1954 The path to the directory containing the skill.
2269 1955
22701956 - `ContainerReference = object { container_id, type }` - `ContainerReference object { container_id, type }`
2271 1957
2272 - `container_id: string`1958 - `container_id: string`
2273 1959
2279 1965
2280 - `"container_reference"`1966 - `"container_reference"`
2281 1967
22821968 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2283 1969
2284 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1970 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2285 1971
2305 1991
2306 The input format for the custom tool. Default is unconstrained text.1992 The input format for the custom tool. Default is unconstrained text.
2307 1993
23081994 - `Text = object { type }` - `Text object { type }`
2309 1995
2310 Unconstrained free-form text.1996 Unconstrained free-form text.
2311 1997
2315 2001
2316 - `"text"`2002 - `"text"`
2317 2003
23182004 - `Grammar = object { definition, syntax, type }` - `Grammar object { definition, syntax, type }`
2319 2005
2320 A grammar defined by the user.2006 A grammar defined by the user.
2321 2007
2337 2023
2338 - `"grammar"`2024 - `"grammar"`
2339 2025
23402026 - `Namespace = object { description, name, tools, type }` - `Namespace object { description, name, tools, type }`
2341 2027
2342 Groups function/custom tools under a shared namespace.2028 Groups function/custom tools under a shared namespace.
2343 2029
2353 2039
2354 The function/custom tools available inside this namespace.2040 The function/custom tools available inside this namespace.
2355 2041
23562042 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
2357 2043
2358 - `name: string`2044 - `name: string`
2359 2045
2371 2057
2372 - `strict: optional boolean`2058 - `strict: optional boolean`
2373 2059
23742060 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2375 2061
2376 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)2062 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2377 2063
2397 2083
2398 The input format for the custom tool. Default is unconstrained text.2084 The input format for the custom tool. Default is unconstrained text.
2399 2085
2400 - `Text = object { type }`
2401
2402 Unconstrained free-form text.
2403
2404 - `type: "text"`
2405
2406 Unconstrained text format. Always `text`.
2407
2408 - `"text"`
2409
2410 - `Grammar = object { definition, syntax, type }`
2411
2412 A grammar defined by the user.
2413
2414 - `definition: string`
2415
2416 The grammar definition.
2417
2418 - `syntax: "lark" or "regex"`
2419
2420 The syntax of the grammar definition. One of `lark` or `regex`.
2421
2422 - `"lark"`
2423
2424 - `"regex"`
2425
2426 - `type: "grammar"`
2427
2428 Grammar format. Always `grammar`.
2429
2430 - `"grammar"`
2431
2432 - `type: "namespace"`2086 - `type: "namespace"`
2433 2087
2434 The type of the tool. Always `namespace`.2088 The type of the tool. Always `namespace`.
2435 2089
2436 - `"namespace"`2090 - `"namespace"`
2437 2091
24382092 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
2439 2093
2440 Hosted or BYOT tool search configuration for deferred tools.2094 Hosted or BYOT tool search configuration for deferred tools.
2441 2095
2461 2115
2462 Parameter schema for a client-executed tool search tool.2116 Parameter schema for a client-executed tool search tool.
2463 2117
24642118 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
2465 2119
2466 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).2120 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).
2467 2121
2515 2169
2516 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.2170 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2517 2171
25182172 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
2519 2173
2520 Allows the assistant to create, delete, or update files using unified diffs.2174 Allows the assistant to create, delete, or update files using unified diffs.
2521 2175
2557 2211
2558 - `"incomplete"`2212 - `"incomplete"`
2559 2213
25602214 - `Reasoning = object { id, summary, type, 3 more }` - `Reasoning object { id, summary, type, 3 more }`
2561 2215
2562 A description of the chain of thought used by a reasoning model while generating2216 A description of the chain of thought used by a reasoning model while generating
2563 a response. Be sure to include these items in your `input` to the Responses API2217 a response. Be sure to include these items in your `input` to the Responses API
2618 2272
2619 - `"incomplete"`2273 - `"incomplete"`
2620 2274
26212275 - `Compaction = object { encrypted_content, type, id }` - `Compaction object { encrypted_content, type, id }`
2622 2276
2623 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).2277 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
2624 2278
2636 2290
2637 The ID of the compaction item.2291 The ID of the compaction item.
2638 2292
26392293 - `ImageGenerationCall = object { id, result, status, type }` - `ImageGenerationCall object { id, result, status, type }`
2640 2294
2641 An image generation request made by the model.2295 An image generation request made by the model.
2642 2296
2666 2320
2667 - `"image_generation_call"`2321 - `"image_generation_call"`
2668 2322
26692323 - `CodeInterpreterCall = object { id, code, container_id, 3 more }` - `CodeInterpreterCall object { id, code, container_id, 3 more }`
2670 2324
2671 A tool call to run code.2325 A tool call to run code.
2672 2326
2687 The outputs generated by the code interpreter, such as logs or images.2341 The outputs generated by the code interpreter, such as logs or images.
2688 Can be null if no outputs are available.2342 Can be null if no outputs are available.
2689 2343
26902344 - `Logs = object { logs, type }` - `Logs object { logs, type }`
2691 2345
2692 The logs output from the code interpreter.2346 The logs output from the code interpreter.
2693 2347
2701 2355
2702 - `"logs"`2356 - `"logs"`
2703 2357
27042358 - `Image = object { type, url }` - `Image object { type, url }`
2705 2359
2706 The image output from the code interpreter.2360 The image output from the code interpreter.
2707 2361
2735 2389
2736 - `"code_interpreter_call"`2390 - `"code_interpreter_call"`
2737 2391
27382392 - `LocalShellCall = object { id, action, call_id, 2 more }` - `LocalShellCall object { id, action, call_id, 2 more }`
2739 2393
2740 A tool call to run a command on the local shell.2394 A tool call to run a command on the local shell.
2741 2395
2793 2447
2794 - `"local_shell_call"`2448 - `"local_shell_call"`
2795 2449
27962450 - `LocalShellCallOutput = object { id, output, type, status }` - `LocalShellCallOutput object { id, output, type, status }`
2797 2451
2798 The output of a local shell tool call.2452 The output of a local shell tool call.
2799 2453
2821 2475
2822 - `"incomplete"`2476 - `"incomplete"`
2823 2477
28242478 - `ShellCall = object { action, call_id, type, 3 more }` - `ShellCall object { action, call_id, type, 3 more }`
2825 2479
2826 A tool representing a request to execute one or more shell commands.2480 A tool representing a request to execute one or more shell commands.
2827 2481
2859 2513
2860 The environment to execute the shell commands in.2514 The environment to execute the shell commands in.
2861 2515
28622516 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
2863
2864 - `type: "local"`
2865
2866 Use a local computer environment.
2867
2868 - `"local"`
2869
2870 - `skills: optional array of LocalSkill`
2871
2872 An optional list of skills.
2873
2874 - `description: string`
2875
2876 The description of the skill.
2877
2878 - `name: string`
2879
2880 The name of the skill.
2881
2882 - `path: string`
2883
2884 The path to the directory containing the skill.
2885
2886 - `ContainerReference = object { container_id, type }`
2887
2888 - `container_id: string`
2889
2890 The ID of the referenced container.
2891
2892 - `type: "container_reference"`
2893
2894 References a container created with the /v1/containers endpoint
2895 2517
28962518 - `"container_reference"` - `ContainerReference object { container_id, type }`
2897 2519
2898 - `status: optional "in_progress" or "completed" or "incomplete"`2520 - `status: optional "in_progress" or "completed" or "incomplete"`
2899 2521
2905 2527
2906 - `"incomplete"`2528 - `"incomplete"`
2907 2529
29082530 - `ShellCallOutput = object { call_id, output, type, 3 more }` - `ShellCallOutput object { call_id, output, type, 3 more }`
2909 2531
2910 The streamed output items emitted by a shell tool call.2532 The streamed output items emitted by a shell tool call.
2911 2533
2921 2543
2922 The exit or timeout outcome associated with this shell call.2544 The exit or timeout outcome associated with this shell call.
2923 2545
29242546 - `Timeout = object { type }` - `Timeout object { type }`
2925 2547
2926 Indicates that the shell call exceeded its configured time limit.2548 Indicates that the shell call exceeded its configured time limit.
2927 2549
2931 2553
2932 - `"timeout"`2554 - `"timeout"`
2933 2555
29342556 - `Exit = object { exit_code, type }` - `Exit object { exit_code, type }`
2935 2557
2936 Indicates that the shell commands finished and returned an exit code.2558 Indicates that the shell commands finished and returned an exit code.
2937 2559
2977 2599
2978 - `"incomplete"`2600 - `"incomplete"`
2979 2601
29802602 - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - `ApplyPatchCall object { call_id, operation, status, 2 more }`
2981 2603
2982 A tool call representing a request to create, delete, or update files using diff patches.2604 A tool call representing a request to create, delete, or update files using diff patches.
2983 2605
2989 2611
2990 The specific create, delete, or update instruction for the apply_patch tool call.2612 The specific create, delete, or update instruction for the apply_patch tool call.
2991 2613
29922614 - `CreateFile = object { diff, path, type }` - `CreateFile object { diff, path, type }`
2993 2615
2994 Instruction for creating a new file via the apply_patch tool.2616 Instruction for creating a new file via the apply_patch tool.
2995 2617
3007 2629
3008 - `"create_file"`2630 - `"create_file"`
3009 2631
30102632 - `DeleteFile = object { path, type }` - `DeleteFile object { path, type }`
3011 2633
3012 Instruction for deleting an existing file via the apply_patch tool.2634 Instruction for deleting an existing file via the apply_patch tool.
3013 2635
3021 2643
3022 - `"delete_file"`2644 - `"delete_file"`
3023 2645
30242646 - `UpdateFile = object { diff, path, type }` - `UpdateFile object { diff, path, type }`
3025 2647
3026 Instruction for updating an existing file via the apply_patch tool.2648 Instruction for updating an existing file via the apply_patch tool.
3027 2649
3057 2679
3058 The unique ID of the apply patch tool call. Populated when this item is returned via API.2680 The unique ID of the apply patch tool call. Populated when this item is returned via API.
3059 2681
30602682 - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`
3061 2683
3062 The streamed output emitted by an apply patch tool call.2684 The streamed output emitted by an apply patch tool call.
3063 2685
3087 2709
3088 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).2710 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).
3089 2711
30902712 - `McpListTools = object { id, server_label, tools, 2 more }` - `McpListTools object { id, server_label, tools, 2 more }`
3091 2713
3092 A list of tools available on an MCP server.2714 A list of tools available on an MCP server.
3093 2715
3129 2751
3130 Error message if the server could not list tools.2752 Error message if the server could not list tools.
3131 2753
31322754 - `McpApprovalRequest = object { id, arguments, name, 2 more }` - `McpApprovalRequest object { id, arguments, name, 2 more }`
3133 2755
3134 A request for human approval of a tool invocation.2756 A request for human approval of a tool invocation.
3135 2757
3155 2777
3156 - `"mcp_approval_request"`2778 - `"mcp_approval_request"`
3157 2779
31582780 - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`
3159 2781
3160 A response to an MCP approval request.2782 A response to an MCP approval request.
3161 2783
3181 2803
3182 Optional reason for the decision.2804 Optional reason for the decision.
3183 2805
31842806 - `McpCall = object { id, arguments, name, 6 more }` - `McpCall object { id, arguments, name, 6 more }`
3185 2807
3186 An invocation of a tool on an MCP server.2808 An invocation of a tool on an MCP server.
3187 2809
3234 2856
3235 - `"failed"`2857 - `"failed"`
3236 2858
32372859 - `CustomToolCallOutput = object { call_id, output, type, id }` - `CustomToolCallOutput object { call_id, output, type, id }`
3238 2860
3239 The output of a custom tool call from your code, being sent back to the model.2861 The output of a custom tool call from your code, being sent back to the model.
3240 2862
3255 2877
3256 Text, image, or file output of the custom tool call.2878 Text, image, or file output of the custom tool call.
3257 2879
32582880 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
3259 2881
3260 A text input to the model.2882 A text input to the model.
3261 2883
32622884 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
3263
3264 The text input to the model.
3265
3266 - `type: "input_text"`
3267
3268 The type of the input item. Always `input_text`.
3269
3270 - `"input_text"`
3271
3272 - `ResponseInputImage = object { detail, type, file_id, image_url }`
3273 2885
3274 An image input to the model. Learn about [image inputs](/docs/guides/vision).2886 An image input to the model. Learn about [image inputs](/docs/guides/vision).
3275 2887
32762888 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
3277
3278 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
3279
3280 - `"low"`
3281
3282 - `"high"`
3283
3284 - `"auto"`
3285
3286 - `"original"`
3287
3288 - `type: "input_image"`
3289
3290 The type of the input item. Always `input_image`.
3291
3292 - `"input_image"`
3293
3294 - `file_id: optional string`
3295
3296 The ID of the file to be sent to the model.
3297
3298 - `image_url: optional string`
3299
3300 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
3301
3302 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
3303 2889
3304 A file input to the model.2890 A file input to the model.
3305 2891
3306 - `type: "input_file"`
3307
3308 The type of the input item. Always `input_file`.
3309
3310 - `"input_file"`
3311
3312 - `detail: optional "low" or "high"`
3313
3314 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`.
3315
3316 - `"low"`
3317
3318 - `"high"`
3319
3320 - `file_data: optional string`
3321
3322 The content of the file to be sent to the model.
3323
3324 - `file_id: optional string`
3325
3326 The ID of the file to be sent to the model.
3327
3328 - `file_url: optional string`
3329
3330 The URL of the file to be sent to the model.
3331
3332 - `filename: optional string`
3333
3334 The name of the file to be sent to the model.
3335
3336 - `type: "custom_tool_call_output"`2892 - `type: "custom_tool_call_output"`
3337 2893
3338 The type of the custom tool call output. Always `custom_tool_call_output`.2894 The type of the custom tool call output. Always `custom_tool_call_output`.
3343 2899
3344 The unique ID of the custom tool call output in the OpenAI platform.2900 The unique ID of the custom tool call output in the OpenAI platform.
3345 2901
33462902 - `CustomToolCall = object { call_id, input, name, 3 more }` - `CustomToolCall object { call_id, input, name, 3 more }`
3347 2903
3348 A call to a custom tool created by the model.2904 A call to a custom tool created by the model.
3349 2905
3373 2929
3374 The namespace of the custom tool being called.2930 The namespace of the custom tool being called.
3375 2931
33762932 - `ItemReference = object { id, type }` - `ItemReference object { id, type }`
3377 2933
3378 An internal identifier for an item to reference.2934 An internal identifier for an item to reference.
3379 2935
3610 the model, you might consider using the `output_text` property where3166 the model, you might consider using the `output_text` property where
3611 supported in SDKs.3167 supported in SDKs.
3612 3168
36133169 - `ResponseOutputMessage = object { id, content, role, 3 more }` - `ResponseOutputMessage object { id, content, role, 3 more }`
3614 3170
3615 An output message from the model.3171 An output message from the model.
3616 3172
36173173 - `id: string` - `FileSearchCall object { id, queries, status, 2 more }`
3618 3174
36193175 The unique ID of the output message. The results of a file search tool call. See the
3176 [file search guide](/docs/guides/tools-file-search) for more information.
3620 3177
36213178 - `content: array of ResponseOutputText or ResponseOutputRefusal` - `id: string`
3622 3179
36233180 The content of the output message. The unique ID of the file search tool call.
3624 3181
36253182 - `ResponseOutputText = object { annotations, logprobs, text, type }` - `queries: array of string`
3626 3183
36273184 A text output from the model. The queries used to search for files.
3628 3185
36293186 - `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 }` - `status: "in_progress" or "searching" or "completed" or 2 more`
3630 3187
36313188 The annotations of the text output. The status of the file search tool call. One of `in_progress`,
3189 `searching`, `incomplete` or `failed`,
3632 3190
36333191 - `FileCitation = object { file_id, filename, index, type }` - `"in_progress"`
3634 3192
36353193 A citation to a file. - `"searching"`
3636 3194
36373195 - `file_id: string` - `"completed"`
3638 3196
36393197 The ID of the file. - `"incomplete"`
3640 3198
36413199 - `filename: string` - `"failed"`
3642 3200
36433201 The filename of the file cited. - `type: "file_search_call"`
3644 3202
36453203 - `index: number` The type of the file search tool call. Always `file_search_call`.
3646 3204
36473205 The index of the file in the list of files. - `"file_search_call"`
3648 3206
36493207 - `type: "file_citation"` - `results: optional array of object { attributes, file_id, filename, 2 more }`
3650 3208
36513209 The type of the file citation. Always `file_citation`. The results of the file search tool call.
3652 3210
36533211 - `"file_citation"` - `attributes: optional map[string or number or boolean]`
3654 3212
36553213 - `URLCitation = object { end_index, start_index, title, 2 more }` Set of 16 key-value pairs that can be attached to an object. This can be
3214 useful for storing additional information about the object in a structured
3215 format, and querying for objects via API or the dashboard. Keys are strings
3216 with a maximum length of 64 characters. Values are strings with a maximum
3217 length of 512 characters, booleans, or numbers.
3656 3218
36573219 A citation for a web resource used to generate a model response. - `string`
3658 3220
36593221 - `end_index: number` - `number`
3660 3222
36613223 The index of the last character of the URL citation in the message. - `boolean`
3662 3224
36633225 - `start_index: number` - `file_id: optional string`
3664 3226
36653227 The index of the first character of the URL citation in the message. The unique ID of the file.
3666 3228
36673229 - `title: string` - `filename: optional string`
3668
3669 The title of the web resource.
3670
3671 - `type: "url_citation"`
3672
3673 The type of the URL citation. Always `url_citation`.
3674
3675 - `"url_citation"`
3676
3677 - `url: string`
3678
3679 The URL of the web resource.
3680
3681 - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }`
3682
3683 A citation for a container file used to generate a model response.
3684
3685 - `container_id: string`
3686
3687 The ID of the container file.
3688
3689 - `end_index: number`
3690
3691 The index of the last character of the container file citation in the message.
3692
3693 - `file_id: string`
3694
3695 The ID of the file.
3696
3697 - `filename: string`
3698
3699 The filename of the container file cited.
3700
3701 - `start_index: number`
3702
3703 The index of the first character of the container file citation in the message.
3704
3705 - `type: "container_file_citation"`
3706
3707 The type of the container file citation. Always `container_file_citation`.
3708
3709 - `"container_file_citation"`
3710
3711 - `FilePath = object { file_id, index, type }`
3712
3713 A path to a file.
3714
3715 - `file_id: string`
3716
3717 The ID of the file.
3718
3719 - `index: number`
3720
3721 The index of the file in the list of files.
3722
3723 - `type: "file_path"`
3724
3725 The type of the file path. Always `file_path`.
3726
3727 - `"file_path"`
3728
3729 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`
3730
3731 - `token: string`
3732
3733 - `bytes: array of number`
3734
3735 - `logprob: number`
3736
3737 - `top_logprobs: array of object { token, bytes, logprob }`
3738
3739 - `token: string`
3740
3741 - `bytes: array of number`
3742
3743 - `logprob: number`
3744
3745 - `text: string`
3746
3747 The text output from the model.
3748
3749 - `type: "output_text"`
3750
3751 The type of the output text. Always `output_text`.
3752
3753 - `"output_text"`
3754
3755 - `ResponseOutputRefusal = object { refusal, type }`
3756
3757 A refusal from the model.
3758
3759 - `refusal: string`
3760
3761 The refusal explanation from the model.
3762
3763 - `type: "refusal"`
3764
3765 The type of the refusal. Always `refusal`.
3766
3767 - `"refusal"`
3768
3769 - `role: "assistant"`
3770
3771 The role of the output message. Always `assistant`.
3772
3773 - `"assistant"`
3774
3775 - `status: "in_progress" or "completed" or "incomplete"`
3776
3777 The status of the message input. One of `in_progress`, `completed`, or
3778 `incomplete`. Populated when input items are returned via API.
3779
3780 - `"in_progress"`
3781
3782 - `"completed"`
3783
3784 - `"incomplete"`
3785
3786 - `type: "message"`
3787
3788 The type of the output message. Always `message`.
3789
3790 - `"message"`
3791
3792 - `phase: optional "commentary" or "final_answer"`
3793
3794 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).
3795 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend
3796 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.
3797
3798 - `"commentary"`
3799
3800 - `"final_answer"`
3801
3802 - `FileSearchCall = object { id, queries, status, 2 more }`
3803
3804 The results of a file search tool call. See the
3805 [file search guide](/docs/guides/tools-file-search) for more information.
3806
3807 - `id: string`
3808
3809 The unique ID of the file search tool call.
3810
3811 - `queries: array of string`
3812
3813 The queries used to search for files.
3814
3815 - `status: "in_progress" or "searching" or "completed" or 2 more`
3816
3817 The status of the file search tool call. One of `in_progress`,
3818 `searching`, `incomplete` or `failed`,
3819
3820 - `"in_progress"`
3821
3822 - `"searching"`
3823
3824 - `"completed"`
3825
3826 - `"incomplete"`
3827
3828 - `"failed"`
3829
3830 - `type: "file_search_call"`
3831
3832 The type of the file search tool call. Always `file_search_call`.
3833
3834 - `"file_search_call"`
3835
3836 - `results: optional array of object { attributes, file_id, filename, 2 more }`
3837
3838 The results of the file search tool call.
3839
3840 - `attributes: optional map[string or number or boolean]`
3841
3842 Set of 16 key-value pairs that can be attached to an object. This can be
3843 useful for storing additional information about the object in a structured
3844 format, and querying for objects via API or the dashboard. Keys are strings
3845 with a maximum length of 64 characters. Values are strings with a maximum
3846 length of 512 characters, booleans, or numbers.
3847
3848 - `string`
3849
3850 - `number`
3851
3852 - `boolean`
3853
3854 - `file_id: optional string`
3855
3856 The unique ID of the file.
3857
3858 - `filename: optional string`
3859 3230
3860 The name of the file.3231 The name of the file.
3861 3232
3867 3238
3868 The text that was retrieved from the file.3239 The text that was retrieved from the file.
3869 3240
38703241 - `FunctionCall = object { arguments, call_id, name, 4 more }` - `FunctionCall object { arguments, call_id, name, 4 more }`
3871 3242
3872 A tool call to run a function. See the3243 A tool call to run a function. See the
3873 [function calling guide](/docs/guides/function-calling) for more information.3244 [function calling guide](/docs/guides/function-calling) for more information.
3909 3280
3910 - `"incomplete"`3281 - `"incomplete"`
3911 3282
39123283 - `FunctionCallOutput = object { id, call_id, output, 3 more }` - `FunctionCallOutput object { id, call_id, output, 3 more }`
3913 3284
3914 - `id: string`3285 - `id: string`
3915 3286
3932 3303
3933 Text, image, or file output of the function call.3304 Text, image, or file output of the function call.
3934 3305
39353306 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
3936 3307
3937 A text input to the model.3308 A text input to the model.
3938 3309
39393310 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
3940
3941 The text input to the model.
3942
3943 - `type: "input_text"`
3944
3945 The type of the input item. Always `input_text`.
3946
3947 - `"input_text"`
3948
3949 - `ResponseInputImage = object { detail, type, file_id, image_url }`
3950 3311
3951 An image input to the model. Learn about [image inputs](/docs/guides/vision).3312 An image input to the model. Learn about [image inputs](/docs/guides/vision).
3952 3313
39533314 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
3954
3955 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
3956
3957 - `"low"`
3958
3959 - `"high"`
3960
3961 - `"auto"`
3962
3963 - `"original"`
3964
3965 - `type: "input_image"`
3966
3967 The type of the input item. Always `input_image`.
3968
3969 - `"input_image"`
3970
3971 - `file_id: optional string`
3972
3973 The ID of the file to be sent to the model.
3974
3975 - `image_url: optional string`
3976
3977 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
3978
3979 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
3980 3315
3981 A file input to the model.3316 A file input to the model.
3982 3317
3983 - `type: "input_file"`
3984
3985 The type of the input item. Always `input_file`.
3986
3987 - `"input_file"`
3988
3989 - `detail: optional "low" or "high"`
3990
3991 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`.
3992
3993 - `"low"`
3994
3995 - `"high"`
3996
3997 - `file_data: optional string`
3998
3999 The content of the file to be sent to the model.
4000
4001 - `file_id: optional string`
4002
4003 The ID of the file to be sent to the model.
4004
4005 - `file_url: optional string`
4006
4007 The URL of the file to be sent to the model.
4008
4009 - `filename: optional string`
4010
4011 The name of the file to be sent to the model.
4012
4013 - `status: "in_progress" or "completed" or "incomplete"`3318 - `status: "in_progress" or "completed" or "incomplete"`
4014 3319
4015 The status of the item. One of `in_progress`, `completed`, or3320 The status of the item. One of `in_progress`, `completed`, or
4031 3336
4032 The identifier of the actor that created the item.3337 The identifier of the actor that created the item.
4033 3338
40343339 - `WebSearchCall = object { id, action, status, type }` - `WebSearchCall object { id, action, status, type }`
4035 3340
4036 The results of a web search tool call. See the3341 The results of a web search tool call. See the
4037 [web search guide](/docs/guides/tools-web-search) for more information.3342 [web search guide](/docs/guides/tools-web-search) for more information.
4045 An object describing the specific action taken in this web search call.3350 An object describing the specific action taken in this web search call.
4046 Includes details on how the model used the web (search, open_page, find_in_page).3351 Includes details on how the model used the web (search, open_page, find_in_page).
4047 3352
40483353 - `Search = object { query, type, queries, sources }` - `Search object { query, type, queries, sources }`
4049 3354
4050 Action type "search" - Performs a web search query.3355 Action type "search" - Performs a web search query.
4051 3356
4077 3382
4078 The URL of the source.3383 The URL of the source.
4079 3384
40803385 - `OpenPage = object { type, url }` - `OpenPage object { type, url }`
4081 3386
4082 Action type "open_page" - Opens a specific URL from search results.3387 Action type "open_page" - Opens a specific URL from search results.
4083 3388
4091 3396
4092 The URL opened by the model.3397 The URL opened by the model.
4093 3398
40943399 - `FindInPage = object { pattern, type, url }` - `FindInPage object { pattern, type, url }`
4095 3400
4096 Action type "find_in_page": Searches for a pattern within a loaded page.3401 Action type "find_in_page": Searches for a pattern within a loaded page.
4097 3402
4127 3432
4128 - `"web_search_call"`3433 - `"web_search_call"`
4129 3434
41303435 - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`
4131 3436
4132 A tool call to a computer use tool. See the3437 A tool call to a computer use tool. See the
4133 [computer use guide](/docs/guides/tools-computer-use) for more information.3438 [computer use guide](/docs/guides/tools-computer-use) for more information.
4177 3482
4178 A click action.3483 A click action.
4179 3484
41803485 - `Click = object { button, type, x, 2 more }` - `actions: optional ComputerActionList`
4181 3486
41823487 A click action. Flattened batched actions for `computer_use`. Each action includes an
3488 `type` discriminator and action-specific fields.
4183 3489
41843490 - `button: "left" or "right" or "wheel" or 2 more` - `ComputerCallOutput object { id, call_id, output, 4 more }`
4185
4186 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
4187
4188 - `"left"`
4189
4190 - `"right"`
4191
4192 - `"wheel"`
4193
4194 - `"back"`
4195
4196 - `"forward"`
4197
4198 - `type: "click"`
4199
4200 Specifies the event type. For a click action, this property is always `click`.
4201
4202 - `"click"`
4203
4204 - `x: number`
4205
4206 The x-coordinate where the click occurred.
4207
4208 - `y: number`
4209
4210 The y-coordinate where the click occurred.
4211
4212 - `keys: optional array of string`
4213
4214 The keys being held while clicking.
4215
4216 - `DoubleClick = object { keys, type, x, y }`
4217
4218 A double click action.
4219
4220 - `keys: array of string`
4221
4222 The keys being held while double-clicking.
4223
4224 - `type: "double_click"`
4225
4226 Specifies the event type. For a double click action, this property is always set to `double_click`.
4227
4228 - `"double_click"`
4229
4230 - `x: number`
4231
4232 The x-coordinate where the double click occurred.
4233
4234 - `y: number`
4235
4236 The y-coordinate where the double click occurred.
4237
4238 - `Drag = object { path, type, keys }`
4239
4240 A drag action.
4241
4242 - `path: array of object { x, y }`
4243
4244 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
4245
4246 ```
4247 [
4248 { x: 100, y: 200 },
4249 { x: 200, y: 300 }
4250 ]
4251 ```
4252
4253 - `x: number`
4254
4255 The x-coordinate.
4256
4257 - `y: number`
4258
4259 The y-coordinate.
4260
4261 - `type: "drag"`
4262
4263 Specifies the event type. For a drag action, this property is always set to `drag`.
4264
4265 - `"drag"`
4266
4267 - `keys: optional array of string`
4268
4269 The keys being held while dragging the mouse.
4270
4271 - `Keypress = object { keys, type }`
4272
4273 A collection of keypresses the model would like to perform.
4274
4275 - `keys: array of string`
4276
4277 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
4278
4279 - `type: "keypress"`
4280
4281 Specifies the event type. For a keypress action, this property is always set to `keypress`.
4282
4283 - `"keypress"`
4284
4285 - `Move = object { type, x, y, keys }`
4286
4287 A mouse move action.
4288
4289 - `type: "move"`
4290
4291 Specifies the event type. For a move action, this property is always set to `move`.
4292
4293 - `"move"`
4294
4295 - `x: number`
4296
4297 The x-coordinate to move to.
4298
4299 - `y: number`
4300
4301 The y-coordinate to move to.
4302
4303 - `keys: optional array of string`
4304
4305 The keys being held while moving the mouse.
4306
4307 - `Screenshot = object { type }`
4308
4309 A screenshot action.
4310
4311 - `type: "screenshot"`
4312
4313 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
4314
4315 - `"screenshot"`
4316
4317 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
4318
4319 A scroll action.
4320
4321 - `scroll_x: number`
4322
4323 The horizontal scroll distance.
4324
4325 - `scroll_y: number`
4326
4327 The vertical scroll distance.
4328
4329 - `type: "scroll"`
4330
4331 Specifies the event type. For a scroll action, this property is always set to `scroll`.
4332
4333 - `"scroll"`
4334
4335 - `x: number`
4336
4337 The x-coordinate where the scroll occurred.
4338
4339 - `y: number`
4340
4341 The y-coordinate where the scroll occurred.
4342
4343 - `keys: optional array of string`
4344
4345 The keys being held while scrolling.
4346
4347 - `Type = object { text, type }`
4348
4349 An action to type in text.
4350
4351 - `text: string`
4352
4353 The text to type.
4354
4355 - `type: "type"`
4356
4357 Specifies the event type. For a type action, this property is always set to `type`.
4358
4359 - `"type"`
4360
4361 - `Wait = object { type }`
4362
4363 A wait action.
4364
4365 - `type: "wait"`
4366
4367 Specifies the event type. For a wait action, this property is always set to `wait`.
4368
4369 - `"wait"`
4370
4371 - `actions: optional ComputerActionList`
4372
4373 Flattened batched actions for `computer_use`. Each action includes an
4374 `type` discriminator and action-specific fields.
4375
4376 - `Click = object { button, type, x, 2 more }`
4377
4378 A click action.
4379
4380 - `button: "left" or "right" or "wheel" or 2 more`
4381
4382 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
4383
4384 - `"left"`
4385
4386 - `"right"`
4387
4388 - `"wheel"`
4389
4390 - `"back"`
4391
4392 - `"forward"`
4393
4394 - `type: "click"`
4395
4396 Specifies the event type. For a click action, this property is always `click`.
4397
4398 - `"click"`
4399
4400 - `x: number`
4401
4402 The x-coordinate where the click occurred.
4403
4404 - `y: number`
4405
4406 The y-coordinate where the click occurred.
4407
4408 - `keys: optional array of string`
4409
4410 The keys being held while clicking.
4411
4412 - `DoubleClick = object { keys, type, x, y }`
4413
4414 A double click action.
4415
4416 - `keys: array of string`
4417
4418 The keys being held while double-clicking.
4419
4420 - `type: "double_click"`
4421
4422 Specifies the event type. For a double click action, this property is always set to `double_click`.
4423
4424 - `"double_click"`
4425
4426 - `x: number`
4427
4428 The x-coordinate where the double click occurred.
4429
4430 - `y: number`
4431
4432 The y-coordinate where the double click occurred.
4433
4434 - `Drag = object { path, type, keys }`
4435
4436 A drag action.
4437
4438 - `path: array of object { x, y }`
4439
4440 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
4441
4442 ```
4443 [
4444 { x: 100, y: 200 },
4445 { x: 200, y: 300 }
4446 ]
4447 ```
4448
4449 - `x: number`
4450
4451 The x-coordinate.
4452
4453 - `y: number`
4454
4455 The y-coordinate.
4456
4457 - `type: "drag"`
4458
4459 Specifies the event type. For a drag action, this property is always set to `drag`.
4460
4461 - `"drag"`
4462
4463 - `keys: optional array of string`
4464
4465 The keys being held while dragging the mouse.
4466
4467 - `Keypress = object { keys, type }`
4468
4469 A collection of keypresses the model would like to perform.
4470
4471 - `keys: array of string`
4472
4473 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
4474
4475 - `type: "keypress"`
4476
4477 Specifies the event type. For a keypress action, this property is always set to `keypress`.
4478
4479 - `"keypress"`
4480
4481 - `Move = object { type, x, y, keys }`
4482
4483 A mouse move action.
4484
4485 - `type: "move"`
4486
4487 Specifies the event type. For a move action, this property is always set to `move`.
4488
4489 - `"move"`
4490
4491 - `x: number`
4492
4493 The x-coordinate to move to.
4494
4495 - `y: number`
4496
4497 The y-coordinate to move to.
4498
4499 - `keys: optional array of string`
4500
4501 The keys being held while moving the mouse.
4502
4503 - `Screenshot = object { type }`
4504
4505 A screenshot action.
4506
4507 - `type: "screenshot"`
4508
4509 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
4510
4511 - `"screenshot"`
4512
4513 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
4514
4515 A scroll action.
4516
4517 - `scroll_x: number`
4518
4519 The horizontal scroll distance.
4520
4521 - `scroll_y: number`
4522
4523 The vertical scroll distance.
4524
4525 - `type: "scroll"`
4526
4527 Specifies the event type. For a scroll action, this property is always set to `scroll`.
4528
4529 - `"scroll"`
4530
4531 - `x: number`
4532
4533 The x-coordinate where the scroll occurred.
4534
4535 - `y: number`
4536
4537 The y-coordinate where the scroll occurred.
4538
4539 - `keys: optional array of string`
4540
4541 The keys being held while scrolling.
4542
4543 - `Type = object { text, type }`
4544
4545 An action to type in text.
4546
4547 - `text: string`
4548
4549 The text to type.
4550
4551 - `type: "type"`
4552
4553 Specifies the event type. For a type action, this property is always set to `type`.
4554
4555 - `"type"`
4556
4557 - `Wait = object { type }`
4558
4559 A wait action.
4560
4561 - `type: "wait"`
4562
4563 Specifies the event type. For a wait action, this property is always set to `wait`.
4564
4565 - `"wait"`
4566
4567 - `ComputerCallOutput = object { id, call_id, output, 4 more }`
4568 3491
4569 - `id: string`3492 - `id: string`
4570 3493
4578 3501
4579 A computer screenshot image used with the computer use tool.3502 A computer screenshot image used with the computer use tool.
4580 3503
4581 - `type: "computer_screenshot"`
4582
4583 Specifies the event type. For a computer screenshot, this property is
4584 always set to `computer_screenshot`.
4585
4586 - `"computer_screenshot"`
4587
4588 - `file_id: optional string`
4589
4590 The identifier of an uploaded file that contains the screenshot.
4591
4592 - `image_url: optional string`
4593
4594 The URL of the screenshot image.
4595
4596 - `status: "completed" or "incomplete" or "failed" or "in_progress"`3504 - `status: "completed" or "incomplete" or "failed" or "in_progress"`
4597 3505
4598 The status of the message input. One of `in_progress`, `completed`, or3506 The status of the message input. One of `in_progress`, `completed`, or
4633 3541
4634 The identifier of the actor that created the item.3542 The identifier of the actor that created the item.
4635 3543
46363544 - `Reasoning = object { id, summary, type, 3 more }` - `Reasoning object { id, summary, type, 3 more }`
4637 3545
4638 A description of the chain of thought used by a reasoning model while generating3546 A description of the chain of thought used by a reasoning model while generating
4639 a response. Be sure to include these items in your `input` to the Responses API3547 a response. Be sure to include these items in your `input` to the Responses API
4656 3564
4657 The type of the object. Always `summary_text`.3565 The type of the object. Always `summary_text`.
4658 3566
4659 - `"summary_text"`
4660
4661 - `type: "reasoning"`3567 - `type: "reasoning"`
4662 3568
4663 The type of the object. Always `reasoning`.3569 The type of the object. Always `reasoning`.
4694 3600
4695 - `"incomplete"`3601 - `"incomplete"`
4696 3602
46973603 - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - `ToolSearchCall object { id, arguments, call_id, 4 more }`
4698 3604
4699 - `id: string`3605 - `id: string`
4700 3606
4736 3642
4737 The identifier of the actor that created the item.3643 The identifier of the actor that created the item.
4738 3644
47393645 - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - `ToolSearchOutput object { id, call_id, execution, 4 more }`
4740 3646
4741 - `id: string`3647 - `id: string`
4742 3648
4744 3650
4745 - `call_id: string`3651 - `call_id: string`
4746 3652
47473653 The unique ID of the tool search call generated by the model. The unique ID of the tool search call generated by the model.
4748
4749 - `execution: "server" or "client"`
4750
4751 Whether tool search was executed by the server or by the client.
4752
4753 - `"server"`
4754
4755 - `"client"`
4756
4757 - `status: "in_progress" or "completed" or "incomplete"`
4758
4759 The status of the tool search output item that was recorded.
4760
4761 - `"in_progress"`
4762
4763 - `"completed"`
4764
4765 - `"incomplete"`
4766
4767 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
4768
4769 The loaded tool definitions returned by tool search.
4770
4771 - `Function = object { name, parameters, strict, 3 more }`
4772
4773 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).
4774
4775 - `name: string`
4776
4777 The name of the function to call.
4778
4779 - `parameters: map[unknown]`
4780
4781 A JSON schema object describing the parameters of the function.
4782
4783 - `strict: boolean`
4784
4785 Whether to enforce strict parameter validation. Default `true`.
4786
4787 - `type: "function"`
4788
4789 The type of the function tool. Always `function`.
4790
4791 - `"function"`
4792
4793 - `defer_loading: optional boolean`
4794
4795 Whether this function is deferred and loaded via tool search.
4796
4797 - `description: optional string`
4798
4799 A description of the function. Used by the model to determine whether or not to call the function.
4800
4801 - `FileSearch = object { type, vector_store_ids, filters, 2 more }`
4802
4803 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).
4804
4805 - `type: "file_search"`
4806
4807 The type of the file search tool. Always `file_search`.
4808
4809 - `"file_search"`
4810
4811 - `vector_store_ids: array of string`
4812
4813 The IDs of the vector stores to search.
4814
4815 - `filters: optional ComparisonFilter or CompoundFilter`
4816
4817 A filter to apply.
4818
4819 - `ComparisonFilter = object { key, type, value }`
4820
4821 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
4822
4823 - `key: string`
4824
4825 The key to compare against the value.
4826
4827 - `type: "eq" or "ne" or "gt" or 5 more`
4828
4829 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
4830
4831 - `eq`: equals
4832 - `ne`: not equal
4833 - `gt`: greater than
4834 - `gte`: greater than or equal
4835 - `lt`: less than
4836 - `lte`: less than or equal
4837 - `in`: in
4838 - `nin`: not in
4839
4840 - `"eq"`
4841
4842 - `"ne"`
4843
4844 - `"gt"`
4845
4846 - `"gte"`
4847
4848 - `"lt"`
4849
4850 - `"lte"`
4851
4852 - `"in"`
4853
4854 - `"nin"`
4855
4856 - `value: string or number or boolean or array of string or number`
4857 3654
48583655 The value to compare against the attribute key; supports string, number, or boolean types. - `execution: "server" or "client"`
4859 3656
48603657 - `string` Whether tool search was executed by the server or by the client.
4861 3658
48623659 - `number` - `"server"`
4863 3660
48643661 - `boolean` - `"client"`
4865 3662
48663663 - `array of string or number` - `status: "in_progress" or "completed" or "incomplete"`
4867 3664
48683665 - `string` The status of the tool search output item that was recorded.
4869 3666
48703667 - `number` - `"in_progress"`
4871 3668
48723669 - `CompoundFilter = object { filters, type }` - `"completed"`
4873 3670
48743671 Combine multiple filters using `and` or `or`. - `"incomplete"`
4875 3672
48763673 - `filters: array of ComparisonFilter or unknown` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
4877 3674
48783675 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. The loaded tool definitions returned by tool search.
4879 3676
48803677 - `ComparisonFilter = object { key, type, value }` - `Function object { name, parameters, strict, 3 more }`
4881 3678
48823679 A filter used to compare a specified attribute key to a given value using a defined comparison operation. 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).
4883 3680
48843681 - `key: string` - `name: string`
4885 3682
48863683 The key to compare against the value. The name of the function to call.
4887 3684
48883685 - `type: "eq" or "ne" or "gt" or 5 more` - `parameters: map[unknown]`
4889 3686
48903687 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. A JSON schema object describing the parameters of the function.
4891 3688
48923689 - `eq`: equals - `strict: boolean`
4893 - `ne`: not equal
4894 - `gt`: greater than
4895 - `gte`: greater than or equal
4896 - `lt`: less than
4897 - `lte`: less than or equal
4898 - `in`: in
4899 - `nin`: not in
4900 3690
49013691 - `"eq"` Whether to enforce strict parameter validation. Default `true`.
4902 3692
49033693 - `"ne"` - `type: "function"`
4904 3694
49053695 - `"gt"` The type of the function tool. Always `function`.
4906 3696
49073697 - `"gte"` - `"function"`
4908 3698
49093699 - `"lt"` - `defer_loading: optional boolean`
4910 3700
49113701 - `"lte"` Whether this function is deferred and loaded via tool search.
4912 3702
49133703 - `"in"` - `description: optional string`
4914 3704
49153705 - `"nin"` A description of the function. Used by the model to determine whether or not to call the function.
4916 3706
49173707 - `value: string or number or boolean or array of string or number` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
4918 3708
49193709 The value to compare against the attribute key; supports string, number, or boolean types. 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).
4920 3710
49213711 - `string` - `type: "file_search"`
4922 3712
49233713 - `number` The type of the file search tool. Always `file_search`.
4924 3714
49253715 - `boolean` - `"file_search"`
4926 3716
49273717 - `array of string or number` - `vector_store_ids: array of string`
4928 3718
49293719 - `string` The IDs of the vector stores to search.
4930 3720
49313721 - `number` - `filters: optional ComparisonFilter or CompoundFilter`
4932 3722
49333723 - `unknown` A filter to apply.
4934 3724
49353725 - `type: "and" or "or"` - `ComparisonFilter object { key, type, value }`
4936 3726
49373727 Type of operation: `and` or `or`. A filter used to compare a specified attribute key to a given value using a defined comparison operation.
4938 3728
49393729 - `"and"` - `CompoundFilter object { filters, type }`
4940 3730
49413731 - `"or"` Combine multiple filters using `and` or `or`.
4942 3732
4943 - `max_num_results: optional number`3733 - `max_num_results: optional number`
4944 3734
4972 3762
4973 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.3763 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.
4974 3764
49753765 - `Computer = object { type }` - `Computer object { type }`
4976 3766
4977 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).3767 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
4978 3768
4982 3772
4983 - `"computer"`3773 - `"computer"`
4984 3774
49853775 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
4986 3776
4987 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).3777 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
4988 3778
5014 3804
5015 - `"computer_use_preview"`3805 - `"computer_use_preview"`
5016 3806
50173807 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
5018 3808
5019 Search the Internet for sources related to the prompt. Learn more about the3809 Search the Internet for sources related to the prompt. Learn more about the
5020 [web search tool](/docs/guides/tools-web-search).3810 [web search tool](/docs/guides/tools-web-search).
5074 3864
5075 - `"approximate"`3865 - `"approximate"`
5076 3866
50773867 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
5078 3868
5079 Give the model access to additional tools via remote Model Context Protocol3869 Give the model access to additional tools via remote Model Context Protocol
5080 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).3870 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
5097 3887
5098 A string array of allowed tool names3888 A string array of allowed tool names
5099 3889
51003890 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
5101 3891
5102 A filter object to specify which tools are allowed.3892 A filter object to specify which tools are allowed.
5103 3893
5163 3953
5164 Specify which of the MCP server's tools require approval.3954 Specify which of the MCP server's tools require approval.
5165 3955
51663956 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
5167 3957
5168 Specify which of the MCP server's tools require approval. Can be3958 Specify which of the MCP server's tools require approval. Can be
5169 `always`, `never`, or a filter object associated with tools3959 `always`, `never`, or a filter object associated with tools
5216 The URL for the MCP server. One of `server_url` or `connector_id` must be4006 The URL for the MCP server. One of `server_url` or `connector_id` must be
5217 provided.4007 provided.
5218 4008
52194009 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
5220 4010
5221 A tool that runs Python code to help generate a response to a prompt.4011 A tool that runs Python code to help generate a response to a prompt.
5222 4012
5230 4020
5231 The container ID.4021 The container ID.
5232 4022
52334023 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
5234 4024
5235 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.4025 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
5236 4026
5260 4050
5261 Network access policy for the container.4051 Network access policy for the container.
5262 4052
52634053 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
5264
5265 - `type: "disabled"`
5266
5267 Disable outbound network access. Always `disabled`.
5268
5269 - `"disabled"`
5270
5271 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
5272
5273 - `allowed_domains: array of string`
5274
5275 A list of allowed domains when type is `allowlist`.
5276
5277 - `type: "allowlist"`
5278
5279 Allow outbound network access only to specified domains. Always `allowlist`.
5280
5281 - `"allowlist"`
5282
5283 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
5284
5285 Optional domain-scoped secrets for allowlisted domains.
5286
5287 - `domain: string`
5288
5289 The domain associated with the secret.
5290
5291 - `name: string`
5292
5293 The name of the secret to inject for the domain.
5294
5295 - `value: string`
5296 4054
52974055 The secret value to inject for the domain. - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
5298 4056
5299 - `type: "code_interpreter"`4057 - `type: "code_interpreter"`
5300 4058
5302 4060
5303 - `"code_interpreter"`4061 - `"code_interpreter"`
5304 4062
53054063 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
5306 4064
5307 A tool that generates images using the GPT image models.4065 A tool that generates images using the GPT image models.
5308 4066
5423 4181
5424 - `"auto"`4182 - `"auto"`
5425 4183
54264184 - `LocalShell = object { type }` - `LocalShell object { type }`
5427 4185
5428 A tool that allows the model to execute shell commands in a local environment.4186 A tool that allows the model to execute shell commands in a local environment.
5429 4187
5433 4191
5434 - `"local_shell"`4192 - `"local_shell"`
5435 4193
54364194 - `Shell = object { type, environment }` - `Shell object { type, environment }`
5437
5438 A tool that allows the model to execute shell commands.
5439
5440 - `type: "shell"`
5441
5442 The type of the shell tool. Always `shell`.
5443
5444 - `"shell"`
5445
5446 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
5447
5448 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }`
5449
5450 - `type: "container_auto"`
5451
5452 Automatically creates a container for this request
5453
5454 - `"container_auto"`
5455
5456 - `file_ids: optional array of string`
5457
5458 An optional list of uploaded files to make available to your code.
5459
5460 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`
5461
5462 The memory limit for the container.
5463
5464 - `"1g"`
5465
5466 - `"4g"`
5467
5468 - `"16g"`
5469
5470 - `"64g"`
5471
5472 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`
5473
5474 Network access policy for the container.
5475
5476 - `ContainerNetworkPolicyDisabled = object { type }`
5477
5478 - `type: "disabled"`
5479
5480 Disable outbound network access. Always `disabled`.
5481
5482 - `"disabled"`
5483
5484 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
5485
5486 - `allowed_domains: array of string`
5487
5488 A list of allowed domains when type is `allowlist`.
5489
5490 - `type: "allowlist"`
5491
5492 Allow outbound network access only to specified domains. Always `allowlist`.
5493
5494 - `"allowlist"`
5495
5496 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
5497
5498 Optional domain-scoped secrets for allowlisted domains.
5499
5500 - `domain: string`
5501
5502 The domain associated with the secret.
5503
5504 - `name: string`
5505
5506 The name of the secret to inject for the domain.
5507
5508 - `value: string`
5509
5510 The secret value to inject for the domain.
5511
5512 - `skills: optional array of SkillReference or InlineSkill`
5513
5514 An optional list of skills referenced by id or inline data.
5515
5516 - `SkillReference = object { skill_id, type, version }`
5517
5518 - `skill_id: string`
5519
5520 The ID of the referenced skill.
5521
5522 - `type: "skill_reference"`
5523
5524 References a skill created with the /v1/skills endpoint.
5525
5526 - `"skill_reference"`
5527
5528 - `version: optional string`
5529
5530 Optional skill version. Use a positive integer or 'latest'. Omit for default.
5531
5532 - `InlineSkill = object { description, name, source, type }`
5533
5534 - `description: string`
5535
5536 The description of the skill.
5537
5538 - `name: string`
5539
5540 The name of the skill.
5541
5542 - `source: InlineSkillSource`
5543
5544 Inline skill payload
5545
5546 - `data: string`
5547
5548 Base64-encoded skill zip bundle.
5549
5550 - `media_type: "application/zip"`
5551
5552 The media type of the inline skill payload. Must be `application/zip`.
5553
5554 - `"application/zip"`
5555
5556 - `type: "base64"`
5557
5558 The type of the inline skill source. Must be `base64`.
5559
5560 - `"base64"`
5561
5562 - `type: "inline"`
5563
5564 Defines an inline skill for this request.
5565
5566 - `"inline"`
5567
5568 - `LocalEnvironment = object { type, skills }`
5569
5570 - `type: "local"`
5571
5572 Use a local computer environment.
5573
5574 - `"local"`
5575
5576 - `skills: optional array of LocalSkill`
5577
5578 An optional list of skills.
5579
5580 - `description: string`
5581
5582 The description of the skill.
5583
5584 - `name: string`
5585
5586 The name of the skill.
5587 4195
55884196 - `path: string` A tool that allows the model to execute shell commands.
5589 4197
55904198 The path to the directory containing the skill. - `type: "shell"`
5591 4199
55924200 - `ContainerReference = object { container_id, type }` The type of the shell tool. Always `shell`.
5593 4201
55944202 - `container_id: string` - `"shell"`
5595 4203
55964204 The ID of the referenced container. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
5597 4205
55984206 - `type: "container_reference"` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
5599 4207
56004208 References a container created with the /v1/containers endpoint - `LocalEnvironment object { type, skills }`
5601 4209
56024210 - `"container_reference"` - `ContainerReference object { container_id, type }`
5603 4211
56044212 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
5605 4213
5606 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)4214 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
5607 4215
5627 4235
5628 The input format for the custom tool. Default is unconstrained text.4236 The input format for the custom tool. Default is unconstrained text.
5629 4237
56304238 - `Text = object { type }` - `Namespace object { description, name, tools, type }`
5631
5632 Unconstrained free-form text.
5633
5634 - `type: "text"`
5635
5636 Unconstrained text format. Always `text`.
5637
5638 - `"text"`
5639
5640 - `Grammar = object { definition, syntax, type }`
5641
5642 A grammar defined by the user.
5643
5644 - `definition: string`
5645
5646 The grammar definition.
5647
5648 - `syntax: "lark" or "regex"`
5649
5650 The syntax of the grammar definition. One of `lark` or `regex`.
5651
5652 - `"lark"`
5653
5654 - `"regex"`
5655
5656 - `type: "grammar"`
5657
5658 Grammar format. Always `grammar`.
5659
5660 - `"grammar"`
5661
5662 - `Namespace = object { description, name, tools, type }`
5663 4239
5664 Groups function/custom tools under a shared namespace.4240 Groups function/custom tools under a shared namespace.
5665 4241
5675 4251
5676 The function/custom tools available inside this namespace.4252 The function/custom tools available inside this namespace.
5677 4253
56784254 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
5679 4255
5680 - `name: string`4256 - `name: string`
5681 4257
5693 4269
5694 - `strict: optional boolean`4270 - `strict: optional boolean`
5695 4271
56964272 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
5697 4273
5698 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)4274 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
5699 4275
5719 4295
5720 The input format for the custom tool. Default is unconstrained text.4296 The input format for the custom tool. Default is unconstrained text.
5721 4297
5722 - `Text = object { type }`
5723
5724 Unconstrained free-form text.
5725
5726 - `type: "text"`
5727
5728 Unconstrained text format. Always `text`.
5729
5730 - `"text"`
5731
5732 - `Grammar = object { definition, syntax, type }`
5733
5734 A grammar defined by the user.
5735
5736 - `definition: string`
5737
5738 The grammar definition.
5739
5740 - `syntax: "lark" or "regex"`
5741
5742 The syntax of the grammar definition. One of `lark` or `regex`.
5743
5744 - `"lark"`
5745
5746 - `"regex"`
5747
5748 - `type: "grammar"`
5749
5750 Grammar format. Always `grammar`.
5751
5752 - `"grammar"`
5753
5754 - `type: "namespace"`4298 - `type: "namespace"`
5755 4299
5756 The type of the tool. Always `namespace`.4300 The type of the tool. Always `namespace`.
5757 4301
5758 - `"namespace"`4302 - `"namespace"`
5759 4303
57604304 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
5761 4305
5762 Hosted or BYOT tool search configuration for deferred tools.4306 Hosted or BYOT tool search configuration for deferred tools.
5763 4307
5783 4327
5784 Parameter schema for a client-executed tool search tool.4328 Parameter schema for a client-executed tool search tool.
5785 4329
57864330 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
5787 4331
5788 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).4332 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).
5789 4333
5837 4381
5838 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.4382 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
5839 4383
58404384 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
5841 4385
5842 Allows the assistant to create, delete, or update files using unified diffs.4386 Allows the assistant to create, delete, or update files using unified diffs.
5843 4387
5857 4401
5858 The identifier of the actor that created the item.4402 The identifier of the actor that created the item.
5859 4403
58604404 - `Compaction = object { id, encrypted_content, type, created_by }` - `Compaction object { id, encrypted_content, type, created_by }`
5861 4405
5862 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).4406 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
5863 4407
5879 4423
5880 The identifier of the actor that created the item.4424 The identifier of the actor that created the item.
5881 4425
58824426 - `ImageGenerationCall = object { id, result, status, type }` - `ImageGenerationCall object { id, result, status, type }`
5883 4427
5884 An image generation request made by the model.4428 An image generation request made by the model.
5885 4429
5909 4453
5910 - `"image_generation_call"`4454 - `"image_generation_call"`
5911 4455
59124456 - `CodeInterpreterCall = object { id, code, container_id, 3 more }` - `CodeInterpreterCall object { id, code, container_id, 3 more }`
5913 4457
5914 A tool call to run code.4458 A tool call to run code.
5915 4459
5930 The outputs generated by the code interpreter, such as logs or images.4474 The outputs generated by the code interpreter, such as logs or images.
5931 Can be null if no outputs are available.4475 Can be null if no outputs are available.
5932 4476
59334477 - `Logs = object { logs, type }` - `Logs object { logs, type }`
5934 4478
5935 The logs output from the code interpreter.4479 The logs output from the code interpreter.
5936 4480
5944 4488
5945 - `"logs"`4489 - `"logs"`
5946 4490
59474491 - `Image = object { type, url }` - `Image object { type, url }`
5948 4492
5949 The image output from the code interpreter.4493 The image output from the code interpreter.
5950 4494
5978 4522
5979 - `"code_interpreter_call"`4523 - `"code_interpreter_call"`
5980 4524
59814525 - `LocalShellCall = object { id, action, call_id, 2 more }` - `LocalShellCall object { id, action, call_id, 2 more }`
5982 4526
5983 A tool call to run a command on the local shell.4527 A tool call to run a command on the local shell.
5984 4528
6036 4580
6037 - `"local_shell_call"`4581 - `"local_shell_call"`
6038 4582
60394583 - `LocalShellCallOutput = object { id, output, type, status }` - `LocalShellCallOutput object { id, output, type, status }`
6040 4584
6041 The output of a local shell tool call.4585 The output of a local shell tool call.
6042 4586
6064 4608
6065 - `"incomplete"`4609 - `"incomplete"`
6066 4610
60674611 - `ShellCall = object { id, action, call_id, 4 more }` - `ShellCall object { id, action, call_id, 4 more }`
6068 4612
6069 A tool call that executes one or more shell commands in a managed environment.4613 A tool call that executes one or more shell commands in a managed environment.
6070 4614
6094 4638
6095 Represents the use of a local environment to perform shell actions.4639 Represents the use of a local environment to perform shell actions.
6096 4640
60974641 - `ResponseLocalEnvironment = object { type }` - `ResponseLocalEnvironment object { type }`
6098 4642
6099 Represents the use of a local environment to perform shell actions.4643 Represents the use of a local environment to perform shell actions.
6100 4644
6104 4648
6105 - `"local"`4649 - `"local"`
6106 4650
61074651 - `ResponseContainerReference = object { container_id, type }` - `ResponseContainerReference object { container_id, type }`
6108 4652
6109 Represents a container created with /v1/containers.4653 Represents a container created with /v1/containers.
6110 4654
6136 4680
6137 The ID of the entity that created this tool call.4681 The ID of the entity that created this tool call.
6138 4682
61394683 - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - `ShellCallOutput object { id, call_id, max_output_length, 4 more }`
6140 4684
6141 The output of a shell tool call that was emitted.4685 The output of a shell tool call that was emitted.
6142 4686
6160 4704
6161 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.4705 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.
6162 4706
61634707 - `Timeout = object { type }` - `Timeout object { type }`
6164 4708
6165 Indicates that the shell call exceeded its configured time limit.4709 Indicates that the shell call exceeded its configured time limit.
6166 4710
6170 4714
6171 - `"timeout"`4715 - `"timeout"`
6172 4716
61734717 - `Exit = object { exit_code, type }` - `Exit object { exit_code, type }`
6174 4718
6175 Indicates that the shell commands finished and returned an exit code.4719 Indicates that the shell commands finished and returned an exit code.
6176 4720
6216 4760
6217 The identifier of the actor that created the item.4761 The identifier of the actor that created the item.
6218 4762
62194763 - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - `ApplyPatchCall object { id, call_id, operation, 3 more }`
6220 4764
6221 A tool call that applies file diffs by creating, deleting, or updating files.4765 A tool call that applies file diffs by creating, deleting, or updating files.
6222 4766
6232 4776
6233 One of the create_file, delete_file, or update_file operations applied via apply_patch.4777 One of the create_file, delete_file, or update_file operations applied via apply_patch.
6234 4778
62354779 - `CreateFile = object { diff, path, type }` - `CreateFile object { diff, path, type }`
6236 4780
6237 Instruction describing how to create a file via the apply_patch tool.4781 Instruction describing how to create a file via the apply_patch tool.
6238 4782
6250 4794
6251 - `"create_file"`4795 - `"create_file"`
6252 4796
62534797 - `DeleteFile = object { path, type }` - `DeleteFile object { path, type }`
6254 4798
6255 Instruction describing how to delete a file via the apply_patch tool.4799 Instruction describing how to delete a file via the apply_patch tool.
6256 4800
6264 4808
6265 - `"delete_file"`4809 - `"delete_file"`
6266 4810
62674811 - `UpdateFile = object { diff, path, type }` - `UpdateFile object { diff, path, type }`
6268 4812
6269 Instruction describing how to update a file via the apply_patch tool.4813 Instruction describing how to update a file via the apply_patch tool.
6270 4814
6300 4844
6301 The ID of the entity that created this tool call.4845 The ID of the entity that created this tool call.
6302 4846
63034847 - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - `ApplyPatchCallOutput object { id, call_id, status, 3 more }`
6304 4848
6305 The output emitted by an apply patch tool call.4849 The output emitted by an apply patch tool call.
6306 4850
6334 4878
6335 Optional textual output returned by the apply patch tool.4879 Optional textual output returned by the apply patch tool.
6336 4880
63374881 - `McpCall = object { id, arguments, name, 6 more }` - `McpCall object { id, arguments, name, 6 more }`
6338 4882
6339 An invocation of a tool on an MCP server.4883 An invocation of a tool on an MCP server.
6340 4884
6387 4931
6388 - `"failed"`4932 - `"failed"`
6389 4933
63904934 - `McpListTools = object { id, server_label, tools, 2 more }` - `McpListTools object { id, server_label, tools, 2 more }`
6391 4935
6392 A list of tools available on an MCP server.4936 A list of tools available on an MCP server.
6393 4937
6429 4973
6430 Error message if the server could not list tools.4974 Error message if the server could not list tools.
6431 4975
64324976 - `McpApprovalRequest = object { id, arguments, name, 2 more }` - `McpApprovalRequest object { id, arguments, name, 2 more }`
6433 4977
6434 A request for human approval of a tool invocation.4978 A request for human approval of a tool invocation.
6435 4979
6455 4999
6456 - `"mcp_approval_request"`5000 - `"mcp_approval_request"`
6457 5001
64585002 - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }`
6459 5003
6460 A response to an MCP approval request.5004 A response to an MCP approval request.
6461 5005
6481 5025
6482 Optional reason for the decision.5026 Optional reason for the decision.
6483 5027
64845028 - `CustomToolCall = object { call_id, input, name, 3 more }` - `CustomToolCall object { call_id, input, name, 3 more }`
6485 5029
6486 A call to a custom tool created by the model.5030 A call to a custom tool created by the model.
6487 5031
6511 5055
6512 The namespace of the custom tool being called.5056 The namespace of the custom tool being called.
6513 5057
65145058 - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - `CustomToolCallOutput object { id, call_id, output, 3 more }`
6515 5059
6516 - `id: string`5060 - `id: string`
6517 5061
6534 5078
6535 Text, image, or file output of the custom tool call.5079 Text, image, or file output of the custom tool call.
6536 5080
65375081 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
6538 5082
6539 A text input to the model.5083 A text input to the model.
6540 5084
65415085 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
6542
6543 The text input to the model.
6544
6545 - `type: "input_text"`
6546
6547 The type of the input item. Always `input_text`.
6548
6549 - `"input_text"`
6550
6551 - `ResponseInputImage = object { detail, type, file_id, image_url }`
6552 5086
6553 An image input to the model. Learn about [image inputs](/docs/guides/vision).5087 An image input to the model. Learn about [image inputs](/docs/guides/vision).
6554 5088
65555089 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
6556
6557 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
6558
6559 - `"low"`
6560
6561 - `"high"`
6562
6563 - `"auto"`
6564
6565 - `"original"`
6566
6567 - `type: "input_image"`
6568
6569 The type of the input item. Always `input_image`.
6570
6571 - `"input_image"`
6572
6573 - `file_id: optional string`
6574
6575 The ID of the file to be sent to the model.
6576
6577 - `image_url: optional string`
6578
6579 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
6580
6581 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
6582 5090
6583 A file input to the model.5091 A file input to the model.
6584 5092
6585 - `type: "input_file"`
6586
6587 The type of the input item. Always `input_file`.
6588
6589 - `"input_file"`
6590
6591 - `detail: optional "low" or "high"`
6592
6593 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`.
6594
6595 - `"low"`
6596
6597 - `"high"`
6598
6599 - `file_data: optional string`
6600
6601 The content of the file to be sent to the model.
6602
6603 - `file_id: optional string`
6604
6605 The ID of the file to be sent to the model.
6606
6607 - `file_url: optional string`
6608
6609 The URL of the file to be sent to the model.
6610
6611 - `filename: optional string`
6612
6613 The name of the file to be sent to the model.
6614
6615 - `status: "in_progress" or "completed" or "incomplete"`5093 - `status: "in_progress" or "completed" or "incomplete"`
6616 5094
6617 The status of the item. One of `in_progress`, `completed`, or5095 The status of the item. One of `in_progress`, `completed`, or
6665 5143
6666 - `"required"`5144 - `"required"`
6667 5145
66685146 - `ToolChoiceAllowed = object { mode, tools, type }` - `ToolChoiceAllowed object { mode, tools, type }`
6669 5147
6670 Constrains the tools available to the model to a pre-defined set.5148 Constrains the tools available to the model to a pre-defined set.
6671 5149
6702 5180
6703 - `"allowed_tools"`5181 - `"allowed_tools"`
6704 5182
67055183 - `ToolChoiceTypes = object { type }` - `ToolChoiceTypes object { type }`
6706 5184
6707 Indicates that the model should use a built-in tool to generate a response.5185 Indicates that the model should use a built-in tool to generate a response.
6708 [Learn more about built-in tools](/docs/guides/tools).5186 [Learn more about built-in tools](/docs/guides/tools).
6738 5216
6739 - `"code_interpreter"`5217 - `"code_interpreter"`
6740 5218
67415219 - `ToolChoiceFunction = object { name, type }` - `ToolChoiceFunction object { name, type }`
6742 5220
6743 Use this option to force the model to call a specific function.5221 Use this option to force the model to call a specific function.
6744 5222
6752 5230
6753 - `"function"`5231 - `"function"`
6754 5232
67555233 - `ToolChoiceMcp = object { server_label, type, name }` - `ToolChoiceMcp object { server_label, type, name }`
6756 5234
6757 Use this option to force the model to call a specific tool on a remote MCP server.5235 Use this option to force the model to call a specific tool on a remote MCP server.
6758 5236
6770 5248
6771 The name of the tool to call on the server.5249 The name of the tool to call on the server.
6772 5250
67735251 - `ToolChoiceCustom = object { name, type }` - `ToolChoiceCustom object { name, type }`
6774 5252
6775 Use this option to force the model to call a specific custom tool.5253 Use this option to force the model to call a specific custom tool.
6776 5254
6784 5262
6785 - `"custom"`5263 - `"custom"`
6786 5264
67875265 - `ToolChoiceApplyPatch = object { type }` - `ToolChoiceApplyPatch object { type }`
6788 5266
6789 Forces the model to call the apply_patch tool when executing a tool call.5267 Forces the model to call the apply_patch tool when executing a tool call.
6790 5268
6794 5272
6795 - `"apply_patch"`5273 - `"apply_patch"`
6796 5274
67975275 - `ToolChoiceShell = object { type }` - `ToolChoiceShell object { type }`
6798 5276
6799 Forces the model to call the shell tool when a tool call is required.5277 Forces the model to call the shell tool when a tool call is required.
6800 5278
6809 An array of tools the model may call while generating a response. You5287 An array of tools the model may call while generating a response. You
6810 can specify which tool to use by setting the `tool_choice` parameter.5288 can specify which tool to use by setting the `tool_choice` parameter.
6811 5289
68125290 We support the following categories of tools: We support the following categories of tools:
6813
6814 - **Built-in tools**: Tools that are provided by OpenAI that extend the
6815 model's capabilities, like [web search](/docs/guides/tools-web-search)
6816 or [file search](/docs/guides/tools-file-search). Learn more about
6817 [built-in tools](/docs/guides/tools).
6818 - **MCP Tools**: Integrations with third-party systems via custom MCP servers
6819 or predefined connectors such as Google Drive and SharePoint. Learn more about
6820 [MCP Tools](/docs/guides/tools-connectors-mcp).
6821 - **Function calls (custom tools)**: Functions that are defined by you,
6822 enabling the model to call your own code with strongly typed arguments
6823 and outputs. Learn more about
6824 [function calling](/docs/guides/function-calling). You can also use
6825 custom tools to call your own code.
6826
6827 - `Function = object { name, parameters, strict, 3 more }`
6828
6829 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).
6830
6831 - `name: string`
6832
6833 The name of the function to call.
6834
6835 - `parameters: map[unknown]`
6836
6837 A JSON schema object describing the parameters of the function.
6838
6839 - `strict: boolean`
6840
6841 Whether to enforce strict parameter validation. Default `true`.
6842
6843 - `type: "function"`
6844
6845 The type of the function tool. Always `function`.
6846
6847 - `"function"`
6848
6849 - `defer_loading: optional boolean`
6850
6851 Whether this function is deferred and loaded via tool search.
6852
6853 - `description: optional string`
6854
6855 A description of the function. Used by the model to determine whether or not to call the function.
6856
6857 - `FileSearch = object { type, vector_store_ids, filters, 2 more }`
6858
6859 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).
6860
6861 - `type: "file_search"`
6862
6863 The type of the file search tool. Always `file_search`.
6864
6865 - `"file_search"`
6866
6867 - `vector_store_ids: array of string`
6868
6869 The IDs of the vector stores to search.
6870
6871 - `filters: optional ComparisonFilter or CompoundFilter`
6872
6873 A filter to apply.
6874
6875 - `ComparisonFilter = object { key, type, value }`
6876
6877 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
6878
6879 - `key: string`
6880
6881 The key to compare against the value.
6882
6883 - `type: "eq" or "ne" or "gt" or 5 more`
6884
6885 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
6886
6887 - `eq`: equals
6888 - `ne`: not equal
6889 - `gt`: greater than
6890 - `gte`: greater than or equal
6891 - `lt`: less than
6892 - `lte`: less than or equal
6893 - `in`: in
6894 - `nin`: not in
6895
6896 - `"eq"`
6897
6898 - `"ne"`
6899
6900 - `"gt"`
6901
6902 - `"gte"`
6903
6904 - `"lt"`
6905
6906 - `"lte"`
6907
6908 - `"in"`
6909
6910 - `"nin"`
6911
6912 - `value: string or number or boolean or array of string or number`
6913
6914 The value to compare against the attribute key; supports string, number, or boolean types.
6915
6916 - `string`
6917
6918 - `number`
6919
6920 - `boolean`
6921
6922 - `array of string or number`
6923
6924 - `string`
6925
6926 - `number`
6927
6928 - `CompoundFilter = object { filters, type }`
6929
6930 Combine multiple filters using `and` or `or`.
6931
6932 - `filters: array of ComparisonFilter or unknown`
6933 5291
69345292 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - **Built-in tools**: Tools that are provided by OpenAI that extend the
5293 model's capabilities, like [web search](/docs/guides/tools-web-search)
5294 or [file search](/docs/guides/tools-file-search). Learn more about
5295 [built-in tools](/docs/guides/tools).
5296 - **MCP Tools**: Integrations with third-party systems via custom MCP servers
5297 or predefined connectors such as Google Drive and SharePoint. Learn more about
5298 [MCP Tools](/docs/guides/tools-connectors-mcp).
5299 - **Function calls (custom tools)**: Functions that are defined by you,
5300 enabling the model to call your own code with strongly typed arguments
5301 and outputs. Learn more about
5302 [function calling](/docs/guides/function-calling). You can also use
5303 custom tools to call your own code.
6935 5304
69365305 - `ComparisonFilter = object { key, type, value }` - `Function object { name, parameters, strict, 3 more }`
6937 5306
69385307 A filter used to compare a specified attribute key to a given value using a defined comparison operation. 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).
6939 5308
69405309 - `key: string` - `name: string`
6941 5310
69425311 The key to compare against the value. The name of the function to call.
6943 5312
69445313 - `type: "eq" or "ne" or "gt" or 5 more` - `parameters: map[unknown]`
6945 5314
69465315 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. A JSON schema object describing the parameters of the function.
6947 5316
69485317 - `eq`: equals - `strict: boolean`
6949 - `ne`: not equal
6950 - `gt`: greater than
6951 - `gte`: greater than or equal
6952 - `lt`: less than
6953 - `lte`: less than or equal
6954 - `in`: in
6955 - `nin`: not in
6956 5318
69575319 - `"eq"` Whether to enforce strict parameter validation. Default `true`.
6958 5320
69595321 - `"ne"` - `type: "function"`
6960 5322
69615323 - `"gt"` The type of the function tool. Always `function`.
6962 5324
69635325 - `"gte"` - `"function"`
6964 5326
69655327 - `"lt"` - `defer_loading: optional boolean`
6966 5328
69675329 - `"lte"` Whether this function is deferred and loaded via tool search.
6968 5330
69695331 - `"in"` - `description: optional string`
6970 5332
69715333 - `"nin"` A description of the function. Used by the model to determine whether or not to call the function.
6972 5334
69735335 - `value: string or number or boolean or array of string or number` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
6974 5336
69755337 The value to compare against the attribute key; supports string, number, or boolean types. 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).
6976 5338
69775339 - `string` - `type: "file_search"`
6978 5340
69795341 - `number` The type of the file search tool. Always `file_search`.
6980 5342
69815343 - `boolean` - `"file_search"`
6982 5344
69835345 - `array of string or number` - `vector_store_ids: array of string`
6984 5346
69855347 - `string` The IDs of the vector stores to search.
6986 5348
69875349 - `number` - `filters: optional ComparisonFilter or CompoundFilter`
6988 5350
69895351 - `unknown` A filter to apply.
6990 5352
69915353 - `type: "and" or "or"` - `ComparisonFilter object { key, type, value }`
6992 5354
69935355 Type of operation: `and` or `or`. A filter used to compare a specified attribute key to a given value using a defined comparison operation.
6994 5356
69955357 - `"and"` - `CompoundFilter object { filters, type }`
6996 5358
69975359 - `"or"` Combine multiple filters using `and` or `or`.
6998 5360
6999 - `max_num_results: optional number`5361 - `max_num_results: optional number`
7000 5362
7028 5390
7029 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.5391 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.
7030 5392
70315393 - `Computer = object { type }` - `Computer object { type }`
7032 5394
7033 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).5395 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
7034 5396
7038 5400
7039 - `"computer"`5401 - `"computer"`
7040 5402
70415403 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
7042 5404
7043 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).5405 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
7044 5406
7070 5432
7071 - `"computer_use_preview"`5433 - `"computer_use_preview"`
7072 5434
70735435 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
7074 5436
7075 Search the Internet for sources related to the prompt. Learn more about the5437 Search the Internet for sources related to the prompt. Learn more about the
7076 [web search tool](/docs/guides/tools-web-search).5438 [web search tool](/docs/guides/tools-web-search).
7130 5492
7131 - `"approximate"`5493 - `"approximate"`
7132 5494
71335495 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
7134 5496
7135 Give the model access to additional tools via remote Model Context Protocol5497 Give the model access to additional tools via remote Model Context Protocol
7136 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).5498 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
7153 5515
7154 A string array of allowed tool names5516 A string array of allowed tool names
7155 5517
71565518 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
7157 5519
7158 A filter object to specify which tools are allowed.5520 A filter object to specify which tools are allowed.
7159 5521
7219 5581
7220 Specify which of the MCP server's tools require approval.5582 Specify which of the MCP server's tools require approval.
7221 5583
72225584 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
7223 5585
7224 Specify which of the MCP server's tools require approval. Can be5586 Specify which of the MCP server's tools require approval. Can be
7225 `always`, `never`, or a filter object associated with tools5587 `always`, `never`, or a filter object associated with tools
7272 The URL for the MCP server. One of `server_url` or `connector_id` must be5634 The URL for the MCP server. One of `server_url` or `connector_id` must be
7273 provided.5635 provided.
7274 5636
72755637 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
7276 5638
7277 A tool that runs Python code to help generate a response to a prompt.5639 A tool that runs Python code to help generate a response to a prompt.
7278 5640
7286 5648
7287 The container ID.5649 The container ID.
7288 5650
72895651 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
7290 5652
7291 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.5653 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
7292 5654
7316 5678
7317 Network access policy for the container.5679 Network access policy for the container.
7318 5680
73195681 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
7320
7321 - `type: "disabled"`
7322
7323 Disable outbound network access. Always `disabled`.
7324
7325 - `"disabled"`
7326
7327 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
7328
7329 - `allowed_domains: array of string`
7330
7331 A list of allowed domains when type is `allowlist`.
7332
7333 - `type: "allowlist"`
7334
7335 Allow outbound network access only to specified domains. Always `allowlist`.
7336
7337 - `"allowlist"`
7338
7339 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
7340
7341 Optional domain-scoped secrets for allowlisted domains.
7342
7343 - `domain: string`
7344
7345 The domain associated with the secret.
7346
7347 - `name: string`
7348
7349 The name of the secret to inject for the domain.
7350
7351 - `value: string`
7352 5682
73535683 The secret value to inject for the domain. - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
7354 5684
7355 - `type: "code_interpreter"`5685 - `type: "code_interpreter"`
7356 5686
7358 5688
7359 - `"code_interpreter"`5689 - `"code_interpreter"`
7360 5690
73615691 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
7362 5692
7363 A tool that generates images using the GPT image models.5693 A tool that generates images using the GPT image models.
7364 5694
7366 5696
7367 The type of the image generation tool. Always `image_generation`.5697 The type of the image generation tool. Always `image_generation`.
7368 5698
73695699 - `"image_generation"` - `"image_generation"`
7370
7371 - `action: optional "generate" or "edit" or "auto"`
7372
7373 Whether to generate a new image or edit an existing image. Default: `auto`.
7374
7375 - `"generate"`
7376
7377 - `"edit"`
7378
7379 - `"auto"`
7380
7381 - `background: optional "transparent" or "opaque" or "auto"`
7382
7383 Background type for the generated image. One of `transparent`,
7384 `opaque`, or `auto`. Default: `auto`.
7385
7386 - `"transparent"`
7387
7388 - `"opaque"`
7389
7390 - `"auto"`
7391
7392 - `input_fidelity: optional "high" or "low"`
7393
7394 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`.
7395
7396 - `"high"`
7397
7398 - `"low"`
7399
7400 - `input_image_mask: optional object { file_id, image_url }`
7401
7402 Optional mask for inpainting. Contains `image_url`
7403 (string, optional) and `file_id` (string, optional).
7404
7405 - `file_id: optional string`
7406
7407 File ID for the mask image.
7408
7409 - `image_url: optional string`
7410
7411 Base64-encoded mask image.
7412
7413 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
7414
7415 The image generation model to use. Default: `gpt-image-1`.
7416
7417 - `string`
7418
7419 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
7420
7421 The image generation model to use. Default: `gpt-image-1`.
7422
7423 - `"gpt-image-1"`
7424
7425 - `"gpt-image-1-mini"`
7426
7427 - `"gpt-image-1.5"`
7428
7429 - `moderation: optional "auto" or "low"`
7430
7431 Moderation level for the generated image. Default: `auto`.
7432
7433 - `"auto"`
7434
7435 - `"low"`
7436
7437 - `output_compression: optional number`
7438
7439 Compression level for the output image. Default: 100.
7440
7441 - `output_format: optional "png" or "webp" or "jpeg"`
7442
7443 The output format of the generated image. One of `png`, `webp`, or
7444 `jpeg`. Default: `png`.
7445
7446 - `"png"`
7447
7448 - `"webp"`
7449
7450 - `"jpeg"`
7451
7452 - `partial_images: optional number`
7453
7454 Number of partial images to generate in streaming mode, from 0 (default value) to 3.
7455
7456 - `quality: optional "low" or "medium" or "high" or "auto"`
7457
7458 The quality of the generated image. One of `low`, `medium`, `high`,
7459 or `auto`. Default: `auto`.
7460
7461 - `"low"`
7462
7463 - `"medium"`
7464
7465 - `"high"`
7466
7467 - `"auto"`
7468
7469 - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"`
7470
7471 The size of the generated image. One of `1024x1024`, `1024x1536`,
7472 `1536x1024`, or `auto`. Default: `auto`.
7473
7474 - `"1024x1024"`
7475
7476 - `"1024x1536"`
7477
7478 - `"1536x1024"`
7479
7480 - `"auto"`
7481
7482 - `LocalShell = object { type }`
7483
7484 A tool that allows the model to execute shell commands in a local environment.
7485
7486 - `type: "local_shell"`
7487
7488 The type of the local shell tool. Always `local_shell`.
7489
7490 - `"local_shell"`
7491
7492 - `Shell = object { type, environment }`
7493
7494 A tool that allows the model to execute shell commands.
7495
7496 - `type: "shell"`
7497
7498 The type of the shell tool. Always `shell`.
7499
7500 - `"shell"`
7501
7502 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
7503
7504 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }`
7505
7506 - `type: "container_auto"`
7507
7508 Automatically creates a container for this request
7509
7510 - `"container_auto"`
7511
7512 - `file_ids: optional array of string`
7513
7514 An optional list of uploaded files to make available to your code.
7515
7516 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`
7517
7518 The memory limit for the container.
7519
7520 - `"1g"`
7521
7522 - `"4g"`
7523
7524 - `"16g"`
7525 5700
75265701 - `"64g"` - `action: optional "generate" or "edit" or "auto"`
7527 5702
75285703 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist` Whether to generate a new image or edit an existing image. Default: `auto`.
7529 5704
75305705 Network access policy for the container. - `"generate"`
7531 5706
75325707 - `ContainerNetworkPolicyDisabled = object { type }` - `"edit"`
7533 5708
75345709 - `type: "disabled"` - `"auto"`
7535 5710
75365711 Disable outbound network access. Always `disabled`. - `background: optional "transparent" or "opaque" or "auto"`
7537 5712
75385713 - `"disabled"` Background type for the generated image. One of `transparent`,
5714 `opaque`, or `auto`. Default: `auto`.
7539 5715
75405716 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `"transparent"`
7541 5717
75425718 - `allowed_domains: array of string` - `"opaque"`
7543 5719
75445720 A list of allowed domains when type is `allowlist`. - `"auto"`
7545 5721
75465722 - `type: "allowlist"` - `input_fidelity: optional "high" or "low"`
7547 5723
75485724 Allow outbound network access only to specified domains. Always `allowlist`. 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`.
7549 5725
75505726 - `"allowlist"` - `"high"`
7551 5727
75525728 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret` - `"low"`
7553 5729
75545730 Optional domain-scoped secrets for allowlisted domains. - `input_image_mask: optional object { file_id, image_url }`
7555 5731
75565732 - `domain: string` Optional mask for inpainting. Contains `image_url`
5733 (string, optional) and `file_id` (string, optional).
7557 5734
75585735 The domain associated with the secret. - `file_id: optional string`
7559 5736
75605737 - `name: string` File ID for the mask image.
7561 5738
75625739 The name of the secret to inject for the domain. - `image_url: optional string`
7563 5740
75645741 - `value: string` Base64-encoded mask image.
7565 5742
75665743 The secret value to inject for the domain. - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
7567 5744
75685745 - `skills: optional array of SkillReference or InlineSkill` The image generation model to use. Default: `gpt-image-1`.
7569 5746
75705747 An optional list of skills referenced by id or inline data. - `string`
7571 5748
75725749 - `SkillReference = object { skill_id, type, version }` - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
7573 5750
75745751 - `skill_id: string` The image generation model to use. Default: `gpt-image-1`.
7575 5752
75765753 The ID of the referenced skill. - `"gpt-image-1"`
7577 5754
75785755 - `type: "skill_reference"` - `"gpt-image-1-mini"`
7579 5756
75805757 References a skill created with the /v1/skills endpoint. - `"gpt-image-1.5"`
7581 5758
75825759 - `"skill_reference"` - `moderation: optional "auto" or "low"`
7583 5760
75845761 - `version: optional string` Moderation level for the generated image. Default: `auto`.
7585 5762
75865763 Optional skill version. Use a positive integer or 'latest'. Omit for default. - `"auto"`
7587 5764
75885765 - `InlineSkill = object { description, name, source, type }` - `"low"`
7589 5766
75905767 - `description: string` - `output_compression: optional number`
7591 5768
75925769 The description of the skill. Compression level for the output image. Default: 100.
7593 5770
75945771 - `name: string` - `output_format: optional "png" or "webp" or "jpeg"`
7595 5772
75965773 The name of the skill. The output format of the generated image. One of `png`, `webp`, or
5774 `jpeg`. Default: `png`.
7597 5775
75985776 - `source: InlineSkillSource` - `"png"`
7599 5777
76005778 Inline skill payload - `"webp"`
7601 5779
76025780 - `data: string` - `"jpeg"`
7603 5781
76045782 Base64-encoded skill zip bundle. - `partial_images: optional number`
7605 5783
76065784 - `media_type: "application/zip"` Number of partial images to generate in streaming mode, from 0 (default value) to 3.
7607 5785
76085786 The media type of the inline skill payload. Must be `application/zip`. - `quality: optional "low" or "medium" or "high" or "auto"`
7609 5787
76105788 - `"application/zip"` The quality of the generated image. One of `low`, `medium`, `high`,
5789 or `auto`. Default: `auto`.
7611 5790
76125791 - `type: "base64"` - `"low"`
7613 5792
76145793 The type of the inline skill source. Must be `base64`. - `"medium"`
7615 5794
76165795 - `"base64"` - `"high"`
7617 5796
76185797 - `type: "inline"` - `"auto"`
7619 5798
76205799 Defines an inline skill for this request. - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"`
7621 5800
76225801 - `"inline"` The size of the generated image. One of `1024x1024`, `1024x1536`,
5802 `1536x1024`, or `auto`. Default: `auto`.
7623 5803
76245804 - `LocalEnvironment = object { type, skills }` - `"1024x1024"`
7625 5805
76265806 - `type: "local"` - `"1024x1536"`
7627 5807
76285808 Use a local computer environment. - `"1536x1024"`
7629 5809
76305810 - `"local"` - `"auto"`
7631 5811
76325812 - `skills: optional array of LocalSkill` - `LocalShell object { type }`
7633 5813
76345814 An optional list of skills. A tool that allows the model to execute shell commands in a local environment.
7635 5815
76365816 - `description: string` - `type: "local_shell"`
7637 5817
76385818 The description of the skill. The type of the local shell tool. Always `local_shell`.
7639 5819
76405820 - `name: string` - `"local_shell"`
7641 5821
76425822 The name of the skill. - `Shell object { type, environment }`
7643 5823
76445824 - `path: string` A tool that allows the model to execute shell commands.
7645 5825
76465826 The path to the directory containing the skill. - `type: "shell"`
7647 5827
76485828 - `ContainerReference = object { container_id, type }` The type of the shell tool. Always `shell`.
7649 5829
76505830 - `container_id: string` - `"shell"`
7651 5831
76525832 The ID of the referenced container. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
7653 5833
76545834 - `type: "container_reference"` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
7655 5835
76565836 References a container created with the /v1/containers endpoint - `LocalEnvironment object { type, skills }`
7657 5837
76585838 - `"container_reference"` - `ContainerReference object { container_id, type }`
7659 5839
76605840 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
7661 5841
7662 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)5842 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
7663 5843
7683 5863
7684 The input format for the custom tool. Default is unconstrained text.5864 The input format for the custom tool. Default is unconstrained text.
7685 5865
76865866 - `Text = object { type }` - `Namespace object { description, name, tools, type }`
7687
7688 Unconstrained free-form text.
7689
7690 - `type: "text"`
7691
7692 Unconstrained text format. Always `text`.
7693
7694 - `"text"`
7695
7696 - `Grammar = object { definition, syntax, type }`
7697
7698 A grammar defined by the user.
7699
7700 - `definition: string`
7701
7702 The grammar definition.
7703
7704 - `syntax: "lark" or "regex"`
7705
7706 The syntax of the grammar definition. One of `lark` or `regex`.
7707
7708 - `"lark"`
7709
7710 - `"regex"`
7711
7712 - `type: "grammar"`
7713
7714 Grammar format. Always `grammar`.
7715
7716 - `"grammar"`
7717
7718 - `Namespace = object { description, name, tools, type }`
7719 5867
7720 Groups function/custom tools under a shared namespace.5868 Groups function/custom tools under a shared namespace.
7721 5869
7731 5879
7732 The function/custom tools available inside this namespace.5880 The function/custom tools available inside this namespace.
7733 5881
77345882 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
7735 5883
7736 - `name: string`5884 - `name: string`
7737 5885
7749 5897
7750 - `strict: optional boolean`5898 - `strict: optional boolean`
7751 5899
77525900 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
7753 5901
7754 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)5902 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
7755 5903
7775 5923
7776 The input format for the custom tool. Default is unconstrained text.5924 The input format for the custom tool. Default is unconstrained text.
7777 5925
7778 - `Text = object { type }`
7779
7780 Unconstrained free-form text.
7781
7782 - `type: "text"`
7783
7784 Unconstrained text format. Always `text`.
7785
7786 - `"text"`
7787
7788 - `Grammar = object { definition, syntax, type }`
7789
7790 A grammar defined by the user.
7791
7792 - `definition: string`
7793
7794 The grammar definition.
7795
7796 - `syntax: "lark" or "regex"`
7797
7798 The syntax of the grammar definition. One of `lark` or `regex`.
7799
7800 - `"lark"`
7801
7802 - `"regex"`
7803
7804 - `type: "grammar"`
7805
7806 Grammar format. Always `grammar`.
7807
7808 - `"grammar"`
7809
7810 - `type: "namespace"`5926 - `type: "namespace"`
7811 5927
7812 The type of the tool. Always `namespace`.5928 The type of the tool. Always `namespace`.
7813 5929
7814 - `"namespace"`5930 - `"namespace"`
7815 5931
78165932 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
7817 5933
7818 Hosted or BYOT tool search configuration for deferred tools.5934 Hosted or BYOT tool search configuration for deferred tools.
7819 5935
7839 5955
7840 Parameter schema for a client-executed tool search tool.5956 Parameter schema for a client-executed tool search tool.
7841 5957
78425958 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
7843 5959
7844 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).5960 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).
7845 5961
7893 6009
7894 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.6010 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
7895 6011
78966012 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
7897 6013
7898 Allows the assistant to create, delete, or update files using unified diffs.6014 Allows the assistant to create, delete, or update files using unified diffs.
7899 6015
7967 6083
7968 - `string`6084 - `string`
7969 6085
79706086 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
7971 6087
7972 A text input to the model.6088 A text input to the model.
7973 6089
79746090 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
7975
7976 The text input to the model.
7977
7978 - `type: "input_text"`
7979
7980 The type of the input item. Always `input_text`.
7981
7982 - `"input_text"`
7983
7984 - `ResponseInputImage = object { detail, type, file_id, image_url }`
7985 6091
7986 An image input to the model. Learn about [image inputs](/docs/guides/vision).6092 An image input to the model. Learn about [image inputs](/docs/guides/vision).
7987 6093
79886094 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
7989
7990 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
7991
7992 - `"low"`
7993
7994 - `"high"`
7995
7996 - `"auto"`
7997
7998 - `"original"`
7999
8000 - `type: "input_image"`
8001
8002 The type of the input item. Always `input_image`.
8003
8004 - `"input_image"`
8005
8006 - `file_id: optional string`
8007
8008 The ID of the file to be sent to the model.
8009
8010 - `image_url: optional string`
8011
8012 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
8013
8014 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
8015 6095
8016 A file input to the model.6096 A file input to the model.
8017 6097
8018 - `type: "input_file"`
8019
8020 The type of the input item. Always `input_file`.
8021
8022 - `"input_file"`
8023
8024 - `detail: optional "low" or "high"`
8025
8026 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`.
8027
8028 - `"low"`
8029
8030 - `"high"`
8031
8032 - `file_data: optional string`
8033
8034 The content of the file to be sent to the model.
8035
8036 - `file_id: optional string`
8037
8038 The ID of the file to be sent to the model.
8039
8040 - `file_url: optional string`
8041
8042 The URL of the file to be sent to the model.
8043
8044 - `filename: optional string`
8045
8046 The name of the file to be sent to the model.
8047
8048 - `version: optional string`6098 - `version: optional string`
8049 6099
8050 Optional version of the prompt template.6100 Optional version of the prompt template.
8188 ensures the message the model generates is valid JSON. Using `json_schema`6238 ensures the message the model generates is valid JSON. Using `json_schema`
8189 is preferred for models that support it.6239 is preferred for models that support it.
8190 6240
81916241 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
8192 6242
8193 Default response format. Used to generate text responses.6243 Default response format. Used to generate text responses.
8194 6244
8198 6248
8199 - `"text"`6249 - `"text"`
8200 6250
82016251 - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }`
8202 6252
8203 JSON Schema response format. Used to generate structured JSON responses.6253 JSON Schema response format. Used to generate structured JSON responses.
8204 Learn more about [Structured Outputs](/docs/guides/structured-outputs).6254 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
8232 `strict` is `true`. To learn more, read the [Structured Outputs6282 `strict` is `true`. To learn more, read the [Structured Outputs
8233 guide](/docs/guides/structured-outputs).6283 guide](/docs/guides/structured-outputs).
8234 6284
82356285 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
8236 6286
8237 JSON object response format. An older method of generating JSON responses.6287 JSON object response format. An older method of generating JSON responses.
8238 Using `json_schema` is recommended for models that support it. Note that the6288 Using `json_schema` is recommended for models that support it. Note that the
53 53
54### Returns54### Returns
55 55
5656- `ResponseItemList = object { data, first_id, has_more, 2 more }`- `ResponseItemList object { data, first_id, has_more, 2 more }`
57 57
58 A list of Response items.58 A list of Response items.
59 59
61 61
62 A list of items used to generate this response.62 A list of items used to generate this response.
63 63
6464 - `ResponseInputMessageItem = object { id, content, role, 2 more }` - `ResponseInputMessageItem object { id, content, role, 2 more }`
65 65
66 - `id: string`66 - `id: string`
67 67
72 A list of one or many input items to the model, containing different content72 A list of one or many input items to the model, containing different content
73 types.73 types.
74 74
7575 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
76 76
77 A text input to the model.77 A text input to the model.
78 78
86 86
87 - `"input_text"`87 - `"input_text"`
88 88
8989 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
90 90
91 An image input to the model. Learn about [image inputs](/docs/guides/vision).91 An image input to the model. Learn about [image inputs](/docs/guides/vision).
92 92
116 116
117 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.117 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
118 118
119119 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
120 120
121 A file input to the model.121 A file input to the model.
122 122
177 177
178 - `"incomplete"`178 - `"incomplete"`
179 179
180180 - `ResponseOutputMessage = object { id, content, role, 3 more }` - `ResponseOutputMessage object { id, content, role, 3 more }`
181 181
182 An output message from the model.182 An output message from the model.
183 183
189 189
190 The content of the output message.190 The content of the output message.
191 191
192192 - `ResponseOutputText = object { annotations, logprobs, text, type }` - `ResponseOutputText object { annotations, logprobs, text, type }`
193 193
194 A text output from the model.194 A text output from the model.
195 195
197 197
198 The annotations of the text output.198 The annotations of the text output.
199 199
200200 - `FileCitation = object { file_id, filename, index, type }` - `FileCitation object { file_id, filename, index, type }`
201 201
202 A citation to a file.202 A citation to a file.
203 203
219 219
220 - `"file_citation"`220 - `"file_citation"`
221 221
222222 - `URLCitation = object { end_index, start_index, title, 2 more }` - `URLCitation object { end_index, start_index, title, 2 more }`
223 223
224 A citation for a web resource used to generate a model response.224 A citation for a web resource used to generate a model response.
225 225
245 245
246 The URL of the web resource.246 The URL of the web resource.
247 247
248248 - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`
249 249
250 A citation for a container file used to generate a model response.250 A citation for a container file used to generate a model response.
251 251
275 275
276 - `"container_file_citation"`276 - `"container_file_citation"`
277 277
278278 - `FilePath = object { file_id, index, type }` - `FilePath object { file_id, index, type }`
279 279
280 A path to a file.280 A path to a file.
281 281
319 319
320 - `"output_text"`320 - `"output_text"`
321 321
322322 - `ResponseOutputRefusal = object { refusal, type }` - `ResponseOutputRefusal object { refusal, type }`
323 323
324 A refusal from the model.324 A refusal from the model.
325 325
366 366
367 - `"final_answer"`367 - `"final_answer"`
368 368
369369 - `FileSearchCall = object { id, queries, status, 2 more }` - `FileSearchCall object { id, queries, status, 2 more }`
370 370
371 The results of a file search tool call. See the371 The results of a file search tool call. See the
372 [file search guide](/docs/guides/tools-file-search) for more information.372 [file search guide](/docs/guides/tools-file-search) for more information.
434 434
435 The text that was retrieved from the file.435 The text that was retrieved from the file.
436 436
437437 - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`
438 438
439 A tool call to a computer use tool. See the439 A tool call to a computer use tool. See the
440 [computer use guide](/docs/guides/tools-computer-use) for more information.440 [computer use guide](/docs/guides/tools-computer-use) for more information.
484 484
485 A click action.485 A click action.
486 486
487487 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
488 488
489 A click action.489 A click action.
490 490
520 520
521 The keys being held while clicking.521 The keys being held while clicking.
522 522
523523 - `DoubleClick = object { keys, type, x, y }` - `DoubleClick object { keys, type, x, y }`
524 524
525 A double click action.525 A double click action.
526 526
542 542
543 The y-coordinate where the double click occurred.543 The y-coordinate where the double click occurred.
544 544
545545 - `Drag = object { path, type, keys }` - `Drag object { path, type, keys }`
546 546
547 A drag action.547 A drag action.
548 548
575 575
576 The keys being held while dragging the mouse.576 The keys being held while dragging the mouse.
577 577
578578 - `Keypress = object { keys, type }` - `Keypress object { keys, type }`
579 579
580 A collection of keypresses the model would like to perform.580 A collection of keypresses the model would like to perform.
581 581
589 589
590 - `"keypress"`590 - `"keypress"`
591 591
592592 - `Move = object { type, x, y, keys }` - `Move object { type, x, y, keys }`
593 593
594 A mouse move action.594 A mouse move action.
595 595
611 611
612 The keys being held while moving the mouse.612 The keys being held while moving the mouse.
613 613
614614 - `Screenshot = object { type }` - `Screenshot object { type }`
615 615
616 A screenshot action.616 A screenshot action.
617 617
621 621
622 - `"screenshot"`622 - `"screenshot"`
623 623
624624 - `Scroll = object { scroll_x, scroll_y, type, 3 more }` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
625 625
626 A scroll action.626 A scroll action.
627 627
651 651
652 The keys being held while scrolling.652 The keys being held while scrolling.
653 653
654654 - `Type = object { text, type }` - `Type object { text, type }`
655 655
656 An action to type in text.656 An action to type in text.
657 657
665 665
666 - `"type"`666 - `"type"`
667 667
668668 - `Wait = object { type }` - `Wait object { type }`
669 669
670 A wait action.670 A wait action.
671 671
680 Flattened batched actions for `computer_use`. Each action includes an680 Flattened batched actions for `computer_use`. Each action includes an
681 `type` discriminator and action-specific fields.681 `type` discriminator and action-specific fields.
682 682
683683 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
684 684
685 A click action.685 A click action.
686 686
687687 - `button: "left" or "right" or "wheel" or 2 more` - `DoubleClick object { keys, type, x, y }`
688
689 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
690
691 - `"left"`
692
693 - `"right"`
694
695 - `"wheel"`
696
697 - `"back"`
698
699 - `"forward"`
700
701 - `type: "click"`
702
703 Specifies the event type. For a click action, this property is always `click`.
704
705 - `"click"`
706
707 - `x: number`
708
709 The x-coordinate where the click occurred.
710
711 - `y: number`
712
713 The y-coordinate where the click occurred.
714
715 - `keys: optional array of string`
716
717 The keys being held while clicking.
718
719 - `DoubleClick = object { keys, type, x, y }`
720 688
721 A double click action.689 A double click action.
722 690
723691 - `keys: array of string` - `Drag object { path, type, keys }`
724
725 The keys being held while double-clicking.
726
727 - `type: "double_click"`
728
729 Specifies the event type. For a double click action, this property is always set to `double_click`.
730
731 - `"double_click"`
732
733 - `x: number`
734
735 The x-coordinate where the double click occurred.
736
737 - `y: number`
738
739 The y-coordinate where the double click occurred.
740
741 - `Drag = object { path, type, keys }`
742 692
743 A drag action.693 A drag action.
744 694
745695 - `path: array of object { x, y }` - `Keypress object { keys, type }`
746
747 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
748
749 ```
750 [
751 { x: 100, y: 200 },
752 { x: 200, y: 300 }
753 ]
754 ```
755
756 - `x: number`
757
758 The x-coordinate.
759
760 - `y: number`
761
762 The y-coordinate.
763
764 - `type: "drag"`
765
766 Specifies the event type. For a drag action, this property is always set to `drag`.
767
768 - `"drag"`
769
770 - `keys: optional array of string`
771
772 The keys being held while dragging the mouse.
773
774 - `Keypress = object { keys, type }`
775 696
776 A collection of keypresses the model would like to perform.697 A collection of keypresses the model would like to perform.
777 698
778699 - `keys: array of string` - `Move object { type, x, y, keys }`
779
780 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
781
782 - `type: "keypress"`
783
784 Specifies the event type. For a keypress action, this property is always set to `keypress`.
785
786 - `"keypress"`
787
788 - `Move = object { type, x, y, keys }`
789 700
790 A mouse move action.701 A mouse move action.
791 702
792703 - `type: "move"` - `Screenshot object { type }`
793
794 Specifies the event type. For a move action, this property is always set to `move`.
795
796 - `"move"`
797
798 - `x: number`
799
800 The x-coordinate to move to.
801
802 - `y: number`
803
804 The y-coordinate to move to.
805
806 - `keys: optional array of string`
807
808 The keys being held while moving the mouse.
809
810 - `Screenshot = object { type }`
811 704
812 A screenshot action.705 A screenshot action.
813 706
814707 - `type: "screenshot"` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
815
816 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
817
818 - `"screenshot"`
819
820 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
821 708
822 A scroll action.709 A scroll action.
823 710
824711 - `scroll_x: number` - `Type object { text, type }`
825
826 The horizontal scroll distance.
827
828 - `scroll_y: number`
829
830 The vertical scroll distance.
831
832 - `type: "scroll"`
833
834 Specifies the event type. For a scroll action, this property is always set to `scroll`.
835
836 - `"scroll"`
837
838 - `x: number`
839
840 The x-coordinate where the scroll occurred.
841
842 - `y: number`
843
844 The y-coordinate where the scroll occurred.
845
846 - `keys: optional array of string`
847
848 The keys being held while scrolling.
849
850 - `Type = object { text, type }`
851 712
852 An action to type in text.713 An action to type in text.
853 714
854715 - `text: string` - `Wait object { type }`
855
856 The text to type.
857
858 - `type: "type"`
859
860 Specifies the event type. For a type action, this property is always set to `type`.
861
862 - `"type"`
863
864 - `Wait = object { type }`
865 716
866 A wait action.717 A wait action.
867 718
868719 - `type: "wait"` - `ComputerCallOutput object { id, call_id, output, 4 more }`
869
870 Specifies the event type. For a wait action, this property is always set to `wait`.
871
872 - `"wait"`
873
874 - `ComputerCallOutput = object { id, call_id, output, 4 more }`
875 720
876 - `id: string`721 - `id: string`
877 722
940 785
941 The identifier of the actor that created the item.786 The identifier of the actor that created the item.
942 787
943788 - `WebSearchCall = object { id, action, status, type }` - `WebSearchCall object { id, action, status, type }`
944 789
945 The results of a web search tool call. See the790 The results of a web search tool call. See the
946 [web search guide](/docs/guides/tools-web-search) for more information.791 [web search guide](/docs/guides/tools-web-search) for more information.
954 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.
955 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).
956 801
957802 - `Search = object { query, type, queries, sources }` - `Search object { query, type, queries, sources }`
958 803
959 Action type "search" - Performs a web search query.804 Action type "search" - Performs a web search query.
960 805
986 831
987 The URL of the source.832 The URL of the source.
988 833
989834 - `OpenPage = object { type, url }` - `OpenPage object { type, url }`
990 835
991 Action type "open_page" - Opens a specific URL from search results.836 Action type "open_page" - Opens a specific URL from search results.
992 837
1000 845
1001 The URL opened by the model.846 The URL opened by the model.
1002 847
1003848 - `FindInPage = object { pattern, type, url }` - `FindInPage object { pattern, type, url }`
1004 849
1005 Action type "find_in_page": Searches for a pattern within a loaded page.850 Action type "find_in_page": Searches for a pattern within a loaded page.
1006 851
1036 881
1037 - `"web_search_call"`882 - `"web_search_call"`
1038 883
1039884 - `FunctionCall = object { id, arguments, call_id, 5 more }` - `FunctionCall object { id, arguments, call_id, 5 more }`
1040 885
1041 - `id: string`886 - `id: string`
1042 887
1079 924
1080 The namespace of the function to run.925 The namespace of the function to run.
1081 926
1082927 - `FunctionCallOutput = object { id, call_id, output, 3 more }` - `FunctionCallOutput object { id, call_id, output, 3 more }`
1083 928
1084 - `id: string`929 - `id: string`
1085 930
1102 947
1103 Text, image, or file output of the function call.948 Text, image, or file output of the function call.
1104 949
1105950 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
1106 951
1107 A text input to the model.952 A text input to the model.
1108 953
1109954 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
1110
1111 The text input to the model.
1112
1113 - `type: "input_text"`
1114
1115 The type of the input item. Always `input_text`.
1116
1117 - `"input_text"`
1118
1119 - `ResponseInputImage = object { detail, type, file_id, image_url }`
1120 955
1121 An image input to the model. Learn about [image inputs](/docs/guides/vision).956 An image input to the model. Learn about [image inputs](/docs/guides/vision).
1122 957
1123958 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
1124
1125 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
1126
1127 - `"low"`
1128
1129 - `"high"`
1130
1131 - `"auto"`
1132
1133 - `"original"`
1134
1135 - `type: "input_image"`
1136
1137 The type of the input item. Always `input_image`.
1138
1139 - `"input_image"`
1140
1141 - `file_id: optional string`
1142
1143 The ID of the file to be sent to the model.
1144
1145 - `image_url: optional string`
1146
1147 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
1148
1149 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
1150 959
1151 A file input to the model.960 A file input to the model.
1152 961
1153 - `type: "input_file"`
1154
1155 The type of the input item. Always `input_file`.
1156
1157 - `"input_file"`
1158
1159 - `detail: optional "low" or "high"`
1160
1161 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`.
1162
1163 - `"low"`
1164
1165 - `"high"`
1166
1167 - `file_data: optional string`
1168
1169 The content of the file to be sent to the model.
1170
1171 - `file_id: optional string`
1172
1173 The ID of the file to be sent to the model.
1174
1175 - `file_url: optional string`
1176
1177 The URL of the file to be sent to the model.
1178
1179 - `filename: optional string`
1180
1181 The name of the file to be sent to the model.
1182
1183 - `status: "in_progress" or "completed" or "incomplete"`962 - `status: "in_progress" or "completed" or "incomplete"`
1184 963
1185 The status of the item. One of `in_progress`, `completed`, or964 The status of the item. One of `in_progress`, `completed`, or
1201 980
1202 The identifier of the actor that created the item.981 The identifier of the actor that created the item.
1203 982
1204983 - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - `ToolSearchCall object { id, arguments, call_id, 4 more }`
1205 984
1206 - `id: string`985 - `id: string`
1207 986
1243 1022
1244 The identifier of the actor that created the item.1023 The identifier of the actor that created the item.
1245 1024
12461025 - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - `ToolSearchOutput object { id, call_id, execution, 4 more }`
1247 1026
1248 - `id: string`1027 - `id: string`
1249 1028
1275 1054
1276 The loaded tool definitions returned by tool search.1055 The loaded tool definitions returned by tool search.
1277 1056
12781057 - `Function = object { name, parameters, strict, 3 more }` - `Function object { name, parameters, strict, 3 more }`
1279 1058
1280 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).1059 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).
1281 1060
1305 1084
1306 A description of the function. Used by the model to determine whether or not to call the function.1085 A description of the function. Used by the model to determine whether or not to call the function.
1307 1086
13081087 - `FileSearch = object { type, vector_store_ids, filters, 2 more }` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
1309 1088
1310 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).1089 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).
1311 1090
1323 1102
1324 A filter to apply.1103 A filter to apply.
1325 1104
13261105 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1327 1106
1328 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1107 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1329 1108
1376 1155
1377 - `number`1156 - `number`
1378 1157
13791158 - `CompoundFilter = object { filters, type }` - `CompoundFilter object { filters, type }`
1380 1159
1381 Combine multiple filters using `and` or `or`.1160 Combine multiple filters using `and` or `or`.
1382 1161
1384 1163
1385 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.1164 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
1386 1165
13871166 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1388 1167
1389 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1168 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1390 1169
1391 - `key: string`
1392
1393 The key to compare against the value.
1394
1395 - `type: "eq" or "ne" or "gt" or 5 more`
1396
1397 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
1398
1399 - `eq`: equals
1400 - `ne`: not equal
1401 - `gt`: greater than
1402 - `gte`: greater than or equal
1403 - `lt`: less than
1404 - `lte`: less than or equal
1405 - `in`: in
1406 - `nin`: not in
1407
1408 - `"eq"`
1409
1410 - `"ne"`
1411
1412 - `"gt"`
1413
1414 - `"gte"`
1415
1416 - `"lt"`
1417
1418 - `"lte"`
1419
1420 - `"in"`
1421
1422 - `"nin"`
1423
1424 - `value: string or number or boolean or array of string or number`
1425
1426 The value to compare against the attribute key; supports string, number, or boolean types.
1427
1428 - `string`
1429
1430 - `number`
1431
1432 - `boolean`
1433
1434 - `array of string or number`
1435
1436 - `string`
1437
1438 - `number`
1439
1440 - `unknown`1170 - `unknown`
1441 1171
1442 - `type: "and" or "or"`1172 - `type: "and" or "or"`
1479 1209
1480 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.1210 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.
1481 1211
14821212 - `Computer = object { type }` - `Computer object { type }`
1483 1213
1484 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1214 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1485 1215
1489 1219
1490 - `"computer"`1220 - `"computer"`
1491 1221
14921222 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
1493 1223
1494 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1224 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1495 1225
1521 1251
1522 - `"computer_use_preview"`1252 - `"computer_use_preview"`
1523 1253
15241254 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
1525 1255
1526 Search the Internet for sources related to the prompt. Learn more about the1256 Search the Internet for sources related to the prompt. Learn more about the
1527 [web search tool](/docs/guides/tools-web-search).1257 [web search tool](/docs/guides/tools-web-search).
1581 1311
1582 - `"approximate"`1312 - `"approximate"`
1583 1313
15841314 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
1585 1315
1586 Give the model access to additional tools via remote Model Context Protocol1316 Give the model access to additional tools via remote Model Context Protocol
1587 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).1317 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
1604 1334
1605 A string array of allowed tool names1335 A string array of allowed tool names
1606 1336
16071337 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
1608 1338
1609 A filter object to specify which tools are allowed.1339 A filter object to specify which tools are allowed.
1610 1340
1670 1400
1671 Specify which of the MCP server's tools require approval.1401 Specify which of the MCP server's tools require approval.
1672 1402
16731403 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
1674 1404
1675 Specify which of the MCP server's tools require approval. Can be1405 Specify which of the MCP server's tools require approval. Can be
1676 `always`, `never`, or a filter object associated with tools1406 `always`, `never`, or a filter object associated with tools
1723 The URL for the MCP server. One of `server_url` or `connector_id` must be1453 The URL for the MCP server. One of `server_url` or `connector_id` must be
1724 provided.1454 provided.
1725 1455
17261456 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
1727 1457
1728 A tool that runs Python code to help generate a response to a prompt.1458 A tool that runs Python code to help generate a response to a prompt.
1729 1459
1737 1467
1738 The container ID.1468 The container ID.
1739 1469
17401470 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
1741 1471
1742 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.1472 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
1743 1473
1767 1497
1768 Network access policy for the container.1498 Network access policy for the container.
1769 1499
17701500 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
1771 1501
1772 - `type: "disabled"`1502 - `type: "disabled"`
1773 1503
1775 1505
1776 - `"disabled"`1506 - `"disabled"`
1777 1507
17781508 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
1779 1509
1780 - `allowed_domains: array of string`1510 - `allowed_domains: array of string`
1781 1511
1809 1539
1810 - `"code_interpreter"`1540 - `"code_interpreter"`
1811 1541
18121542 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
1813 1543
1814 A tool that generates images using the GPT image models.1544 A tool that generates images using the GPT image models.
1815 1545
1930 1660
1931 - `"auto"`1661 - `"auto"`
1932 1662
19331663 - `LocalShell = object { type }` - `LocalShell object { type }`
1934 1664
1935 A tool that allows the model to execute shell commands in a local environment.1665 A tool that allows the model to execute shell commands in a local environment.
1936 1666
1940 1670
1941 - `"local_shell"`1671 - `"local_shell"`
1942 1672
19431673 - `Shell = object { type, environment }` - `Shell object { type, environment }`
1944 1674
1945 A tool that allows the model to execute shell commands.1675 A tool that allows the model to execute shell commands.
1946 1676
1952 1682
1953 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`1683 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
1954 1684
19551685 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
1956 1686
1957 - `type: "container_auto"`1687 - `type: "container_auto"`
1958 1688
1980 1710
1981 Network access policy for the container.1711 Network access policy for the container.
1982 1712
19831713 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
1984
1985 - `type: "disabled"`
1986
1987 Disable outbound network access. Always `disabled`.
1988
1989 - `"disabled"`
1990
1991 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
1992 1714
19931715 - `allowed_domains: array of string` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
1994
1995 A list of allowed domains when type is `allowlist`.
1996
1997 - `type: "allowlist"`
1998
1999 Allow outbound network access only to specified domains. Always `allowlist`.
2000
2001 - `"allowlist"`
2002
2003 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
2004
2005 Optional domain-scoped secrets for allowlisted domains.
2006
2007 - `domain: string`
2008
2009 The domain associated with the secret.
2010
2011 - `name: string`
2012
2013 The name of the secret to inject for the domain.
2014
2015 - `value: string`
2016
2017 The secret value to inject for the domain.
2018 1716
2019 - `skills: optional array of SkillReference or InlineSkill`1717 - `skills: optional array of SkillReference or InlineSkill`
2020 1718
2021 An optional list of skills referenced by id or inline data.1719 An optional list of skills referenced by id or inline data.
2022 1720
20231721 - `SkillReference = object { skill_id, type, version }` - `SkillReference object { skill_id, type, version }`
2024 1722
2025 - `skill_id: string`1723 - `skill_id: string`
2026 1724
2036 1734
2037 Optional skill version. Use a positive integer or 'latest'. Omit for default.1735 Optional skill version. Use a positive integer or 'latest'. Omit for default.
2038 1736
20391737 - `InlineSkill = object { description, name, source, type }` - `InlineSkill object { description, name, source, type }`
2040 1738
2041 - `description: string`1739 - `description: string`
2042 1740
2072 1770
2073 - `"inline"`1771 - `"inline"`
2074 1772
20751773 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
2076 1774
2077 - `type: "local"`1775 - `type: "local"`
2078 1776
2096 1794
2097 The path to the directory containing the skill.1795 The path to the directory containing the skill.
2098 1796
20991797 - `ContainerReference = object { container_id, type }` - `ContainerReference object { container_id, type }`
2100 1798
2101 - `container_id: string`1799 - `container_id: string`
2102 1800
2108 1806
2109 - `"container_reference"`1807 - `"container_reference"`
2110 1808
21111809 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2112 1810
2113 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1811 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2114 1812
2134 1832
2135 The input format for the custom tool. Default is unconstrained text.1833 The input format for the custom tool. Default is unconstrained text.
2136 1834
21371835 - `Text = object { type }` - `Text object { type }`
2138 1836
2139 Unconstrained free-form text.1837 Unconstrained free-form text.
2140 1838
2144 1842
2145 - `"text"`1843 - `"text"`
2146 1844
21471845 - `Grammar = object { definition, syntax, type }` - `Grammar object { definition, syntax, type }`
2148 1846
2149 A grammar defined by the user.1847 A grammar defined by the user.
2150 1848
2166 1864
2167 - `"grammar"`1865 - `"grammar"`
2168 1866
21691867 - `Namespace = object { description, name, tools, type }` - `Namespace object { description, name, tools, type }`
2170 1868
2171 Groups function/custom tools under a shared namespace.1869 Groups function/custom tools under a shared namespace.
2172 1870
2182 1880
2183 The function/custom tools available inside this namespace.1881 The function/custom tools available inside this namespace.
2184 1882
21851883 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
2186 1884
2187 - `name: string`1885 - `name: string`
2188 1886
2200 1898
2201 - `strict: optional boolean`1899 - `strict: optional boolean`
2202 1900
22031901 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2204 1902
2205 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1903 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2206 1904
2226 1924
2227 The input format for the custom tool. Default is unconstrained text.1925 The input format for the custom tool. Default is unconstrained text.
2228 1926
2229 - `Text = object { type }`
2230
2231 Unconstrained free-form text.
2232
2233 - `type: "text"`
2234
2235 Unconstrained text format. Always `text`.
2236
2237 - `"text"`
2238
2239 - `Grammar = object { definition, syntax, type }`
2240
2241 A grammar defined by the user.
2242
2243 - `definition: string`
2244
2245 The grammar definition.
2246
2247 - `syntax: "lark" or "regex"`
2248
2249 The syntax of the grammar definition. One of `lark` or `regex`.
2250
2251 - `"lark"`
2252
2253 - `"regex"`
2254
2255 - `type: "grammar"`
2256
2257 Grammar format. Always `grammar`.
2258
2259 - `"grammar"`
2260
2261 - `type: "namespace"`1927 - `type: "namespace"`
2262 1928
2263 The type of the tool. Always `namespace`.1929 The type of the tool. Always `namespace`.
2264 1930
2265 - `"namespace"`1931 - `"namespace"`
2266 1932
22671933 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
2268 1934
2269 Hosted or BYOT tool search configuration for deferred tools.1935 Hosted or BYOT tool search configuration for deferred tools.
2270 1936
2290 1956
2291 Parameter schema for a client-executed tool search tool.1957 Parameter schema for a client-executed tool search tool.
2292 1958
22931959 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
2294 1960
2295 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).1961 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).
2296 1962
2344 2010
2345 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.2011 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2346 2012
23472013 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
2348 2014
2349 Allows the assistant to create, delete, or update files using unified diffs.2015 Allows the assistant to create, delete, or update files using unified diffs.
2350 2016
2364 2030
2365 The identifier of the actor that created the item.2031 The identifier of the actor that created the item.
2366 2032
23672033 - `Reasoning = object { id, summary, type, 3 more }` - `Reasoning object { id, summary, type, 3 more }`
2368 2034
2369 A description of the chain of thought used by a reasoning model while generating2035 A description of the chain of thought used by a reasoning model while generating
2370 a response. Be sure to include these items in your `input` to the Responses API2036 a response. Be sure to include these items in your `input` to the Responses API
2425 2091
2426 - `"incomplete"`2092 - `"incomplete"`
2427 2093
24282094 - `Compaction = object { id, encrypted_content, type, created_by }` - `Compaction object { id, encrypted_content, type, created_by }`
2429 2095
2430 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).2096 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
2431 2097
2447 2113
2448 The identifier of the actor that created the item.2114 The identifier of the actor that created the item.
2449 2115
24502116 - `ImageGenerationCall = object { id, result, status, type }` - `ImageGenerationCall object { id, result, status, type }`
2451 2117
2452 An image generation request made by the model.2118 An image generation request made by the model.
2453 2119
2477 2143
2478 - `"image_generation_call"`2144 - `"image_generation_call"`
2479 2145
24802146 - `CodeInterpreterCall = object { id, code, container_id, 3 more }` - `CodeInterpreterCall object { id, code, container_id, 3 more }`
2481 2147
2482 A tool call to run code.2148 A tool call to run code.
2483 2149
2498 The outputs generated by the code interpreter, such as logs or images.2164 The outputs generated by the code interpreter, such as logs or images.
2499 Can be null if no outputs are available.2165 Can be null if no outputs are available.
2500 2166
25012167 - `Logs = object { logs, type }` - `Logs object { logs, type }`
2502 2168
2503 The logs output from the code interpreter.2169 The logs output from the code interpreter.
2504 2170
2512 2178
2513 - `"logs"`2179 - `"logs"`
2514 2180
25152181 - `Image = object { type, url }` - `Image object { type, url }`
2516 2182
2517 The image output from the code interpreter.2183 The image output from the code interpreter.
2518 2184
2546 2212
2547 - `"code_interpreter_call"`2213 - `"code_interpreter_call"`
2548 2214
25492215 - `LocalShellCall = object { id, action, call_id, 2 more }` - `LocalShellCall object { id, action, call_id, 2 more }`
2550 2216
2551 A tool call to run a command on the local shell.2217 A tool call to run a command on the local shell.
2552 2218
2604 2270
2605 - `"local_shell_call"`2271 - `"local_shell_call"`
2606 2272
26072273 - `LocalShellCallOutput = object { id, output, type, status }` - `LocalShellCallOutput object { id, output, type, status }`
2608 2274
2609 The output of a local shell tool call.2275 The output of a local shell tool call.
2610 2276
2632 2298
2633 - `"incomplete"`2299 - `"incomplete"`
2634 2300
26352301 - `ShellCall = object { id, action, call_id, 4 more }` - `ShellCall object { id, action, call_id, 4 more }`
2636 2302
2637 A tool call that executes one or more shell commands in a managed environment.2303 A tool call that executes one or more shell commands in a managed environment.
2638 2304
2662 2328
2663 Represents the use of a local environment to perform shell actions.2329 Represents the use of a local environment to perform shell actions.
2664 2330
26652331 - `ResponseLocalEnvironment = object { type }` - `ResponseLocalEnvironment object { type }`
2666 2332
2667 Represents the use of a local environment to perform shell actions.2333 Represents the use of a local environment to perform shell actions.
2668 2334
2672 2338
2673 - `"local"`2339 - `"local"`
2674 2340
26752341 - `ResponseContainerReference = object { container_id, type }` - `ResponseContainerReference object { container_id, type }`
2676 2342
2677 Represents a container created with /v1/containers.2343 Represents a container created with /v1/containers.
2678 2344
2704 2370
2705 The ID of the entity that created this tool call.2371 The ID of the entity that created this tool call.
2706 2372
27072373 - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - `ShellCallOutput object { id, call_id, max_output_length, 4 more }`
2708 2374
2709 The output of a shell tool call that was emitted.2375 The output of a shell tool call that was emitted.
2710 2376
2728 2394
2729 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.2395 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.
2730 2396
27312397 - `Timeout = object { type }` - `Timeout object { type }`
2732 2398
2733 Indicates that the shell call exceeded its configured time limit.2399 Indicates that the shell call exceeded its configured time limit.
2734 2400
2738 2404
2739 - `"timeout"`2405 - `"timeout"`
2740 2406
27412407 - `Exit = object { exit_code, type }` - `Exit object { exit_code, type }`
2742 2408
2743 Indicates that the shell commands finished and returned an exit code.2409 Indicates that the shell commands finished and returned an exit code.
2744 2410
2784 2450
2785 The identifier of the actor that created the item.2451 The identifier of the actor that created the item.
2786 2452
27872453 - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - `ApplyPatchCall object { id, call_id, operation, 3 more }`
2788 2454
2789 A tool call that applies file diffs by creating, deleting, or updating files.2455 A tool call that applies file diffs by creating, deleting, or updating files.
2790 2456
2800 2466
2801 One of the create_file, delete_file, or update_file operations applied via apply_patch.2467 One of the create_file, delete_file, or update_file operations applied via apply_patch.
2802 2468
28032469 - `CreateFile = object { diff, path, type }` - `CreateFile object { diff, path, type }`
2804 2470
2805 Instruction describing how to create a file via the apply_patch tool.2471 Instruction describing how to create a file via the apply_patch tool.
2806 2472
2818 2484
2819 - `"create_file"`2485 - `"create_file"`
2820 2486
28212487 - `DeleteFile = object { path, type }` - `DeleteFile object { path, type }`
2822 2488
2823 Instruction describing how to delete a file via the apply_patch tool.2489 Instruction describing how to delete a file via the apply_patch tool.
2824 2490
2832 2498
2833 - `"delete_file"`2499 - `"delete_file"`
2834 2500
28352501 - `UpdateFile = object { diff, path, type }` - `UpdateFile object { diff, path, type }`
2836 2502
2837 Instruction describing how to update a file via the apply_patch tool.2503 Instruction describing how to update a file via the apply_patch tool.
2838 2504
2868 2534
2869 The ID of the entity that created this tool call.2535 The ID of the entity that created this tool call.
2870 2536
28712537 - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - `ApplyPatchCallOutput object { id, call_id, status, 3 more }`
2872 2538
2873 The output emitted by an apply patch tool call.2539 The output emitted by an apply patch tool call.
2874 2540
2902 2568
2903 Optional textual output returned by the apply patch tool.2569 Optional textual output returned by the apply patch tool.
2904 2570
29052571 - `McpListTools = object { id, server_label, tools, 2 more }` - `McpListTools object { id, server_label, tools, 2 more }`
2906 2572
2907 A list of tools available on an MCP server.2573 A list of tools available on an MCP server.
2908 2574
2944 2610
2945 Error message if the server could not list tools.2611 Error message if the server could not list tools.
2946 2612
29472613 - `McpApprovalRequest = object { id, arguments, name, 2 more }` - `McpApprovalRequest object { id, arguments, name, 2 more }`
2948 2614
2949 A request for human approval of a tool invocation.2615 A request for human approval of a tool invocation.
2950 2616
2970 2636
2971 - `"mcp_approval_request"`2637 - `"mcp_approval_request"`
2972 2638
29732639 - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }`
2974 2640
2975 A response to an MCP approval request.2641 A response to an MCP approval request.
2976 2642
2996 2662
2997 Optional reason for the decision.2663 Optional reason for the decision.
2998 2664
29992665 - `McpCall = object { id, arguments, name, 6 more }` - `McpCall object { id, arguments, name, 6 more }`
3000 2666
3001 An invocation of a tool on an MCP server.2667 An invocation of a tool on an MCP server.
3002 2668
3049 2715
3050 - `"failed"`2716 - `"failed"`
3051 2717
30522718 - `CustomToolCall = object { id, call_id, input, 5 more }` - `CustomToolCall object { id, call_id, input, 5 more }`
3053 2719
3054 - `id: string`2720 - `id: string`
3055 2721
3092 2758
3093 The namespace of the custom tool being called.2759 The namespace of the custom tool being called.
3094 2760
30952761 - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - `CustomToolCallOutput object { id, call_id, output, 3 more }`
3096 2762
3097 - `id: string`2763 - `id: string`
3098 2764
3115 2781
3116 Text, image, or file output of the custom tool call.2782 Text, image, or file output of the custom tool call.
3117 2783
31182784 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
3119 2785
3120 A text input to the model.2786 A text input to the model.
3121 2787
31222788 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
3123
3124 The text input to the model.
3125
3126 - `type: "input_text"`
3127
3128 The type of the input item. Always `input_text`.
3129
3130 - `"input_text"`
3131
3132 - `ResponseInputImage = object { detail, type, file_id, image_url }`
3133 2789
3134 An image input to the model. Learn about [image inputs](/docs/guides/vision).2790 An image input to the model. Learn about [image inputs](/docs/guides/vision).
3135 2791
31362792 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
3137
3138 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
3139
3140 - `"low"`
3141
3142 - `"high"`
3143
3144 - `"auto"`
3145
3146 - `"original"`
3147
3148 - `type: "input_image"`
3149
3150 The type of the input item. Always `input_image`.
3151
3152 - `"input_image"`
3153
3154 - `file_id: optional string`
3155
3156 The ID of the file to be sent to the model.
3157
3158 - `image_url: optional string`
3159
3160 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
3161
3162 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
3163 2793
3164 A file input to the model.2794 A file input to the model.
3165 2795
3166 - `type: "input_file"`
3167
3168 The type of the input item. Always `input_file`.
3169
3170 - `"input_file"`
3171
3172 - `detail: optional "low" or "high"`
3173
3174 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`.
3175
3176 - `"low"`
3177
3178 - `"high"`
3179
3180 - `file_data: optional string`
3181
3182 The content of the file to be sent to the model.
3183
3184 - `file_id: optional string`
3185
3186 The ID of the file to be sent to the model.
3187
3188 - `file_url: optional string`
3189
3190 The URL of the file to be sent to the model.
3191
3192 - `filename: optional string`
3193
3194 The name of the file to be sent to the model.
3195
3196 - `status: "in_progress" or "completed" or "incomplete"`2796 - `status: "in_progress" or "completed" or "incomplete"`
3197 2797
3198 The status of the item. One of `in_progress`, `completed`, or2798 The status of the item. One of `in_progress`, `completed`, or
19 19
20 The unique ID of the conversation.20 The unique ID of the conversation.
21 21
2222 - `ResponseConversationParam = object { id }` - `ResponseConversationParam object { id }`
23 23
24 The conversation that this response belongs to.24 The conversation that this response belongs to.
25 25
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
4242 - `EasyInputMessage = object { content, role, phase, type }` - `EasyInputMessage object { content, role, phase, type }`
43 43
44 A message input to the model with a role indicating instruction following44 A message input to the model with a role indicating instruction following
45 hierarchy. Instructions given with the `developer` or `system` role take45 hierarchy. Instructions given with the `developer` or `system` role take
61 A list of one or many input items to the model, containing different content61 A list of one or many input items to the model, containing different content
62 types.62 types.
63 63
6464 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
65 65
66 A text input to the model.66 A text input to the model.
67 67
75 75
76 - `"input_text"`76 - `"input_text"`
77 77
7878 - `ResponseInputImage = object { detail, type, file_id, image_url }` - `ResponseInputImage object { detail, type, file_id, image_url }`
79 79
80 An image input to the model. Learn about [image inputs](/docs/guides/vision).80 An image input to the model. Learn about [image inputs](/docs/guides/vision).
81 81
105 105
106 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.106 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
107 107
108108 - `ResponseInputFile = object { type, detail, file_data, 3 more }` - `ResponseInputFile object { type, detail, file_data, 3 more }`
109 109
110 A file input to the model.110 A file input to the model.
111 111
168 168
169 - `"message"`169 - `"message"`
170 170
171171 - `Message = object { content, role, status, type }` - `Message object { content, role, status, type }`
172 172
173 A message input to the model with a role indicating instruction following173 A message input to the model with a role indicating instruction following
174 hierarchy. Instructions given with the `developer` or `system` role take174 hierarchy. Instructions given with the `developer` or `system` role take
179 A list of one or many input items to the model, containing different content179 A list of one or many input items to the model, containing different content
180 types.180 types.
181 181
182 - `ResponseInputText = object { text, type }`
183
184 A text input to the model.
185
186 - `text: string`
187
188 The text input to the model.
189
190 - `type: "input_text"`
191
192 The type of the input item. Always `input_text`.
193
194 - `"input_text"`
195
196 - `ResponseInputImage = object { detail, type, file_id, image_url }`
197
198 An image input to the model. Learn about [image inputs](/docs/guides/vision).
199
200 - `detail: "low" or "high" or "auto" or "original"`
201
202 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
203
204 - `"low"`
205
206 - `"high"`
207
208 - `"auto"`
209
210 - `"original"`
211
212 - `type: "input_image"`
213
214 The type of the input item. Always `input_image`.
215
216 - `"input_image"`
217
218 - `file_id: optional string`
219
220 The ID of the file to be sent to the model.
221
222 - `image_url: optional string`
223
224 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
225
226 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
227
228 A file input to the model.
229
230 - `type: "input_file"`
231
232 The type of the input item. Always `input_file`.
233
234 - `"input_file"`
235
236 - `detail: optional "low" or "high"`
237
238 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`.
239
240 - `"low"`
241
242 - `"high"`
243
244 - `file_data: optional string`
245
246 The content of the file to be sent to the model.
247
248 - `file_id: optional string`
249
250 The ID of the file to be sent to the model.
251
252 - `file_url: optional string`
253
254 The URL of the file to be sent to the model.
255
256 - `filename: optional string`
257
258 The name of the file to be sent to the model.
259
260 - `role: "user" or "system" or "developer"`182 - `role: "user" or "system" or "developer"`
261 183
262 The role of the message input. One of `user`, `system`, or `developer`.184 The role of the message input. One of `user`, `system`, or `developer`.
284 206
285 - `"message"`207 - `"message"`
286 208
287209 - `ResponseOutputMessage = object { id, content, role, 3 more }` - `ResponseOutputMessage object { id, content, role, 3 more }`
288 210
289 An output message from the model.211 An output message from the model.
290 212
296 218
297 The content of the output message.219 The content of the output message.
298 220
299221 - `ResponseOutputText = object { annotations, logprobs, text, type }` - `ResponseOutputText object { annotations, logprobs, text, type }`
300 222
301 A text output from the model.223 A text output from the model.
302 224
304 226
305 The annotations of the text output.227 The annotations of the text output.
306 228
307229 - `FileCitation = object { file_id, filename, index, type }` - `FileCitation object { file_id, filename, index, type }`
308 230
309 A citation to a file.231 A citation to a file.
310 232
326 248
327 - `"file_citation"`249 - `"file_citation"`
328 250
329251 - `URLCitation = object { end_index, start_index, title, 2 more }` - `URLCitation object { end_index, start_index, title, 2 more }`
330 252
331 A citation for a web resource used to generate a model response.253 A citation for a web resource used to generate a model response.
332 254
352 274
353 The URL of the web resource.275 The URL of the web resource.
354 276
355277 - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`
356 278
357 A citation for a container file used to generate a model response.279 A citation for a container file used to generate a model response.
358 280
382 304
383 - `"container_file_citation"`305 - `"container_file_citation"`
384 306
385307 - `FilePath = object { file_id, index, type }` - `FilePath object { file_id, index, type }`
386 308
387 A path to a file.309 A path to a file.
388 310
426 348
427 - `"output_text"`349 - `"output_text"`
428 350
429351 - `ResponseOutputRefusal = object { refusal, type }` - `ResponseOutputRefusal object { refusal, type }`
430 352
431 A refusal from the model.353 A refusal from the model.
432 354
473 395
474 - `"final_answer"`396 - `"final_answer"`
475 397
476398 - `FileSearchCall = object { id, queries, status, 2 more }` - `FileSearchCall object { id, queries, status, 2 more }`
477 399
478 The results of a file search tool call. See the400 The results of a file search tool call. See the
479 [file search guide](/docs/guides/tools-file-search) for more information.401 [file search guide](/docs/guides/tools-file-search) for more information.
541 463
542 The text that was retrieved from the file.464 The text that was retrieved from the file.
543 465
544466 - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`
545 467
546 A tool call to a computer use tool. See the468 A tool call to a computer use tool. See the
547 [computer use guide](/docs/guides/tools-computer-use) for more information.469 [computer use guide](/docs/guides/tools-computer-use) for more information.
591 513
592 A click action.514 A click action.
593 515
594516 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
595 517
596 A click action.518 A click action.
597 519
627 549
628 The keys being held while clicking.550 The keys being held while clicking.
629 551
630552 - `DoubleClick = object { keys, type, x, y }` - `DoubleClick object { keys, type, x, y }`
631 553
632 A double click action.554 A double click action.
633 555
649 571
650 The y-coordinate where the double click occurred.572 The y-coordinate where the double click occurred.
651 573
652574 - `Drag = object { path, type, keys }` - `Drag object { path, type, keys }`
653 575
654 A drag action.576 A drag action.
655 577
682 604
683 The keys being held while dragging the mouse.605 The keys being held while dragging the mouse.
684 606
685607 - `Keypress = object { keys, type }` - `Keypress object { keys, type }`
686 608
687 A collection of keypresses the model would like to perform.609 A collection of keypresses the model would like to perform.
688 610
696 618
697 - `"keypress"`619 - `"keypress"`
698 620
699621 - `Move = object { type, x, y, keys }` - `Move object { type, x, y, keys }`
700 622
701 A mouse move action.623 A mouse move action.
702 624
718 640
719 The keys being held while moving the mouse.641 The keys being held while moving the mouse.
720 642
721643 - `Screenshot = object { type }` - `Screenshot object { type }`
722 644
723 A screenshot action.645 A screenshot action.
724 646
728 650
729 - `"screenshot"`651 - `"screenshot"`
730 652
731653 - `Scroll = object { scroll_x, scroll_y, type, 3 more }` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
732 654
733 A scroll action.655 A scroll action.
734 656
758 680
759 The keys being held while scrolling.681 The keys being held while scrolling.
760 682
761683 - `Type = object { text, type }` - `Type object { text, type }`
762 684
763 An action to type in text.685 An action to type in text.
764 686
772 694
773 - `"type"`695 - `"type"`
774 696
775697 - `Wait = object { type }` - `Wait object { type }`
776 698
777 A wait action.699 A wait action.
778 700
787 Flattened batched actions for `computer_use`. Each action includes an709 Flattened batched actions for `computer_use`. Each action includes an
788 `type` discriminator and action-specific fields.710 `type` discriminator and action-specific fields.
789 711
790712 - `Click = object { button, type, x, 2 more }` - `Click object { button, type, x, 2 more }`
791 713
792 A click action.714 A click action.
793 715
794716 - `button: "left" or "right" or "wheel" or 2 more` - `DoubleClick object { keys, type, x, y }`
795
796 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
797
798 - `"left"`
799
800 - `"right"`
801
802 - `"wheel"`
803
804 - `"back"`
805
806 - `"forward"`
807
808 - `type: "click"`
809
810 Specifies the event type. For a click action, this property is always `click`.
811
812 - `"click"`
813
814 - `x: number`
815
816 The x-coordinate where the click occurred.
817
818 - `y: number`
819
820 The y-coordinate where the click occurred.
821
822 - `keys: optional array of string`
823
824 The keys being held while clicking.
825
826 - `DoubleClick = object { keys, type, x, y }`
827 717
828 A double click action.718 A double click action.
829 719
830720 - `keys: array of string` - `Drag object { path, type, keys }`
831
832 The keys being held while double-clicking.
833
834 - `type: "double_click"`
835
836 Specifies the event type. For a double click action, this property is always set to `double_click`.
837
838 - `"double_click"`
839
840 - `x: number`
841
842 The x-coordinate where the double click occurred.
843
844 - `y: number`
845
846 The y-coordinate where the double click occurred.
847
848 - `Drag = object { path, type, keys }`
849 721
850 A drag action.722 A drag action.
851 723
852724 - `path: array of object { x, y }` - `Keypress object { keys, type }`
853
854 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
855
856 ```
857 [
858 { x: 100, y: 200 },
859 { x: 200, y: 300 }
860 ]
861 ```
862
863 - `x: number`
864
865 The x-coordinate.
866
867 - `y: number`
868
869 The y-coordinate.
870
871 - `type: "drag"`
872
873 Specifies the event type. For a drag action, this property is always set to `drag`.
874
875 - `"drag"`
876
877 - `keys: optional array of string`
878
879 The keys being held while dragging the mouse.
880
881 - `Keypress = object { keys, type }`
882 725
883 A collection of keypresses the model would like to perform.726 A collection of keypresses the model would like to perform.
884 727
885728 - `keys: array of string` - `Move object { type, x, y, keys }`
886
887 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
888
889 - `type: "keypress"`
890
891 Specifies the event type. For a keypress action, this property is always set to `keypress`.
892
893 - `"keypress"`
894
895 - `Move = object { type, x, y, keys }`
896 729
897 A mouse move action.730 A mouse move action.
898 731
899732 - `type: "move"` - `Screenshot object { type }`
900
901 Specifies the event type. For a move action, this property is always set to `move`.
902
903 - `"move"`
904
905 - `x: number`
906
907 The x-coordinate to move to.
908
909 - `y: number`
910
911 The y-coordinate to move to.
912
913 - `keys: optional array of string`
914
915 The keys being held while moving the mouse.
916
917 - `Screenshot = object { type }`
918 733
919 A screenshot action.734 A screenshot action.
920 735
921736 - `type: "screenshot"` - `Scroll object { scroll_x, scroll_y, type, 3 more }`
922
923 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
924
925 - `"screenshot"`
926
927 - `Scroll = object { scroll_x, scroll_y, type, 3 more }`
928 737
929 A scroll action.738 A scroll action.
930 739
931740 - `scroll_x: number` - `Type object { text, type }`
932
933 The horizontal scroll distance.
934
935 - `scroll_y: number`
936
937 The vertical scroll distance.
938
939 - `type: "scroll"`
940
941 Specifies the event type. For a scroll action, this property is always set to `scroll`.
942
943 - `"scroll"`
944
945 - `x: number`
946
947 The x-coordinate where the scroll occurred.
948
949 - `y: number`
950
951 The y-coordinate where the scroll occurred.
952
953 - `keys: optional array of string`
954
955 The keys being held while scrolling.
956
957 - `Type = object { text, type }`
958 741
959 An action to type in text.742 An action to type in text.
960 743
961744 - `text: string` - `Wait object { type }`
962
963 The text to type.
964
965 - `type: "type"`
966
967 Specifies the event type. For a type action, this property is always set to `type`.
968
969 - `"type"`
970
971 - `Wait = object { type }`
972 745
973 A wait action.746 A wait action.
974 747
975748 - `type: "wait"` - `ComputerCallOutput object { call_id, output, type, 3 more }`
976
977 Specifies the event type. For a wait action, this property is always set to `wait`.
978
979 - `"wait"`
980
981 - `ComputerCallOutput = object { call_id, output, type, 3 more }`
982 749
983 The output of a computer tool call.750 The output of a computer tool call.
984 751
1041 808
1042 - `"incomplete"`809 - `"incomplete"`
1043 810
1044811 - `WebSearchCall = object { id, action, status, type }` - `WebSearchCall object { id, action, status, type }`
1045 812
1046 The results of a web search tool call. See the813 The results of a web search tool call. See the
1047 [web search guide](/docs/guides/tools-web-search) for more information.814 [web search guide](/docs/guides/tools-web-search) for more information.
1055 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.
1056 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).
1057 824
1058825 - `Search = object { query, type, queries, sources }` - `Search object { query, type, queries, sources }`
1059 826
1060 Action type "search" - Performs a web search query.827 Action type "search" - Performs a web search query.
1061 828
1087 854
1088 The URL of the source.855 The URL of the source.
1089 856
1090857 - `OpenPage = object { type, url }` - `OpenPage object { type, url }`
1091 858
1092 Action type "open_page" - Opens a specific URL from search results.859 Action type "open_page" - Opens a specific URL from search results.
1093 860
1101 868
1102 The URL opened by the model.869 The URL opened by the model.
1103 870
1104871 - `FindInPage = object { pattern, type, url }` - `FindInPage object { pattern, type, url }`
1105 872
1106 Action type "find_in_page": Searches for a pattern within a loaded page.873 Action type "find_in_page": Searches for a pattern within a loaded page.
1107 874
1137 904
1138 - `"web_search_call"`905 - `"web_search_call"`
1139 906
1140907 - `FunctionCall = object { arguments, call_id, name, 4 more }` - `FunctionCall object { arguments, call_id, name, 4 more }`
1141 908
1142 A tool call to run a function. See the909 A tool call to run a function. See the
1143 [function calling guide](/docs/guides/function-calling) for more information.910 [function calling guide](/docs/guides/function-calling) for more information.
1179 946
1180 - `"incomplete"`947 - `"incomplete"`
1181 948
1182949 - `FunctionCallOutput = object { call_id, output, type, 2 more }` - `FunctionCallOutput object { call_id, output, type, 2 more }`
1183 950
1184 The output of a function tool call.951 The output of a function tool call.
1185 952
1199 966
1200 An array of content outputs (text, image, file) for the function tool call.967 An array of content outputs (text, image, file) for the function tool call.
1201 968
1202969 - `ResponseInputTextContent = object { text, type }` - `ResponseInputTextContent object { text, type }`
1203 970
1204 A text input to the model.971 A text input to the model.
1205 972
1213 980
1214 - `"input_text"`981 - `"input_text"`
1215 982
1216983 - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - `ResponseInputImageContent object { type, detail, file_id, image_url }`
1217 984
1218 An image input to the model. Learn about [image inputs](/docs/guides/vision)985 An image input to the model. Learn about [image inputs](/docs/guides/vision)
1219 986
1243 1010
1244 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.1011 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
1245 1012
12461013 - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - `ResponseInputFileContent object { type, detail, file_data, 3 more }`
1247 1014
1248 A file input to the model.1015 A file input to the model.
1249 1016
1297 1064
1298 - `"incomplete"`1065 - `"incomplete"`
1299 1066
13001067 - `ToolSearchCall = object { arguments, type, id, 3 more }` - `ToolSearchCall object { arguments, type, id, 3 more }`
1301 1068
1302 - `arguments: unknown`1069 - `arguments: unknown`
1303 1070
1335 1102
1336 - `"incomplete"`1103 - `"incomplete"`
1337 1104
13381105 - `ToolSearchOutput = object { tools, type, id, 3 more }` - `ToolSearchOutput object { tools, type, id, 3 more }`
1339 1106
1340 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`1107 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
1341 1108
1342 The loaded tool definitions returned by the tool search output.1109 The loaded tool definitions returned by the tool search output.
1343 1110
13441111 - `Function = object { name, parameters, strict, 3 more }` - `Function object { name, parameters, strict, 3 more }`
1345 1112
1346 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).1113 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).
1347 1114
1371 1138
1372 A description of the function. Used by the model to determine whether or not to call the function.1139 A description of the function. Used by the model to determine whether or not to call the function.
1373 1140
13741141 - `FileSearch = object { type, vector_store_ids, filters, 2 more }` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
1375 1142
1376 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).1143 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).
1377 1144
1389 1156
1390 A filter to apply.1157 A filter to apply.
1391 1158
13921159 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1393 1160
1394 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1161 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1395 1162
1442 1209
1443 - `number`1210 - `number`
1444 1211
14451212 - `CompoundFilter = object { filters, type }` - `CompoundFilter object { filters, type }`
1446 1213
1447 Combine multiple filters using `and` or `or`.1214 Combine multiple filters using `and` or `or`.
1448 1215
1450 1217
1451 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.1218 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
1452 1219
14531220 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
1454 1221
1455 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1222 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1456 1223
14571224 - `key: string` - `unknown`
1458 1225
14591226 The key to compare against the value. - `type: "and" or "or"`
1460 1227
14611228 - `type: "eq" or "ne" or "gt" or 5 more` Type of operation: `and` or `or`.
1462 1229
14631230 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - `"and"`
1464 1231
14651232 - `eq`: equals - `"or"`
1466 - `ne`: not equal
1467 - `gt`: greater than
1468 - `gte`: greater than or equal
1469 - `lt`: less than
1470 - `lte`: less than or equal
1471 - `in`: in
1472 - `nin`: not in
1473 1233
14741234 - `"eq"` - `max_num_results: optional number`
1475 1235
14761236 - `"ne"` The maximum number of results to return. This number should be between 1 and 50 inclusive.
1477 1237
14781238 - `"gt"` - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
1479 1239
14801240 - `"gte"` Ranking options for search.
1481
1482 - `"lt"`
1483
1484 - `"lte"`
1485
1486 - `"in"`
1487
1488 - `"nin"`
1489
1490 - `value: string or number or boolean or array of string or number`
1491
1492 The value to compare against the attribute key; supports string, number, or boolean types.
1493
1494 - `string`
1495
1496 - `number`
1497
1498 - `boolean`
1499
1500 - `array of string or number`
1501
1502 - `string`
1503
1504 - `number`
1505
1506 - `unknown`
1507
1508 - `type: "and" or "or"`
1509
1510 Type of operation: `and` or `or`.
1511
1512 - `"and"`
1513
1514 - `"or"`
1515
1516 - `max_num_results: optional number`
1517
1518 The maximum number of results to return. This number should be between 1 and 50 inclusive.
1519
1520 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
1521
1522 Ranking options for search.
1523 1241
1524 - `hybrid_search: optional object { embedding_weight, text_weight }`1242 - `hybrid_search: optional object { embedding_weight, text_weight }`
1525 1243
1545 1263
1546 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.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.
1547 1265
15481266 - `Computer = object { type }` - `Computer object { type }`
1549 1267
1550 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1268 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1551 1269
1555 1273
1556 - `"computer"`1274 - `"computer"`
1557 1275
15581276 - `ComputerUsePreview = object { display_height, display_width, environment, type }` - `ComputerUsePreview object { display_height, display_width, environment, type }`
1559 1277
1560 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).1278 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1561 1279
1587 1305
1588 - `"computer_use_preview"`1306 - `"computer_use_preview"`
1589 1307
15901308 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
1591 1309
1592 Search the Internet for sources related to the prompt. Learn more about the1310 Search the Internet for sources related to the prompt. Learn more about the
1593 [web search tool](/docs/guides/tools-web-search).1311 [web search tool](/docs/guides/tools-web-search).
1647 1365
1648 - `"approximate"`1366 - `"approximate"`
1649 1367
16501368 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
1651 1369
1652 Give the model access to additional tools via remote Model Context Protocol1370 Give the model access to additional tools via remote Model Context Protocol
1653 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).1371 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
1670 1388
1671 A string array of allowed tool names1389 A string array of allowed tool names
1672 1390
16731391 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
1674 1392
1675 A filter object to specify which tools are allowed.1393 A filter object to specify which tools are allowed.
1676 1394
1736 1454
1737 Specify which of the MCP server's tools require approval.1455 Specify which of the MCP server's tools require approval.
1738 1456
17391457 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
1740 1458
1741 Specify which of the MCP server's tools require approval. Can be1459 Specify which of the MCP server's tools require approval. Can be
1742 `always`, `never`, or a filter object associated with tools1460 `always`, `never`, or a filter object associated with tools
1789 The URL for the MCP server. One of `server_url` or `connector_id` must be1507 The URL for the MCP server. One of `server_url` or `connector_id` must be
1790 provided.1508 provided.
1791 1509
17921510 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
1793 1511
1794 A tool that runs Python code to help generate a response to a prompt.1512 A tool that runs Python code to help generate a response to a prompt.
1795 1513
1803 1521
1804 The container ID.1522 The container ID.
1805 1523
18061524 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
1807 1525
1808 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.1526 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
1809 1527
1833 1551
1834 Network access policy for the container.1552 Network access policy for the container.
1835 1553
18361554 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
1837 1555
1838 - `type: "disabled"`1556 - `type: "disabled"`
1839 1557
1841 1559
1842 - `"disabled"`1560 - `"disabled"`
1843 1561
18441562 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
1845 1563
1846 - `allowed_domains: array of string`1564 - `allowed_domains: array of string`
1847 1565
1875 1593
1876 - `"code_interpreter"`1594 - `"code_interpreter"`
1877 1595
18781596 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
1879 1597
1880 A tool that generates images using the GPT image models.1598 A tool that generates images using the GPT image models.
1881 1599
1996 1714
1997 - `"auto"`1715 - `"auto"`
1998 1716
19991717 - `LocalShell = object { type }` - `LocalShell object { type }`
2000 1718
2001 A tool that allows the model to execute shell commands in a local environment.1719 A tool that allows the model to execute shell commands in a local environment.
2002 1720
2006 1724
2007 - `"local_shell"`1725 - `"local_shell"`
2008 1726
20091727 - `Shell = object { type, environment }` - `Shell object { type, environment }`
2010 1728
2011 A tool that allows the model to execute shell commands.1729 A tool that allows the model to execute shell commands.
2012 1730
2018 1736
2019 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`1737 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
2020 1738
20211739 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
2022 1740
2023 - `type: "container_auto"`1741 - `type: "container_auto"`
2024 1742
2046 1764
2047 Network access policy for the container.1765 Network access policy for the container.
2048 1766
20491767 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
2050
2051 - `type: "disabled"`
2052
2053 Disable outbound network access. Always `disabled`.
2054
2055 - `"disabled"`
2056
2057 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
2058
2059 - `allowed_domains: array of string`
2060
2061 A list of allowed domains when type is `allowlist`.
2062
2063 - `type: "allowlist"`
2064
2065 Allow outbound network access only to specified domains. Always `allowlist`.
2066
2067 - `"allowlist"`
2068
2069 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
2070
2071 Optional domain-scoped secrets for allowlisted domains.
2072
2073 - `domain: string`
2074
2075 The domain associated with the secret.
2076
2077 - `name: string`
2078
2079 The name of the secret to inject for the domain.
2080
2081 - `value: string`
2082 1768
20831769 The secret value to inject for the domain. - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
2084 1770
2085 - `skills: optional array of SkillReference or InlineSkill`1771 - `skills: optional array of SkillReference or InlineSkill`
2086 1772
2087 An optional list of skills referenced by id or inline data.1773 An optional list of skills referenced by id or inline data.
2088 1774
20891775 - `SkillReference = object { skill_id, type, version }` - `SkillReference object { skill_id, type, version }`
2090 1776
2091 - `skill_id: string`1777 - `skill_id: string`
2092 1778
2102 1788
2103 Optional skill version. Use a positive integer or 'latest'. Omit for default.1789 Optional skill version. Use a positive integer or 'latest'. Omit for default.
2104 1790
21051791 - `InlineSkill = object { description, name, source, type }` - `InlineSkill object { description, name, source, type }`
2106 1792
2107 - `description: string`1793 - `description: string`
2108 1794
2138 1824
2139 - `"inline"`1825 - `"inline"`
2140 1826
21411827 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
2142 1828
2143 - `type: "local"`1829 - `type: "local"`
2144 1830
2162 1848
2163 The path to the directory containing the skill.1849 The path to the directory containing the skill.
2164 1850
21651851 - `ContainerReference = object { container_id, type }` - `ContainerReference object { container_id, type }`
2166 1852
2167 - `container_id: string`1853 - `container_id: string`
2168 1854
2174 1860
2175 - `"container_reference"`1861 - `"container_reference"`
2176 1862
21771863 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2178 1864
2179 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1865 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2180 1866
2200 1886
2201 The input format for the custom tool. Default is unconstrained text.1887 The input format for the custom tool. Default is unconstrained text.
2202 1888
22031889 - `Text = object { type }` - `Text object { type }`
2204 1890
2205 Unconstrained free-form text.1891 Unconstrained free-form text.
2206 1892
2210 1896
2211 - `"text"`1897 - `"text"`
2212 1898
22131899 - `Grammar = object { definition, syntax, type }` - `Grammar object { definition, syntax, type }`
2214 1900
2215 A grammar defined by the user.1901 A grammar defined by the user.
2216 1902
2232 1918
2233 - `"grammar"`1919 - `"grammar"`
2234 1920
22351921 - `Namespace = object { description, name, tools, type }` - `Namespace object { description, name, tools, type }`
2236 1922
2237 Groups function/custom tools under a shared namespace.1923 Groups function/custom tools under a shared namespace.
2238 1924
2248 1934
2249 The function/custom tools available inside this namespace.1935 The function/custom tools available inside this namespace.
2250 1936
22511937 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
2252 1938
2253 - `name: string`1939 - `name: string`
2254 1940
2266 1952
2267 - `strict: optional boolean`1953 - `strict: optional boolean`
2268 1954
22691955 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
2270 1956
2271 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)1957 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2272 1958
2292 1978
2293 The input format for the custom tool. Default is unconstrained text.1979 The input format for the custom tool. Default is unconstrained text.
2294 1980
2295 - `Text = object { type }`
2296
2297 Unconstrained free-form text.
2298
2299 - `type: "text"`
2300
2301 Unconstrained text format. Always `text`.
2302
2303 - `"text"`
2304
2305 - `Grammar = object { definition, syntax, type }`
2306
2307 A grammar defined by the user.
2308
2309 - `definition: string`
2310
2311 The grammar definition.
2312
2313 - `syntax: "lark" or "regex"`
2314
2315 The syntax of the grammar definition. One of `lark` or `regex`.
2316
2317 - `"lark"`
2318
2319 - `"regex"`
2320
2321 - `type: "grammar"`
2322
2323 Grammar format. Always `grammar`.
2324
2325 - `"grammar"`
2326
2327 - `type: "namespace"`1981 - `type: "namespace"`
2328 1982
2329 The type of the tool. Always `namespace`.1983 The type of the tool. Always `namespace`.
2330 1984
2331 - `"namespace"`1985 - `"namespace"`
2332 1986
23331987 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
2334 1988
2335 Hosted or BYOT tool search configuration for deferred tools.1989 Hosted or BYOT tool search configuration for deferred tools.
2336 1990
2356 2010
2357 Parameter schema for a client-executed tool search tool.2011 Parameter schema for a client-executed tool search tool.
2358 2012
23592013 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
2360 2014
2361 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).2015 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).
2362 2016
2410 2064
2411 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.2065 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2412 2066
24132067 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
2414 2068
2415 Allows the assistant to create, delete, or update files using unified diffs.2069 Allows the assistant to create, delete, or update files using unified diffs.
2416 2070
2452 2106
2453 - `"incomplete"`2107 - `"incomplete"`
2454 2108
24552109 - `Reasoning = object { id, summary, type, 3 more }` - `Reasoning object { id, summary, type, 3 more }`
2456 2110
2457 A description of the chain of thought used by a reasoning model while generating2111 A description of the chain of thought used by a reasoning model while generating
2458 a response. Be sure to include these items in your `input` to the Responses API2112 a response. Be sure to include these items in your `input` to the Responses API
2513 2167
2514 - `"incomplete"`2168 - `"incomplete"`
2515 2169
25162170 - `Compaction = object { encrypted_content, type, id }` - `Compaction object { encrypted_content, type, id }`
2517 2171
2518 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).2172 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
2519 2173
2531 2185
2532 The ID of the compaction item.2186 The ID of the compaction item.
2533 2187
25342188 - `ImageGenerationCall = object { id, result, status, type }` - `ImageGenerationCall object { id, result, status, type }`
2535 2189
2536 An image generation request made by the model.2190 An image generation request made by the model.
2537 2191
2561 2215
2562 - `"image_generation_call"`2216 - `"image_generation_call"`
2563 2217
25642218 - `CodeInterpreterCall = object { id, code, container_id, 3 more }` - `CodeInterpreterCall object { id, code, container_id, 3 more }`
2565 2219
2566 A tool call to run code.2220 A tool call to run code.
2567 2221
2582 The outputs generated by the code interpreter, such as logs or images.2236 The outputs generated by the code interpreter, such as logs or images.
2583 Can be null if no outputs are available.2237 Can be null if no outputs are available.
2584 2238
25852239 - `Logs = object { logs, type }` - `Logs object { logs, type }`
2586 2240
2587 The logs output from the code interpreter.2241 The logs output from the code interpreter.
2588 2242
2596 2250
2597 - `"logs"`2251 - `"logs"`
2598 2252
25992253 - `Image = object { type, url }` - `Image object { type, url }`
2600 2254
2601 The image output from the code interpreter.2255 The image output from the code interpreter.
2602 2256
2630 2284
2631 - `"code_interpreter_call"`2285 - `"code_interpreter_call"`
2632 2286
26332287 - `LocalShellCall = object { id, action, call_id, 2 more }` - `LocalShellCall object { id, action, call_id, 2 more }`
2634 2288
2635 A tool call to run a command on the local shell.2289 A tool call to run a command on the local shell.
2636 2290
2688 2342
2689 - `"local_shell_call"`2343 - `"local_shell_call"`
2690 2344
26912345 - `LocalShellCallOutput = object { id, output, type, status }` - `LocalShellCallOutput object { id, output, type, status }`
2692 2346
2693 The output of a local shell tool call.2347 The output of a local shell tool call.
2694 2348
2716 2370
2717 - `"incomplete"`2371 - `"incomplete"`
2718 2372
27192373 - `ShellCall = object { action, call_id, type, 3 more }` - `ShellCall object { action, call_id, type, 3 more }`
2720 2374
2721 A tool representing a request to execute one or more shell commands.2375 A tool representing a request to execute one or more shell commands.
2722 2376
2754 2408
2755 The environment to execute the shell commands in.2409 The environment to execute the shell commands in.
2756 2410
27572411 - `LocalEnvironment = object { type, skills }` - `LocalEnvironment object { type, skills }`
2758
2759 - `type: "local"`
2760
2761 Use a local computer environment.
2762
2763 - `"local"`
2764
2765 - `skills: optional array of LocalSkill`
2766
2767 An optional list of skills.
2768
2769 - `description: string`
2770
2771 The description of the skill.
2772
2773 - `name: string`
2774
2775 The name of the skill.
2776
2777 - `path: string`
2778
2779 The path to the directory containing the skill.
2780
2781 - `ContainerReference = object { container_id, type }`
2782
2783 - `container_id: string`
2784
2785 The ID of the referenced container.
2786
2787 - `type: "container_reference"`
2788
2789 References a container created with the /v1/containers endpoint
2790 2412
27912413 - `"container_reference"` - `ContainerReference object { container_id, type }`
2792 2414
2793 - `status: optional "in_progress" or "completed" or "incomplete"`2415 - `status: optional "in_progress" or "completed" or "incomplete"`
2794 2416
2800 2422
2801 - `"incomplete"`2423 - `"incomplete"`
2802 2424
28032425 - `ShellCallOutput = object { call_id, output, type, 3 more }` - `ShellCallOutput object { call_id, output, type, 3 more }`
2804 2426
2805 The streamed output items emitted by a shell tool call.2427 The streamed output items emitted by a shell tool call.
2806 2428
2816 2438
2817 The exit or timeout outcome associated with this shell call.2439 The exit or timeout outcome associated with this shell call.
2818 2440
28192441 - `Timeout = object { type }` - `Timeout object { type }`
2820 2442
2821 Indicates that the shell call exceeded its configured time limit.2443 Indicates that the shell call exceeded its configured time limit.
2822 2444
2826 2448
2827 - `"timeout"`2449 - `"timeout"`
2828 2450
28292451 - `Exit = object { exit_code, type }` - `Exit object { exit_code, type }`
2830 2452
2831 Indicates that the shell commands finished and returned an exit code.2453 Indicates that the shell commands finished and returned an exit code.
2832 2454
2872 2494
2873 - `"incomplete"`2495 - `"incomplete"`
2874 2496
28752497 - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - `ApplyPatchCall object { call_id, operation, status, 2 more }`
2876 2498
2877 A tool call representing a request to create, delete, or update files using diff patches.2499 A tool call representing a request to create, delete, or update files using diff patches.
2878 2500
2884 2506
2885 The specific create, delete, or update instruction for the apply_patch tool call.2507 The specific create, delete, or update instruction for the apply_patch tool call.
2886 2508
28872509 - `CreateFile = object { diff, path, type }` - `CreateFile object { diff, path, type }`
2888 2510
2889 Instruction for creating a new file via the apply_patch tool.2511 Instruction for creating a new file via the apply_patch tool.
2890 2512
2902 2524
2903 - `"create_file"`2525 - `"create_file"`
2904 2526
29052527 - `DeleteFile = object { path, type }` - `DeleteFile object { path, type }`
2906 2528
2907 Instruction for deleting an existing file via the apply_patch tool.2529 Instruction for deleting an existing file via the apply_patch tool.
2908 2530
2916 2538
2917 - `"delete_file"`2539 - `"delete_file"`
2918 2540
29192541 - `UpdateFile = object { diff, path, type }` - `UpdateFile object { diff, path, type }`
2920 2542
2921 Instruction for updating an existing file via the apply_patch tool.2543 Instruction for updating an existing file via the apply_patch tool.
2922 2544
2952 2574
2953 The unique ID of the apply patch tool call. Populated when this item is returned via API.2575 The unique ID of the apply patch tool call. Populated when this item is returned via API.
2954 2576
29552577 - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`
2956 2578
2957 The streamed output emitted by an apply patch tool call.2579 The streamed output emitted by an apply patch tool call.
2958 2580
2982 2604
2983 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).2605 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).
2984 2606
29852607 - `McpListTools = object { id, server_label, tools, 2 more }` - `McpListTools object { id, server_label, tools, 2 more }`
2986 2608
2987 A list of tools available on an MCP server.2609 A list of tools available on an MCP server.
2988 2610
3024 2646
3025 Error message if the server could not list tools.2647 Error message if the server could not list tools.
3026 2648
30272649 - `McpApprovalRequest = object { id, arguments, name, 2 more }` - `McpApprovalRequest object { id, arguments, name, 2 more }`
3028 2650
3029 A request for human approval of a tool invocation.2651 A request for human approval of a tool invocation.
3030 2652
3050 2672
3051 - `"mcp_approval_request"`2673 - `"mcp_approval_request"`
3052 2674
30532675 - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`
3054 2676
3055 A response to an MCP approval request.2677 A response to an MCP approval request.
3056 2678
3076 2698
3077 Optional reason for the decision.2699 Optional reason for the decision.
3078 2700
30792701 - `McpCall = object { id, arguments, name, 6 more }` - `McpCall object { id, arguments, name, 6 more }`
3080 2702
3081 An invocation of a tool on an MCP server.2703 An invocation of a tool on an MCP server.
3082 2704
3129 2751
3130 - `"failed"`2752 - `"failed"`
3131 2753
31322754 - `CustomToolCallOutput = object { call_id, output, type, id }` - `CustomToolCallOutput object { call_id, output, type, id }`
3133 2755
3134 The output of a custom tool call from your code, being sent back to the model.2756 The output of a custom tool call from your code, being sent back to the model.
3135 2757
3150 2772
3151 Text, image, or file output of the custom tool call.2773 Text, image, or file output of the custom tool call.
3152 2774
31532775 - `ResponseInputText = object { text, type }` - `ResponseInputText object { text, type }`
3154 2776
3155 A text input to the model.2777 A text input to the model.
3156 2778
31572779 - `text: string` - `ResponseInputImage object { detail, type, file_id, image_url }`
3158
3159 The text input to the model.
3160
3161 - `type: "input_text"`
3162
3163 The type of the input item. Always `input_text`.
3164
3165 - `"input_text"`
3166
3167 - `ResponseInputImage = object { detail, type, file_id, image_url }`
3168 2780
3169 An image input to the model. Learn about [image inputs](/docs/guides/vision).2781 An image input to the model. Learn about [image inputs](/docs/guides/vision).
3170 2782
31712783 - `detail: "low" or "high" or "auto" or "original"` - `ResponseInputFile object { type, detail, file_data, 3 more }`
3172
3173 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
3174
3175 - `"low"`
3176
3177 - `"high"`
3178
3179 - `"auto"`
3180
3181 - `"original"`
3182
3183 - `type: "input_image"`
3184
3185 The type of the input item. Always `input_image`.
3186
3187 - `"input_image"`
3188
3189 - `file_id: optional string`
3190
3191 The ID of the file to be sent to the model.
3192
3193 - `image_url: optional string`
3194
3195 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
3196
3197 - `ResponseInputFile = object { type, detail, file_data, 3 more }`
3198 2784
3199 A file input to the model.2785 A file input to the model.
3200 2786
3201 - `type: "input_file"`
3202
3203 The type of the input item. Always `input_file`.
3204
3205 - `"input_file"`
3206
3207 - `detail: optional "low" or "high"`
3208
3209 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`.
3210
3211 - `"low"`
3212
3213 - `"high"`
3214
3215 - `file_data: optional string`
3216
3217 The content of the file to be sent to the model.
3218
3219 - `file_id: optional string`
3220
3221 The ID of the file to be sent to the model.
3222
3223 - `file_url: optional string`
3224
3225 The URL of the file to be sent to the model.
3226
3227 - `filename: optional string`
3228
3229 The name of the file to be sent to the model.
3230
3231 - `type: "custom_tool_call_output"`2787 - `type: "custom_tool_call_output"`
3232 2788
3233 The type of the custom tool call output. Always `custom_tool_call_output`.2789 The type of the custom tool call output. Always `custom_tool_call_output`.
3238 2794
3239 The unique ID of the custom tool call output in the OpenAI platform.2795 The unique ID of the custom tool call output in the OpenAI platform.
3240 2796
32412797 - `CustomToolCall = object { call_id, input, name, 3 more }` - `CustomToolCall object { call_id, input, name, 3 more }`
3242 2798
3243 A call to a custom tool created by the model.2799 A call to a custom tool created by the model.
3244 2800
3268 2824
3269 The namespace of the custom tool being called.2825 The namespace of the custom tool being called.
3270 2826
32712827 - `ItemReference = object { id, type }` - `ItemReference object { id, type }`
3272 2828
3273 An internal identifier for an item to reference.2829 An internal identifier for an item to reference.
3274 2830
3380 ensures the message the model generates is valid JSON. Using `json_schema`2936 ensures the message the model generates is valid JSON. Using `json_schema`
3381 is preferred for models that support it.2937 is preferred for models that support it.
3382 2938
33832939 - `ResponseFormatText = object { type }` - `ResponseFormatText object { type }`
3384 2940
3385 Default response format. Used to generate text responses.2941 Default response format. Used to generate text responses.
3386 2942
3390 2946
3391 - `"text"`2947 - `"text"`
3392 2948
33932949 - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }`
3394 2950
3395 JSON Schema response format. Used to generate structured JSON responses.2951 JSON Schema response format. Used to generate structured JSON responses.
3396 Learn more about [Structured Outputs](/docs/guides/structured-outputs).2952 Learn more about [Structured Outputs](/docs/guides/structured-outputs).
3424 `strict` is `true`. To learn more, read the [Structured Outputs2980 `strict` is `true`. To learn more, read the [Structured Outputs
3425 guide](/docs/guides/structured-outputs).2981 guide](/docs/guides/structured-outputs).
3426 2982
34272983 - `ResponseFormatJSONObject = object { type }` - `ResponseFormatJSONObject object { type }`
3428 2984
3429 JSON object response format. An older method of generating JSON responses.2985 JSON object response format. An older method of generating JSON responses.
3430 Using `json_schema` is recommended for models that support it. Note that the2986 Using `json_schema` is recommended for models that support it. Note that the
3470 3026
3471 - `"required"`3027 - `"required"`
3472 3028
34733029 - `ToolChoiceAllowed = object { mode, tools, type }` - `ToolChoiceAllowed object { mode, tools, type }`
3474 3030
3475 Constrains the tools available to the model to a pre-defined set.3031 Constrains the tools available to the model to a pre-defined set.
3476 3032
3507 3063
3508 - `"allowed_tools"`3064 - `"allowed_tools"`
3509 3065
35103066 - `ToolChoiceTypes = object { type }` - `ToolChoiceTypes object { type }`
3511 3067
3512 Indicates that the model should use a built-in tool to generate a response.3068 Indicates that the model should use a built-in tool to generate a response.
3513 [Learn more about built-in tools](/docs/guides/tools).3069 [Learn more about built-in tools](/docs/guides/tools).
3543 3099
3544 - `"code_interpreter"`3100 - `"code_interpreter"`
3545 3101
35463102 - `ToolChoiceFunction = object { name, type }` - `ToolChoiceFunction object { name, type }`
3547 3103
3548 Use this option to force the model to call a specific function.3104 Use this option to force the model to call a specific function.
3549 3105
3557 3113
3558 - `"function"`3114 - `"function"`
3559 3115
35603116 - `ToolChoiceMcp = object { server_label, type, name }` - `ToolChoiceMcp object { server_label, type, name }`
3561 3117
3562 Use this option to force the model to call a specific tool on a remote MCP server.3118 Use this option to force the model to call a specific tool on a remote MCP server.
3563 3119
3575 3131
3576 The name of the tool to call on the server.3132 The name of the tool to call on the server.
3577 3133
35783134 - `ToolChoiceCustom = object { name, type }` - `ToolChoiceCustom object { name, type }`
3579 3135
3580 Use this option to force the model to call a specific custom tool.3136 Use this option to force the model to call a specific custom tool.
3581 3137
3589 3145
3590 - `"custom"`3146 - `"custom"`
3591 3147
35923148 - `ToolChoiceApplyPatch = object { type }` - `ToolChoiceApplyPatch object { type }`
3593 3149
3594 Forces the model to call the apply_patch tool when executing a tool call.3150 Forces the model to call the apply_patch tool when executing a tool call.
3595 3151
3599 3155
3600 - `"apply_patch"`3156 - `"apply_patch"`
3601 3157
36023158 - `ToolChoiceShell = object { type }` - `ToolChoiceShell object { type }`
3603 3159
3604 Forces the model to call the shell tool when a tool call is required.3160 Forces the model to call the shell tool when a tool call is required.
3605 3161
3613 3169
3614 An array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter.3170 An array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter.
3615 3171
36163172 - `Function = object { name, parameters, strict, 3 more }` - `Function object { name, parameters, strict, 3 more }`
3617 3173
3618 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).3174 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).
3619 3175
3643 3199
3644 A description of the function. Used by the model to determine whether or not to call the function.3200 A description of the function. Used by the model to determine whether or not to call the function.
3645 3201
36463202 - `FileSearch = object { type, vector_store_ids, filters, 2 more }` - `FileSearch object { type, vector_store_ids, filters, 2 more }`
3647 3203
3648 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).3204 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).
3649 3205
3661 3217
3662 A filter to apply.3218 A filter to apply.
3663 3219
36643220 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
3665 3221
3666 A filter used to compare a specified attribute key to a given value using a defined comparison operation.3222 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
3667 3223
36683224 - `key: string` - `CompoundFilter object { filters, type }`
3669 3225
36703226 The key to compare against the value. Combine multiple filters using `and` or `or`.
3671 3227
36723228 - `type: "eq" or "ne" or "gt" or 5 more` - `max_num_results: optional number`
3673 3229
36743230 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. The maximum number of results to return. This number should be between 1 and 50 inclusive.
3675 3231
36763232 - `eq`: equals - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
3677 - `ne`: not equal
3678 - `gt`: greater than
3679 - `gte`: greater than or equal
3680 - `lt`: less than
3681 - `lte`: less than or equal
3682 - `in`: in
3683 - `nin`: not in
3684 3233
36853234 - `"eq"` Ranking options for search.
3686 3235
36873236 - `"ne"` - `hybrid_search: optional object { embedding_weight, text_weight }`
3688 3237
36893238 - `"gt"` Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
3690 3239
36913240 - `"gte"` - `embedding_weight: number`
3692 3241
36933242 - `"lt"` The weight of the embedding in the reciprocal ranking fusion.
3694 3243
36953244 - `"lte"` - `text_weight: number`
3696 3245
36973246 - `"in"` The weight of the text in the reciprocal ranking fusion.
3698 3247
36993248 - `"nin"` - `ranker: optional "auto" or "default-2024-11-15"`
3700 3249
37013250 - `value: string or number or boolean or array of string or number` The ranker to use for the file search.
3702 3251
37033252 The value to compare against the attribute key; supports string, number, or boolean types. - `"auto"`
3704 3253
37053254 - `string` - `"default-2024-11-15"`
3706 3255
37073256 - `number` - `score_threshold: optional number`
3708 3257
37093258 - `boolean` 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.
3710 3259
37113260 - `array of string or number` - `Computer object { type }`
3712 3261
37133262 - `string` A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
3714 3263
37153264 - `number` - `type: "computer"`
3716 3265
37173266 - `CompoundFilter = object { filters, type }` The type of the computer tool. Always `computer`.
3718 3267
37193268 Combine multiple filters using `and` or `or`. - `"computer"`
3720 3269
37213270 - `filters: array of ComparisonFilter or unknown` - `ComputerUsePreview object { display_height, display_width, environment, type }`
3722 3271
37233272 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
3724 3273
37253274 - `ComparisonFilter = object { key, type, value }` - `display_height: number`
3726
3727 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
3728
3729 - `key: string`
3730
3731 The key to compare against the value.
3732
3733 - `type: "eq" or "ne" or "gt" or 5 more`
3734
3735 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
3736
3737 - `eq`: equals
3738 - `ne`: not equal
3739 - `gt`: greater than
3740 - `gte`: greater than or equal
3741 - `lt`: less than
3742 - `lte`: less than or equal
3743 - `in`: in
3744 - `nin`: not in
3745
3746 - `"eq"`
3747
3748 - `"ne"`
3749
3750 - `"gt"`
3751
3752 - `"gte"`
3753
3754 - `"lt"`
3755
3756 - `"lte"`
3757
3758 - `"in"`
3759
3760 - `"nin"`
3761
3762 - `value: string or number or boolean or array of string or number`
3763
3764 The value to compare against the attribute key; supports string, number, or boolean types.
3765
3766 - `string`
3767
3768 - `number`
3769
3770 - `boolean`
3771
3772 - `array of string or number`
3773
3774 - `string`
3775
3776 - `number`
3777
3778 - `unknown`
3779
3780 - `type: "and" or "or"`
3781
3782 Type of operation: `and` or `or`.
3783
3784 - `"and"`
3785
3786 - `"or"`
3787
3788 - `max_num_results: optional number`
3789
3790 The maximum number of results to return. This number should be between 1 and 50 inclusive.
3791
3792 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
3793
3794 Ranking options for search.
3795
3796 - `hybrid_search: optional object { embedding_weight, text_weight }`
3797
3798 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
3799
3800 - `embedding_weight: number`
3801
3802 The weight of the embedding in the reciprocal ranking fusion.
3803
3804 - `text_weight: number`
3805
3806 The weight of the text in the reciprocal ranking fusion.
3807
3808 - `ranker: optional "auto" or "default-2024-11-15"`
3809
3810 The ranker to use for the file search.
3811
3812 - `"auto"`
3813
3814 - `"default-2024-11-15"`
3815
3816 - `score_threshold: optional number`
3817
3818 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.
3819
3820 - `Computer = object { type }`
3821
3822 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
3823
3824 - `type: "computer"`
3825
3826 The type of the computer tool. Always `computer`.
3827
3828 - `"computer"`
3829
3830 - `ComputerUsePreview = object { display_height, display_width, environment, type }`
3831
3832 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
3833
3834 - `display_height: number`
3835 3275
3836 The height of the computer display.3276 The height of the computer display.
3837 3277
3859 3299
3860 - `"computer_use_preview"`3300 - `"computer_use_preview"`
3861 3301
38623302 - `WebSearch = object { type, filters, search_context_size, user_location }` - `WebSearch object { type, filters, search_context_size, user_location }`
3863 3303
3864 Search the Internet for sources related to the prompt. Learn more about the3304 Search the Internet for sources related to the prompt. Learn more about the
3865 [web search tool](/docs/guides/tools-web-search).3305 [web search tool](/docs/guides/tools-web-search).
3919 3359
3920 - `"approximate"`3360 - `"approximate"`
3921 3361
39223362 - `Mcp = object { server_label, type, allowed_tools, 7 more }` - `Mcp object { server_label, type, allowed_tools, 7 more }`
3923 3363
3924 Give the model access to additional tools via remote Model Context Protocol3364 Give the model access to additional tools via remote Model Context Protocol
3925 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).3365 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
3942 3382
3943 A string array of allowed tool names3383 A string array of allowed tool names
3944 3384
39453385 - `McpToolFilter = object { read_only, tool_names }` - `McpToolFilter object { read_only, tool_names }`
3946 3386
3947 A filter object to specify which tools are allowed.3387 A filter object to specify which tools are allowed.
3948 3388
4008 3448
4009 Specify which of the MCP server's tools require approval.3449 Specify which of the MCP server's tools require approval.
4010 3450
40113451 - `McpToolApprovalFilter = object { always, never }` - `McpToolApprovalFilter object { always, never }`
4012 3452
4013 Specify which of the MCP server's tools require approval. Can be3453 Specify which of the MCP server's tools require approval. Can be
4014 `always`, `never`, or a filter object associated with tools3454 `always`, `never`, or a filter object associated with tools
4061 The URL for the MCP server. One of `server_url` or `connector_id` must be3501 The URL for the MCP server. One of `server_url` or `connector_id` must be
4062 provided.3502 provided.
4063 3503
40643504 - `CodeInterpreter = object { container, type }` - `CodeInterpreter object { container, type }`
4065 3505
4066 A tool that runs Python code to help generate a response to a prompt.3506 A tool that runs Python code to help generate a response to a prompt.
4067 3507
4075 3515
4076 The container ID.3516 The container ID.
4077 3517
40783518 - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
4079 3519
4080 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.3520 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
4081 3521
4105 3545
4106 Network access policy for the container.3546 Network access policy for the container.
4107 3547
41083548 - `ContainerNetworkPolicyDisabled = object { type }` - `ContainerNetworkPolicyDisabled object { type }`
4109
4110 - `type: "disabled"`
4111
4112 Disable outbound network access. Always `disabled`.
4113
4114 - `"disabled"`
4115
4116 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
4117
4118 - `allowed_domains: array of string`
4119
4120 A list of allowed domains when type is `allowlist`.
4121
4122 - `type: "allowlist"`
4123
4124 Allow outbound network access only to specified domains. Always `allowlist`.
4125
4126 - `"allowlist"`
4127
4128 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
4129
4130 Optional domain-scoped secrets for allowlisted domains.
4131
4132 - `domain: string`
4133
4134 The domain associated with the secret.
4135
4136 - `name: string`
4137
4138 The name of the secret to inject for the domain.
4139 3549
41403550 - `value: string` - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
4141
4142 The secret value to inject for the domain.
4143 3551
4144 - `type: "code_interpreter"`3552 - `type: "code_interpreter"`
4145 3553
4147 3555
4148 - `"code_interpreter"`3556 - `"code_interpreter"`
4149 3557
41503558 - `ImageGeneration = object { type, action, background, 9 more }` - `ImageGeneration object { type, action, background, 9 more }`
4151 3559
4152 A tool that generates images using the GPT image models.3560 A tool that generates images using the GPT image models.
4153 3561
4268 3676
4269 - `"auto"`3677 - `"auto"`
4270 3678
42713679 - `LocalShell = object { type }` - `LocalShell object { type }`
4272 3680
4273 A tool that allows the model to execute shell commands in a local environment.3681 A tool that allows the model to execute shell commands in a local environment.
4274 3682
4278 3686
4279 - `"local_shell"`3687 - `"local_shell"`
4280 3688
42813689 - `Shell = object { type, environment }` - `Shell object { type, environment }`
4282 3690
4283 A tool that allows the model to execute shell commands.3691 A tool that allows the model to execute shell commands.
4284 3692
4290 3698
4291 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`3699 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
4292 3700
42933701 - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
4294
4295 - `type: "container_auto"`
4296
4297 Automatically creates a container for this request
4298
4299 - `"container_auto"`
4300
4301 - `file_ids: optional array of string`
4302
4303 An optional list of uploaded files to make available to your code.
4304
4305 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`
4306
4307 The memory limit for the container.
4308
4309 - `"1g"`
4310
4311 - `"4g"`
4312
4313 - `"16g"`
4314
4315 - `"64g"`
4316
4317 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`
4318
4319 Network access policy for the container.
4320
4321 - `ContainerNetworkPolicyDisabled = object { type }`
4322 3702
43233703 - `type: "disabled"` - `LocalEnvironment object { type, skills }`
4324
4325 Disable outbound network access. Always `disabled`.
4326 3704
43273705 - `"disabled"` - `ContainerReference object { container_id, type }`
4328
4329 - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }`
4330 3706
43313707 - `allowed_domains: array of string` - `Custom object { name, type, defer_loading, 2 more }`
4332
4333 A list of allowed domains when type is `allowlist`.
4334
4335 - `type: "allowlist"`
4336
4337 Allow outbound network access only to specified domains. Always `allowlist`.
4338
4339 - `"allowlist"`
4340
4341 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
4342
4343 Optional domain-scoped secrets for allowlisted domains.
4344
4345 - `domain: string`
4346
4347 The domain associated with the secret.
4348
4349 - `name: string`
4350
4351 The name of the secret to inject for the domain.
4352
4353 - `value: string`
4354
4355 The secret value to inject for the domain.
4356
4357 - `skills: optional array of SkillReference or InlineSkill`
4358
4359 An optional list of skills referenced by id or inline data.
4360
4361 - `SkillReference = object { skill_id, type, version }`
4362
4363 - `skill_id: string`
4364
4365 The ID of the referenced skill.
4366
4367 - `type: "skill_reference"`
4368
4369 References a skill created with the /v1/skills endpoint.
4370
4371 - `"skill_reference"`
4372
4373 - `version: optional string`
4374
4375 Optional skill version. Use a positive integer or 'latest'. Omit for default.
4376
4377 - `InlineSkill = object { description, name, source, type }`
4378
4379 - `description: string`
4380
4381 The description of the skill.
4382
4383 - `name: string`
4384
4385 The name of the skill.
4386
4387 - `source: InlineSkillSource`
4388
4389 Inline skill payload
4390
4391 - `data: string`
4392
4393 Base64-encoded skill zip bundle.
4394
4395 - `media_type: "application/zip"`
4396
4397 The media type of the inline skill payload. Must be `application/zip`.
4398
4399 - `"application/zip"`
4400
4401 - `type: "base64"`
4402
4403 The type of the inline skill source. Must be `base64`.
4404
4405 - `"base64"`
4406
4407 - `type: "inline"`
4408
4409 Defines an inline skill for this request.
4410
4411 - `"inline"`
4412
4413 - `LocalEnvironment = object { type, skills }`
4414
4415 - `type: "local"`
4416
4417 Use a local computer environment.
4418
4419 - `"local"`
4420
4421 - `skills: optional array of LocalSkill`
4422
4423 An optional list of skills.
4424
4425 - `description: string`
4426
4427 The description of the skill.
4428
4429 - `name: string`
4430
4431 The name of the skill.
4432
4433 - `path: string`
4434
4435 The path to the directory containing the skill.
4436
4437 - `ContainerReference = object { container_id, type }`
4438
4439 - `container_id: string`
4440
4441 The ID of the referenced container.
4442
4443 - `type: "container_reference"`
4444
4445 References a container created with the /v1/containers endpoint
4446
4447 - `"container_reference"`
4448
4449 - `Custom = object { name, type, defer_loading, 2 more }`
4450 3708
4451 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)3709 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
4452 3710
4472 3730
4473 The input format for the custom tool. Default is unconstrained text.3731 The input format for the custom tool. Default is unconstrained text.
4474 3732
44753733 - `Text = object { type }` - `Namespace object { description, name, tools, type }`
4476
4477 Unconstrained free-form text.
4478
4479 - `type: "text"`
4480
4481 Unconstrained text format. Always `text`.
4482
4483 - `"text"`
4484
4485 - `Grammar = object { definition, syntax, type }`
4486
4487 A grammar defined by the user.
4488
4489 - `definition: string`
4490
4491 The grammar definition.
4492
4493 - `syntax: "lark" or "regex"`
4494
4495 The syntax of the grammar definition. One of `lark` or `regex`.
4496
4497 - `"lark"`
4498
4499 - `"regex"`
4500
4501 - `type: "grammar"`
4502
4503 Grammar format. Always `grammar`.
4504
4505 - `"grammar"`
4506
4507 - `Namespace = object { description, name, tools, type }`
4508 3734
4509 Groups function/custom tools under a shared namespace.3735 Groups function/custom tools under a shared namespace.
4510 3736
4520 3746
4521 The function/custom tools available inside this namespace.3747 The function/custom tools available inside this namespace.
4522 3748
45233749 - `Function = object { name, type, defer_loading, 3 more }` - `Function object { name, type, defer_loading, 3 more }`
4524 3750
4525 - `name: string`3751 - `name: string`
4526 3752
4538 3764
4539 - `strict: optional boolean`3765 - `strict: optional boolean`
4540 3766
45413767 - `Custom = object { name, type, defer_loading, 2 more }` - `Custom object { name, type, defer_loading, 2 more }`
4542 3768
4543 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)3769 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
4544 3770
4564 3790
4565 The input format for the custom tool. Default is unconstrained text.3791 The input format for the custom tool. Default is unconstrained text.
4566 3792
4567 - `Text = object { type }`
4568
4569 Unconstrained free-form text.
4570
4571 - `type: "text"`
4572
4573 Unconstrained text format. Always `text`.
4574
4575 - `"text"`
4576
4577 - `Grammar = object { definition, syntax, type }`
4578
4579 A grammar defined by the user.
4580
4581 - `definition: string`
4582
4583 The grammar definition.
4584
4585 - `syntax: "lark" or "regex"`
4586
4587 The syntax of the grammar definition. One of `lark` or `regex`.
4588
4589 - `"lark"`
4590
4591 - `"regex"`
4592
4593 - `type: "grammar"`
4594
4595 Grammar format. Always `grammar`.
4596
4597 - `"grammar"`
4598
4599 - `type: "namespace"`3793 - `type: "namespace"`
4600 3794
4601 The type of the tool. Always `namespace`.3795 The type of the tool. Always `namespace`.
4602 3796
4603 - `"namespace"`3797 - `"namespace"`
4604 3798
46053799 - `ToolSearch = object { type, description, execution, parameters }` - `ToolSearch object { type, description, execution, parameters }`
4606 3800
4607 Hosted or BYOT tool search configuration for deferred tools.3801 Hosted or BYOT tool search configuration for deferred tools.
4608 3802
4628 3822
4629 Parameter schema for a client-executed tool search tool.3823 Parameter schema for a client-executed tool search tool.
4630 3824
46313825 - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
4632 3826
4633 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).3827 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).
4634 3828
4682 3876
4683 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.3877 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
4684 3878
46853879 - `ApplyPatch = object { type }` - `ApplyPatch object { type }`
4686 3880
4687 Allows the assistant to create, delete, or update files using unified diffs.3881 Allows the assistant to create, delete, or update files using unified diffs.
4688 3882
4745 "input_tokens": 113939 "input_tokens": 11
4746}3940}
4747```3941```
3942
3943## Domain Types
3944
3945### Input Token Count Response
3946
3947- `InputTokenCountResponse object { input_tokens, object }`
3948
3949 - `input_tokens: number`
3950
3951 - `object: "response.input_tokens"`
3952
3953 - `"response.input_tokens"`
12 12
13### Returns13### Returns
14 14
1515- `Upload = object { id, bytes, created_at, 6 more }`- `Upload object { id, bytes, created_at, 6 more }`
16 16
17 The Upload object can accept byte chunks in the form of Parts.17 The Upload object can accept byte chunks in the form of Parts.
18 18
70 70
71### Returns71### Returns
72 72
7373- `Upload = object { id, bytes, created_at, 6 more }`- `Upload object { id, bytes, created_at, 6 more }`
74 74
75 The Upload object can accept byte chunks in the form of Parts.75 The Upload object can accept byte chunks in the form of Parts.
76 76
14 14
15### Returns15### Returns
16 16
1717- `UploadPart = object { id, created_at, object, upload_id }`- `UploadPart object { id, created_at, object, upload_id }`
18 18
19 The upload Part represents a chunk of bytes we can add to an Upload object.19 The upload Part represents a chunk of bytes we can add to an Upload object.
20 20
10 10
11 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.11 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.
12 12
1313 - `AutoFileChunkingStrategyParam = object { type }` - `AutoFileChunkingStrategyParam object { type }`
14 14
15 The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.15 The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
16 16
20 20
21 - `"auto"`21 - `"auto"`
22 22
2323 - `StaticFileChunkingStrategyObjectParam = object { static, type }` - `StaticFileChunkingStrategyObjectParam object { static, type }`
24 24
25 Customize your own chunking strategy by setting chunk size and chunk overlap.25 Customize your own chunking strategy by setting chunk size and chunk overlap.
26 26
79 79
80### Returns80### Returns
81 81
8282- `VectorStore = object { id, created_at, file_counts, 8 more }`- `VectorStore object { id, created_at, file_counts, 8 more }`
83 83
84 A vector store is a collection of processed files can be used by the `file_search` tool.84 A vector store is a collection of processed files can be used by the `file_search` tool.
85 85
10 10
11### Returns11### Returns
12 12
1313- `VectorStoreDeleted = object { id, deleted, object }`- `VectorStoreDeleted object { id, deleted, object }`
14 14
15 - `id: string`15 - `id: string`
16 16
10 10
11### Returns11### Returns
12 12
1313- `VectorStore = object { id, created_at, file_counts, 8 more }`- `VectorStore object { id, created_at, file_counts, 8 more }`
14 14
15 A vector store is a collection of processed files can be used by the `file_search` tool.15 A vector store is a collection of processed files can be used by the `file_search` tool.
16 16
22 22
23 A filter to apply based on file attributes.23 A filter to apply based on file attributes.
24 24
2525 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
26 26
27 A filter used to compare a specified attribute key to a given value using a defined comparison operation.27 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
28 28
75 75
76 - `number`76 - `number`
77 77
7878 - `CompoundFilter = object { filters, type }` - `CompoundFilter object { filters, type }`
79 79
80 Combine multiple filters using `and` or `or`.80 Combine multiple filters using `and` or `or`.
81 81
83 83
84 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.84 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
85 85
8686 - `ComparisonFilter = object { key, type, value }` - `ComparisonFilter object { key, type, value }`
87 87
88 A filter used to compare a specified attribute key to a given value using a defined comparison operation.88 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
89 89
90 - `key: string`
91
92 The key to compare against the value.
93
94 - `type: "eq" or "ne" or "gt" or 5 more`
95
96 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
97
98 - `eq`: equals
99 - `ne`: not equal
100 - `gt`: greater than
101 - `gte`: greater than or equal
102 - `lt`: less than
103 - `lte`: less than or equal
104 - `in`: in
105 - `nin`: not in
106
107 - `"eq"`
108
109 - `"ne"`
110
111 - `"gt"`
112
113 - `"gte"`
114
115 - `"lt"`
116
117 - `"lte"`
118
119 - `"in"`
120
121 - `"nin"`
122
123 - `value: string or number or boolean or array of string or number`
124
125 The value to compare against the attribute key; supports string, number, or boolean types.
126
127 - `string`
128
129 - `number`
130
131 - `boolean`
132
133 - `array of string or number`
134
135 - `string`
136
137 - `number`
138
139 - `unknown`90 - `unknown`
140 91
141 - `type: "and" or "or"`92 - `type: "and" or "or"`
39 39
40### Returns40### Returns
41 41
4242- `VectorStore = object { id, created_at, file_counts, 8 more }`- `VectorStore object { id, created_at, file_counts, 8 more }`
43 43
44 A vector store is a collection of processed files can be used by the `file_search` tool.44 A vector store is a collection of processed files can be used by the `file_search` tool.
45 45
12 12
13### Returns13### Returns
14 14
1515- `VectorStoreFileBatch = object { id, created_at, file_counts, 3 more }`- `VectorStoreFileBatch object { id, created_at, file_counts, 3 more }`
16 16
17 A batch of files attached to a vector store.17 A batch of files attached to a vector store.
18 18
28 28
29 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.29 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.
30 30
3131 - `AutoFileChunkingStrategyParam = object { type }` - `AutoFileChunkingStrategyParam object { type }`
32 32
33 The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.33 The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
34 34
38 38
39 - `"auto"`39 - `"auto"`
40 40
4141 - `StaticFileChunkingStrategyObjectParam = object { static, type }` - `StaticFileChunkingStrategyObjectParam object { static, type }`
42 42
43 Customize your own chunking strategy by setting chunk size and chunk overlap.43 Customize your own chunking strategy by setting chunk size and chunk overlap.
44 44
90 90
91 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.91 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.
92 92
93 - `AutoFileChunkingStrategyParam = object { type }`
94
95 The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
96
97 - `type: "auto"`
98
99 Always `auto`.
100
101 - `"auto"`
102
103 - `StaticFileChunkingStrategyObjectParam = object { static, type }`
104
105 Customize your own chunking strategy by setting chunk size and chunk overlap.
106
107 - `static: StaticFileChunkingStrategy`
108
109 - `chunk_overlap_tokens: number`
110
111 The number of tokens that overlap between chunks. The default value is `400`.
112
113 Note that the overlap must not exceed half of `max_chunk_size_tokens`.
114
115 - `max_chunk_size_tokens: number`
116
117 The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.
118
119 - `type: "static"`
120
121 Always `static`.
122
123 - `"static"`
124
125### Returns93### Returns
126 94
12795- `VectorStoreFileBatch = object { id, created_at, file_counts, 3 more }`- `VectorStoreFileBatch object { id, created_at, file_counts, 3 more }`
128 96
129 A batch of files attached to a vector store.97 A batch of files attached to a vector store.
130 98
118 118
119 The strategy used to chunk the file.119 The strategy used to chunk the file.
120 120
121121 - `StaticFileChunkingStrategyObject = object { static, type }` - `StaticFileChunkingStrategyObject object { static, type }`
122 122
123 - `static: StaticFileChunkingStrategy`123 - `static: StaticFileChunkingStrategy`
124 124
138 138
139 - `"static"`139 - `"static"`
140 140
141141 - `OtherFileChunkingStrategyObject = object { type }` - `OtherFileChunkingStrategyObject object { type }`
142 142
143 This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.143 This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.
144 144
12 12
13### Returns13### Returns
14 14
1515- `VectorStoreFileBatch = object { id, created_at, file_counts, 3 more }`- `VectorStoreFileBatch object { id, created_at, file_counts, 3 more }`
16 16
17 A batch of files attached to a vector store.17 A batch of files attached to a vector store.
18 18
32 32
33 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.33 The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.
34 34
3535 - `AutoFileChunkingStrategyParam = object { type }` - `AutoFileChunkingStrategyParam object { type }`
36 36
37 The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.37 The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
38 38
42 42
43 - `"auto"`43 - `"auto"`
44 44
4545 - `StaticFileChunkingStrategyObjectParam = object { static, type }` - `StaticFileChunkingStrategyObjectParam object { static, type }`
46 46
47 Customize your own chunking strategy by setting chunk size and chunk overlap.47 Customize your own chunking strategy by setting chunk size and chunk overlap.
48 48
66 66
67### Returns67### Returns
68 68
6969- `VectorStoreFile = object { id, created_at, last_error, 6 more }`- `VectorStoreFile object { id, created_at, last_error, 6 more }`
70 70
71 A list of files attached to a vector store.71 A list of files attached to a vector store.
72 72
140 140
141 The strategy used to chunk the file.141 The strategy used to chunk the file.
142 142
143143 - `StaticFileChunkingStrategyObject = object { static, type }` - `StaticFileChunkingStrategyObject object { static, type }`
144 144
145 - `static: StaticFileChunkingStrategy`145 - `static: StaticFileChunkingStrategy`
146 146
160 160
161 - `"static"`161 - `"static"`
162 162
163163 - `OtherFileChunkingStrategyObject = object { type }` - `OtherFileChunkingStrategyObject object { type }`
164 164
165 This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.165 This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.
166 166
12 12
13### Returns13### Returns
14 14
1515- `VectorStoreFileDeleted = object { id, deleted, object }`- `VectorStoreFileDeleted object { id, deleted, object }`
16 16
17 - `id: string`17 - `id: string`
18 18
116 116
117 The strategy used to chunk the file.117 The strategy used to chunk the file.
118 118
119119 - `StaticFileChunkingStrategyObject = object { static, type }` - `StaticFileChunkingStrategyObject object { static, type }`
120 120
121 - `static: StaticFileChunkingStrategy`121 - `static: StaticFileChunkingStrategy`
122 122
136 136
137 - `"static"`137 - `"static"`
138 138
139139 - `OtherFileChunkingStrategyObject = object { type }` - `OtherFileChunkingStrategyObject object { type }`
140 140
141 This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.141 This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.
142 142
12 12
13### Returns13### Returns
14 14
1515- `VectorStoreFile = object { id, created_at, last_error, 6 more }`- `VectorStoreFile object { id, created_at, last_error, 6 more }`
16 16
17 A list of files attached to a vector store.17 A list of files attached to a vector store.
18 18
86 86
87 The strategy used to chunk the file.87 The strategy used to chunk the file.
88 88
8989 - `StaticFileChunkingStrategyObject = object { static, type }` - `StaticFileChunkingStrategyObject object { static, type }`
90 90
91 - `static: StaticFileChunkingStrategy`91 - `static: StaticFileChunkingStrategy`
92 92
106 106
107 - `"static"`107 - `"static"`
108 108
109109 - `OtherFileChunkingStrategyObject = object { type }` - `OtherFileChunkingStrategyObject object { type }`
110 110
111 This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.111 This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.
112 112
28 28
29### Returns29### Returns
30 30
3131- `VectorStoreFile = object { id, created_at, last_error, 6 more }`- `VectorStoreFile object { id, created_at, last_error, 6 more }`
32 32
33 A list of files attached to a vector store.33 A list of files attached to a vector store.
34 34
102 102
103 The strategy used to chunk the file.103 The strategy used to chunk the file.
104 104
105105 - `StaticFileChunkingStrategyObject = object { static, type }` - `StaticFileChunkingStrategyObject object { static, type }`
106 106
107 - `static: StaticFileChunkingStrategy`107 - `static: StaticFileChunkingStrategy`
108 108
122 122
123 - `"static"`123 - `"static"`
124 124
125125 - `OtherFileChunkingStrategyObject = object { type }` - `OtherFileChunkingStrategyObject object { type }`
126 126
127 This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.127 This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.
128 128
62 62
63### Returns63### Returns
64 64
6565- `Video = object { id, completed_at, created_at, 10 more }`- `Video object { id, completed_at, created_at, 10 more }`
66 66
67 Structured information describing a generated video job.67 Structured information describing a generated video job.
68 68
10 10
11### Returns11### Returns
12 12
1313- `Video = object { id, completed_at, created_at, 10 more }`- `Video object { id, completed_at, created_at, 10 more }`
14 14
15 Structured information describing a generated video job.15 Structured information describing a generated video job.
16 16