74 74
75 The unique ID of the conversation.75 The unique ID of the conversation.
76 76
77- `image: optional object { context_compression }`
78
79 Request level image options.
80
81 - `context_compression: optional "auto" or "enabled" or "disabled"`
82
83 Controls image context optimization. Defaults to `auto`, which uses the model, transport, and input to select a policy. Use `enabled` to require compression support or `disabled` to turn it off.
84
85 - `"auto"`
86
87 - `"enabled"`
88
89 - `"disabled"`
90
77- `include: optional array of BetaResponseIncludable or null`91- `include: optional array of BetaResponseIncludable or null`
78 92
79 Specify additional output data to include in the model response. Currently supported values are:93 Specify additional output data to include in the model response. Currently supported values are:
5737 5751
5738- `prompt_cache_options: optional object { comparison_response_id, mode, prewarm, ttl }`5752- `prompt_cache_options: optional object { comparison_response_id, mode, prewarm, ttl }`
5739 5753
5740 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.5754 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.
5741 5755
5742 - `comparison_response_id: optional string or null`5756 - `comparison_response_id: optional string or null`
5743 5757
5755 5769
5756 Prepares the prompt cache without generating output. Defaults to `false`. When set to `true`, overrides the `generate` field to `false`.5770 Prepares the prompt cache without generating output. Defaults to `false`. When set to `true`, overrides the `generate` field to `false`.
5757 5771
5758 - `ttl: optional "30m"`5772 - `ttl: optional "30m" or "12h"`
5759 5773
5760 The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer.5774 The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Supported values are `30m` (the default) and `12h`. The backend may retain cache entries for longer.
5761 5775
5762 - `"30m"`5776 - `"30m"`
5763 5777
5778 - `"12h"`
5779
5764- `prompt_cache_retention: optional "in_memory" or "24h" or null`5780- `prompt_cache_retention: optional "in_memory" or "24h" or null`
5765 5781
5766 Deprecated. Use `prompt_cache_options.ttl` instead.5782 Deprecated. Use `prompt_cache_options.ttl` instead.
7252 7268
7253### Returns7269### Returns
7254 7270
7255- `BetaResponse object { id, access_programs, created_at, 35 more }`7271- `BetaResponse object { id, access_programs, created_at, 36 more }`
7256 7272
7257 - `id: string`7273 - `id: string`
7258 7274
18301 18317
18302 The unique ID of the conversation that this response was associated with.18318 The unique ID of the conversation that this response was associated with.
18303 18319
18320 - `image: optional object { context_compression }`
18321
18322 - `context_compression: "enabled" or "disabled"`
18323
18324 Effective image context optimization policy.
18325
18326 - `"enabled"`
18327
18328 - `"disabled"`
18329
18304 - `max_output_tokens: optional integer or null`18330 - `max_output_tokens: optional integer or null`
18305 18331
18306 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).18332 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).
18544 18570
18545 - `"explicit"`18571 - `"explicit"`
18546 18572
18547 - `ttl: "30m"`18573 - `ttl: "30m" or "12h"`
18548 18574
18549 The minimum lifetime applied to each cache breakpoint.18575 The minimum lifetime applied to each cache breakpoint.
18550 18576
18551 - `"30m"`18577 - `"30m"`
18552 18578
18579 - `"12h"`
18580
18553 - `comparison_response_id: optional string or null`18581 - `comparison_response_id: optional string or null`
18554 18582
18555 The response ID supplied as the prompt cache diagnostics comparison.18583 The response ID supplied as the prompt cache diagnostics comparison.
18883 18911
18884 The number of input tokens.18912 The number of input tokens.
18885 18913
18886 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`18914 - `input_tokens_details: object { cache_write_tokens, cached_tokens, cache_write_tokens_details }`
18887 18915
18888 A detailed breakdown of the input tokens.18916 A detailed breakdown of the input tokens.
18889 18917
18896 The number of tokens that were retrieved from the cache.18924 The number of tokens that were retrieved from the cache.
18897 [More on prompt caching](/api/docs/guides/prompt-caching).18925 [More on prompt caching](/api/docs/guides/prompt-caching).
18898 18926
18927 - `cache_write_tokens_details: optional object { ttl_12h_tokens, ttl_30m_tokens }`
18928
18929 - `ttl_12h_tokens: integer`
18930
18931 The number of input tokens written with 12-hour retention.
18932
18933 - `ttl_30m_tokens: integer`
18934
18935 The number of input tokens written with 30-minute retention.
18936
18899 - `output_tokens: integer`18937 - `output_tokens: integer`
18900 18938
18901 The number of output tokens.18939 The number of output tokens.
19011 "conversation": {19049 "conversation": {
19012 "id": "id"19050 "id": "id"
19013 },19051 },
19052 "image": {
19053 "context_compression": "enabled"
19054 },
19014 "moderation": {19055 "moderation": {
19015 "input": {19056 "input": {
19016 "categories": {19057 "categories": {