202 202
203 - `string`203 - `string`
204 204
205- `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 26 more`205- `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 27 more`
206 206
207 Text, image, or file inputs to the model, used to generate a response207 Text, image, or file inputs to the model, used to generate a response
208 208
210 210
211 A text input to the model, equivalent to a text input with the `user` role.211 A text input to the model, equivalent to a text input with the `user` role.
212 212
213 - `array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 26 more`213 - `array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 27 more`
214 214
215 A list of one or many input items to the model, containing different content types.215 A list of one or many input items to the model, containing different content types.
216 216
992 992
993 The unique ID of the web search tool call.993 The unique ID of the web search tool call.
994 994
995 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`995 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`
996 996
997 An object describing the specific action taken in this web search call.997 An object describing the specific action taken in this web search call.
998 Includes details on how the model used the web (search, open_page, find_in_page).998 Includes details on how the model used the web (search, open_page, find_in_page).
999 999
1000 - `Search object { query, type, queries, sources }`1000 - `Search object { type, queries, query, sources }`
1001 1001
1002 Action type "search" - Performs a web search query.1002 Action type "search" - Performs a web search query.
1003 1003
1004 - `query: string`
1005
1006 [DEPRECATED] The search query.
1007
1008 - `type: "search"`1004 - `type: "search"`
1009 1005
1010 The action type.1006 The action type.
1015 1011
1016 The search queries.1012 The search queries.
1017 1013
1014 - `query: optional string`
1015
1016 The search query.
1017
1018 - `sources: optional array of object { type, url }`1018 - `sources: optional array of object { type, url }`
1019 1019
1020 The sources used in the search.1020 The sources used in the search.
2286 2286
2287 - `"incomplete"`2287 - `"incomplete"`
2288 2288
2289 - `Reasoning object { id, summary, type, 3 more }`2289 - `AdditionalTools object { role, tools, type, id }`
2290
2291 A description of the chain of thought used by a reasoning model while generating
2292 a response. Be sure to include these items in your `input` to the Responses API
2293 for subsequent turns of a conversation if you are manually
2294 [managing context](/docs/guides/conversation-state).
2295 2290
2296 - `id: string`2291 - `role: "developer"`
2297 2292
2298 The unique identifier of the reasoning content.2293 The role that provided the additional tools. Only `developer` is supported.
2299 2294
2300 - `summary: array of SummaryTextContent`2295 - `"developer"`
2301 2296
2302 Reasoning summary content.2297 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
2303 2298
2304 - `text: string`2299 A list of additional tools made available at this item.
2305 2300
2306 A summary of the reasoning output from the model so far.2301 - `Function object { name, parameters, strict, 3 more }`
2307 2302
2308 - `type: "summary_text"`2303 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).
2309 2304
2310 The type of the object. Always `summary_text`.2305 - `name: string`
2311 2306
2312 - `"summary_text"`2307 The name of the function to call.
2313 2308
2314 - `type: "reasoning"`2309 - `parameters: map[unknown]`
2315 2310
2316 The type of the object. Always `reasoning`.2311 A JSON schema object describing the parameters of the function.
2317 2312
2318 - `"reasoning"`2313 - `strict: boolean`
2319 2314
2320 - `content: optional array of object { text, type }`2315 Whether to enforce strict parameter validation. Default `true`.
2321 2316
2322 Reasoning text content.2317 - `type: "function"`
2323 2318
2324 - `text: string`2319 The type of the function tool. Always `function`.
2325 2320
2326 The reasoning text from the model.2321 - `"function"`
2327 2322
2328 - `type: "reasoning_text"`2323 - `defer_loading: optional boolean`
2329 2324
2330 The type of the reasoning text. Always `reasoning_text`.2325 Whether this function is deferred and loaded via tool search.
2331 2326
2332 - `"reasoning_text"`2327 - `description: optional string`
2333 2328
2334 - `encrypted_content: optional string`2329 A description of the function. Used by the model to determine whether or not to call the function.
2335 2330
2336 The encrypted content of the reasoning item - populated when a response is2331 - `FileSearch object { type, vector_store_ids, filters, 2 more }`
2337 generated with `reasoning.encrypted_content` in the `include` parameter.
2338 2332
2339 - `status: optional "in_progress" or "completed" or "incomplete"`2333 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).
2340 2334
2341 The status of the item. One of `in_progress`, `completed`, or2335 - `type: "file_search"`
2342 `incomplete`. Populated when items are returned via API.
2343 2336
2344 - `"in_progress"`2337 The type of the file search tool. Always `file_search`.
2345 2338
2346 - `"completed"`2339 - `"file_search"`
2347 2340
2348 - `"incomplete"`2341 - `vector_store_ids: array of string`
2349 2342
2350 - `Compaction object { encrypted_content, type, id }`2343 The IDs of the vector stores to search.
2351 2344
2352 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).2345 - `filters: optional ComparisonFilter or CompoundFilter`
2353 2346
2354 - `encrypted_content: string`2347 A filter to apply.
2355 2348
2356 The encrypted content of the compaction summary.2349 - `ComparisonFilter object { key, type, value }`
2357 2350
2358 - `type: "compaction"`2351 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
2359 2352
2360 The type of the item. Always `compaction`.2353 - `CompoundFilter object { filters, type }`
2361 2354
2362 - `"compaction"`2355 Combine multiple filters using `and` or `or`.
2363 2356
2364 - `id: optional string`2357 - `max_num_results: optional number`
2365 2358
2366 The ID of the compaction item.2359 The maximum number of results to return. This number should be between 1 and 50 inclusive.
2367 2360
2368 - `ImageGenerationCall object { id, result, status, type }`2361 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
2369 2362
2370 An image generation request made by the model.2363 Ranking options for search.
2371 2364
2372 - `id: string`2365 - `hybrid_search: optional object { embedding_weight, text_weight }`
2373 2366
2374 The unique ID of the image generation call.2367 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
2375 2368
2376 - `result: string`2369 - `embedding_weight: number`
2377 2370
2378 The generated image encoded in base64.2371 The weight of the embedding in the reciprocal ranking fusion.
2379 2372
2380 - `status: "in_progress" or "completed" or "generating" or "failed"`2373 - `text_weight: number`
2381 2374
2382 The status of the image generation call.2375 The weight of the text in the reciprocal ranking fusion.
2383 2376
2384 - `"in_progress"`2377 - `ranker: optional "auto" or "default-2024-11-15"`
2385 2378
2386 - `"completed"`2379 The ranker to use for the file search.
2387 2380
2388 - `"generating"`2381 - `"auto"`
2389 2382
2390 - `"failed"`2383 - `"default-2024-11-15"`
2391 2384
2392 - `type: "image_generation_call"`2385 - `score_threshold: optional number`
2393 2386
2394 The type of the image generation call. Always `image_generation_call`.2387 The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
2395 2388
2396 - `"image_generation_call"`2389 - `Computer object { type }`
2397 2390
2398 - `CodeInterpreterCall object { id, code, container_id, 3 more }`2391 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
2399 2392
2400 A tool call to run code.2393 - `type: "computer"`
2401 2394
2402 - `id: string`2395 The type of the computer tool. Always `computer`.
2403 2396
2404 The unique ID of the code interpreter tool call.2397 - `"computer"`
2405 2398
2406 - `code: string`2399 - `ComputerUsePreview object { display_height, display_width, environment, type }`
2407 2400
2408 The code to run, or null if not available.2401 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
2409 2402
2410 - `container_id: string`2403 - `display_height: number`
2411 2404
2412 The ID of the container used to run the code.2405 The height of the computer display.
2413 2406
2414 - `outputs: array of object { logs, type } or object { type, url }`2407 - `display_width: number`
2415 2408
2416 The outputs generated by the code interpreter, such as logs or images.2409 The width of the computer display.
2417 Can be null if no outputs are available.
2418 2410
2419 - `Logs object { logs, type }`2411 - `environment: "windows" or "mac" or "linux" or 2 more`
2420 2412
2421 The logs output from the code interpreter.2413 The type of computer environment to control.
2422 2414
2423 - `logs: string`2415 - `"windows"`
2424 2416
2425 The logs output from the code interpreter.2417 - `"mac"`
2426 2418
2427 - `type: "logs"`2419 - `"linux"`
2428 2420
2429 The type of the output. Always `logs`.2421 - `"ubuntu"`
2430 2422
2431 - `"logs"`2423 - `"browser"`
2432 2424
2433 - `Image object { type, url }`2425 - `type: "computer_use_preview"`
2434 2426
2435 The image output from the code interpreter.2427 The type of the computer use tool. Always `computer_use_preview`.
2436 2428
2437 - `type: "image"`2429 - `"computer_use_preview"`
2438 2430
2439 The type of the output. Always `image`.2431 - `WebSearch object { type, filters, search_context_size, user_location }`
2440 2432
2441 - `"image"`2433 Search the Internet for sources related to the prompt. Learn more about the
2434 [web search tool](/docs/guides/tools-web-search).
2442 2435
2443 - `url: string`2436 - `type: "web_search" or "web_search_2025_08_26"`
2444 2437
2445 The URL of the image output from the code interpreter.2438 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
2446 2439
2447 - `status: "in_progress" or "completed" or "incomplete" or 2 more`2440 - `"web_search"`
2448 2441
2449 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.2442 - `"web_search_2025_08_26"`
2450 2443
2451 - `"in_progress"`2444 - `filters: optional object { allowed_domains }`
2452 2445
2453 - `"completed"`2446 Filters for the search.
2454 2447
2455 - `"incomplete"`2448 - `allowed_domains: optional array of string`
2456 2449
2457 - `"interpreting"`2450 Allowed domains for the search. If not provided, all domains are allowed.
2451 Subdomains of the provided domains are allowed as well.
2458 2452
2459 - `"failed"`2453 Example: `["pubmed.ncbi.nlm.nih.gov"]`
2460 2454
2461 - `type: "code_interpreter_call"`2455 - `search_context_size: optional "low" or "medium" or "high"`
2462 2456
2463 The type of the code interpreter tool call. Always `code_interpreter_call`.2457 High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
2464 2458
2465 - `"code_interpreter_call"`2459 - `"low"`
2466 2460
2467 - `LocalShellCall object { id, action, call_id, 2 more }`2461 - `"medium"`
2468 2462
2469 A tool call to run a command on the local shell.2463 - `"high"`
2470 2464
2471 - `id: string`2465 - `user_location: optional object { city, country, region, 2 more }`
2472 2466
2473 The unique ID of the local shell call.2467 The approximate location of the user.
2474 2468
2475 - `action: object { command, env, type, 3 more }`2469 - `city: optional string`
2476 2470
2477 Execute a shell command on the server.2471 Free text input for the city of the user, e.g. `San Francisco`.
2478 2472
2479 - `command: array of string`2473 - `country: optional string`
2480 2474
2481 The command to run.2475 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
2482 2476
2483 - `env: map[string]`2477 - `region: optional string`
2484 2478
2485 Environment variables to set for the command.2479 Free text input for the region of the user, e.g. `California`.
2486 2480
2487 - `type: "exec"`2481 - `timezone: optional string`
2488 2482
2489 The type of the local shell action. Always `exec`.2483 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2490 2484
2491 - `"exec"`2485 - `type: optional "approximate"`
2492 2486
2493 - `timeout_ms: optional number`2487 The type of location approximation. Always `approximate`.
2494 2488
2495 Optional timeout in milliseconds for the command.2489 - `"approximate"`
2496 2490
2497 - `user: optional string`2491 - `Mcp object { server_label, type, allowed_tools, 7 more }`
2498 2492
2499 Optional user to run the command as.2493 Give the model access to additional tools via remote Model Context Protocol
2494 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
2500 2495
2501 - `working_directory: optional string`2496 - `server_label: string`
2502 2497
2503 Optional working directory to run the command in.2498 A label for this MCP server, used to identify it in tool calls.
2504 2499
2505 - `call_id: string`2500 - `type: "mcp"`
2506 2501
2507 The unique ID of the local shell tool call generated by the model.2502 The type of the MCP tool. Always `mcp`.
2508 2503
2509 - `status: "in_progress" or "completed" or "incomplete"`2504 - `"mcp"`
2510 2505
2511 The status of the local shell call.2506 - `allowed_tools: optional array of string or object { read_only, tool_names }`
2512 2507
2513 - `"in_progress"`2508 List of allowed tool names or a filter object.
2514 2509
2515 - `"completed"`2510 - `McpAllowedTools = array of string`
2516 2511
2517 - `"incomplete"`2512 A string array of allowed tool names
2518 2513
2519 - `type: "local_shell_call"`2514 - `McpToolFilter object { read_only, tool_names }`
2520 2515
2521 The type of the local shell call. Always `local_shell_call`.2516 A filter object to specify which tools are allowed.
2522 2517
2523 - `"local_shell_call"`2518 - `read_only: optional boolean`
2524 2519
2525 - `LocalShellCallOutput object { id, output, type, status }`2520 Indicates whether or not a tool modifies data or is read-only. If an
2521 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
2522 it will match this filter.
2526 2523
2527 The output of a local shell tool call.2524 - `tool_names: optional array of string`
2528 2525
2529 - `id: string`2526 List of allowed tool names.
2530 2527
2531 The unique ID of the local shell tool call generated by the model.2528 - `authorization: optional string`
2532 2529
2533 - `output: string`2530 An OAuth access token that can be used with a remote MCP server, either
2531 with a custom MCP server URL or a service connector. Your application
2532 must handle the OAuth authorization flow and provide the token here.
2534 2533
2535 A JSON string of the output of the local shell tool call.2534 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`
2536 2535
2537 - `type: "local_shell_call_output"`2536 Identifier for service connectors, like those available in ChatGPT. One of
2537 `server_url` or `connector_id` must be provided. Learn more about service
2538 connectors [here](/docs/guides/tools-remote-mcp#connectors).
2538 2539
2539 The type of the local shell tool call output. Always `local_shell_call_output`.2540 Currently supported `connector_id` values are:
2540 2541
2541 - `"local_shell_call_output"`2542 - Dropbox: `connector_dropbox`
2543 - Gmail: `connector_gmail`
2544 - Google Calendar: `connector_googlecalendar`
2545 - Google Drive: `connector_googledrive`
2546 - Microsoft Teams: `connector_microsoftteams`
2547 - Outlook Calendar: `connector_outlookcalendar`
2548 - Outlook Email: `connector_outlookemail`
2549 - SharePoint: `connector_sharepoint`
2542 2550
2543 - `status: optional "in_progress" or "completed" or "incomplete"`2551 - `"connector_dropbox"`
2544 2552
2545 The status of the item. One of `in_progress`, `completed`, or `incomplete`.2553 - `"connector_gmail"`
2546 2554
2547 - `"in_progress"`2555 - `"connector_googlecalendar"`
2548 2556
2549 - `"completed"`2557 - `"connector_googledrive"`
2550 2558
2551 - `"incomplete"`2559 - `"connector_microsoftteams"`
2552 2560
2553 - `ShellCall object { action, call_id, type, 3 more }`2561 - `"connector_outlookcalendar"`
2554 2562
2555 A tool representing a request to execute one or more shell commands.2563 - `"connector_outlookemail"`
2556 2564
2557 - `action: object { commands, max_output_length, timeout_ms }`2565 - `"connector_sharepoint"`
2558 2566
2559 The shell commands and limits that describe how to run the tool call.2567 - `defer_loading: optional boolean`
2560 2568
2561 - `commands: array of string`2569 Whether this MCP tool is deferred and discovered via tool search.
2562 2570
2563 Ordered shell commands for the execution environment to run.2571 - `headers: optional map[string]`
2564 2572
2565 - `max_output_length: optional number`2573 Optional HTTP headers to send to the MCP server. Use for authentication
2574 or other purposes.
2566 2575
2567 Maximum number of UTF-8 characters to capture from combined stdout and stderr output.2576 - `require_approval: optional object { always, never } or "always" or "never"`
2568 2577
2569 - `timeout_ms: optional number`2578 Specify which of the MCP server's tools require approval.
2570 2579
2571 Maximum wall-clock time in milliseconds to allow the shell commands to run.2580 - `McpToolApprovalFilter object { always, never }`
2572 2581
2573 - `call_id: string`2582 Specify which of the MCP server's tools require approval. Can be
2583 `always`, `never`, or a filter object associated with tools
2584 that require approval.
2574 2585
2575 The unique ID of the shell tool call generated by the model.2586 - `always: optional object { read_only, tool_names }`
2576 2587
2577 - `type: "shell_call"`2588 A filter object to specify which tools are allowed.
2578 2589
2579 The type of the item. Always `shell_call`.2590 - `read_only: optional boolean`
2580 2591
2581 - `"shell_call"`2592 Indicates whether or not a tool modifies data or is read-only. If an
2593 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
2594 it will match this filter.
2582 2595
2583 - `id: optional string`2596 - `tool_names: optional array of string`
2584 2597
2585 The unique ID of the shell tool call. Populated when this item is returned via API.2598 List of allowed tool names.
2586 2599
2587 - `environment: optional LocalEnvironment or ContainerReference`2600 - `never: optional object { read_only, tool_names }`
2588 2601
2589 The environment to execute the shell commands in.2602 A filter object to specify which tools are allowed.
2590 2603
2591 - `LocalEnvironment object { type, skills }`2604 - `read_only: optional boolean`
2592 2605
2593 - `ContainerReference object { container_id, type }`2606 Indicates whether or not a tool modifies data or is read-only. If an
2607 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
2608 it will match this filter.
2594 2609
2595 - `status: optional "in_progress" or "completed" or "incomplete"`2610 - `tool_names: optional array of string`
2596 2611
2597 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.2612 List of allowed tool names.
2598 2613
2599 - `"in_progress"`2614 - `McpToolApprovalSetting = "always" or "never"`
2600 2615
2601 - `"completed"`2616 Specify a single approval policy for all tools. One of `always` or
2617 `never`. When set to `always`, all tools will require approval. When
2618 set to `never`, all tools will not require approval.
2602 2619
2603 - `"incomplete"`2620 - `"always"`
2604 2621
2605 - `ShellCallOutput object { call_id, output, type, 3 more }`2622 - `"never"`
2606 2623
2607 The streamed output items emitted by a shell tool call.2624 - `server_description: optional string`
2608 2625
2609 - `call_id: string`2626 Optional description of the MCP server, used to provide more context.
2610 2627
2611 The unique ID of the shell tool call generated by the model.2628 - `server_url: optional string`
2612 2629
2613 - `output: array of ResponseFunctionShellCallOutputContent`2630 The URL for the MCP server. One of `server_url` or `connector_id` must be
2631 provided.
2614 2632
2615 Captured chunks of stdout and stderr output, along with their associated outcomes.2633 - `CodeInterpreter object { container, type }`
2616 2634
2617 - `outcome: object { type } or object { exit_code, type }`2635 A tool that runs Python code to help generate a response to a prompt.
2618 2636
2619 The exit or timeout outcome associated with this shell call.2637 - `container: string or object { type, file_ids, memory_limit, network_policy }`
2620 2638
2621 - `Timeout object { type }`2639 The code interpreter container. Can be a container ID or an object that
2640 specifies uploaded file IDs to make available to your code, along with an
2641 optional `memory_limit` setting.
2622 2642
2623 Indicates that the shell call exceeded its configured time limit.2643 - `string`
2624 2644
2625 - `type: "timeout"`2645 The container ID.
2626 2646
2627 The outcome type. Always `timeout`.2647 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
2628 2648
2629 - `"timeout"`2649 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
2630 2650
2631 - `Exit object { exit_code, type }`2651 - `type: "auto"`
2632 2652
2633 Indicates that the shell commands finished and returned an exit code.2653 Always `auto`.
2634 2654
2635 - `exit_code: number`2655 - `"auto"`
2636 2656
2637 The exit code returned by the shell process.2657 - `file_ids: optional array of string`
2638 2658
2639 - `type: "exit"`2659 An optional list of uploaded files to make available to your code.
2640 2660
2641 The outcome type. Always `exit`.2661 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`
2642 2662
2643 - `"exit"`2663 The memory limit for the code interpreter container.
2644 2664
2645 - `stderr: string`2665 - `"1g"`
2646 2666
2647 Captured stderr output for the shell call.2667 - `"4g"`
2648 2668
2649 - `stdout: string`2669 - `"16g"`
2650 2670
2651 Captured stdout output for the shell call.2671 - `"64g"`
2652 2672
2653 - `type: "shell_call_output"`2673 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`
2654 2674
2655 The type of the item. Always `shell_call_output`.2675 Network access policy for the container.
2656 2676
2657 - `"shell_call_output"`2677 - `ContainerNetworkPolicyDisabled object { type }`
2658 2678
2659 - `id: optional string`2679 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
2660 2680
2661 The unique ID of the shell tool call output. Populated when this item is returned via API.2681 - `type: "code_interpreter"`
2662 2682
2663 - `max_output_length: optional number`2683 The type of the code interpreter tool. Always `code_interpreter`.
2664 2684
2665 The maximum number of UTF-8 characters captured for this shell call's combined output.2685 - `"code_interpreter"`
2666 2686
2667 - `status: optional "in_progress" or "completed" or "incomplete"`2687 - `ImageGeneration object { type, action, background, 9 more }`
2668 2688
2669 The status of the shell call output.2689 A tool that generates images using the GPT image models.
2670 2690
2671 - `"in_progress"`2691 - `type: "image_generation"`
2672 2692
2673 - `"completed"`2693 The type of the image generation tool. Always `image_generation`.
2674 2694
2675 - `"incomplete"`2695 - `"image_generation"`
2676 2696
2677 - `ApplyPatchCall object { call_id, operation, status, 2 more }`2697 - `action: optional "generate" or "edit" or "auto"`
2678 2698
2679 A tool call representing a request to create, delete, or update files using diff patches.2699 Whether to generate a new image or edit an existing image. Default: `auto`.
2680 2700
2681 - `call_id: string`2701 - `"generate"`
2682 2702
2683 The unique ID of the apply patch tool call generated by the model.2703 - `"edit"`
2684 2704
2685 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`2705 - `"auto"`
2686 2706
2687 The specific create, delete, or update instruction for the apply_patch tool call.2707 - `background: optional "transparent" or "opaque" or "auto"`
2688 2708
2689 - `CreateFile object { diff, path, type }`2709 Background type for the generated image. One of `transparent`,
2710 `opaque`, or `auto`. Default: `auto`.
2690 2711
2691 Instruction for creating a new file via the apply_patch tool.2712 - `"transparent"`
2692 2713
2693 - `diff: string`2714 - `"opaque"`
2694 2715
2695 Unified diff content to apply when creating the file.2716 - `"auto"`
2696 2717
2697 - `path: string`2718 - `input_fidelity: optional "high" or "low"`
2698 2719
2699 Path of the file to create relative to the workspace root.2720 Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
2700 2721
2701 - `type: "create_file"`2722 - `"high"`
2702 2723
2703 The operation type. Always `create_file`.2724 - `"low"`
2704 2725
2705 - `"create_file"`2726 - `input_image_mask: optional object { file_id, image_url }`
2706 2727
2707 - `DeleteFile object { path, type }`2728 Optional mask for inpainting. Contains `image_url`
2729 (string, optional) and `file_id` (string, optional).
2708 2730
2709 Instruction for deleting an existing file via the apply_patch tool.2731 - `file_id: optional string`
2710 2732
2711 - `path: string`2733 File ID for the mask image.
2712 2734
2713 Path of the file to delete relative to the workspace root.2735 - `image_url: optional string`
2714 2736
2715 - `type: "delete_file"`2737 Base64-encoded mask image.
2716 2738
2717 The operation type. Always `delete_file`.2739 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
2718 2740
2719 - `"delete_file"`2741 The image generation model to use. Default: `gpt-image-1`.
2720 2742
2721 - `UpdateFile object { diff, path, type }`2743 - `string`
2722 2744
2723 Instruction for updating an existing file via the apply_patch tool.2745 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
2724 2746
2725 - `diff: string`2747 The image generation model to use. Default: `gpt-image-1`.
2726 2748
2727 Unified diff content to apply to the existing file.2749 - `"gpt-image-1"`
2728 2750
2729 - `path: string`2751 - `"gpt-image-1-mini"`
2730 2752
2731 Path of the file to update relative to the workspace root.2753 - `"gpt-image-1.5"`
2732 2754
2733 - `type: "update_file"`2755 - `moderation: optional "auto" or "low"`
2734 2756
2735 The operation type. Always `update_file`.2757 Moderation level for the generated image. Default: `auto`.
2736 2758
2737 - `"update_file"`2759 - `"auto"`
2738 2760
2739 - `status: "in_progress" or "completed"`2761 - `"low"`
2740 2762
2741 The status of the apply patch tool call. One of `in_progress` or `completed`.2763 - `output_compression: optional number`
2742 2764
2743 - `"in_progress"`2765 Compression level for the output image. Default: 100.
2744 2766
2745 - `"completed"`2767 - `output_format: optional "png" or "webp" or "jpeg"`
2746 2768
2747 - `type: "apply_patch_call"`2769 The output format of the generated image. One of `png`, `webp`, or
2770 `jpeg`. Default: `png`.
2748 2771
2749 The type of the item. Always `apply_patch_call`.2772 - `"png"`
2750 2773
2751 - `"apply_patch_call"`2774 - `"webp"`
2752 2775
2753 - `id: optional string`2776 - `"jpeg"`
2754 2777
2755 The unique ID of the apply patch tool call. Populated when this item is returned via API.2778 - `partial_images: optional number`
2756 2779
2757 - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`2780 Number of partial images to generate in streaming mode, from 0 (default value) to 3.
2758 2781
2759 The streamed output emitted by an apply patch tool call.2782 - `quality: optional "low" or "medium" or "high" or "auto"`
2760 2783
2761 - `call_id: string`2784 The quality of the generated image. One of `low`, `medium`, `high`,
2785 or `auto`. Default: `auto`.
2762 2786
2763 The unique ID of the apply patch tool call generated by the model.2787 - `"low"`
2764 2788
2765 - `status: "completed" or "failed"`2789 - `"medium"`
2766 2790
2767 The status of the apply patch tool call output. One of `completed` or `failed`.2791 - `"high"`
2768 2792
2769 - `"completed"`2793 - `"auto"`
2770 2794
2771 - `"failed"`2795 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`
2772 2796
2773 - `type: "apply_patch_call_output"`2797 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.
2774 2798
2775 The type of the item. Always `apply_patch_call_output`.2799 - `string`
2776 2800
2777 - `"apply_patch_call_output"`2801 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`
2778 2802
2779 - `id: optional string`2803 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.
2780 2804
2781 The unique ID of the apply patch tool call output. Populated when this item is returned via API.2805 - `"1024x1024"`
2782 2806
2783 - `output: optional string`2807 - `"1024x1536"`
2784 2808
2785 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).2809 - `"1536x1024"`
2786 2810
2787 - `McpListTools object { id, server_label, tools, 2 more }`2811 - `"auto"`
2788 2812
2789 A list of tools available on an MCP server.2813 - `LocalShell object { type }`
2790 2814
2791 - `id: string`2815 A tool that allows the model to execute shell commands in a local environment.
2792 2816
2793 The unique ID of the list.2817 - `type: "local_shell"`
2794 2818
2795 - `server_label: string`2819 The type of the local shell tool. Always `local_shell`.
2796 2820
2797 The label of the MCP server.2821 - `"local_shell"`
2798 2822
2799 - `tools: array of object { input_schema, name, annotations, description }`2823 - `Shell object { type, environment }`
2800 2824
2801 The tools available on the server.2825 A tool that allows the model to execute shell commands.
2802 2826
2803 - `input_schema: unknown`2827 - `type: "shell"`
2804 2828
2805 The JSON schema describing the tool's input.2829 The type of the shell tool. Always `shell`.
2806 2830
2807 - `name: string`2831 - `"shell"`
2808 2832
2809 The name of the tool.2833 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
2810 2834
2811 - `annotations: optional unknown`2835 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
2812 2836
2813 Additional annotations about the tool.2837 - `LocalEnvironment object { type, skills }`
2814 2838
2815 - `description: optional string`2839 - `ContainerReference object { container_id, type }`
2816 2840
2817 The description of the tool.2841 - `Custom object { name, type, defer_loading, 2 more }`
2818 2842
2819 - `type: "mcp_list_tools"`2843 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2820 2844
2821 The type of the item. Always `mcp_list_tools`.2845 - `name: string`
2822 2846
2823 - `"mcp_list_tools"`2847 The name of the custom tool, used to identify it in tool calls.
2824 2848
2825 - `error: optional string`2849 - `type: "custom"`
2826 2850
2827 Error message if the server could not list tools.2851 The type of the custom tool. Always `custom`.
2828 2852
2829 - `McpApprovalRequest object { id, arguments, name, 2 more }`2853 - `"custom"`
2830 2854
2831 A request for human approval of a tool invocation.2855 - `defer_loading: optional boolean`
2832 2856
2833 - `id: string`2857 Whether this tool should be deferred and discovered via tool search.
2834 2858
2835 The unique ID of the approval request.2859 - `description: optional string`
2836 2860
2837 - `arguments: string`2861 Optional description of the custom tool, used to provide more context.
2838 2862
2839 A JSON string of arguments for the tool.2863 - `format: optional CustomToolInputFormat`
2840 2864
2841 - `name: string`2865 The input format for the custom tool. Default is unconstrained text.
2842 2866
2843 The name of the tool to run.2867 - `Namespace object { description, name, tools, type }`
2844 2868
2845 - `server_label: string`2869 Groups function/custom tools under a shared namespace.
2846 2870
2847 The label of the MCP server making the request.2871 - `description: string`
2848 2872
2849 - `type: "mcp_approval_request"`2873 A description of the namespace shown to the model.
2850 2874
2851 The type of the item. Always `mcp_approval_request`.2875 - `name: string`
2852 2876
2853 - `"mcp_approval_request"`2877 The namespace name used in tool calls (for example, `crm`).
2854 2878
2855 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`2879 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`
2856 2880
2857 A response to an MCP approval request.2881 The function/custom tools available inside this namespace.
2858 2882
2859 - `approval_request_id: string`2883 - `Function object { name, type, defer_loading, 3 more }`
2860 2884
2861 The ID of the approval request being answered.2885 - `name: string`
2862 2886
2863 - `approve: boolean`2887 - `type: "function"`
2864 2888
2865 Whether the request was approved.2889 - `"function"`
2866 2890
2867 - `type: "mcp_approval_response"`2891 - `defer_loading: optional boolean`
2868 2892
2869 The type of the item. Always `mcp_approval_response`.2893 Whether this function should be deferred and discovered via tool search.
2870 2894
2871 - `"mcp_approval_response"`2895 - `description: optional string`
2872 2896
2873 - `id: optional string`2897 - `parameters: optional unknown`
2874 2898
2875 The unique ID of the approval response2899 - `strict: optional boolean`
2876 2900
2877 - `reason: optional string`2901 - `Custom object { name, type, defer_loading, 2 more }`
2878 2902
2879 Optional reason for the decision.2903 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
2880 2904
2881 - `McpCall object { id, arguments, name, 6 more }`2905 - `name: string`
2882 2906
2883 An invocation of a tool on an MCP server.2907 The name of the custom tool, used to identify it in tool calls.
2884 2908
2885 - `id: string`2909 - `type: "custom"`
2886 2910
2887 The unique ID of the tool call.2911 The type of the custom tool. Always `custom`.
2888 2912
2889 - `arguments: string`2913 - `"custom"`
2890 2914
2891 A JSON string of the arguments passed to the tool.2915 - `defer_loading: optional boolean`
2892 2916
2893 - `name: string`2917 Whether this tool should be deferred and discovered via tool search.
2894 2918
2895 The name of the tool that was run.2919 - `description: optional string`
2896 2920
2897 - `server_label: string`2921 Optional description of the custom tool, used to provide more context.
2898 2922
2899 The label of the MCP server running the tool.2923 - `format: optional CustomToolInputFormat`
2900 2924
2901 - `type: "mcp_call"`2925 The input format for the custom tool. Default is unconstrained text.
2902 2926
2903 The type of the item. Always `mcp_call`.2927 - `type: "namespace"`
2904 2928
2905 - `"mcp_call"`2929 The type of the tool. Always `namespace`.
2906 2930
2907 - `approval_request_id: optional string`2931 - `"namespace"`
2908 2932
2909 Unique identifier for the MCP tool call approval request.2933 - `ToolSearch object { type, description, execution, parameters }`
2910 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.
2911 2934
2912 - `error: optional string`2935 Hosted or BYOT tool search configuration for deferred tools.
2913 2936
2914 The error from the tool call, if any.2937 - `type: "tool_search"`
2915 2938
2916 - `output: optional string`2939 The type of the tool. Always `tool_search`.
2917 2940
2918 The output from the tool call.2941 - `"tool_search"`
2919 2942
2920 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`2943 - `description: optional string`
2921 2944
2922 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.2945 Description shown to the model for a client-executed tool search tool.
2923 2946
2924 - `"in_progress"`2947 - `execution: optional "server" or "client"`
2925 2948
2926 - `"completed"`2949 Whether tool search is executed by the server or by the client.
2927 2950
2928 - `"incomplete"`2951 - `"server"`
2929 2952
2930 - `"calling"`2953 - `"client"`
2931 2954
2932 - `"failed"`2955 - `parameters: optional unknown`
2933 2956
2934 - `CustomToolCallOutput object { call_id, output, type, id }`2957 Parameter schema for a client-executed tool search tool.
2935 2958
2936 The output of a custom tool call from your code, being sent back to the model.2959 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
2937 2960
2938 - `call_id: string`2961 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).
2939 2962
2940 The call ID, used to map this custom tool call output to a custom tool call.2963 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`
2941 2964
2942 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`2965 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.
2943 2966
2944 The output from the custom tool call generated by your code.2967 - `"web_search_preview"`
2945 Can be a string or an list of output content.
2946 2968
2947 - `StringOutput = string`2969 - `"web_search_preview_2025_03_11"`
2948 2970
2949 A string of the output of the custom tool call.2971 - `search_content_types: optional array of "text" or "image"`
2950 2972
2951 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`2973 - `"text"`
2952 2974
2953 Text, image, or file output of the custom tool call.2975 - `"image"`
2954 2976
2955 - `ResponseInputText object { text, type }`2977 - `search_context_size: optional "low" or "medium" or "high"`
2956 2978
2957 A text input to the model.2979 High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
2958 2980
2959 - `ResponseInputImage object { detail, type, file_id, image_url }`2981 - `"low"`
2960 2982
2961 An image input to the model. Learn about [image inputs](/docs/guides/vision).2983 - `"medium"`
2962 2984
2963 - `ResponseInputFile object { type, detail, file_data, 3 more }`2985 - `"high"`
2964 2986
2965 A file input to the model.2987 - `user_location: optional object { type, city, country, 2 more }`
2966 2988
2967 - `type: "custom_tool_call_output"`2989 The user's location.
2968 2990
2969 The type of the custom tool call output. Always `custom_tool_call_output`.2991 - `type: "approximate"`
2970 2992
2971 - `"custom_tool_call_output"`2993 The type of location approximation. Always `approximate`.
2972 2994
2973 - `id: optional string`2995 - `"approximate"`
2974 2996
2975 The unique ID of the custom tool call output in the OpenAI platform.2997 - `city: optional string`
2976 2998
2977 - `CustomToolCall object { call_id, input, name, 3 more }`2999 Free text input for the city of the user, e.g. `San Francisco`.
2978 3000
2979 A call to a custom tool created by the model.3001 - `country: optional string`
2980 3002
2981 - `call_id: string`3003 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
2982 3004
2983 An identifier used to map this custom tool call to a tool call output.3005 - `region: optional string`
2984 3006
2985 - `input: string`3007 Free text input for the region of the user, e.g. `California`.
2986 3008
2987 The input for the custom tool call generated by the model.3009 - `timezone: optional string`
2988 3010
2989 - `name: string`3011 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2990 3012
2991 The name of the custom tool being called.3013 - `ApplyPatch object { type }`
2992 3014
2993 - `type: "custom_tool_call"`3015 Allows the assistant to create, delete, or update files using unified diffs.
2994 3016
2995 The type of the custom tool call. Always `custom_tool_call`.3017 - `type: "apply_patch"`
2996 3018
2997 - `"custom_tool_call"`3019 The type of the tool. Always `apply_patch`.
2998 3020
2999 - `id: optional string`3021 - `"apply_patch"`
3000 3022
3001 The unique ID of the custom tool call in the OpenAI platform.3023 - `type: "additional_tools"`
3002 3024
3003 - `namespace: optional string`3025 The item type. Always `additional_tools`.
3004 3026
3005 The namespace of the custom tool being called.3027 - `"additional_tools"`
3006 3028
3007 - `CompactionTrigger object { type }`3029 - `id: optional string`
3008 3030
3009 Compacts the current context. Must be the final input item.3031 The unique ID of this additional tools item.
3010 3032
3011 - `type: "compaction_trigger"`3033 - `Reasoning object { id, summary, type, 3 more }`
3012 3034
3013 The type of the item. Always `compaction_trigger`.3035 A description of the chain of thought used by a reasoning model while generating
3036 a response. Be sure to include these items in your `input` to the Responses API
3037 for subsequent turns of a conversation if you are manually
3038 [managing context](/docs/guides/conversation-state).
3014 3039
3015 - `"compaction_trigger"`3040 - `id: string`
3016 3041
3017 - `ItemReference object { id, type }`3042 The unique identifier of the reasoning content.
3018 3043
3019 An internal identifier for an item to reference.3044 - `summary: array of SummaryTextContent`
3020 3045
3021 - `id: string`3046 Reasoning summary content.
3022 3047
3023 The ID of the item to reference.3048 - `text: string`
3024 3049
3025 - `type: optional "item_reference"`3050 A summary of the reasoning output from the model so far.
3051
3052 - `type: "summary_text"`
3053
3054 The type of the object. Always `summary_text`.
3055
3056 - `"summary_text"`
3057
3058 - `type: "reasoning"`
3059
3060 The type of the object. Always `reasoning`.
3061
3062 - `"reasoning"`
3063
3064 - `content: optional array of object { text, type }`
3065
3066 Reasoning text content.
3067
3068 - `text: string`
3069
3070 The reasoning text from the model.
3071
3072 - `type: "reasoning_text"`
3073
3074 The type of the reasoning text. Always `reasoning_text`.
3075
3076 - `"reasoning_text"`
3077
3078 - `encrypted_content: optional string`
3079
3080 The encrypted content of the reasoning item - populated when a response is
3081 generated with `reasoning.encrypted_content` in the `include` parameter.
3082
3083 - `status: optional "in_progress" or "completed" or "incomplete"`
3084
3085 The status of the item. One of `in_progress`, `completed`, or
3086 `incomplete`. Populated when items are returned via API.
3087
3088 - `"in_progress"`
3089
3090 - `"completed"`
3091
3092 - `"incomplete"`
3093
3094 - `Compaction object { encrypted_content, type, id }`
3095
3096 A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).
3097
3098 - `encrypted_content: string`
3099
3100 The encrypted content of the compaction summary.
3101
3102 - `type: "compaction"`
3103
3104 The type of the item. Always `compaction`.
3105
3106 - `"compaction"`
3107
3108 - `id: optional string`
3109
3110 The ID of the compaction item.
3111
3112 - `ImageGenerationCall object { id, result, status, type }`
3113
3114 An image generation request made by the model.
3115
3116 - `id: string`
3117
3118 The unique ID of the image generation call.
3119
3120 - `result: string`
3121
3122 The generated image encoded in base64.
3123
3124 - `status: "in_progress" or "completed" or "generating" or "failed"`
3125
3126 The status of the image generation call.
3127
3128 - `"in_progress"`
3129
3130 - `"completed"`
3131
3132 - `"generating"`
3133
3134 - `"failed"`
3135
3136 - `type: "image_generation_call"`
3137
3138 The type of the image generation call. Always `image_generation_call`.
3139
3140 - `"image_generation_call"`
3141
3142 - `CodeInterpreterCall object { id, code, container_id, 3 more }`
3143
3144 A tool call to run code.
3145
3146 - `id: string`
3147
3148 The unique ID of the code interpreter tool call.
3149
3150 - `code: string`
3151
3152 The code to run, or null if not available.
3153
3154 - `container_id: string`
3155
3156 The ID of the container used to run the code.
3157
3158 - `outputs: array of object { logs, type } or object { type, url }`
3159
3160 The outputs generated by the code interpreter, such as logs or images.
3161 Can be null if no outputs are available.
3162
3163 - `Logs object { logs, type }`
3164
3165 The logs output from the code interpreter.
3166
3167 - `logs: string`
3168
3169 The logs output from the code interpreter.
3170
3171 - `type: "logs"`
3172
3173 The type of the output. Always `logs`.
3174
3175 - `"logs"`
3176
3177 - `Image object { type, url }`
3178
3179 The image output from the code interpreter.
3180
3181 - `type: "image"`
3182
3183 The type of the output. Always `image`.
3184
3185 - `"image"`
3186
3187 - `url: string`
3188
3189 The URL of the image output from the code interpreter.
3190
3191 - `status: "in_progress" or "completed" or "incomplete" or 2 more`
3192
3193 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.
3194
3195 - `"in_progress"`
3196
3197 - `"completed"`
3198
3199 - `"incomplete"`
3200
3201 - `"interpreting"`
3202
3203 - `"failed"`
3204
3205 - `type: "code_interpreter_call"`
3206
3207 The type of the code interpreter tool call. Always `code_interpreter_call`.
3208
3209 - `"code_interpreter_call"`
3210
3211 - `LocalShellCall object { id, action, call_id, 2 more }`
3212
3213 A tool call to run a command on the local shell.
3214
3215 - `id: string`
3216
3217 The unique ID of the local shell call.
3218
3219 - `action: object { command, env, type, 3 more }`
3220
3221 Execute a shell command on the server.
3222
3223 - `command: array of string`
3224
3225 The command to run.
3226
3227 - `env: map[string]`
3228
3229 Environment variables to set for the command.
3230
3231 - `type: "exec"`
3232
3233 The type of the local shell action. Always `exec`.
3234
3235 - `"exec"`
3236
3237 - `timeout_ms: optional number`
3238
3239 Optional timeout in milliseconds for the command.
3240
3241 - `user: optional string`
3242
3243 Optional user to run the command as.
3244
3245 - `working_directory: optional string`
3246
3247 Optional working directory to run the command in.
3248
3249 - `call_id: string`
3250
3251 The unique ID of the local shell tool call generated by the model.
3252
3253 - `status: "in_progress" or "completed" or "incomplete"`
3254
3255 The status of the local shell call.
3256
3257 - `"in_progress"`
3258
3259 - `"completed"`
3260
3261 - `"incomplete"`
3262
3263 - `type: "local_shell_call"`
3264
3265 The type of the local shell call. Always `local_shell_call`.
3266
3267 - `"local_shell_call"`
3268
3269 - `LocalShellCallOutput object { id, output, type, status }`
3270
3271 The output of a local shell tool call.
3272
3273 - `id: string`
3274
3275 The unique ID of the local shell tool call generated by the model.
3276
3277 - `output: string`
3278
3279 A JSON string of the output of the local shell tool call.
3280
3281 - `type: "local_shell_call_output"`
3282
3283 The type of the local shell tool call output. Always `local_shell_call_output`.
3284
3285 - `"local_shell_call_output"`
3286
3287 - `status: optional "in_progress" or "completed" or "incomplete"`
3288
3289 The status of the item. One of `in_progress`, `completed`, or `incomplete`.
3290
3291 - `"in_progress"`
3292
3293 - `"completed"`
3294
3295 - `"incomplete"`
3296
3297 - `ShellCall object { action, call_id, type, 3 more }`
3298
3299 A tool representing a request to execute one or more shell commands.
3300
3301 - `action: object { commands, max_output_length, timeout_ms }`
3302
3303 The shell commands and limits that describe how to run the tool call.
3304
3305 - `commands: array of string`
3306
3307 Ordered shell commands for the execution environment to run.
3308
3309 - `max_output_length: optional number`
3310
3311 Maximum number of UTF-8 characters to capture from combined stdout and stderr output.
3312
3313 - `timeout_ms: optional number`
3314
3315 Maximum wall-clock time in milliseconds to allow the shell commands to run.
3316
3317 - `call_id: string`
3318
3319 The unique ID of the shell tool call generated by the model.
3320
3321 - `type: "shell_call"`
3322
3323 The type of the item. Always `shell_call`.
3324
3325 - `"shell_call"`
3326
3327 - `id: optional string`
3328
3329 The unique ID of the shell tool call. Populated when this item is returned via API.
3330
3331 - `environment: optional LocalEnvironment or ContainerReference`
3332
3333 The environment to execute the shell commands in.
3334
3335 - `LocalEnvironment object { type, skills }`
3336
3337 - `ContainerReference object { container_id, type }`
3338
3339 - `status: optional "in_progress" or "completed" or "incomplete"`
3340
3341 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.
3342
3343 - `"in_progress"`
3344
3345 - `"completed"`
3346
3347 - `"incomplete"`
3348
3349 - `ShellCallOutput object { call_id, output, type, 3 more }`
3350
3351 The streamed output items emitted by a shell tool call.
3352
3353 - `call_id: string`
3354
3355 The unique ID of the shell tool call generated by the model.
3356
3357 - `output: array of ResponseFunctionShellCallOutputContent`
3358
3359 Captured chunks of stdout and stderr output, along with their associated outcomes.
3360
3361 - `outcome: object { type } or object { exit_code, type }`
3362
3363 The exit or timeout outcome associated with this shell call.
3364
3365 - `Timeout object { type }`
3366
3367 Indicates that the shell call exceeded its configured time limit.
3368
3369 - `type: "timeout"`
3370
3371 The outcome type. Always `timeout`.
3372
3373 - `"timeout"`
3374
3375 - `Exit object { exit_code, type }`
3376
3377 Indicates that the shell commands finished and returned an exit code.
3378
3379 - `exit_code: number`
3380
3381 The exit code returned by the shell process.
3382
3383 - `type: "exit"`
3384
3385 The outcome type. Always `exit`.
3386
3387 - `"exit"`
3388
3389 - `stderr: string`
3390
3391 Captured stderr output for the shell call.
3392
3393 - `stdout: string`
3394
3395 Captured stdout output for the shell call.
3396
3397 - `type: "shell_call_output"`
3398
3399 The type of the item. Always `shell_call_output`.
3400
3401 - `"shell_call_output"`
3402
3403 - `id: optional string`
3404
3405 The unique ID of the shell tool call output. Populated when this item is returned via API.
3406
3407 - `max_output_length: optional number`
3408
3409 The maximum number of UTF-8 characters captured for this shell call's combined output.
3410
3411 - `status: optional "in_progress" or "completed" or "incomplete"`
3412
3413 The status of the shell call output.
3414
3415 - `"in_progress"`
3416
3417 - `"completed"`
3418
3419 - `"incomplete"`
3420
3421 - `ApplyPatchCall object { call_id, operation, status, 2 more }`
3422
3423 A tool call representing a request to create, delete, or update files using diff patches.
3424
3425 - `call_id: string`
3426
3427 The unique ID of the apply patch tool call generated by the model.
3428
3429 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`
3430
3431 The specific create, delete, or update instruction for the apply_patch tool call.
3432
3433 - `CreateFile object { diff, path, type }`
3434
3435 Instruction for creating a new file via the apply_patch tool.
3436
3437 - `diff: string`
3438
3439 Unified diff content to apply when creating the file.
3440
3441 - `path: string`
3442
3443 Path of the file to create relative to the workspace root.
3444
3445 - `type: "create_file"`
3446
3447 The operation type. Always `create_file`.
3448
3449 - `"create_file"`
3450
3451 - `DeleteFile object { path, type }`
3452
3453 Instruction for deleting an existing file via the apply_patch tool.
3454
3455 - `path: string`
3456
3457 Path of the file to delete relative to the workspace root.
3458
3459 - `type: "delete_file"`
3460
3461 The operation type. Always `delete_file`.
3462
3463 - `"delete_file"`
3464
3465 - `UpdateFile object { diff, path, type }`
3466
3467 Instruction for updating an existing file via the apply_patch tool.
3468
3469 - `diff: string`
3470
3471 Unified diff content to apply to the existing file.
3472
3473 - `path: string`
3474
3475 Path of the file to update relative to the workspace root.
3476
3477 - `type: "update_file"`
3478
3479 The operation type. Always `update_file`.
3480
3481 - `"update_file"`
3482
3483 - `status: "in_progress" or "completed"`
3484
3485 The status of the apply patch tool call. One of `in_progress` or `completed`.
3486
3487 - `"in_progress"`
3488
3489 - `"completed"`
3490
3491 - `type: "apply_patch_call"`
3492
3493 The type of the item. Always `apply_patch_call`.
3494
3495 - `"apply_patch_call"`
3496
3497 - `id: optional string`
3498
3499 The unique ID of the apply patch tool call. Populated when this item is returned via API.
3500
3501 - `ApplyPatchCallOutput object { call_id, status, type, 2 more }`
3502
3503 The streamed output emitted by an apply patch tool call.
3504
3505 - `call_id: string`
3506
3507 The unique ID of the apply patch tool call generated by the model.
3508
3509 - `status: "completed" or "failed"`
3510
3511 The status of the apply patch tool call output. One of `completed` or `failed`.
3512
3513 - `"completed"`
3514
3515 - `"failed"`
3516
3517 - `type: "apply_patch_call_output"`
3518
3519 The type of the item. Always `apply_patch_call_output`.
3520
3521 - `"apply_patch_call_output"`
3522
3523 - `id: optional string`
3524
3525 The unique ID of the apply patch tool call output. Populated when this item is returned via API.
3526
3527 - `output: optional string`
3528
3529 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).
3530
3531 - `McpListTools object { id, server_label, tools, 2 more }`
3532
3533 A list of tools available on an MCP server.
3534
3535 - `id: string`
3536
3537 The unique ID of the list.
3538
3539 - `server_label: string`
3540
3541 The label of the MCP server.
3542
3543 - `tools: array of object { input_schema, name, annotations, description }`
3544
3545 The tools available on the server.
3546
3547 - `input_schema: unknown`
3548
3549 The JSON schema describing the tool's input.
3550
3551 - `name: string`
3552
3553 The name of the tool.
3554
3555 - `annotations: optional unknown`
3556
3557 Additional annotations about the tool.
3558
3559 - `description: optional string`
3560
3561 The description of the tool.
3562
3563 - `type: "mcp_list_tools"`
3564
3565 The type of the item. Always `mcp_list_tools`.
3566
3567 - `"mcp_list_tools"`
3568
3569 - `error: optional string`
3570
3571 Error message if the server could not list tools.
3572
3573 - `McpApprovalRequest object { id, arguments, name, 2 more }`
3574
3575 A request for human approval of a tool invocation.
3576
3577 - `id: string`
3578
3579 The unique ID of the approval request.
3580
3581 - `arguments: string`
3582
3583 A JSON string of arguments for the tool.
3584
3585 - `name: string`
3586
3587 The name of the tool to run.
3588
3589 - `server_label: string`
3590
3591 The label of the MCP server making the request.
3592
3593 - `type: "mcp_approval_request"`
3594
3595 The type of the item. Always `mcp_approval_request`.
3596
3597 - `"mcp_approval_request"`
3598
3599 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`
3600
3601 A response to an MCP approval request.
3602
3603 - `approval_request_id: string`
3604
3605 The ID of the approval request being answered.
3606
3607 - `approve: boolean`
3608
3609 Whether the request was approved.
3610
3611 - `type: "mcp_approval_response"`
3612
3613 The type of the item. Always `mcp_approval_response`.
3614
3615 - `"mcp_approval_response"`
3616
3617 - `id: optional string`
3618
3619 The unique ID of the approval response
3620
3621 - `reason: optional string`
3622
3623 Optional reason for the decision.
3624
3625 - `McpCall object { id, arguments, name, 6 more }`
3626
3627 An invocation of a tool on an MCP server.
3628
3629 - `id: string`
3630
3631 The unique ID of the tool call.
3632
3633 - `arguments: string`
3634
3635 A JSON string of the arguments passed to the tool.
3636
3637 - `name: string`
3638
3639 The name of the tool that was run.
3640
3641 - `server_label: string`
3642
3643 The label of the MCP server running the tool.
3644
3645 - `type: "mcp_call"`
3646
3647 The type of the item. Always `mcp_call`.
3648
3649 - `"mcp_call"`
3650
3651 - `approval_request_id: optional string`
3652
3653 Unique identifier for the MCP tool call approval request.
3654 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.
3655
3656 - `error: optional string`
3657
3658 The error from the tool call, if any.
3659
3660 - `output: optional string`
3661
3662 The output from the tool call.
3663
3664 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`
3665
3666 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
3667
3668 - `"in_progress"`
3669
3670 - `"completed"`
3671
3672 - `"incomplete"`
3673
3674 - `"calling"`
3675
3676 - `"failed"`
3677
3678 - `CustomToolCallOutput object { call_id, output, type, id }`
3679
3680 The output of a custom tool call from your code, being sent back to the model.
3681
3682 - `call_id: string`
3683
3684 The call ID, used to map this custom tool call output to a custom tool call.
3685
3686 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`
3687
3688 The output from the custom tool call generated by your code.
3689 Can be a string or an list of output content.
3690
3691 - `StringOutput = string`
3692
3693 A string of the output of the custom tool call.
3694
3695 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`
3696
3697 Text, image, or file output of the custom tool call.
3698
3699 - `ResponseInputText object { text, type }`
3700
3701 A text input to the model.
3702
3703 - `ResponseInputImage object { detail, type, file_id, image_url }`
3704
3705 An image input to the model. Learn about [image inputs](/docs/guides/vision).
3706
3707 - `ResponseInputFile object { type, detail, file_data, 3 more }`
3708
3709 A file input to the model.
3710
3711 - `type: "custom_tool_call_output"`
3712
3713 The type of the custom tool call output. Always `custom_tool_call_output`.
3714
3715 - `"custom_tool_call_output"`
3716
3717 - `id: optional string`
3718
3719 The unique ID of the custom tool call output in the OpenAI platform.
3720
3721 - `CustomToolCall object { call_id, input, name, 3 more }`
3722
3723 A call to a custom tool created by the model.
3724
3725 - `call_id: string`
3726
3727 An identifier used to map this custom tool call to a tool call output.
3728
3729 - `input: string`
3730
3731 The input for the custom tool call generated by the model.
3732
3733 - `name: string`
3734
3735 The name of the custom tool being called.
3736
3737 - `type: "custom_tool_call"`
3738
3739 The type of the custom tool call. Always `custom_tool_call`.
3740
3741 - `"custom_tool_call"`
3742
3743 - `id: optional string`
3744
3745 The unique ID of the custom tool call in the OpenAI platform.
3746
3747 - `namespace: optional string`
3748
3749 The namespace of the custom tool being called.
3750
3751 - `CompactionTrigger object { type }`
3752
3753 Compacts the current context. Must be the final input item.
3754
3755 - `type: "compaction_trigger"`
3756
3757 The type of the item. Always `compaction_trigger`.
3758
3759 - `"compaction_trigger"`
3760
3761 - `ItemReference object { id, type }`
3762
3763 An internal identifier for an item to reference.
3764
3765 - `id: string`
3766
3767 The ID of the item to reference.
3768
3769 - `type: optional "item_reference"`
3770
3771 The type of item to reference. Always `item_reference`.
3772
3773 - `"item_reference"`
3774
3775- `instructions: optional string`
3776
3777 A system (or developer) message inserted into the model's context.
3778 When used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.
3779
3780- `previous_response_id: optional string`
3781
3782 The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.
3783
3784- `prompt_cache_key: optional string`
3785
3786 A key to use when reading from or writing to the prompt cache.
3787
3788- `prompt_cache_retention: optional "in_memory" or "24h"`
3789
3790 How long to retain a prompt cache entry created by this request.
3791
3792 - `"in_memory"`
3793
3794 - `"24h"`
3795
3796- `service_tier: optional "auto" or "default" or "flex" or "priority"`
3797
3798 The service tier to use for this request.
3799
3800 - `"auto"`
3801
3802 - `"default"`
3803
3804 - `"flex"`
3805
3806 - `"priority"`
3807
3808### Returns
3809
3810- `CompactedResponse object { id, created_at, object, 2 more }`
3811
3812 - `id: string`
3813
3814 The unique identifier for the compacted response.
3815
3816 - `created_at: number`
3817
3818 Unix timestamp (in seconds) when the compacted conversation was created.
3819
3820 - `object: "response.compaction"`
3821
3822 The object type. Always `response.compaction`.
3823
3824 - `"response.compaction"`
3825
3826 - `output: array of Message or object { arguments, call_id, name, 4 more } or object { id, arguments, call_id, 4 more } or 23 more`
3827
3828 The compacted list of output items.
3829
3830 - `Message object { id, content, role, 3 more }`
3831
3832 A message to or from the model.
3833
3834 - `id: string`
3835
3836 The unique ID of the message.
3837
3838 - `content: array of ResponseInputText or ResponseOutputText or TextContent or 6 more`
3839
3840 The content of the message
3841
3842 - `ResponseInputText object { text, type }`
3843
3844 A text input to the model.
3845
3846 - `text: string`
3847
3848 The text input to the model.
3849
3850 - `type: "input_text"`
3851
3852 The type of the input item. Always `input_text`.
3853
3854 - `"input_text"`
3855
3856 - `ResponseOutputText object { annotations, logprobs, text, type }`
3857
3858 A text output from the model.
3859
3860 - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }`
3861
3862 The annotations of the text output.
3863
3864 - `FileCitation object { file_id, filename, index, type }`
3865
3866 A citation to a file.
3867
3868 - `file_id: string`
3869
3870 The ID of the file.
3871
3872 - `filename: string`
3873
3874 The filename of the file cited.
3875
3876 - `index: number`
3877
3878 The index of the file in the list of files.
3879
3880 - `type: "file_citation"`
3881
3882 The type of the file citation. Always `file_citation`.
3883
3884 - `"file_citation"`
3885
3886 - `URLCitation object { end_index, start_index, title, 2 more }`
3887
3888 A citation for a web resource used to generate a model response.
3889
3890 - `end_index: number`
3891
3892 The index of the last character of the URL citation in the message.
3893
3894 - `start_index: number`
3895
3896 The index of the first character of the URL citation in the message.
3897
3898 - `title: string`
3899
3900 The title of the web resource.
3901
3902 - `type: "url_citation"`
3903
3904 The type of the URL citation. Always `url_citation`.
3905
3906 - `"url_citation"`
3907
3908 - `url: string`
3909
3910 The URL of the web resource.
3911
3912 - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`
3913
3914 A citation for a container file used to generate a model response.
3915
3916 - `container_id: string`
3917
3918 The ID of the container file.
3919
3920 - `end_index: number`
3921
3922 The index of the last character of the container file citation in the message.
3923
3924 - `file_id: string`
3925
3926 The ID of the file.
3927
3928 - `filename: string`
3929
3930 The filename of the container file cited.
3931
3932 - `start_index: number`
3933
3934 The index of the first character of the container file citation in the message.
3935
3936 - `type: "container_file_citation"`
3937
3938 The type of the container file citation. Always `container_file_citation`.
3939
3940 - `"container_file_citation"`
3941
3942 - `FilePath object { file_id, index, type }`
3943
3944 A path to a file.
3945
3946 - `file_id: string`
3947
3948 The ID of the file.
3949
3950 - `index: number`
3951
3952 The index of the file in the list of files.
3953
3954 - `type: "file_path"`
3955
3956 The type of the file path. Always `file_path`.
3957
3958 - `"file_path"`
3959
3960 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`
3961
3962 - `token: string`
3963
3964 - `bytes: array of number`
3965
3966 - `logprob: number`
3967
3968 - `top_logprobs: array of object { token, bytes, logprob }`
3969
3970 - `token: string`
3971
3972 - `bytes: array of number`
3973
3974 - `logprob: number`
3975
3976 - `text: string`
3977
3978 The text output from the model.
3979
3980 - `type: "output_text"`
3981
3982 The type of the output text. Always `output_text`.
3983
3984 - `"output_text"`
3985
3986 - `TextContent object { text, type }`
3987
3988 A text content.
3989
3990 - `text: string`
3991
3992 - `type: "text"`
3993
3994 - `"text"`
3995
3996 - `SummaryTextContent object { text, type }`
3997
3998 A summary text from the model.
3999
4000 - `text: string`
4001
4002 A summary of the reasoning output from the model so far.
4003
4004 - `type: "summary_text"`
4005
4006 The type of the object. Always `summary_text`.
4007
4008 - `"summary_text"`
4009
4010 - `ReasoningText object { text, type }`
4011
4012 Reasoning text from the model.
4013
4014 - `text: string`
4015
4016 The reasoning text from the model.
4017
4018 - `type: "reasoning_text"`
4019
4020 The type of the reasoning text. Always `reasoning_text`.
4021
4022 - `"reasoning_text"`
4023
4024 - `ResponseOutputRefusal object { refusal, type }`
4025
4026 A refusal from the model.
4027
4028 - `refusal: string`
4029
4030 The refusal explanation from the model.
4031
4032 - `type: "refusal"`
4033
4034 The type of the refusal. Always `refusal`.
4035
4036 - `"refusal"`
4037
4038 - `ResponseInputImage object { detail, type, file_id, image_url }`
4039
4040 An image input to the model. Learn about [image inputs](/docs/guides/vision).
4041
4042 - `detail: "low" or "high" or "auto" or "original"`
4043
4044 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
4045
4046 - `"low"`
4047
4048 - `"high"`
4049
4050 - `"auto"`
4051
4052 - `"original"`
4053
4054 - `type: "input_image"`
4055
4056 The type of the input item. Always `input_image`.
4057
4058 - `"input_image"`
4059
4060 - `file_id: optional string`
4061
4062 The ID of the file to be sent to the model.
4063
4064 - `image_url: optional string`
4065
4066 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
4067
4068 - `ComputerScreenshotContent object { detail, file_id, image_url, type }`
4069
4070 A screenshot of a computer.
4071
4072 - `detail: "low" or "high" or "auto" or "original"`
4073
4074 The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
4075
4076 - `"low"`
4077
4078 - `"high"`
4079
4080 - `"auto"`
4081
4082 - `"original"`
4083
4084 - `file_id: string`
4085
4086 The identifier of an uploaded file that contains the screenshot.
4087
4088 - `image_url: string`
4089
4090 The URL of the screenshot image.
4091
4092 - `type: "computer_screenshot"`
4093
4094 Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.
4095
4096 - `"computer_screenshot"`
4097
4098 - `ResponseInputFile object { type, detail, file_data, 3 more }`
4099
4100 A file input to the model.
4101
4102 - `type: "input_file"`
4103
4104 The type of the input item. Always `input_file`.
4105
4106 - `"input_file"`
4107
4108 - `detail: optional "low" or "high"`
4109
4110 The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`.
4111
4112 - `"low"`
4113
4114 - `"high"`
4115
4116 - `file_data: optional string`
4117
4118 The content of the file to be sent to the model.
4119
4120 - `file_id: optional string`
4121
4122 The ID of the file to be sent to the model.
4123
4124 - `file_url: optional string`
4125
4126 The URL of the file to be sent to the model.
4127
4128 - `filename: optional string`
4129
4130 The name of the file to be sent to the model.
4131
4132 - `role: "unknown" or "user" or "assistant" or 5 more`
4133
4134 The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`.
4135
4136 - `"unknown"`
4137
4138 - `"user"`
4139
4140 - `"assistant"`
4141
4142 - `"system"`
4143
4144 - `"critic"`
4145
4146 - `"discriminator"`
4147
4148 - `"developer"`
4149
4150 - `"tool"`
4151
4152 - `status: "in_progress" or "completed" or "incomplete"`
4153
4154 The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.
4155
4156 - `"in_progress"`
4157
4158 - `"completed"`
4159
4160 - `"incomplete"`
4161
4162 - `type: "message"`
4163
4164 The type of the message. Always set to `message`.
4165
4166 - `"message"`
4167
4168 - `phase: optional "commentary" or "final_answer"`
4169
4170 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.
4171
4172 - `"commentary"`
4173
4174 - `"final_answer"`
4175
4176 - `FunctionCall object { arguments, call_id, name, 4 more }`
4177
4178 A tool call to run a function. See the
4179 [function calling guide](/docs/guides/function-calling) for more information.
4180
4181 - `arguments: string`
4182
4183 A JSON string of the arguments to pass to the function.
4184
4185 - `call_id: string`
4186
4187 The unique ID of the function tool call generated by the model.
4188
4189 - `name: string`
4190
4191 The name of the function to run.
4192
4193 - `type: "function_call"`
4194
4195 The type of the function tool call. Always `function_call`.
4196
4197 - `"function_call"`
4198
4199 - `id: optional string`
4200
4201 The unique ID of the function tool call.
4202
4203 - `namespace: optional string`
4204
4205 The namespace of the function to run.
4206
4207 - `status: optional "in_progress" or "completed" or "incomplete"`
4208
4209 The status of the item. One of `in_progress`, `completed`, or
4210 `incomplete`. Populated when items are returned via API.
4211
4212 - `"in_progress"`
4213
4214 - `"completed"`
4215
4216 - `"incomplete"`
4217
4218 - `ToolSearchCall object { id, arguments, call_id, 4 more }`
4219
4220 - `id: string`
4221
4222 The unique ID of the tool search call item.
4223
4224 - `arguments: unknown`
4225
4226 Arguments used for the tool search call.
4227
4228 - `call_id: string`
4229
4230 The unique ID of the tool search call generated by the model.
4231
4232 - `execution: "server" or "client"`
4233
4234 Whether tool search was executed by the server or by the client.
4235
4236 - `"server"`
4237
4238 - `"client"`
4239
4240 - `status: "in_progress" or "completed" or "incomplete"`
4241
4242 The status of the tool search call item that was recorded.
4243
4244 - `"in_progress"`
4245
4246 - `"completed"`
4247
4248 - `"incomplete"`
4249
4250 - `type: "tool_search_call"`
4251
4252 The type of the item. Always `tool_search_call`.
4253
4254 - `"tool_search_call"`
4255
4256 - `created_by: optional string`
4257
4258 The identifier of the actor that created the item.
4259
4260 - `ToolSearchOutput object { id, call_id, execution, 4 more }`
4261
4262 - `id: string`
4263
4264 The unique ID of the tool search output item.
4265
4266 - `call_id: string`
4267
4268 The unique ID of the tool search call generated by the model.
4269
4270 - `execution: "server" or "client"`
4271
4272 Whether tool search was executed by the server or by the client.
4273
4274 - `"server"`
4275
4276 - `"client"`
4277
4278 - `status: "in_progress" or "completed" or "incomplete"`
4279
4280 The status of the tool search output item that was recorded.
4281
4282 - `"in_progress"`
4283
4284 - `"completed"`
4285
4286 - `"incomplete"`
4287
4288 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
4289
4290 The loaded tool definitions returned by tool search.
4291
4292 - `Function object { name, parameters, strict, 3 more }`
4293
4294 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).
4295
4296 - `name: string`
4297
4298 The name of the function to call.
4299
4300 - `parameters: map[unknown]`
4301
4302 A JSON schema object describing the parameters of the function.
4303
4304 - `strict: boolean`
4305
4306 Whether to enforce strict parameter validation. Default `true`.
4307
4308 - `type: "function"`
4309
4310 The type of the function tool. Always `function`.
4311
4312 - `"function"`
4313
4314 - `defer_loading: optional boolean`
4315
4316 Whether this function is deferred and loaded via tool search.
4317
4318 - `description: optional string`
4319
4320 A description of the function. Used by the model to determine whether or not to call the function.
4321
4322 - `FileSearch object { type, vector_store_ids, filters, 2 more }`
4323
4324 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).
4325
4326 - `type: "file_search"`
4327
4328 The type of the file search tool. Always `file_search`.
4329
4330 - `"file_search"`
4331
4332 - `vector_store_ids: array of string`
4333
4334 The IDs of the vector stores to search.
4335
4336 - `filters: optional ComparisonFilter or CompoundFilter`
4337
4338 A filter to apply.
4339
4340 - `ComparisonFilter object { key, type, value }`
4341
4342 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
4343
4344 - `key: string`
4345
4346 The key to compare against the value.
4347
4348 - `type: "eq" or "ne" or "gt" or 5 more`
4349
4350 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
4351
4352 - `eq`: equals
4353 - `ne`: not equal
4354 - `gt`: greater than
4355 - `gte`: greater than or equal
4356 - `lt`: less than
4357 - `lte`: less than or equal
4358 - `in`: in
4359 - `nin`: not in
4360
4361 - `"eq"`
4362
4363 - `"ne"`
4364
4365 - `"gt"`
4366
4367 - `"gte"`
4368
4369 - `"lt"`
4370
4371 - `"lte"`
4372
4373 - `"in"`
4374
4375 - `"nin"`
4376
4377 - `value: string or number or boolean or array of string or number`
4378
4379 The value to compare against the attribute key; supports string, number, or boolean types.
4380
4381 - `string`
4382
4383 - `number`
4384
4385 - `boolean`
4386
4387 - `array of string or number`
4388
4389 - `string`
4390
4391 - `number`
4392
4393 - `CompoundFilter object { filters, type }`
4394
4395 Combine multiple filters using `and` or `or`.
4396
4397 - `filters: array of ComparisonFilter or unknown`
4398
4399 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
4400
4401 - `ComparisonFilter object { key, type, value }`
4402
4403 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
4404
4405 - `unknown`
4406
4407 - `type: "and" or "or"`
4408
4409 Type of operation: `and` or `or`.
4410
4411 - `"and"`
4412
4413 - `"or"`
4414
4415 - `max_num_results: optional number`
4416
4417 The maximum number of results to return. This number should be between 1 and 50 inclusive.
4418
4419 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
4420
4421 Ranking options for search.
4422
4423 - `hybrid_search: optional object { embedding_weight, text_weight }`
4424
4425 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
4426
4427 - `embedding_weight: number`
4428
4429 The weight of the embedding in the reciprocal ranking fusion.
4430
4431 - `text_weight: number`
4432
4433 The weight of the text in the reciprocal ranking fusion.
4434
4435 - `ranker: optional "auto" or "default-2024-11-15"`
4436
4437 The ranker to use for the file search.
4438
4439 - `"auto"`
4440
4441 - `"default-2024-11-15"`
4442
4443 - `score_threshold: optional number`
4444
4445 The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
4446
4447 - `Computer object { type }`
4448
4449 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
4450
4451 - `type: "computer"`
4452
4453 The type of the computer tool. Always `computer`.
4454
4455 - `"computer"`
4456
4457 - `ComputerUsePreview object { display_height, display_width, environment, type }`
4458
4459 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
4460
4461 - `display_height: number`
4462
4463 The height of the computer display.
4464
4465 - `display_width: number`
4466
4467 The width of the computer display.
4468
4469 - `environment: "windows" or "mac" or "linux" or 2 more`
4470
4471 The type of computer environment to control.
4472
4473 - `"windows"`
4474
4475 - `"mac"`
4476
4477 - `"linux"`
4478
4479 - `"ubuntu"`
4480
4481 - `"browser"`
4482
4483 - `type: "computer_use_preview"`
4484
4485 The type of the computer use tool. Always `computer_use_preview`.
4486
4487 - `"computer_use_preview"`
4488
4489 - `WebSearch object { type, filters, search_context_size, user_location }`
4490
4491 Search the Internet for sources related to the prompt. Learn more about the
4492 [web search tool](/docs/guides/tools-web-search).
4493
4494 - `type: "web_search" or "web_search_2025_08_26"`
4495
4496 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
4497
4498 - `"web_search"`
4499
4500 - `"web_search_2025_08_26"`
4501
4502 - `filters: optional object { allowed_domains }`
4503
4504 Filters for the search.
4505
4506 - `allowed_domains: optional array of string`
4507
4508 Allowed domains for the search. If not provided, all domains are allowed.
4509 Subdomains of the provided domains are allowed as well.
4510
4511 Example: `["pubmed.ncbi.nlm.nih.gov"]`
4512
4513 - `search_context_size: optional "low" or "medium" or "high"`
4514
4515 High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
4516
4517 - `"low"`
4518
4519 - `"medium"`
4520
4521 - `"high"`
4522
4523 - `user_location: optional object { city, country, region, 2 more }`
4524
4525 The approximate location of the user.
3026 4526
3027 The type of item to reference. Always `item_reference`.4527 - `city: optional string`
3028 4528
3029 - `"item_reference"`4529 Free text input for the city of the user, e.g. `San Francisco`.
3030 4530
3031- `instructions: optional string`4531 - `country: optional string`
3032 4532
3033 A system (or developer) message inserted into the model's context.4533 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
3034 When used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.
3035 4534
3036- `previous_response_id: optional string`4535 - `region: optional string`
3037 4536
3038 The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.4537 Free text input for the region of the user, e.g. `California`.
3039 4538
3040- `prompt_cache_key: optional string`4539 - `timezone: optional string`
3041 4540
3042 A key to use when reading from or writing to the prompt cache.4541 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
3043 4542
3044- `prompt_cache_retention: optional "in_memory" or "24h"`4543 - `type: optional "approximate"`
3045 4544
3046 How long to retain a prompt cache entry created by this request.4545 The type of location approximation. Always `approximate`.
3047 4546
3048 - `"in_memory"`4547 - `"approximate"`
3049 4548
3050 - `"24h"`4549 - `Mcp object { server_label, type, allowed_tools, 7 more }`
3051 4550
3052- `service_tier: optional "auto" or "default" or "flex" or "priority"`4551 Give the model access to additional tools via remote Model Context Protocol
4552 (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).
3053 4553
3054 The service tier to use for this request.4554 - `server_label: string`
4555
4556 A label for this MCP server, used to identify it in tool calls.
4557
4558 - `type: "mcp"`
4559
4560 The type of the MCP tool. Always `mcp`.
4561
4562 - `"mcp"`
4563
4564 - `allowed_tools: optional array of string or object { read_only, tool_names }`
4565
4566 List of allowed tool names or a filter object.
4567
4568 - `McpAllowedTools = array of string`
4569
4570 A string array of allowed tool names
4571
4572 - `McpToolFilter object { read_only, tool_names }`
4573
4574 A filter object to specify which tools are allowed.
4575
4576 - `read_only: optional boolean`
4577
4578 Indicates whether or not a tool modifies data or is read-only. If an
4579 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
4580 it will match this filter.
4581
4582 - `tool_names: optional array of string`
4583
4584 List of allowed tool names.
4585
4586 - `authorization: optional string`
4587
4588 An OAuth access token that can be used with a remote MCP server, either
4589 with a custom MCP server URL or a service connector. Your application
4590 must handle the OAuth authorization flow and provide the token here.
4591
4592 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`
4593
4594 Identifier for service connectors, like those available in ChatGPT. One of
4595 `server_url` or `connector_id` must be provided. Learn more about service
4596 connectors [here](/docs/guides/tools-remote-mcp#connectors).
4597
4598 Currently supported `connector_id` values are:
4599
4600 - Dropbox: `connector_dropbox`
4601 - Gmail: `connector_gmail`
4602 - Google Calendar: `connector_googlecalendar`
4603 - Google Drive: `connector_googledrive`
4604 - Microsoft Teams: `connector_microsoftteams`
4605 - Outlook Calendar: `connector_outlookcalendar`
4606 - Outlook Email: `connector_outlookemail`
4607 - SharePoint: `connector_sharepoint`
4608
4609 - `"connector_dropbox"`
4610
4611 - `"connector_gmail"`
4612
4613 - `"connector_googlecalendar"`
4614
4615 - `"connector_googledrive"`
4616
4617 - `"connector_microsoftteams"`
4618
4619 - `"connector_outlookcalendar"`
4620
4621 - `"connector_outlookemail"`
4622
4623 - `"connector_sharepoint"`
4624
4625 - `defer_loading: optional boolean`
4626
4627 Whether this MCP tool is deferred and discovered via tool search.
4628
4629 - `headers: optional map[string]`
4630
4631 Optional HTTP headers to send to the MCP server. Use for authentication
4632 or other purposes.
4633
4634 - `require_approval: optional object { always, never } or "always" or "never"`
4635
4636 Specify which of the MCP server's tools require approval.
4637
4638 - `McpToolApprovalFilter object { always, never }`
4639
4640 Specify which of the MCP server's tools require approval. Can be
4641 `always`, `never`, or a filter object associated with tools
4642 that require approval.
4643
4644 - `always: optional object { read_only, tool_names }`
4645
4646 A filter object to specify which tools are allowed.
4647
4648 - `read_only: optional boolean`
4649
4650 Indicates whether or not a tool modifies data or is read-only. If an
4651 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
4652 it will match this filter.
4653
4654 - `tool_names: optional array of string`
4655
4656 List of allowed tool names.
4657
4658 - `never: optional object { read_only, tool_names }`
4659
4660 A filter object to specify which tools are allowed.
4661
4662 - `read_only: optional boolean`
4663
4664 Indicates whether or not a tool modifies data or is read-only. If an
4665 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
4666 it will match this filter.
4667
4668 - `tool_names: optional array of string`
4669
4670 List of allowed tool names.
4671
4672 - `McpToolApprovalSetting = "always" or "never"`
4673
4674 Specify a single approval policy for all tools. One of `always` or
4675 `never`. When set to `always`, all tools will require approval. When
4676 set to `never`, all tools will not require approval.
4677
4678 - `"always"`
4679
4680 - `"never"`
4681
4682 - `server_description: optional string`
4683
4684 Optional description of the MCP server, used to provide more context.
4685
4686 - `server_url: optional string`
4687
4688 The URL for the MCP server. One of `server_url` or `connector_id` must be
4689 provided.
4690
4691 - `CodeInterpreter object { container, type }`
4692
4693 A tool that runs Python code to help generate a response to a prompt.
4694
4695 - `container: string or object { type, file_ids, memory_limit, network_policy }`
4696
4697 The code interpreter container. Can be a container ID or an object that
4698 specifies uploaded file IDs to make available to your code, along with an
4699 optional `memory_limit` setting.
4700
4701 - `string`
4702
4703 The container ID.
4704
4705 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
4706
4707 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
4708
4709 - `type: "auto"`
4710
4711 Always `auto`.
3055 4712
3056 - `"auto"`4713 - `"auto"`
3057 4714
3058 - `"default"`4715 - `file_ids: optional array of string`
3059 4716
3060 - `"flex"`4717 An optional list of uploaded files to make available to your code.
3061 4718
3062 - `"priority"`4719 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`
3063 4720
3064### Returns4721 The memory limit for the code interpreter container.
3065 4722
3066- `CompactedResponse object { id, created_at, object, 2 more }`4723 - `"1g"`
3067 4724
3068 - `id: string`4725 - `"4g"`
3069 4726
3070 The unique identifier for the compacted response.4727 - `"16g"`
3071 4728
3072 - `created_at: number`4729 - `"64g"`
3073 4730
3074 Unix timestamp (in seconds) when the compacted conversation was created.4731 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`
3075 4732
3076 - `object: "response.compaction"`4733 Network access policy for the container.
3077 4734
3078 The object type. Always `response.compaction`.4735 - `ContainerNetworkPolicyDisabled object { type }`
3079 4736
3080 - `"response.compaction"`4737 - `type: "disabled"`
3081 4738
3082 - `output: array of Message or object { arguments, call_id, name, 4 more } or object { id, arguments, call_id, 4 more } or 22 more`4739 Disable outbound network access. Always `disabled`.
3083 4740
3084 The compacted list of output items.4741 - `"disabled"`
3085 4742
3086 - `Message object { id, content, role, 3 more }`4743 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
4744
4745 - `allowed_domains: array of string`
4746
4747 A list of allowed domains when type is `allowlist`.
4748
4749 - `type: "allowlist"`
4750
4751 Allow outbound network access only to specified domains. Always `allowlist`.
4752
4753 - `"allowlist"`
4754
4755 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
4756
4757 Optional domain-scoped secrets for allowlisted domains.
4758
4759 - `domain: string`
4760
4761 The domain associated with the secret.
4762
4763 - `name: string`
4764
4765 The name of the secret to inject for the domain.
4766
4767 - `value: string`
4768
4769 The secret value to inject for the domain.
4770
4771 - `type: "code_interpreter"`
4772
4773 The type of the code interpreter tool. Always `code_interpreter`.
4774
4775 - `"code_interpreter"`
4776
4777 - `ImageGeneration object { type, action, background, 9 more }`
4778
4779 A tool that generates images using the GPT image models.
4780
4781 - `type: "image_generation"`
4782
4783 The type of the image generation tool. Always `image_generation`.
3087 4784
3088 A message to or from the model.4785 - `"image_generation"`
3089 4786
3090 - `id: string`4787 - `action: optional "generate" or "edit" or "auto"`
3091 4788
3092 The unique ID of the message.4789 Whether to generate a new image or edit an existing image. Default: `auto`.
3093 4790
3094 - `content: array of ResponseInputText or ResponseOutputText or TextContent or 6 more`4791 - `"generate"`
3095 4792
3096 The content of the message4793 - `"edit"`
3097 4794
3098 - `ResponseInputText object { text, type }`4795 - `"auto"`
3099 4796
3100 A text input to the model.4797 - `background: optional "transparent" or "opaque" or "auto"`
3101 4798
3102 - `text: string`4799 Background type for the generated image. One of `transparent`,
4800 `opaque`, or `auto`. Default: `auto`.
3103 4801
3104 The text input to the model.4802 - `"transparent"`
3105 4803
3106 - `type: "input_text"`4804 - `"opaque"`
3107 4805
3108 The type of the input item. Always `input_text`.4806 - `"auto"`
3109 4807
3110 - `"input_text"`4808 - `input_fidelity: optional "high" or "low"`
3111 4809
3112 - `ResponseOutputText object { annotations, logprobs, text, type }`4810 Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
3113 4811
3114 A text output from the model.4812 - `"high"`
3115 4813
3116 - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }`4814 - `"low"`
3117 4815
3118 The annotations of the text output.4816 - `input_image_mask: optional object { file_id, image_url }`
3119 4817
3120 - `FileCitation object { file_id, filename, index, type }`4818 Optional mask for inpainting. Contains `image_url`
4819 (string, optional) and `file_id` (string, optional).
3121 4820
3122 A citation to a file.4821 - `file_id: optional string`
3123 4822
3124 - `file_id: string`4823 File ID for the mask image.
3125 4824
3126 The ID of the file.4825 - `image_url: optional string`
3127 4826
3128 - `filename: string`4827 Base64-encoded mask image.
3129 4828
3130 The filename of the file cited.4829 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
3131 4830
3132 - `index: number`4831 The image generation model to use. Default: `gpt-image-1`.
3133 4832
3134 The index of the file in the list of files.4833 - `string`
3135 4834
3136 - `type: "file_citation"`4835 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"`
3137 4836
3138 The type of the file citation. Always `file_citation`.4837 The image generation model to use. Default: `gpt-image-1`.
3139 4838
3140 - `"file_citation"`4839 - `"gpt-image-1"`
3141 4840
3142 - `URLCitation object { end_index, start_index, title, 2 more }`4841 - `"gpt-image-1-mini"`
3143 4842
3144 A citation for a web resource used to generate a model response.4843 - `"gpt-image-1.5"`
3145 4844
3146 - `end_index: number`4845 - `moderation: optional "auto" or "low"`
3147 4846
3148 The index of the last character of the URL citation in the message.4847 Moderation level for the generated image. Default: `auto`.
3149 4848
3150 - `start_index: number`4849 - `"auto"`
3151 4850
3152 The index of the first character of the URL citation in the message.4851 - `"low"`
3153 4852
3154 - `title: string`4853 - `output_compression: optional number`
3155 4854
3156 The title of the web resource.4855 Compression level for the output image. Default: 100.
3157 4856
3158 - `type: "url_citation"`4857 - `output_format: optional "png" or "webp" or "jpeg"`
3159 4858
3160 The type of the URL citation. Always `url_citation`.4859 The output format of the generated image. One of `png`, `webp`, or
4860 `jpeg`. Default: `png`.
3161 4861
3162 - `"url_citation"`4862 - `"png"`
3163 4863
3164 - `url: string`4864 - `"webp"`
3165 4865
3166 The URL of the web resource.4866 - `"jpeg"`
3167 4867
3168 - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`4868 - `partial_images: optional number`
3169 4869
3170 A citation for a container file used to generate a model response.4870 Number of partial images to generate in streaming mode, from 0 (default value) to 3.
3171 4871
3172 - `container_id: string`4872 - `quality: optional "low" or "medium" or "high" or "auto"`
3173 4873
3174 The ID of the container file.4874 The quality of the generated image. One of `low`, `medium`, `high`,
4875 or `auto`. Default: `auto`.
3175 4876
3176 - `end_index: number`4877 - `"low"`
3177 4878
3178 The index of the last character of the container file citation in the message.4879 - `"medium"`
3179 4880
3180 - `file_id: string`4881 - `"high"`
3181 4882
3182 The ID of the file.4883 - `"auto"`
3183 4884
3184 - `filename: string`4885 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`
3185 4886
3186 The filename of the container file cited.4887 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.
3187 4888
3188 - `start_index: number`4889 - `string`
3189 4890
3190 The index of the first character of the container file citation in the message.4891 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`
3191 4892
3192 - `type: "container_file_citation"`4893 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.
3193 4894
3194 The type of the container file citation. Always `container_file_citation`.4895 - `"1024x1024"`
3195 4896
3196 - `"container_file_citation"`4897 - `"1024x1536"`
3197 4898
3198 - `FilePath object { file_id, index, type }`4899 - `"1536x1024"`
3199 4900
3200 A path to a file.4901 - `"auto"`
3201 4902
3202 - `file_id: string`4903 - `LocalShell object { type }`
3203 4904
3204 The ID of the file.4905 A tool that allows the model to execute shell commands in a local environment.
3205 4906
3206 - `index: number`4907 - `type: "local_shell"`
3207 4908
3208 The index of the file in the list of files.4909 The type of the local shell tool. Always `local_shell`.
3209 4910
3210 - `type: "file_path"`4911 - `"local_shell"`
3211 4912
3212 The type of the file path. Always `file_path`.4913 - `Shell object { type, environment }`
3213 4914
3214 - `"file_path"`4915 A tool that allows the model to execute shell commands.
3215 4916
3216 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`4917 - `type: "shell"`
3217 4918
3218 - `token: string`4919 The type of the shell tool. Always `shell`.
3219 4920
3220 - `bytes: array of number`4921 - `"shell"`
3221 4922
3222 - `logprob: number`4923 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference`
3223 4924
3224 - `top_logprobs: array of object { token, bytes, logprob }`4925 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
3225 4926
3226 - `token: string`4927 - `type: "container_auto"`
3227 4928
3228 - `bytes: array of number`4929 Automatically creates a container for this request
3229 4930
3230 - `logprob: number`4931 - `"container_auto"`
3231 4932
3232 - `text: string`4933 - `file_ids: optional array of string`
3233 4934
3234 The text output from the model.4935 An optional list of uploaded files to make available to your code.
3235 4936
3236 - `type: "output_text"`4937 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`
3237 4938
3238 The type of the output text. Always `output_text`.4939 The memory limit for the container.
3239 4940
3240 - `"output_text"`4941 - `"1g"`
3241 4942
3242 - `TextContent object { text, type }`4943 - `"4g"`
3243 4944
3244 A text content.4945 - `"16g"`
3245 4946
3246 - `text: string`4947 - `"64g"`
3247 4948
3248 - `type: "text"`4949 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`
3249 4950
3250 - `"text"`4951 Network access policy for the container.
3251 4952
3252 - `SummaryTextContent object { text, type }`4953 - `ContainerNetworkPolicyDisabled object { type }`
3253 4954
3254 A summary text from the model.4955 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
3255 4956
3256 - `text: string`4957 - `skills: optional array of SkillReference or InlineSkill`
3257 4958
3258 A summary of the reasoning output from the model so far.4959 An optional list of skills referenced by id or inline data.
3259 4960
3260 - `type: "summary_text"`4961 - `SkillReference object { skill_id, type, version }`
3261 4962
3262 The type of the object. Always `summary_text`.4963 - `skill_id: string`
3263 4964
3264 - `"summary_text"`4965 The ID of the referenced skill.
3265 4966
3266 - `ReasoningText object { text, type }`4967 - `type: "skill_reference"`
3267 4968
3268 Reasoning text from the model.4969 References a skill created with the /v1/skills endpoint.
3269 4970
3270 - `text: string`4971 - `"skill_reference"`
3271 4972
3272 The reasoning text from the model.4973 - `version: optional string`
3273 4974
3274 - `type: "reasoning_text"`4975 Optional skill version. Use a positive integer or 'latest'. Omit for default.
3275 4976
3276 The type of the reasoning text. Always `reasoning_text`.4977 - `InlineSkill object { description, name, source, type }`
3277 4978
3278 - `"reasoning_text"`4979 - `description: string`
3279 4980
3280 - `ResponseOutputRefusal object { refusal, type }`4981 The description of the skill.
3281 4982
3282 A refusal from the model.4983 - `name: string`
3283 4984
3284 - `refusal: string`4985 The name of the skill.
3285 4986
3286 The refusal explanation from the model.4987 - `source: InlineSkillSource`
3287 4988
3288 - `type: "refusal"`4989 Inline skill payload
3289 4990
3290 The type of the refusal. Always `refusal`.4991 - `data: string`
3291 4992
3292 - `"refusal"`4993 Base64-encoded skill zip bundle.
3293 4994
3294 - `ResponseInputImage object { detail, type, file_id, image_url }`4995 - `media_type: "application/zip"`
3295 4996
3296 An image input to the model. Learn about [image inputs](/docs/guides/vision).4997 The media type of the inline skill payload. Must be `application/zip`.
3297 4998
3298 - `detail: "low" or "high" or "auto" or "original"`4999 - `"application/zip"`
3299 5000
3300 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.5001 - `type: "base64"`
3301 5002
3302 - `"low"`5003 The type of the inline skill source. Must be `base64`.
3303 5004
3304 - `"high"`5005 - `"base64"`
3305 5006
3306 - `"auto"`5007 - `type: "inline"`
3307 5008
3308 - `"original"`5009 Defines an inline skill for this request.
3309 5010
3310 - `type: "input_image"`5011 - `"inline"`
3311 5012
3312 The type of the input item. Always `input_image`.5013 - `LocalEnvironment object { type, skills }`
3313 5014
3314 - `"input_image"`5015 - `type: "local"`
3315 5016
3316 - `file_id: optional string`5017 Use a local computer environment.
3317 5018
3318 The ID of the file to be sent to the model.5019 - `"local"`
3319 5020
3320 - `image_url: optional string`5021 - `skills: optional array of LocalSkill`
3321 5022
3322 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.5023 An optional list of skills.
3323 5024
3324 - `ComputerScreenshotContent object { detail, file_id, image_url, type }`5025 - `description: string`
3325 5026
3326 A screenshot of a computer.5027 The description of the skill.
3327 5028
3328 - `detail: "low" or "high" or "auto" or "original"`5029 - `name: string`
3329 5030
3330 The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.5031 The name of the skill.
3331 5032
3332 - `"low"`5033 - `path: string`
3333 5034
3334 - `"high"`5035 The path to the directory containing the skill.
3335 5036
3336 - `"auto"`5037 - `ContainerReference object { container_id, type }`
3337 5038
3338 - `"original"`5039 - `container_id: string`
3339 5040
3340 - `file_id: string`5041 The ID of the referenced container.
3341 5042
3342 The identifier of an uploaded file that contains the screenshot.5043 - `type: "container_reference"`
3343 5044
3344 - `image_url: string`5045 References a container created with the /v1/containers endpoint
3345 5046
3346 The URL of the screenshot image.5047 - `"container_reference"`
3347 5048
3348 - `type: "computer_screenshot"`5049 - `Custom object { name, type, defer_loading, 2 more }`
3349 5050
3350 Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.5051 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
3351 5052
3352 - `"computer_screenshot"`5053 - `name: string`
3353 5054
3354 - `ResponseInputFile object { type, detail, file_data, 3 more }`5055 The name of the custom tool, used to identify it in tool calls.
3355 5056
3356 A file input to the model.5057 - `type: "custom"`
3357 5058
3358 - `type: "input_file"`5059 The type of the custom tool. Always `custom`.
3359 5060
3360 The type of the input item. Always `input_file`.5061 - `"custom"`
3361 5062
3362 - `"input_file"`5063 - `defer_loading: optional boolean`
3363 5064
3364 - `detail: optional "low" or "high"`5065 Whether this tool should be deferred and discovered via tool search.
3365 5066
3366 The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`.5067 - `description: optional string`
3367 5068
3368 - `"low"`5069 Optional description of the custom tool, used to provide more context.
3369 5070
3370 - `"high"`5071 - `format: optional CustomToolInputFormat`
3371 5072
3372 - `file_data: optional string`5073 The input format for the custom tool. Default is unconstrained text.
3373 5074
3374 The content of the file to be sent to the model.5075 - `Text object { type }`
3375 5076
3376 - `file_id: optional string`5077 Unconstrained free-form text.
3377 5078
3378 The ID of the file to be sent to the model.5079 - `type: "text"`
3379 5080
3380 - `file_url: optional string`5081 Unconstrained text format. Always `text`.
3381 5082
3382 The URL of the file to be sent to the model.5083 - `"text"`
3383 5084
3384 - `filename: optional string`5085 - `Grammar object { definition, syntax, type }`
3385 5086
3386 The name of the file to be sent to the model.5087 A grammar defined by the user.
3387 5088
3388 - `role: "unknown" or "user" or "assistant" or 5 more`5089 - `definition: string`
3389 5090
3390 The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`.5091 The grammar definition.
3391 5092
3392 - `"unknown"`5093 - `syntax: "lark" or "regex"`
3393 5094
3394 - `"user"`5095 The syntax of the grammar definition. One of `lark` or `regex`.
3395 5096
3396 - `"assistant"`5097 - `"lark"`
3397 5098
3398 - `"system"`5099 - `"regex"`
3399 5100
3400 - `"critic"`5101 - `type: "grammar"`
3401 5102
3402 - `"discriminator"`5103 Grammar format. Always `grammar`.
3403 5104
3404 - `"developer"`5105 - `"grammar"`
3405 5106
3406 - `"tool"`5107 - `Namespace object { description, name, tools, type }`
3407 5108
3408 - `status: "in_progress" or "completed" or "incomplete"`5109 Groups function/custom tools under a shared namespace.
3409 5110
3410 The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.5111 - `description: string`
3411 5112
3412 - `"in_progress"`5113 A description of the namespace shown to the model.
3413 5114
3414 - `"completed"`5115 - `name: string`
3415 5116
3416 - `"incomplete"`5117 The namespace name used in tool calls (for example, `crm`).
3417 5118
3418 - `type: "message"`5119 - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }`
3419 5120
3420 The type of the message. Always set to `message`.5121 The function/custom tools available inside this namespace.
3421 5122
3422 - `"message"`5123 - `Function object { name, type, defer_loading, 3 more }`
3423 5124
3424 - `phase: optional "commentary" or "final_answer"`5125 - `name: string`
3425 5126
3426 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.5127 - `type: "function"`
3427 5128
3428 - `"commentary"`5129 - `"function"`
3429 5130
3430 - `"final_answer"`5131 - `defer_loading: optional boolean`
3431 5132
3432 - `FunctionCall object { arguments, call_id, name, 4 more }`5133 Whether this function should be deferred and discovered via tool search.
3433 5134
3434 A tool call to run a function. See the5135 - `description: optional string`
3435 [function calling guide](/docs/guides/function-calling) for more information.
3436 5136
3437 - `arguments: string`5137 - `parameters: optional unknown`
3438 5138
3439 A JSON string of the arguments to pass to the function.5139 - `strict: optional boolean`
3440 5140
3441 - `call_id: string`5141 - `Custom object { name, type, defer_loading, 2 more }`
3442 5142
3443 The unique ID of the function tool call generated by the model.5143 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
3444 5144
3445 - `name: string`5145 - `name: string`
3446 5146
3447 The name of the function to run.5147 The name of the custom tool, used to identify it in tool calls.
3448 5148
3449 - `type: "function_call"`5149 - `type: "custom"`
3450 5150
3451 The type of the function tool call. Always `function_call`.5151 The type of the custom tool. Always `custom`.
3452 5152
3453 - `"function_call"`5153 - `"custom"`
3454 5154
3455 - `id: optional string`5155 - `defer_loading: optional boolean`
3456 5156
3457 The unique ID of the function tool call.5157 Whether this tool should be deferred and discovered via tool search.
3458 5158
3459 - `namespace: optional string`5159 - `description: optional string`
3460 5160
3461 The namespace of the function to run.5161 Optional description of the custom tool, used to provide more context.
3462 5162
3463 - `status: optional "in_progress" or "completed" or "incomplete"`5163 - `format: optional CustomToolInputFormat`
3464 5164
3465 The status of the item. One of `in_progress`, `completed`, or5165 The input format for the custom tool. Default is unconstrained text.
3466 `incomplete`. Populated when items are returned via API.
3467 5166
3468 - `"in_progress"`5167 - `type: "namespace"`
3469 5168
3470 - `"completed"`5169 The type of the tool. Always `namespace`.
3471 5170
3472 - `"incomplete"`5171 - `"namespace"`
3473 5172
3474 - `ToolSearchCall object { id, arguments, call_id, 4 more }`5173 - `ToolSearch object { type, description, execution, parameters }`
3475 5174
3476 - `id: string`5175 Hosted or BYOT tool search configuration for deferred tools.
3477 5176
3478 The unique ID of the tool search call item.5177 - `type: "tool_search"`
3479 5178
3480 - `arguments: unknown`5179 The type of the tool. Always `tool_search`.
3481 5180
3482 Arguments used for the tool search call.5181 - `"tool_search"`
3483 5182
3484 - `call_id: string`5183 - `description: optional string`
3485 5184
3486 The unique ID of the tool search call generated by the model.5185 Description shown to the model for a client-executed tool search tool.
3487 5186
3488 - `execution: "server" or "client"`5187 - `execution: optional "server" or "client"`
3489 5188
3490 Whether tool search was executed by the server or by the client.5189 Whether tool search is executed by the server or by the client.
3491 5190
3492 - `"server"`5191 - `"server"`
3493 5192
3494 - `"client"`5193 - `"client"`
3495 5194
3496 - `status: "in_progress" or "completed" or "incomplete"`5195 - `parameters: optional unknown`
3497 5196
3498 The status of the tool search call item that was recorded.5197 Parameter schema for a client-executed tool search tool.
3499 5198
3500 - `"in_progress"`5199 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
3501 5200
3502 - `"completed"`5201 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).
3503 5202
3504 - `"incomplete"`5203 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`
3505 5204
3506 - `type: "tool_search_call"`5205 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.
3507 5206
3508 The type of the item. Always `tool_search_call`.5207 - `"web_search_preview"`
3509 5208
3510 - `"tool_search_call"`5209 - `"web_search_preview_2025_03_11"`
3511 5210
3512 - `created_by: optional string`5211 - `search_content_types: optional array of "text" or "image"`
3513 5212
3514 The identifier of the actor that created the item.5213 - `"text"`
3515 5214
3516 - `ToolSearchOutput object { id, call_id, execution, 4 more }`5215 - `"image"`
3517 5216
3518 - `id: string`5217 - `search_context_size: optional "low" or "medium" or "high"`
3519 5218
3520 The unique ID of the tool search output item.5219 High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
3521 5220
3522 - `call_id: string`5221 - `"low"`
3523 5222
3524 The unique ID of the tool search call generated by the model.5223 - `"medium"`
3525 5224
3526 - `execution: "server" or "client"`5225 - `"high"`
3527 5226
3528 Whether tool search was executed by the server or by the client.5227 - `user_location: optional object { type, city, country, 2 more }`
3529 5228
3530 - `"server"`5229 The user's location.
3531 5230
3532 - `"client"`5231 - `type: "approximate"`
3533 5232
3534 - `status: "in_progress" or "completed" or "incomplete"`5233 The type of location approximation. Always `approximate`.
3535 5234
3536 The status of the tool search output item that was recorded.5235 - `"approximate"`
3537 5236
3538 - `"in_progress"`5237 - `city: optional string`
3539 5238
3540 - `"completed"`5239 Free text input for the city of the user, e.g. `San Francisco`.
3541 5240
3542 - `"incomplete"`5241 - `country: optional string`
3543 5242
3544 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`5243 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
3545 5244
3546 The loaded tool definitions returned by tool search.5245 - `region: optional string`
3547 5246
3548 - `Function object { name, parameters, strict, 3 more }`5247 Free text input for the region of the user, e.g. `California`.
3549 5248
3550 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).5249 - `timezone: optional string`
3551 5250
3552 - `name: string`5251 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
3553 5252
3554 The name of the function to call.5253 - `ApplyPatch object { type }`
3555 5254
3556 - `parameters: map[unknown]`5255 Allows the assistant to create, delete, or update files using unified diffs.
3557 5256
3558 A JSON schema object describing the parameters of the function.5257 - `type: "apply_patch"`
3559 5258
3560 - `strict: boolean`5259 The type of the tool. Always `apply_patch`.
3561 5260
3562 Whether to enforce strict parameter validation. Default `true`.5261 - `"apply_patch"`
3563 5262
3564 - `type: "function"`5263 - `type: "tool_search_output"`
3565 5264
3566 The type of the function tool. Always `function`.5265 The type of the item. Always `tool_search_output`.
3567 5266
3568 - `"function"`5267 - `"tool_search_output"`
3569 5268
3570 - `defer_loading: optional boolean`5269 - `created_by: optional string`
3571 5270
3572 Whether this function is deferred and loaded via tool search.5271 The identifier of the actor that created the item.
3573 5272
3574 - `description: optional string`5273 - `AdditionalTools object { id, role, tools, type }`
3575 5274
3576 A description of the function. Used by the model to determine whether or not to call the function.5275 - `id: string`
3577 5276
3578 - `FileSearch object { type, vector_store_ids, filters, 2 more }`5277 The unique ID of the additional tools item.
3579 5278
3580 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).5279 - `role: "unknown" or "user" or "assistant" or 5 more`
3581 5280
3582 - `type: "file_search"`5281 The role that provided the additional tools.
3583 5282
3584 The type of the file search tool. Always `file_search`.5283 - `"unknown"`
3585 5284
3586 - `"file_search"`5285 - `"user"`
3587 5286
3588 - `vector_store_ids: array of string`5287 - `"assistant"`
3589 5288
3590 The IDs of the vector stores to search.5289 - `"system"`
3591 5290
3592 - `filters: optional ComparisonFilter or CompoundFilter`5291 - `"critic"`
3593 5292
3594 A filter to apply.5293 - `"discriminator"`
3595 5294
3596 - `ComparisonFilter object { key, type, value }`5295 - `"developer"`
3597 5296
3598 A filter used to compare a specified attribute key to a given value using a defined comparison operation.5297 - `"tool"`
3599 5298
3600 - `key: string`5299 - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more`
3601 5300
3602 The key to compare against the value.5301 The additional tool definitions made available at this item.
5302
5303 - `Function object { name, parameters, strict, 3 more }`
3603 5304
3604 - `type: "eq" or "ne" or "gt" or 5 more`5305 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).
3605 5306
3606 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.5307 - `name: string`
3607 5308
3608 - `eq`: equals5309 The name of the function to call.
3609 - `ne`: not equal
3610 - `gt`: greater than
3611 - `gte`: greater than or equal
3612 - `lt`: less than
3613 - `lte`: less than or equal
3614 - `in`: in
3615 - `nin`: not in
3616 5310
3617 - `"eq"`5311 - `parameters: map[unknown]`
3618 5312
3619 - `"ne"`5313 A JSON schema object describing the parameters of the function.
3620 5314
3621 - `"gt"`5315 - `strict: boolean`
3622 5316
3623 - `"gte"`5317 Whether to enforce strict parameter validation. Default `true`.
3624 5318
3625 - `"lt"`5319 - `type: "function"`
3626 5320
3627 - `"lte"`5321 The type of the function tool. Always `function`.
3628 5322
3629 - `"in"`5323 - `"function"`
3630 5324
3631 - `"nin"`5325 - `defer_loading: optional boolean`
3632 5326
3633 - `value: string or number or boolean or array of string or number`5327 Whether this function is deferred and loaded via tool search.
3634 5328
3635 The value to compare against the attribute key; supports string, number, or boolean types.5329 - `description: optional string`
3636 5330
3637 - `string`5331 A description of the function. Used by the model to determine whether or not to call the function.
3638 5332
3639 - `number`5333 - `FileSearch object { type, vector_store_ids, filters, 2 more }`
3640 5334
3641 - `boolean`5335 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).
3642 5336
3643 - `array of string or number`5337 - `type: "file_search"`
3644 5338
3645 - `string`5339 The type of the file search tool. Always `file_search`.
3646 5340
3647 - `number`5341 - `"file_search"`
3648 5342
3649 - `CompoundFilter object { filters, type }`5343 - `vector_store_ids: array of string`
3650 5344
3651 Combine multiple filters using `and` or `or`.5345 The IDs of the vector stores to search.
3652 5346
3653 - `filters: array of ComparisonFilter or unknown`5347 - `filters: optional ComparisonFilter or CompoundFilter`
3654 5348
3655 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.5349 A filter to apply.
3656 5350
3657 - `ComparisonFilter object { key, type, value }`5351 - `ComparisonFilter object { key, type, value }`
3658 5352
3659 A filter used to compare a specified attribute key to a given value using a defined comparison operation.5353 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
3660 5354
3661 - `unknown`5355 - `CompoundFilter object { filters, type }`
3662
3663 - `type: "and" or "or"`
3664
3665 Type of operation: `and` or `or`.
3666
3667 - `"and"`
3668 5356
3669 - `"or"`5357 Combine multiple filters using `and` or `or`.
3670 5358
3671 - `max_num_results: optional number`5359 - `max_num_results: optional number`
3672 5360
3990 5678
3991 - `ContainerNetworkPolicyDisabled object { type }`5679 - `ContainerNetworkPolicyDisabled object { type }`
3992 5680
3993 - `type: "disabled"`
3994
3995 Disable outbound network access. Always `disabled`.
3996
3997 - `"disabled"`
3998
3999 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`5681 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
4000 5682
4001 - `allowed_domains: array of string`
4002
4003 A list of allowed domains when type is `allowlist`.
4004
4005 - `type: "allowlist"`
4006
4007 Allow outbound network access only to specified domains. Always `allowlist`.
4008
4009 - `"allowlist"`
4010
4011 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
4012
4013 Optional domain-scoped secrets for allowlisted domains.
4014
4015 - `domain: string`
4016
4017 The domain associated with the secret.
4018
4019 - `name: string`
4020
4021 The name of the secret to inject for the domain.
4022
4023 - `value: string`
4024
4025 The secret value to inject for the domain.
4026
4027 - `type: "code_interpreter"`5683 - `type: "code_interpreter"`
4028 5684
4029 The type of the code interpreter tool. Always `code_interpreter`.5685 The type of the code interpreter tool. Always `code_interpreter`.
4180 5836
4181 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`5837 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
4182 5838
4183 - `type: "container_auto"`
4184
4185 Automatically creates a container for this request
4186
4187 - `"container_auto"`
4188
4189 - `file_ids: optional array of string`
4190
4191 An optional list of uploaded files to make available to your code.
4192
4193 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`
4194
4195 The memory limit for the container.
4196
4197 - `"1g"`
4198
4199 - `"4g"`
4200
4201 - `"16g"`
4202
4203 - `"64g"`
4204
4205 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`
4206
4207 Network access policy for the container.
4208
4209 - `ContainerNetworkPolicyDisabled object { type }`
4210
4211 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
4212
4213 - `skills: optional array of SkillReference or InlineSkill`
4214
4215 An optional list of skills referenced by id or inline data.
4216
4217 - `SkillReference object { skill_id, type, version }`
4218
4219 - `skill_id: string`
4220
4221 The ID of the referenced skill.
4222
4223 - `type: "skill_reference"`
4224
4225 References a skill created with the /v1/skills endpoint.
4226
4227 - `"skill_reference"`
4228
4229 - `version: optional string`
4230
4231 Optional skill version. Use a positive integer or 'latest'. Omit for default.
4232
4233 - `InlineSkill object { description, name, source, type }`
4234
4235 - `description: string`
4236
4237 The description of the skill.
4238
4239 - `name: string`
4240
4241 The name of the skill.
4242
4243 - `source: InlineSkillSource`
4244
4245 Inline skill payload
4246
4247 - `data: string`
4248
4249 Base64-encoded skill zip bundle.
4250
4251 - `media_type: "application/zip"`
4252
4253 The media type of the inline skill payload. Must be `application/zip`.
4254
4255 - `"application/zip"`
4256
4257 - `type: "base64"`
4258
4259 The type of the inline skill source. Must be `base64`.
4260
4261 - `"base64"`
4262
4263 - `type: "inline"`
4264
4265 Defines an inline skill for this request.
4266
4267 - `"inline"`
4268
4269 - `LocalEnvironment object { type, skills }`5839 - `LocalEnvironment object { type, skills }`
4270 5840
4271 - `type: "local"`
4272
4273 Use a local computer environment.
4274
4275 - `"local"`
4276
4277 - `skills: optional array of LocalSkill`
4278
4279 An optional list of skills.
4280
4281 - `description: string`
4282
4283 The description of the skill.
4284
4285 - `name: string`
4286
4287 The name of the skill.
4288
4289 - `path: string`
4290
4291 The path to the directory containing the skill.
4292
4293 - `ContainerReference object { container_id, type }`5841 - `ContainerReference object { container_id, type }`
4294 5842
4295 - `container_id: string`
4296
4297 The ID of the referenced container.
4298
4299 - `type: "container_reference"`
4300
4301 References a container created with the /v1/containers endpoint
4302
4303 - `"container_reference"`
4304
4305 - `Custom object { name, type, defer_loading, 2 more }`5843 - `Custom object { name, type, defer_loading, 2 more }`
4306 5844
4307 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)5845 A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)
4328 5866
4329 The input format for the custom tool. Default is unconstrained text.5867 The input format for the custom tool. Default is unconstrained text.
4330 5868
4331 - `Text object { type }`
4332
4333 Unconstrained free-form text.
4334
4335 - `type: "text"`
4336
4337 Unconstrained text format. Always `text`.
4338
4339 - `"text"`
4340
4341 - `Grammar object { definition, syntax, type }`
4342
4343 A grammar defined by the user.
4344
4345 - `definition: string`
4346
4347 The grammar definition.
4348
4349 - `syntax: "lark" or "regex"`
4350
4351 The syntax of the grammar definition. One of `lark` or `regex`.
4352
4353 - `"lark"`
4354
4355 - `"regex"`
4356
4357 - `type: "grammar"`
4358
4359 Grammar format. Always `grammar`.
4360
4361 - `"grammar"`
4362
4363 - `Namespace object { description, name, tools, type }`5869 - `Namespace object { description, name, tools, type }`
4364 5870
4365 Groups function/custom tools under a shared namespace.5871 Groups function/custom tools under a shared namespace.
4516 6022
4517 - `"apply_patch"`6023 - `"apply_patch"`
4518 6024
4519 - `type: "tool_search_output"`6025 - `type: "additional_tools"`
4520
4521 The type of the item. Always `tool_search_output`.
4522
4523 - `"tool_search_output"`
4524 6026
4525 - `created_by: optional string`6027 The type of the item. Always `additional_tools`.
4526 6028
4527 The identifier of the actor that created the item.6029 - `"additional_tools"`
4528 6030
4529 - `FunctionCallOutput object { call_id, output, type, 2 more }`6031 - `FunctionCallOutput object { call_id, output, type, 2 more }`
4530 6032
4658 6160
4659 The unique ID of the web search tool call.6161 The unique ID of the web search tool call.
4660 6162
4661 - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }`6163 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`
4662 6164
4663 An object describing the specific action taken in this web search call.6165 An object describing the specific action taken in this web search call.
4664 Includes details on how the model used the web (search, open_page, find_in_page).6166 Includes details on how the model used the web (search, open_page, find_in_page).
4665 6167
4666 - `Search object { query, type, queries, sources }`6168 - `Search object { type, queries, query, sources }`
4667 6169
4668 Action type "search" - Performs a web search query.6170 Action type "search" - Performs a web search query.
4669 6171
4670 - `query: string`
4671
4672 [DEPRECATED] The search query.
4673
4674 - `type: "search"`6172 - `type: "search"`
4675 6173
4676 The action type.6174 The action type.
4681 6179
4682 The search queries.6180 The search queries.
4683 6181
6182 - `query: optional string`
6183
6184 The search query.
6185
4684 - `sources: optional array of object { type, url }`6186 - `sources: optional array of object { type, url }`
4685 6187
4686 The sources used in the search.6188 The sources used in the search.