openai 7.2.0 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -1
- package/README.md +5 -10
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +9 -3
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +9 -3
- package/internal/uploads.mjs.map +1 -1
- package/package.json +4 -1
- package/resources/beta/responses/responses.d.mts +17 -3
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +17 -3
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/content-provenance-checks.d.mts +103 -0
- package/resources/content-provenance-checks.d.mts.map +1 -0
- package/resources/content-provenance-checks.d.ts +103 -0
- package/resources/content-provenance-checks.d.ts.map +1 -0
- package/resources/content-provenance-checks.js +24 -0
- package/resources/content-provenance-checks.js.map +1 -0
- package/resources/content-provenance-checks.mjs +20 -0
- package/resources/content-provenance-checks.mjs.map +1 -0
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/responses/responses.d.mts +17 -3
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +17 -3
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/src/client.ts +13 -0
- package/src/internal/uploads.ts +8 -4
- package/src/resources/beta/responses/responses.ts +17 -3
- package/src/resources/content-provenance-checks.ts +132 -0
- package/src/resources/index.ts +5 -0
- package/src/resources/responses/responses.ts +17 -3
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { type Uploadable } from '../core/uploads';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { multipartFormRequestOptions } from '../internal/uploads';
|
|
8
|
+
|
|
9
|
+
export class ContentProvenanceChecks extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Check whether an image or audio file contains known OpenAI provenance signals.
|
|
12
|
+
* [Learn more about content provenance](/api/docs/guides/content-provenance).
|
|
13
|
+
*
|
|
14
|
+
* If `not_detected`, it means the tool did not find supported signals in the
|
|
15
|
+
* uploaded file. The content could still have been generated by OpenAI if the
|
|
16
|
+
* metadata was stripped or has evidence of tampering, the watermark was degraded,
|
|
17
|
+
* it comes from a legacy generation model, or it was created before provenance
|
|
18
|
+
* signals were available. Content could also still be AI-generated by another
|
|
19
|
+
* company's model, which the tool currently does not detect.
|
|
20
|
+
*/
|
|
21
|
+
create(
|
|
22
|
+
body: ContentProvenanceCheckCreateParams,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): APIPromise<ContentProvenanceCheck> {
|
|
25
|
+
return this._client.post(
|
|
26
|
+
'/content_provenance_checks',
|
|
27
|
+
multipartFormRequestOptions({ body, ...options, __security: { bearerAuth: true } }, this._client),
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ContentProvenanceCheck {
|
|
33
|
+
/**
|
|
34
|
+
* The Unix timestamp, in seconds, when the provenance check was created.
|
|
35
|
+
*/
|
|
36
|
+
created_at: number;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The object type. Always `content_provenance_check` for this endpoint.
|
|
40
|
+
*/
|
|
41
|
+
object: 'content_provenance_check';
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The provenance results that apply to the uploaded file. Image results include
|
|
45
|
+
* C2PA and SynthID; audio results include SynthID.
|
|
46
|
+
*/
|
|
47
|
+
results: Array<ContentProvenanceCheck.C2PA | ContentProvenanceCheck.SynthID>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export namespace ContentProvenanceCheck {
|
|
51
|
+
export interface C2PA {
|
|
52
|
+
/**
|
|
53
|
+
* The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset
|
|
54
|
+
* was generated, when available.
|
|
55
|
+
*/
|
|
56
|
+
generated_at: string | null;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The C2PA manifest issuer, when available.
|
|
60
|
+
*/
|
|
61
|
+
issuer: string | null;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The OpenAI model recorded by the provenance signal, when available.
|
|
65
|
+
*/
|
|
66
|
+
model: string | null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Whether a supported OpenAI C2PA provenance signal was detected. If
|
|
70
|
+
* `not_detected`, it means the tool did not find supported signals in the uploaded
|
|
71
|
+
* file. The content could still have been generated by OpenAI if the metadata was
|
|
72
|
+
* stripped or has evidence of tampering, the watermark was degraded, it comes from
|
|
73
|
+
* a legacy generation model, or it was created before provenance signals were
|
|
74
|
+
* available. Content could also still be AI-generated by another company's model,
|
|
75
|
+
* which the tool currently does not detect.
|
|
76
|
+
*/
|
|
77
|
+
outcome: 'detected' | 'not_detected';
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The provenance signal type. Always `c2pa`.
|
|
81
|
+
*/
|
|
82
|
+
type: 'c2pa';
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The validation status of the C2PA manifest in the uploaded image.
|
|
86
|
+
*/
|
|
87
|
+
validation_state: 'trusted' | 'valid' | 'invalid' | 'not_present';
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface SynthID {
|
|
91
|
+
/**
|
|
92
|
+
* The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset
|
|
93
|
+
* was generated, when available.
|
|
94
|
+
*/
|
|
95
|
+
generated_at: string | null;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The OpenAI model recorded by the provenance signal, when available.
|
|
99
|
+
*/
|
|
100
|
+
model: string | null;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Whether a supported OpenAI SynthID watermark was detected. If `not_detected`, it
|
|
104
|
+
* means the tool did not find supported signals in the uploaded file. The content
|
|
105
|
+
* could still have been generated by OpenAI if the metadata was stripped or has
|
|
106
|
+
* evidence of tampering, the watermark was degraded, it comes from a legacy
|
|
107
|
+
* generation model, or it was created before provenance signals were available.
|
|
108
|
+
* Content could also still be AI-generated by another company's model, which the
|
|
109
|
+
* tool currently does not detect.
|
|
110
|
+
*/
|
|
111
|
+
outcome: 'detected' | 'not_detected';
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The provenance signal type. Always `synthid`.
|
|
115
|
+
*/
|
|
116
|
+
type: 'synthid';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface ContentProvenanceCheckCreateParams {
|
|
121
|
+
/**
|
|
122
|
+
* The image or audio file to check for supported OpenAI provenance signals.
|
|
123
|
+
*/
|
|
124
|
+
file: Uploadable;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export declare namespace ContentProvenanceChecks {
|
|
128
|
+
export {
|
|
129
|
+
type ContentProvenanceCheck as ContentProvenanceCheck,
|
|
130
|
+
type ContentProvenanceCheckCreateParams as ContentProvenanceCheckCreateParams,
|
|
131
|
+
};
|
|
132
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -33,6 +33,11 @@ export {
|
|
|
33
33
|
type ContainerListParams,
|
|
34
34
|
type ContainerListResponsesPage,
|
|
35
35
|
} from './containers/containers';
|
|
36
|
+
export {
|
|
37
|
+
ContentProvenanceChecks,
|
|
38
|
+
type ContentProvenanceCheck,
|
|
39
|
+
type ContentProvenanceCheckCreateParams,
|
|
40
|
+
} from './content-provenance-checks';
|
|
36
41
|
export { Conversations } from './conversations/conversations';
|
|
37
42
|
export {
|
|
38
43
|
Embeddings,
|
|
@@ -9236,9 +9236,23 @@ export interface ResponseCompactParams {
|
|
|
9236
9236
|
prompt_cache_retention?: 'in_memory' | '24h' | null;
|
|
9237
9237
|
|
|
9238
9238
|
/**
|
|
9239
|
-
*
|
|
9240
|
-
|
|
9241
|
-
|
|
9239
|
+
* Specifies the processing type used for serving the request. - If set to 'auto',
|
|
9240
|
+
* then the request will be processed with the service tier configured in the
|
|
9241
|
+
* Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
9242
|
+
* If set to 'default', then the request will be processed with the standard
|
|
9243
|
+
* pricing and performance for the selected model. - If set to
|
|
9244
|
+
* '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
9245
|
+
* request will be processed with the Flex Processing service tier. - To opt-in to
|
|
9246
|
+
* [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
9247
|
+
* `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
9248
|
+
* Completions. The response will show `service_tier=priority` regardless of if you
|
|
9249
|
+
* specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
9250
|
+
* default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
9251
|
+
* response body will include the `service_tier` value based on the processing mode
|
|
9252
|
+
* actually used to serve the request. This response value may be different from
|
|
9253
|
+
* the value set in the parameter.
|
|
9254
|
+
*/
|
|
9255
|
+
service_tier?: 'auto' | 'default' | 'fast' | 'flex' | 'priority' | null;
|
|
9242
9256
|
}
|
|
9243
9257
|
|
|
9244
9258
|
export namespace ResponseCompactParams {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '7.
|
|
1
|
+
export const VERSION = '7.3.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.
|
|
1
|
+
export declare const VERSION = "7.3.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.
|
|
1
|
+
export declare const VERSION = "7.3.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '7.
|
|
1
|
+
export const VERSION = '7.3.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|