openai 7.27.0 → 7.30.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 +23 -0
- 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/helpers/standard-schema.d.mts +8 -3
- package/helpers/standard-schema.d.mts.map +1 -1
- package/helpers/standard-schema.d.ts +8 -3
- package/helpers/standard-schema.d.ts.map +1 -1
- package/helpers/standard-schema.js +1 -0
- package/helpers/standard-schema.js.map +1 -1
- package/helpers/standard-schema.mjs +1 -0
- package/helpers/standard-schema.mjs.map +1 -1
- package/helpers/zod.d.mts +2 -0
- package/helpers/zod.d.mts.map +1 -1
- package/helpers/zod.d.ts +2 -0
- package/helpers/zod.d.ts.map +1 -1
- package/helpers/zod.js +1 -0
- package/helpers/zod.js.map +1 -1
- package/helpers/zod.mjs +1 -0
- package/helpers/zod.mjs.map +1 -1
- package/lib/ChatCompletionStream.d.mts +2 -1
- package/lib/ChatCompletionStream.d.mts.map +1 -1
- package/lib/ChatCompletionStream.d.ts +2 -1
- package/lib/ChatCompletionStream.d.ts.map +1 -1
- package/lib/ChatCompletionStream.js +9 -2
- package/lib/ChatCompletionStream.js.map +1 -1
- package/lib/ChatCompletionStream.mjs +9 -2
- package/lib/ChatCompletionStream.mjs.map +1 -1
- package/lib/ResponsesParser.d.mts.map +1 -1
- package/lib/ResponsesParser.d.ts.map +1 -1
- package/lib/ResponsesParser.js +5 -0
- package/lib/ResponsesParser.js.map +1 -1
- package/lib/ResponsesParser.mjs +5 -0
- package/lib/ResponsesParser.mjs.map +1 -1
- package/lib/agents/agent-session-stream.d.mts +7 -0
- package/lib/agents/agent-session-stream.d.mts.map +1 -1
- package/lib/agents/agent-session-stream.d.ts +7 -0
- package/lib/agents/agent-session-stream.d.ts.map +1 -1
- package/lib/agents/agent-session-stream.js +8 -110
- package/lib/agents/agent-session-stream.js.map +1 -1
- package/lib/agents/agent-session-stream.mjs +9 -111
- package/lib/agents/agent-session-stream.mjs.map +1 -1
- package/lib/beta/agents/agent-session-create-stream.d.mts +41 -1
- package/lib/beta/agents/agent-session-create-stream.d.mts.map +1 -1
- package/lib/beta/agents/agent-session-create-stream.d.ts +41 -1
- package/lib/beta/agents/agent-session-create-stream.d.ts.map +1 -1
- package/lib/beta/agents/agent-session-create-stream.js +70 -2
- package/lib/beta/agents/agent-session-create-stream.js.map +1 -1
- package/lib/beta/agents/agent-session-create-stream.mjs +69 -2
- package/lib/beta/agents/agent-session-create-stream.mjs.map +1 -1
- package/lib/beta/agents/function-tool.d.mts.map +1 -1
- package/lib/beta/agents/function-tool.d.ts.map +1 -1
- package/lib/beta/agents/function-tool.js +22 -15
- package/lib/beta/agents/function-tool.js.map +1 -1
- package/lib/beta/agents/function-tool.mjs +22 -15
- package/lib/beta/agents/function-tool.mjs.map +1 -1
- package/lib/beta/agents/parse-result.d.mts +4 -2
- package/lib/beta/agents/parse-result.d.mts.map +1 -1
- package/lib/beta/agents/parse-result.d.ts +4 -2
- package/lib/beta/agents/parse-result.d.ts.map +1 -1
- package/lib/beta/agents/tool-dispatcher.d.mts +13 -0
- package/lib/beta/agents/tool-dispatcher.d.mts.map +1 -0
- package/lib/beta/agents/tool-dispatcher.d.ts +13 -0
- package/lib/beta/agents/tool-dispatcher.d.ts.map +1 -0
- package/lib/beta/agents/tool-dispatcher.js +185 -0
- package/lib/beta/agents/tool-dispatcher.js.map +1 -0
- package/lib/beta/agents/tool-dispatcher.mjs +181 -0
- package/lib/beta/agents/tool-dispatcher.mjs.map +1 -0
- package/lib/beta/agents/tool-error.d.mts +13 -0
- package/lib/beta/agents/tool-error.d.mts.map +1 -0
- package/lib/beta/agents/tool-error.d.ts +13 -0
- package/lib/beta/agents/tool-error.d.ts.map +1 -0
- package/lib/beta/agents/tool-error.js +3 -0
- package/lib/beta/agents/tool-error.js.map +1 -0
- package/lib/beta/agents/tool-error.mjs +2 -0
- package/lib/beta/agents/tool-error.mjs.map +1 -0
- package/lib/beta/agents/tool-stages.d.mts +12 -0
- package/lib/beta/agents/tool-stages.d.mts.map +1 -0
- package/lib/beta/agents/tool-stages.d.ts +12 -0
- package/lib/beta/agents/tool-stages.d.ts.map +1 -0
- package/lib/beta/agents/tool-stages.js +6 -0
- package/lib/beta/agents/tool-stages.js.map +1 -0
- package/lib/beta/agents/tool-stages.mjs +3 -0
- package/lib/beta/agents/tool-stages.mjs.map +1 -0
- package/lib/chat-completions/streaming.d.mts +11 -0
- package/lib/chat-completions/streaming.d.mts.map +1 -0
- package/lib/chat-completions/streaming.d.ts +11 -0
- package/lib/chat-completions/streaming.d.ts.map +1 -0
- package/lib/chat-completions/streaming.js +27 -0
- package/lib/chat-completions/streaming.js.map +1 -0
- package/lib/chat-completions/streaming.mjs +23 -0
- package/lib/chat-completions/streaming.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/admin/organization/usage.d.mts +381 -20
- package/resources/admin/organization/usage.d.mts.map +1 -1
- package/resources/admin/organization/usage.d.ts +381 -20
- package/resources/admin/organization/usage.d.ts.map +1 -1
- package/resources/audio/audio.d.mts +4 -0
- package/resources/audio/audio.d.mts.map +1 -1
- package/resources/audio/audio.d.ts +4 -0
- package/resources/audio/audio.d.ts.map +1 -1
- package/resources/audio/audio.js +4 -0
- package/resources/audio/audio.js.map +1 -1
- package/resources/audio/audio.mjs +4 -0
- package/resources/audio/audio.mjs.map +1 -1
- package/resources/audio/index.d.mts +1 -0
- package/resources/audio/index.d.mts.map +1 -1
- package/resources/audio/index.d.ts +1 -0
- package/resources/audio/index.d.ts.map +1 -1
- package/resources/audio/index.js +3 -1
- package/resources/audio/index.js.map +1 -1
- package/resources/audio/index.mjs +1 -0
- package/resources/audio/index.mjs.map +1 -1
- package/resources/audio/speech.d.mts +2 -0
- package/resources/audio/speech.d.mts.map +1 -1
- package/resources/audio/speech.d.ts +2 -0
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/voices.d.mts +119 -0
- package/resources/audio/voices.d.mts.map +1 -0
- package/resources/audio/voices.d.ts +119 -0
- package/resources/audio/voices.d.ts.map +1 -0
- package/resources/audio/voices.js +41 -0
- package/resources/audio/voices.js.map +1 -0
- package/resources/audio/voices.mjs +37 -0
- package/resources/audio/voices.mjs.map +1 -0
- package/resources/beta/agents/agents.d.mts +14 -10
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +14 -10
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/agents/environments/templates.d.mts +6 -8
- package/resources/beta/agents/environments/templates.d.mts.map +1 -1
- package/resources/beta/agents/environments/templates.d.ts +6 -8
- package/resources/beta/agents/environments/templates.d.ts.map +1 -1
- package/resources/beta/agents/sessions/index.d.mts +1 -1
- package/resources/beta/agents/sessions/index.d.mts.map +1 -1
- package/resources/beta/agents/sessions/index.d.ts +1 -1
- package/resources/beta/agents/sessions/index.d.ts.map +1 -1
- package/resources/beta/agents/sessions/index.js +2 -2
- package/resources/beta/agents/sessions/index.js.map +1 -1
- package/resources/beta/agents/sessions/index.mjs +1 -1
- package/resources/beta/agents/sessions/index.mjs.map +1 -1
- package/resources/beta/agents/sessions/sessions.d.mts +8 -7
- package/resources/beta/agents/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/agents/sessions/sessions.d.ts +8 -7
- package/resources/beta/agents/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/agents/sessions/sessions.js +7 -4
- package/resources/beta/agents/sessions/sessions.js.map +1 -1
- package/resources/beta/agents/sessions/sessions.mjs +8 -5
- package/resources/beta/agents/sessions/sessions.mjs.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/turns.d.mts +2 -2
- package/resources/beta/agents/sessions/subagents/turns/turns.d.mts.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/turns.d.ts +2 -2
- package/resources/beta/agents/sessions/subagents/turns/turns.d.ts.map +1 -1
- package/resources/beta/agents/sessions/turns/index.d.mts +3 -0
- package/resources/beta/agents/sessions/turns/index.d.mts.map +1 -0
- package/resources/beta/agents/sessions/turns/index.d.ts +3 -0
- package/resources/beta/agents/sessions/turns/index.d.ts.map +1 -0
- package/resources/beta/agents/sessions/turns/index.js +9 -0
- package/resources/beta/agents/sessions/turns/index.js.map +1 -0
- package/resources/beta/agents/sessions/turns/index.mjs +4 -0
- package/resources/beta/agents/sessions/turns/index.mjs.map +1 -0
- package/resources/beta/agents/sessions/turns/items.d.mts +43 -0
- package/resources/beta/agents/sessions/turns/items.d.mts.map +1 -0
- package/resources/beta/agents/sessions/turns/items.d.ts +43 -0
- package/resources/beta/agents/sessions/turns/items.d.ts.map +1 -0
- package/resources/beta/agents/sessions/turns/items.js +40 -0
- package/resources/beta/agents/sessions/turns/items.js.map +1 -0
- package/resources/beta/agents/sessions/turns/items.mjs +36 -0
- package/resources/beta/agents/sessions/turns/items.mjs.map +1 -0
- package/resources/beta/agents/sessions/turns/turns.d.mts +128 -0
- package/resources/beta/agents/sessions/turns/turns.d.mts.map +1 -0
- package/resources/beta/agents/sessions/turns/turns.d.ts +128 -0
- package/resources/beta/agents/sessions/turns/turns.d.ts.map +1 -0
- package/resources/beta/agents/sessions/turns/turns.js +111 -0
- package/resources/beta/agents/sessions/turns/turns.js.map +1 -0
- package/resources/beta/agents/sessions/turns/turns.mjs +106 -0
- package/resources/beta/agents/sessions/turns/turns.mjs.map +1 -0
- package/resources/beta/agents/sessions/turns.d.mts +1 -123
- package/resources/beta/agents/sessions/turns.d.mts.map +1 -1
- package/resources/beta/agents/sessions/turns.d.ts +1 -123
- package/resources/beta/agents/sessions/turns.d.ts.map +1 -1
- package/resources/beta/agents/sessions/turns.js +2 -99
- package/resources/beta/agents/sessions/turns.js.map +1 -1
- package/resources/beta/agents/sessions/turns.mjs +1 -97
- package/resources/beta/agents/sessions/turns.mjs.map +1 -1
- package/resources/beta/beta.d.mts +2 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +2 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.mts +1 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/responses/index.d.mts +1 -1
- package/resources/beta/responses/index.d.mts.map +1 -1
- package/resources/beta/responses/index.d.ts +1 -1
- package/resources/beta/responses/index.d.ts.map +1 -1
- package/resources/beta/responses/index.js.map +1 -1
- package/resources/beta/responses/index.mjs.map +1 -1
- package/resources/beta/responses/responses.d.mts +379 -9
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +379 -9
- 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/chat/completions/completions.d.mts +44 -9
- package/resources/chat/completions/completions.d.mts.map +1 -1
- package/resources/chat/completions/completions.d.ts +44 -9
- package/resources/chat/completions/completions.d.ts.map +1 -1
- package/resources/chat/completions/completions.js +5 -2
- package/resources/chat/completions/completions.js.map +1 -1
- package/resources/chat/completions/completions.mjs +5 -2
- package/resources/chat/completions/completions.mjs.map +1 -1
- package/resources/completions.d.mts +1 -1
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +1 -1
- package/resources/completions.d.ts.map +1 -1
- package/resources/decisions.d.mts +196 -0
- package/resources/decisions.d.mts.map +1 -0
- package/resources/decisions.d.ts +196 -0
- package/resources/decisions.d.ts.map +1 -0
- package/resources/decisions.js +32 -0
- package/resources/decisions.js.map +1 -0
- package/resources/decisions.mjs +28 -0
- package/resources/decisions.mjs.map +1 -0
- package/resources/fine-tuning/jobs/jobs.d.mts +7 -2
- package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +7 -2
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/graders/grader-models.d.mts +1 -1
- package/resources/graders/grader-models.d.ts +1 -1
- package/resources/images.d.mts +61 -75
- package/resources/images.d.mts.map +1 -1
- package/resources/images.d.ts +61 -75
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js +4 -7
- package/resources/images.js.map +1 -1
- package/resources/images.mjs +4 -7
- package/resources/images.mjs.map +1 -1
- 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/realtime/realtime.d.mts +16 -4
- package/resources/realtime/realtime.d.mts.map +1 -1
- package/resources/realtime/realtime.d.ts +16 -4
- package/resources/realtime/realtime.d.ts.map +1 -1
- package/resources/realtime/realtime.js.map +1 -1
- package/resources/realtime/realtime.mjs.map +1 -1
- package/resources/responses/responses.d.mts +381 -9
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +381 -9
- 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/resources/shared.d.mts +69 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +69 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/videos.d.mts +5 -0
- package/resources/videos.d.mts.map +1 -1
- package/resources/videos.d.ts +5 -0
- package/resources/videos.d.ts.map +1 -1
- package/resources/webhooks/webhooks.d.mts +211 -6
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +211 -6
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/src/client.ts +21 -0
- package/src/helpers/standard-schema.ts +11 -4
- package/src/helpers/zod.ts +4 -0
- package/src/lib/ChatCompletionStream.ts +10 -3
- package/src/lib/ResponsesParser.ts +8 -0
- package/src/lib/agents/agent-session-stream.ts +20 -124
- package/src/lib/beta/agents/agent-session-create-stream.ts +87 -1
- package/src/lib/beta/agents/function-tool.ts +23 -15
- package/src/lib/beta/agents/tool-dispatcher.ts +226 -0
- package/src/lib/beta/agents/tool-error.ts +12 -0
- package/src/lib/beta/agents/tool-stages.ts +14 -0
- package/src/lib/chat-completions/streaming.ts +35 -0
- package/src/resources/admin/organization/usage.ts +438 -20
- package/src/resources/audio/audio.ts +6 -0
- package/src/resources/audio/index.ts +1 -0
- package/src/resources/audio/speech.ts +2 -0
- package/src/resources/audio/voices.ts +152 -0
- package/src/resources/beta/agents/agents.ts +16 -9
- package/src/resources/beta/agents/environments/templates.ts +6 -8
- package/src/resources/beta/agents/sessions/index.ts +7 -1
- package/src/resources/beta/agents/sessions/sessions.ts +18 -8
- package/src/resources/beta/agents/sessions/subagents/turns/turns.ts +2 -2
- package/src/resources/beta/agents/sessions/turns/index.ts +4 -0
- package/src/resources/beta/agents/sessions/turns/items.ts +79 -0
- package/src/resources/beta/agents/sessions/turns/turns.ts +383 -0
- package/src/resources/beta/agents/sessions/turns.ts +1 -373
- package/src/resources/beta/beta.ts +2 -0
- package/src/resources/beta/index.ts +1 -0
- package/src/resources/beta/responses/index.ts +1 -0
- package/src/resources/beta/responses/responses.ts +471 -8
- package/src/resources/chat/completions/completions.ts +67 -19
- package/src/resources/completions.ts +1 -1
- package/src/resources/decisions.ts +290 -0
- package/src/resources/fine-tuning/jobs/jobs.ts +7 -2
- package/src/resources/graders/grader-models.ts +1 -1
- package/src/resources/images.ts +62 -76
- package/src/resources/index.ts +9 -0
- package/src/resources/realtime/realtime.ts +16 -4
- package/src/resources/responses/api.md +1 -0
- package/src/resources/responses/responses.ts +473 -8
- package/src/resources/shared.ts +70 -0
- package/src/resources/videos.ts +6 -0
- package/src/resources/webhooks/api.md +5 -0
- package/src/resources/webhooks/webhooks.ts +273 -1
- 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,290 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
function resolveResourceRequestOptions(
|
|
8
|
+
options: RequestOptions | undefined,
|
|
9
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
10
|
+
): Promise<RequestOptions> {
|
|
11
|
+
return Promise.resolve(options).then(buildOptions);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class Decisions extends APIResource {
|
|
15
|
+
/**
|
|
16
|
+
* Evaluate ordered classification and scoring questions against shared input.
|
|
17
|
+
* Answers are returned in question order.
|
|
18
|
+
*
|
|
19
|
+
* Supply input as a string or user messages containing text and inline images.
|
|
20
|
+
* Only user messages with `input_text` and `input_image` parts are supported;
|
|
21
|
+
* non-user roles, function calls, files, audio, and item references are not
|
|
22
|
+
* supported. Images require a data URL, not an external URL or file ID. At most
|
|
23
|
+
* 128 images are allowed across the request.
|
|
24
|
+
*
|
|
25
|
+
* Each question can return a refusal instead of a scored answer. A refusal has
|
|
26
|
+
* type `refusal` and the corresponding question name, or null if unnamed.
|
|
27
|
+
*/
|
|
28
|
+
create(body: DecisionCreateParams, options?: RequestOptions): APIPromise<Decision> {
|
|
29
|
+
return this._client.post(
|
|
30
|
+
'/decisions',
|
|
31
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
32
|
+
body,
|
|
33
|
+
...options,
|
|
34
|
+
__security: { bearerAuth: true },
|
|
35
|
+
})),
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface Decision {
|
|
41
|
+
answers: Array<
|
|
42
|
+
| Decision.AnswerResourcePredicate
|
|
43
|
+
| Decision.AnswerResourceChoice
|
|
44
|
+
| Decision.AnswerResourceScore
|
|
45
|
+
| Decision.AnswerResourceRefusal
|
|
46
|
+
>;
|
|
47
|
+
|
|
48
|
+
model: string;
|
|
49
|
+
|
|
50
|
+
usage: Decision.Usage;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export namespace Decision {
|
|
54
|
+
export interface AnswerResourcePredicate {
|
|
55
|
+
name: string | null;
|
|
56
|
+
|
|
57
|
+
probability: number;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The type of the object. Always `predicate`.
|
|
61
|
+
*/
|
|
62
|
+
type: 'predicate';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface AnswerResourceChoice {
|
|
66
|
+
/**
|
|
67
|
+
* Choice values are typed: a string and a boolean with the same text are distinct.
|
|
68
|
+
*/
|
|
69
|
+
choice: string | boolean;
|
|
70
|
+
|
|
71
|
+
confidence: number;
|
|
72
|
+
|
|
73
|
+
name: string | null;
|
|
74
|
+
|
|
75
|
+
probabilities: Array<AnswerResourceChoice.Probability>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The type of the object. Always `choice`.
|
|
79
|
+
*/
|
|
80
|
+
type: 'choice';
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export namespace AnswerResourceChoice {
|
|
84
|
+
export interface Probability {
|
|
85
|
+
probability: number;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Choice values are typed: a string and a boolean with the same text are distinct.
|
|
89
|
+
*/
|
|
90
|
+
value: string | boolean;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface AnswerResourceScore {
|
|
95
|
+
confidence: number;
|
|
96
|
+
|
|
97
|
+
name: string | null;
|
|
98
|
+
|
|
99
|
+
probabilities: Array<AnswerResourceScore.Probability>;
|
|
100
|
+
|
|
101
|
+
score: number;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The type of the object. Always `score`.
|
|
105
|
+
*/
|
|
106
|
+
type: 'score';
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export namespace AnswerResourceScore {
|
|
110
|
+
export interface Probability {
|
|
111
|
+
label: string;
|
|
112
|
+
|
|
113
|
+
probability: number;
|
|
114
|
+
|
|
115
|
+
value: number;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The host may decline one question without disclosing its refusal score.
|
|
121
|
+
*/
|
|
122
|
+
export interface AnswerResourceRefusal {
|
|
123
|
+
name: string | null;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The type of the object. Always `refusal`.
|
|
127
|
+
*/
|
|
128
|
+
type: 'refusal';
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface Usage {
|
|
132
|
+
input_tokens: number;
|
|
133
|
+
|
|
134
|
+
input_tokens_details: Usage.InputTokensDetails;
|
|
135
|
+
|
|
136
|
+
output_tokens: number;
|
|
137
|
+
|
|
138
|
+
output_tokens_details: Usage.OutputTokensDetails;
|
|
139
|
+
|
|
140
|
+
total_tokens: number;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export namespace Usage {
|
|
144
|
+
export interface InputTokensDetails {
|
|
145
|
+
cache_write_tokens: number;
|
|
146
|
+
|
|
147
|
+
cached_tokens: number;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface OutputTokensDetails {
|
|
151
|
+
reasoning_tokens: number;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* An inline image. External URLs and file IDs are not supported.
|
|
158
|
+
*/
|
|
159
|
+
export interface DecisionInputImage {
|
|
160
|
+
/**
|
|
161
|
+
* A base64-encoded image in a data URL.
|
|
162
|
+
*/
|
|
163
|
+
image_url: string;
|
|
164
|
+
|
|
165
|
+
type: 'input_image';
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The image detail level, using the selected model's image profile. Defaults to
|
|
169
|
+
* auto.
|
|
170
|
+
*/
|
|
171
|
+
detail?: 'low' | 'high' | 'auto' | 'original' | null;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* A user message containing text or inline images.
|
|
176
|
+
*/
|
|
177
|
+
export interface DecisionInputMessage {
|
|
178
|
+
/**
|
|
179
|
+
* Text evidence or an ordered list of text and inline image parts.
|
|
180
|
+
*/
|
|
181
|
+
content: string | Array<DecisionInputPart>;
|
|
182
|
+
|
|
183
|
+
role: 'user';
|
|
184
|
+
|
|
185
|
+
type?: 'message';
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* An inline image. External URLs and file IDs are not supported.
|
|
190
|
+
*/
|
|
191
|
+
export type DecisionInputPart = DecisionInputText | DecisionInputImage;
|
|
192
|
+
|
|
193
|
+
export interface DecisionInputText {
|
|
194
|
+
text: string;
|
|
195
|
+
|
|
196
|
+
type: 'input_text';
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface DecisionCreateParams {
|
|
200
|
+
/**
|
|
201
|
+
* Shared evidence, as a string or an array of user messages containing text and
|
|
202
|
+
* inline images. Non-user roles, function calls, function-call outputs, files,
|
|
203
|
+
* audio, and item references are not supported. At most 128 image parts are
|
|
204
|
+
* allowed across all messages in one request.
|
|
205
|
+
*/
|
|
206
|
+
input: string | Array<DecisionInputMessage>;
|
|
207
|
+
|
|
208
|
+
model: string;
|
|
209
|
+
|
|
210
|
+
questions: Array<
|
|
211
|
+
| DecisionCreateParams.QuestionParamPredicate
|
|
212
|
+
| DecisionCreateParams.QuestionParamChoice
|
|
213
|
+
| DecisionCreateParams.QuestionParamScore
|
|
214
|
+
>;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Opaque caller-provided end-user identifier, scoped by the verified org. Match
|
|
218
|
+
* Responses' limit; this is never the authenticated user identity.
|
|
219
|
+
*/
|
|
220
|
+
safety_identifier?: string | null;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export namespace DecisionCreateParams {
|
|
224
|
+
export interface QuestionParamPredicate {
|
|
225
|
+
instructions: string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The type of the object. Always `predicate`.
|
|
229
|
+
*/
|
|
230
|
+
type: 'predicate';
|
|
231
|
+
|
|
232
|
+
name?: string;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface QuestionParamChoice {
|
|
236
|
+
choices: Array<QuestionParamChoice.Choice>;
|
|
237
|
+
|
|
238
|
+
instructions: string;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* The type of the object. Always `choice`.
|
|
242
|
+
*/
|
|
243
|
+
type: 'choice';
|
|
244
|
+
|
|
245
|
+
name?: string;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export namespace QuestionParamChoice {
|
|
249
|
+
export interface Choice {
|
|
250
|
+
/**
|
|
251
|
+
* Choice values are typed: a string and a boolean with the same text are distinct.
|
|
252
|
+
*/
|
|
253
|
+
value: string | boolean;
|
|
254
|
+
|
|
255
|
+
description?: string;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface QuestionParamScore {
|
|
260
|
+
instructions: string;
|
|
261
|
+
|
|
262
|
+
levels: Array<QuestionParamScore.Level>;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* The type of the object. Always `score`.
|
|
266
|
+
*/
|
|
267
|
+
type: 'score';
|
|
268
|
+
|
|
269
|
+
name?: string;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export namespace QuestionParamScore {
|
|
273
|
+
export interface Level {
|
|
274
|
+
label: string;
|
|
275
|
+
|
|
276
|
+
description?: string;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export declare namespace Decisions {
|
|
282
|
+
export {
|
|
283
|
+
type Decision as Decision,
|
|
284
|
+
type DecisionInputImage as DecisionInputImage,
|
|
285
|
+
type DecisionInputMessage as DecisionInputMessage,
|
|
286
|
+
type DecisionInputPart as DecisionInputPart,
|
|
287
|
+
type DecisionInputText as DecisionInputText,
|
|
288
|
+
type DecisionCreateParams as DecisionCreateParams,
|
|
289
|
+
};
|
|
290
|
+
}
|
|
@@ -956,8 +956,13 @@ export namespace JobCreateParams {
|
|
|
956
956
|
|
|
957
957
|
export interface JobListParams extends CursorPageParams {
|
|
958
958
|
/**
|
|
959
|
-
* Optional metadata filter. To filter, use the syntax `metadata[k]=v`.
|
|
960
|
-
*
|
|
959
|
+
* Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Omitting
|
|
960
|
+
* the parameter or passing an empty object applies no metadata filter. An empty
|
|
961
|
+
* value, such as `metadata[k]=`, filters for that key with an empty string value.
|
|
962
|
+
* To select jobs with null metadata, send the literal query string
|
|
963
|
+
* `metadata=null`. Nullable caller types do not specify how a client serializes
|
|
964
|
+
* null for a deep-object parameter. Use a raw query parameter if the client omits
|
|
965
|
+
* null. Do not combine the two query forms.
|
|
961
966
|
*/
|
|
962
967
|
metadata?: { [key: string]: string } | null;
|
|
963
968
|
}
|
package/src/resources/images.ts
CHANGED
|
@@ -20,14 +20,11 @@ function resolveResourceRequestOptions(
|
|
|
20
20
|
*/
|
|
21
21
|
export class Images extends APIResource {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* This endpoint is retired and no longer available. Use the image edits endpoint
|
|
24
|
+
* with a GPT Image model and a prompt to create a variation of an image. The
|
|
25
|
+
* request and response schemas below describe the legacy contract.
|
|
24
26
|
*
|
|
25
|
-
* @
|
|
26
|
-
* ```ts
|
|
27
|
-
* const imagesResponse = await client.images.createVariation({
|
|
28
|
-
* image: fs.createReadStream('otter.png'),
|
|
29
|
-
* });
|
|
30
|
-
* ```
|
|
27
|
+
* @deprecated
|
|
31
28
|
*/
|
|
32
29
|
createVariation(body: ImageCreateVariationParams, options?: RequestOptions): APIPromise<ImagesResponse> {
|
|
33
30
|
return this._client.post(
|
|
@@ -40,7 +37,7 @@ export class Images extends APIResource {
|
|
|
40
37
|
|
|
41
38
|
/**
|
|
42
39
|
* Creates an edited or extended image given one or more source images and a
|
|
43
|
-
* prompt. This endpoint supports GPT Image models
|
|
40
|
+
* prompt. This endpoint supports GPT Image models.
|
|
44
41
|
*
|
|
45
42
|
* @example
|
|
46
43
|
* ```ts
|
|
@@ -78,7 +75,7 @@ export class Images extends APIResource {
|
|
|
78
75
|
}
|
|
79
76
|
|
|
80
77
|
/**
|
|
81
|
-
* Creates an image given a prompt.
|
|
78
|
+
* Creates an image given a prompt using a GPT Image model.
|
|
82
79
|
* [Learn more](https://developers.openai.com/api/docs/guides/images-vision).
|
|
83
80
|
*
|
|
84
81
|
* @example
|
|
@@ -118,21 +115,21 @@ export class Images extends APIResource {
|
|
|
118
115
|
*/
|
|
119
116
|
export interface Image {
|
|
120
117
|
/**
|
|
121
|
-
* The base64-encoded JSON of the generated image. Returned by default for
|
|
122
|
-
* image models,
|
|
123
|
-
*
|
|
118
|
+
* The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
119
|
+
* image models, or when `response_format` is set to `b64_json` for models that
|
|
120
|
+
* support that parameter.
|
|
124
121
|
*/
|
|
125
122
|
b64_json?: string;
|
|
126
123
|
|
|
127
124
|
/**
|
|
128
|
-
*
|
|
125
|
+
* The revised prompt used to generate the image, for models that support prompt
|
|
126
|
+
* revision. Not returned by GPT image models.
|
|
129
127
|
*/
|
|
130
128
|
revised_prompt?: string;
|
|
131
129
|
|
|
132
130
|
/**
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* models.
|
|
131
|
+
* The URL of the generated image when `response_format` is set to `url` for models
|
|
132
|
+
* that support that parameter. Unsupported for GPT image models.
|
|
136
133
|
*/
|
|
137
134
|
url?: string;
|
|
138
135
|
}
|
|
@@ -419,16 +416,22 @@ export interface ImageGenPartialImageEvent {
|
|
|
419
416
|
*/
|
|
420
417
|
export type ImageGenStreamEvent = ImageGenPartialImageEvent | ImageGenCompletedEvent;
|
|
421
418
|
|
|
419
|
+
/**
|
|
420
|
+
* Deprecated values:
|
|
421
|
+
*
|
|
422
|
+
* - "dall-e-2", "dall-e-3": This model was retired on May 12, 2026. Use a GPT
|
|
423
|
+
* image model instead.
|
|
424
|
+
*/
|
|
422
425
|
export type ImageModel =
|
|
423
|
-
| 'gpt-image-1'
|
|
424
|
-
| 'gpt-image-1-mini'
|
|
426
|
+
| 'gpt-image-1.5'
|
|
425
427
|
| 'gpt-image-2'
|
|
426
428
|
| 'gpt-image-2-2026-04-21'
|
|
427
429
|
| 'gpt-image-2.5-sunburst'
|
|
428
430
|
| 'gpt-image-2.5-sunburst-2026-09-08'
|
|
429
431
|
| 'gpt-image-2.5-flare'
|
|
430
432
|
| 'gpt-image-2.5-flare-2026-09-08'
|
|
431
|
-
| 'gpt-image-1
|
|
433
|
+
| 'gpt-image-1'
|
|
434
|
+
| 'gpt-image-1-mini'
|
|
432
435
|
| 'chatgpt-image-latest'
|
|
433
436
|
| 'dall-e-2'
|
|
434
437
|
| 'dall-e-3';
|
|
@@ -547,8 +550,8 @@ export interface ImageCreateVariationParams {
|
|
|
547
550
|
image: Uploadable;
|
|
548
551
|
|
|
549
552
|
/**
|
|
550
|
-
* The model
|
|
551
|
-
*
|
|
553
|
+
* The legacy model used by the retired image variations endpoint. This endpoint no
|
|
554
|
+
* longer accepts requests.
|
|
552
555
|
*/
|
|
553
556
|
model?: (string & {}) | ImageModel | null;
|
|
554
557
|
|
|
@@ -590,15 +593,12 @@ export interface ImageEditParamsBase {
|
|
|
590
593
|
* `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`), each image should
|
|
591
594
|
* be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
|
|
592
595
|
* images.
|
|
593
|
-
*
|
|
594
|
-
* For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
595
|
-
* file less than 4MB.
|
|
596
596
|
*/
|
|
597
597
|
image: Uploadable | Array<Uploadable>;
|
|
598
598
|
|
|
599
599
|
/**
|
|
600
|
-
* A text description of the desired image(s). The maximum length is
|
|
601
|
-
* characters for
|
|
600
|
+
* A text description of the desired image(s). The maximum length is 32000
|
|
601
|
+
* characters for the GPT image models.
|
|
602
602
|
*/
|
|
603
603
|
prompt: string;
|
|
604
604
|
|
|
@@ -616,9 +616,10 @@ export interface ImageEditParamsBase {
|
|
|
616
616
|
background?: 'transparent' | 'opaque' | 'auto' | null;
|
|
617
617
|
|
|
618
618
|
/**
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
* `gpt-image-
|
|
619
|
+
* Control how much effort the model will exert to match the style and features,
|
|
620
|
+
* especially facial features, of input images. Supports `high` and `low` on
|
|
621
|
+
* `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
|
|
622
|
+
* `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
|
|
622
623
|
*/
|
|
623
624
|
input_fidelity?: 'high' | 'low' | null;
|
|
624
625
|
|
|
@@ -631,12 +632,11 @@ export interface ImageEditParamsBase {
|
|
|
631
632
|
mask?: Uploadable;
|
|
632
633
|
|
|
633
634
|
/**
|
|
634
|
-
* The model to use for image
|
|
635
|
-
*
|
|
636
|
-
* `gpt-image-2-
|
|
637
|
-
* `gpt-image-2.5-
|
|
638
|
-
* `
|
|
639
|
-
* `gpt-image-1.5`.
|
|
635
|
+
* The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
|
|
636
|
+
* `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
637
|
+
* `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
638
|
+
* `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
639
|
+
* `chatgpt-image-latest`).
|
|
640
640
|
*/
|
|
641
641
|
model?: (string & {}) | ImageModel | null;
|
|
642
642
|
|
|
@@ -675,31 +675,28 @@ export interface ImageEditParamsBase {
|
|
|
675
675
|
* `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support
|
|
676
676
|
* `xhigh` and `max`. Defaults to `auto`.
|
|
677
677
|
*/
|
|
678
|
-
quality?: '
|
|
678
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | 'standard' | null;
|
|
679
679
|
|
|
680
680
|
/**
|
|
681
|
-
*
|
|
682
|
-
*
|
|
683
|
-
* generated. This parameter is only supported for `dall-e-2` (default is `url` for
|
|
684
|
-
* `dall-e-2`), as GPT image models always return base64-encoded images.
|
|
681
|
+
* @deprecated Legacy response format parameter for retired image models.
|
|
682
|
+
* Unsupported for GPT image models, which always return base64-encoded images.
|
|
685
683
|
*/
|
|
686
684
|
response_format?: 'url' | 'b64_json' | null;
|
|
687
685
|
|
|
688
686
|
/**
|
|
689
|
-
* The size of the generated images.
|
|
690
|
-
* `gpt-image-2
|
|
691
|
-
* `gpt-image-2.5-
|
|
692
|
-
* resolutions are supported as
|
|
693
|
-
* Width and height must both be
|
|
694
|
-
* must be between 1:3 and 3:1.
|
|
695
|
-
*
|
|
696
|
-
*
|
|
697
|
-
*
|
|
698
|
-
* `
|
|
699
|
-
*
|
|
700
|
-
* `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
687
|
+
* The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
688
|
+
* `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
689
|
+
* `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
690
|
+
* `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
|
|
691
|
+
* `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
|
|
692
|
+
* divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
|
|
693
|
+
* Resolutions above `2560x1440` are experimental, and the maximum supported
|
|
694
|
+
* resolution is `3840x2160`. The requested size must also satisfy the model's
|
|
695
|
+
* current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
|
|
696
|
+
* `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
697
|
+
* models that allow automatic sizing.
|
|
701
698
|
*/
|
|
702
|
-
size?: (string & {}) | '
|
|
699
|
+
size?: (string & {}) | '1024x1024' | '1536x1024' | '1024x1536' | 'auto' | '256x256' | '512x512' | null;
|
|
703
700
|
|
|
704
701
|
/**
|
|
705
702
|
* Edit the image in streaming mode. Defaults to `false`. See the
|
|
@@ -744,8 +741,7 @@ export type ImageGenerateParams = ImageGenerateParamsNonStreaming | ImageGenerat
|
|
|
744
741
|
export interface ImageGenerateParamsBase {
|
|
745
742
|
/**
|
|
746
743
|
* A text description of the desired image(s). The maximum length is 32000
|
|
747
|
-
* characters
|
|
748
|
-
* characters for `dall-e-3`.
|
|
744
|
+
* characters.
|
|
749
745
|
*/
|
|
750
746
|
prompt: string;
|
|
751
747
|
|
|
@@ -763,12 +759,11 @@ export interface ImageGenerateParamsBase {
|
|
|
763
759
|
background?: 'transparent' | 'opaque' | 'auto' | null;
|
|
764
760
|
|
|
765
761
|
/**
|
|
766
|
-
* The model to use for image generation.
|
|
767
|
-
*
|
|
768
|
-
* `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
762
|
+
* The GPT image model to use for image generation. Specify a model explicitly.
|
|
763
|
+
* Supported models include `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
764
|
+
* `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
769
765
|
* `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
770
|
-
* `gpt-image-2.5-flare-2026-09-08
|
|
771
|
-
* specific to the GPT image models is used.
|
|
766
|
+
* `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
|
|
772
767
|
*/
|
|
773
768
|
model?: (string & {}) | ImageModel | null;
|
|
774
769
|
|
|
@@ -780,8 +775,7 @@ export interface ImageGenerateParamsBase {
|
|
|
780
775
|
moderation?: 'low' | 'auto' | null;
|
|
781
776
|
|
|
782
777
|
/**
|
|
783
|
-
* The number of images to generate. Must be between 1 and 10.
|
|
784
|
-
* `n=1` is supported.
|
|
778
|
+
* The number of images to generate. Must be between 1 and 10.
|
|
785
779
|
*/
|
|
786
780
|
n?: number | null;
|
|
787
781
|
|
|
@@ -816,16 +810,12 @@ export interface ImageGenerateParamsBase {
|
|
|
816
810
|
* - `high`, `medium` and `low` are supported for the GPT image models.
|
|
817
811
|
* - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their
|
|
818
812
|
* `2026-09-08` snapshots, also support `xhigh` and `max`.
|
|
819
|
-
* - `hd` and `standard` are supported for `dall-e-3`.
|
|
820
|
-
* - `standard` is the only option for `dall-e-2`.
|
|
821
813
|
*/
|
|
822
|
-
quality?: '
|
|
814
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | 'standard' | 'hd' | null;
|
|
823
815
|
|
|
824
816
|
/**
|
|
825
|
-
*
|
|
826
|
-
*
|
|
827
|
-
* after the image has been generated. This parameter isn't supported for the GPT
|
|
828
|
-
* image models, which always return base64-encoded images.
|
|
817
|
+
* @deprecated Legacy response format parameter for retired image models.
|
|
818
|
+
* Unsupported for GPT image models, which always return base64-encoded images.
|
|
829
819
|
*/
|
|
830
820
|
response_format?: 'url' | 'b64_json' | null;
|
|
831
821
|
|
|
@@ -839,9 +829,7 @@ export interface ImageGenerateParamsBase {
|
|
|
839
829
|
* the maximum supported resolution is `3840x2160`. The requested size must also
|
|
840
830
|
* satisfy the model's current pixel and edge limits. The standard sizes
|
|
841
831
|
* `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
842
|
-
* `auto` is supported for models that allow automatic sizing.
|
|
843
|
-
* one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
844
|
-
* `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
832
|
+
* `auto` is supported for models that allow automatic sizing.
|
|
845
833
|
*/
|
|
846
834
|
size?:
|
|
847
835
|
| (string & {})
|
|
@@ -863,10 +851,8 @@ export interface ImageGenerateParamsBase {
|
|
|
863
851
|
stream?: boolean | null;
|
|
864
852
|
|
|
865
853
|
/**
|
|
866
|
-
*
|
|
867
|
-
*
|
|
868
|
-
* towards generating hyper-real and dramatic images. Natural causes the model to
|
|
869
|
-
* produce more natural, less hyper-real looking images.
|
|
854
|
+
* @deprecated Legacy style parameter for retired image models. Unsupported for GPT
|
|
855
|
+
* image models; describe the desired style in the prompt instead.
|
|
870
856
|
*/
|
|
871
857
|
style?: 'vivid' | 'natural' | null;
|
|
872
858
|
|
package/src/resources/index.ts
CHANGED
|
@@ -39,6 +39,15 @@ export {
|
|
|
39
39
|
type ContentProvenanceCheckCreateParams,
|
|
40
40
|
} from './content-provenance-checks';
|
|
41
41
|
export { Conversations } from './conversations/conversations';
|
|
42
|
+
export {
|
|
43
|
+
Decisions,
|
|
44
|
+
type Decision,
|
|
45
|
+
type DecisionInputImage,
|
|
46
|
+
type DecisionInputMessage,
|
|
47
|
+
type DecisionInputPart,
|
|
48
|
+
type DecisionInputText,
|
|
49
|
+
type DecisionCreateParams,
|
|
50
|
+
} from './decisions';
|
|
42
51
|
export {
|
|
43
52
|
Embeddings,
|
|
44
53
|
type CreateEmbeddingResponse,
|
|
@@ -1302,8 +1302,9 @@ export interface RealtimeAudioConfigOutput {
|
|
|
1302
1302
|
* `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
1303
1303
|
* `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
1304
1304
|
* `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
1305
|
-
* model has responded with audio at least once.
|
|
1306
|
-
*
|
|
1305
|
+
* model has responded with audio at least once. Custom voices must be created from
|
|
1306
|
+
* audio samples. Voices created from text prompts are supported only in Live. We
|
|
1307
|
+
* recommend `marin` and `cedar` for best quality.
|
|
1307
1308
|
*/
|
|
1308
1309
|
voice?:
|
|
1309
1310
|
| string
|
|
@@ -2202,8 +2203,9 @@ export namespace RealtimeResponseCreateAudioOutput {
|
|
|
2202
2203
|
* `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
2203
2204
|
* `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
2204
2205
|
* `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
2205
|
-
* model has responded with audio at least once.
|
|
2206
|
-
*
|
|
2206
|
+
* model has responded with audio at least once. Custom voices must be created from
|
|
2207
|
+
* audio samples. Voices created from text prompts are supported only in Live. We
|
|
2208
|
+
* recommend `marin` and `cedar` for best quality.
|
|
2207
2209
|
*/
|
|
2208
2210
|
voice?:
|
|
2209
2211
|
| string
|
|
@@ -5173,6 +5175,16 @@ export interface SessionCreatedEvent {
|
|
|
5173
5175
|
* fields that are present in the `session.update` are updated. To clear a field
|
|
5174
5176
|
* like `instructions`, pass an empty string. To clear a field like `tools`, pass
|
|
5175
5177
|
* an empty array. To clear a field like `turn_detection`, pass `null`.
|
|
5178
|
+
*
|
|
5179
|
+
* To turn off input audio noise reduction, send this Realtime event:
|
|
5180
|
+
*
|
|
5181
|
+
* ```json
|
|
5182
|
+
* {"type":"session.update","session":{"type":"realtime","audio":{"input":{"noise_reduction":null}}}}
|
|
5183
|
+
* ```
|
|
5184
|
+
*
|
|
5185
|
+
* For a transcription session, use `"type":"transcription"` inside `session`.
|
|
5186
|
+
* Omitting `audio.input.noise_reduction` from an update leaves its current setting
|
|
5187
|
+
* unchanged.
|
|
5176
5188
|
*/
|
|
5177
5189
|
export interface SessionUpdateEvent {
|
|
5178
5190
|
/**
|
|
@@ -166,6 +166,7 @@ Types:
|
|
|
166
166
|
- <code><a href="./src/resources/responses/responses.ts">ToolChoiceOptions</a></code>
|
|
167
167
|
- <code><a href="./src/resources/responses/responses.ts">ToolChoiceShell</a></code>
|
|
168
168
|
- <code><a href="./src/resources/responses/responses.ts">ToolChoiceTypes</a></code>
|
|
169
|
+
- <code><a href="./src/resources/responses/responses.ts">ToolSearchOutputNamespaceTool</a></code>
|
|
169
170
|
- <code><a href="./src/resources/responses/responses.ts">ToolSearchTool</a></code>
|
|
170
171
|
- <code><a href="./src/resources/responses/responses.ts">WebSearchPreviewTool</a></code>
|
|
171
172
|
- <code><a href="./src/resources/responses/responses.ts">WebSearchTool</a></code>
|