@@ -479,6 +479,13 @@ export interface Response {
479479 */
480480 prompt ?: ResponsePrompt | null ;
481481
482+ /**
483+ * Used by OpenAI to cache responses for similar requests to optimize your cache
484+ * hit rates. Replaces the `user` field.
485+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
486+ */
487+ prompt_cache_key ?: string ;
488+
482489 /**
483490 * **o-series models only**
484491 *
@@ -487,6 +494,15 @@ export interface Response {
487494 */
488495 reasoning ?: Shared . Reasoning | null ;
489496
497+ /**
498+ * A stable identifier used to help detect users of your application that may be
499+ * violating OpenAI's usage policies. The IDs should be a string that uniquely
500+ * identifies each user. We recommend hashing their username or email address, in
501+ * order to avoid sending us any identifying information.
502+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
503+ */
504+ safety_identifier ?: string ;
505+
490506 /**
491507 * Specifies the latency tier to use for processing the request. This parameter is
492508 * relevant for customers subscribed to the scale tier service:
@@ -540,9 +556,12 @@ export interface Response {
540556 usage ?: ResponseUsage ;
541557
542558 /**
543- * A stable identifier for your end-users. Used to boost cache hit rates by better
544- * bucketing similar requests and to help OpenAI detect and prevent abuse.
545- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
559+ * @deprecated This field is being replaced by `safety_identifier` and
560+ * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
561+ * optimizations. A stable identifier for your end-users. Used to boost cache hit
562+ * rates by better bucketing similar requests and to help OpenAI detect and prevent
563+ * abuse.
564+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
546565 */
547566 user ?: string ;
548567}
@@ -4836,6 +4855,13 @@ export interface ResponseCreateParamsBase {
48364855 */
48374856 prompt ?: ResponsePrompt | null ;
48384857
4858+ /**
4859+ * Used by OpenAI to cache responses for similar requests to optimize your cache
4860+ * hit rates. Replaces the `user` field.
4861+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
4862+ */
4863+ prompt_cache_key ?: string ;
4864+
48394865 /**
48404866 * **o-series models only**
48414867 *
@@ -4844,6 +4870,15 @@ export interface ResponseCreateParamsBase {
48444870 */
48454871 reasoning ?: Shared . Reasoning | null ;
48464872
4873+ /**
4874+ * A stable identifier used to help detect users of your application that may be
4875+ * violating OpenAI's usage policies. The IDs should be a string that uniquely
4876+ * identifies each user. We recommend hashing their username or email address, in
4877+ * order to avoid sending us any identifying information.
4878+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
4879+ */
4880+ safety_identifier ?: string ;
4881+
48474882 /**
48484883 * Specifies the latency tier to use for processing the request. This parameter is
48494884 * relevant for customers subscribed to the scale tier service:
@@ -4942,9 +4977,12 @@ export interface ResponseCreateParamsBase {
49424977 truncation ?: 'auto' | 'disabled' | null ;
49434978
49444979 /**
4945- * A stable identifier for your end-users. Used to boost cache hit rates by better
4946- * bucketing similar requests and to help OpenAI detect and prevent abuse.
4947- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
4980+ * @deprecated This field is being replaced by `safety_identifier` and
4981+ * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
4982+ * optimizations. A stable identifier for your end-users. Used to boost cache hit
4983+ * rates by better bucketing similar requests and to help OpenAI detect and prevent
4984+ * abuse.
4985+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
49484986 */
49494987 user ?: string ;
49504988}
0 commit comments