@openrouter/sdk 1.4.3 → 1.4.5
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/esm/funcs/sttCreateTranscription.d.ts +1 -1
- package/esm/funcs/sttCreateTranscription.js +1 -1
- package/esm/funcs/sttCreateTranscriptionMultipart.d.ts +1 -1
- package/esm/funcs/sttCreateTranscriptionMultipart.js +32 -18
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/byokproviderslug.d.ts +1 -0
- package/esm/models/byokproviderslug.js +1 -0
- package/esm/models/chatrequest.d.ts +5 -4
- package/esm/models/chatrequest.js +3 -0
- package/esm/models/imagegenerationproviderpreferences.d.ts +6 -0
- package/esm/models/imagegenerationproviderpreferences.js +1 -0
- package/esm/models/index.d.ts +4 -0
- package/esm/models/index.js +4 -0
- package/esm/models/jevrouterplugin.d.ts +27 -0
- package/esm/models/jevrouterplugin.js +22 -0
- package/esm/models/messagesrequest.d.ts +5 -4
- package/esm/models/messagesrequest.js +3 -0
- package/esm/models/operations/createaudiotranscriptionsmultipart.d.ts +23 -3
- package/esm/models/operations/createaudiotranscriptionsmultipart.js +7 -1
- package/esm/models/operations/listbyokkeys.d.ts +1 -0
- package/esm/models/operations/listbyokkeys.js +1 -0
- package/esm/models/providername.d.ts +1 -0
- package/esm/models/providername.js +1 -0
- package/esm/models/provideroptions.d.ts +6 -0
- package/esm/models/provideroptions.js +1 -0
- package/esm/models/providerresponse.d.ts +1 -0
- package/esm/models/providerresponse.js +1 -0
- package/esm/models/responsesrequest.d.ts +5 -4
- package/esm/models/responsesrequest.js +3 -0
- package/esm/models/sttentity.d.ts +28 -0
- package/esm/models/sttentity.js +23 -0
- package/esm/models/sttinlineinputaudio.d.ts +23 -0
- package/esm/models/sttinlineinputaudio.js +14 -0
- package/esm/models/sttinputaudio.d.ts +5 -15
- package/esm/models/sttinputaudio.js +6 -4
- package/esm/models/sttrequest.d.ts +12 -2
- package/esm/models/sttrequest.js +2 -0
- package/esm/models/sttresponse.d.ts +9 -0
- package/esm/models/sttresponse.js +8 -0
- package/esm/models/sttsegment.d.ts +8 -0
- package/esm/models/sttsegment.js +3 -0
- package/esm/models/stturlinputaudio.d.ts +23 -0
- package/esm/models/stturlinputaudio.js +14 -0
- package/esm/models/sttword.d.ts +27 -1
- package/esm/models/sttword.js +18 -0
- package/esm/models/videogenerationrequest.d.ts +6 -0
- package/esm/models/videogenerationrequest.js +1 -0
- package/esm/sdk/stt.d.ts +2 -2
- package/esm/sdk/stt.js +2 -2
- package/jsr.json +1 -1
- package/package.json +6 -6
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* Create transcription
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Transcribes audio into text. Accepts base64-encoded audio input as JSON
|
|
16
|
+
* Transcribes audio into text. Accepts base64-encoded audio input as JSON, an OpenAI-style multipart/form-data file upload, or a URL the provider downloads directly, and returns the transcribed text.
|
|
17
17
|
*/
|
|
18
18
|
export declare function sttCreateTranscription(client: OpenRouterCore, request: operations.CreateAudioTranscriptionsRequest, options?: RequestOptions): APIPromise<Result<models.STTResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.GatewayTimeoutResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=sttCreateTranscription.d.ts.map
|
|
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
* Create transcription
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Transcribes audio into text. Accepts base64-encoded audio input as JSON
|
|
20
|
+
* Transcribes audio into text. Accepts base64-encoded audio input as JSON, an OpenAI-style multipart/form-data file upload, or a URL the provider downloads directly, and returns the transcribed text.
|
|
21
21
|
*/
|
|
22
22
|
export function sttCreateTranscription(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* Create transcription
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Transcribes audio into text. Accepts base64-encoded audio input as JSON
|
|
16
|
+
* Transcribes audio into text. Accepts base64-encoded audio input as JSON, an OpenAI-style multipart/form-data file upload, or a URL the provider downloads directly, and returns the transcribed text.
|
|
17
17
|
*/
|
|
18
18
|
export declare function sttCreateTranscriptionMultipart(client: OpenRouterCore, request: operations.CreateAudioTranscriptionsMultipartRequest, options?: RequestOptions): APIPromise<Result<models.STTResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.GatewayTimeoutResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=sttCreateTranscriptionMultipart.d.ts.map
|
|
@@ -20,7 +20,7 @@ import { isReadableStream } from "../types/streams.js";
|
|
|
20
20
|
* Create transcription
|
|
21
21
|
*
|
|
22
22
|
* @remarks
|
|
23
|
-
* Transcribes audio into text. Accepts base64-encoded audio input as JSON
|
|
23
|
+
* Transcribes audio into text. Accepts base64-encoded audio input as JSON, an OpenAI-style multipart/form-data file upload, or a URL the provider downloads directly, and returns the transcribed text.
|
|
24
24
|
*/
|
|
25
25
|
export function sttCreateTranscriptionMultipart(client, request, options) {
|
|
26
26
|
return new APIPromise($do(client, request, options));
|
|
@@ -32,33 +32,47 @@ async function $do(client, request, options) {
|
|
|
32
32
|
}
|
|
33
33
|
const payload = parsed.value;
|
|
34
34
|
const body = new FormData();
|
|
35
|
-
if (isBlobLike(payload.RequestBody.file)) {
|
|
36
|
-
const file = payload.RequestBody.file;
|
|
37
|
-
const blob = await normalizeBlob(file);
|
|
38
|
-
const name = "name" in file ? file.name : undefined;
|
|
39
|
-
appendForm(body, "file", blob, name);
|
|
40
|
-
}
|
|
41
|
-
else if (isReadableStream(payload.RequestBody.file.content)) {
|
|
42
|
-
const buffer = await readableStreamToArrayBuffer(payload.RequestBody.file.content);
|
|
43
|
-
const contentType = getContentTypeFromFileName(payload.RequestBody.file.fileName)
|
|
44
|
-
|| "application/octet-stream";
|
|
45
|
-
appendForm(body, "file", bytesToBlob(buffer, contentType), payload.RequestBody.file.fileName);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
const contentType = getContentTypeFromFileName(payload.RequestBody.file.fileName)
|
|
49
|
-
|| "application/octet-stream";
|
|
50
|
-
appendForm(body, "file", bytesToBlob(payload.RequestBody.file.content, contentType), payload.RequestBody.file.fileName);
|
|
51
|
-
}
|
|
52
35
|
appendForm(body, "model", payload.RequestBody.model);
|
|
36
|
+
if (payload.RequestBody.diarize !== undefined) {
|
|
37
|
+
appendForm(body, "diarize", payload.RequestBody.diarize);
|
|
38
|
+
}
|
|
39
|
+
if (payload.RequestBody.file !== undefined) {
|
|
40
|
+
if (isBlobLike(payload.RequestBody.file)) {
|
|
41
|
+
const file = payload.RequestBody.file;
|
|
42
|
+
const blob = await normalizeBlob(file);
|
|
43
|
+
const name = "name" in file ? file.name : undefined;
|
|
44
|
+
appendForm(body, "file", blob, name);
|
|
45
|
+
}
|
|
46
|
+
else if (isReadableStream(payload.RequestBody.file.content)) {
|
|
47
|
+
const buffer = await readableStreamToArrayBuffer(payload.RequestBody.file.content);
|
|
48
|
+
const contentType = getContentTypeFromFileName(payload.RequestBody.file.fileName)
|
|
49
|
+
|| "application/octet-stream";
|
|
50
|
+
appendForm(body, "file", bytesToBlob(buffer, contentType), payload.RequestBody.file.fileName);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
const contentType = getContentTypeFromFileName(payload.RequestBody.file.fileName)
|
|
54
|
+
|| "application/octet-stream";
|
|
55
|
+
appendForm(body, "file", bytesToBlob(payload.RequestBody.file.content, contentType), payload.RequestBody.file.fileName);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (payload.RequestBody["keyterms[]"] !== undefined) {
|
|
59
|
+
appendForm(body, "keyterms[]", payload.RequestBody["keyterms[]"]);
|
|
60
|
+
}
|
|
53
61
|
if (payload.RequestBody.language !== undefined) {
|
|
54
62
|
appendForm(body, "language", payload.RequestBody.language);
|
|
55
63
|
}
|
|
64
|
+
if (payload.RequestBody.provider !== undefined) {
|
|
65
|
+
appendForm(body, "provider", payload.RequestBody.provider);
|
|
66
|
+
}
|
|
56
67
|
if (payload.RequestBody.response_format !== undefined) {
|
|
57
68
|
appendForm(body, "response_format", payload.RequestBody.response_format);
|
|
58
69
|
}
|
|
59
70
|
if (payload.RequestBody.session_id !== undefined) {
|
|
60
71
|
appendForm(body, "session_id", payload.RequestBody.session_id);
|
|
61
72
|
}
|
|
73
|
+
if (payload.RequestBody.source_url !== undefined) {
|
|
74
|
+
appendForm(body, "source_url", payload.RequestBody.source_url);
|
|
75
|
+
}
|
|
62
76
|
if (payload.RequestBody.temperature !== undefined) {
|
|
63
77
|
appendForm(body, "temperature", payload.RequestBody.temperature);
|
|
64
78
|
}
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.4.
|
|
53
|
+
readonly sdkVersion: "1.4.5";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.4.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.4.5 2.914.0 1.0.0 @openrouter/sdk";
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
|
|
|
29
29
|
export const SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.4.
|
|
32
|
+
sdkVersion: "1.4.5",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.4.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.4.5 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -41,6 +41,7 @@ export declare const BYOKProviderSlug: {
|
|
|
41
41
|
readonly Deepseek: "deepseek";
|
|
42
42
|
readonly Dekallm: "dekallm";
|
|
43
43
|
readonly Digitalocean: "digitalocean";
|
|
44
|
+
readonly Elevenlabs: "elevenlabs";
|
|
44
45
|
readonly Featherless: "featherless";
|
|
45
46
|
readonly Fireworks: "fireworks";
|
|
46
47
|
readonly FishAudio: "fish-audio";
|
|
@@ -18,6 +18,7 @@ import { ContextCompressionPlugin, ContextCompressionPlugin$Outbound } from "./c
|
|
|
18
18
|
import { FileParserPlugin, FileParserPlugin$Outbound } from "./fileparserplugin.js";
|
|
19
19
|
import { FusionPlugin, FusionPlugin$Outbound } from "./fusionplugin.js";
|
|
20
20
|
import { ImageConfig, ImageConfig$Outbound } from "./imageconfig.js";
|
|
21
|
+
import { JevRouterPlugin, JevRouterPlugin$Outbound } from "./jevrouterplugin.js";
|
|
21
22
|
import { ModerationPlugin, ModerationPlugin$Outbound } from "./moderationplugin.js";
|
|
22
23
|
import { ParetoRouterPlugin, ParetoRouterPlugin$Outbound } from "./paretorouterplugin.js";
|
|
23
24
|
import { Prediction, Prediction$Outbound } from "./prediction.js";
|
|
@@ -35,7 +36,7 @@ export declare const Modality: {
|
|
|
35
36
|
readonly Audio: "audio";
|
|
36
37
|
};
|
|
37
38
|
export type Modality = OpenEnum<typeof Modality>;
|
|
38
|
-
export type ChatRequestPlugin = AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
39
|
+
export type ChatRequestPlugin = AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
39
40
|
/**
|
|
40
41
|
* Constrains effort on reasoning for reasoning models
|
|
41
42
|
*/
|
|
@@ -174,7 +175,7 @@ export type ChatRequest = {
|
|
|
174
175
|
/**
|
|
175
176
|
* Plugins you want to enable for this request, including their settings.
|
|
176
177
|
*/
|
|
177
|
-
plugins?: Array<AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
178
|
+
plugins?: Array<AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
178
179
|
/**
|
|
179
180
|
* Static predicted output content. Supported models can use this to reduce latency when much of the response is known in advance.
|
|
180
181
|
*/
|
|
@@ -276,7 +277,7 @@ export type ChatRequest = {
|
|
|
276
277
|
/** @internal */
|
|
277
278
|
export declare const Modality$outboundSchema: z.ZodType<string, Modality>;
|
|
278
279
|
/** @internal */
|
|
279
|
-
export type ChatRequestPlugin$Outbound = AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
280
|
+
export type ChatRequestPlugin$Outbound = AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | JevRouterPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
280
281
|
/** @internal */
|
|
281
282
|
export declare const ChatRequestPlugin$outboundSchema: z.ZodType<ChatRequestPlugin$Outbound, ChatRequestPlugin>;
|
|
282
283
|
export declare function chatRequestPluginToJSON(chatRequestPlugin: ChatRequestPlugin): string;
|
|
@@ -327,7 +328,7 @@ export type ChatRequest$Outbound = {
|
|
|
327
328
|
model?: string | undefined;
|
|
328
329
|
models?: Array<string> | undefined;
|
|
329
330
|
parallel_tool_calls?: boolean | null | undefined;
|
|
330
|
-
plugins?: Array<AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
331
|
+
plugins?: Array<AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | JevRouterPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
331
332
|
prediction?: Prediction$Outbound | null | undefined;
|
|
332
333
|
presence_penalty?: number | null | undefined;
|
|
333
334
|
prompt_cache_key?: string | null | undefined;
|
|
@@ -23,6 +23,7 @@ import { ContextCompressionPlugin$outboundSchema, } from "./contextcompressionpl
|
|
|
23
23
|
import { FileParserPlugin$outboundSchema, } from "./fileparserplugin.js";
|
|
24
24
|
import { FusionPlugin$outboundSchema, } from "./fusionplugin.js";
|
|
25
25
|
import { ImageConfig$outboundSchema, } from "./imageconfig.js";
|
|
26
|
+
import { JevRouterPlugin$outboundSchema, } from "./jevrouterplugin.js";
|
|
26
27
|
import { ModerationPlugin$outboundSchema, } from "./moderationplugin.js";
|
|
27
28
|
import { ParetoRouterPlugin$outboundSchema, } from "./paretorouterplugin.js";
|
|
28
29
|
import { Prediction$outboundSchema, } from "./prediction.js";
|
|
@@ -84,6 +85,7 @@ export const ChatRequestPlugin$outboundSchema = z.union([
|
|
|
84
85
|
ContextCompressionPlugin$outboundSchema,
|
|
85
86
|
FileParserPlugin$outboundSchema,
|
|
86
87
|
FusionPlugin$outboundSchema,
|
|
88
|
+
JevRouterPlugin$outboundSchema,
|
|
87
89
|
ModerationPlugin$outboundSchema,
|
|
88
90
|
ParetoRouterPlugin$outboundSchema,
|
|
89
91
|
ResponseHealingPlugin$outboundSchema,
|
|
@@ -151,6 +153,7 @@ export const ChatRequest$outboundSchema = z.object({
|
|
|
151
153
|
ContextCompressionPlugin$outboundSchema,
|
|
152
154
|
FileParserPlugin$outboundSchema,
|
|
153
155
|
FusionPlugin$outboundSchema,
|
|
156
|
+
JevRouterPlugin$outboundSchema,
|
|
154
157
|
ModerationPlugin$outboundSchema,
|
|
155
158
|
ParetoRouterPlugin$outboundSchema,
|
|
156
159
|
ResponseHealingPlugin$outboundSchema,
|
|
@@ -137,6 +137,9 @@ export type ImageGenerationProviderPreferencesOptions = {
|
|
|
137
137
|
digitalocean?: {
|
|
138
138
|
[k: string]: any;
|
|
139
139
|
} | undefined;
|
|
140
|
+
elevenlabs?: {
|
|
141
|
+
[k: string]: any;
|
|
142
|
+
} | undefined;
|
|
140
143
|
enfer?: {
|
|
141
144
|
[k: string]: any;
|
|
142
145
|
} | undefined;
|
|
@@ -620,6 +623,9 @@ export type ImageGenerationProviderPreferencesOptions$Outbound = {
|
|
|
620
623
|
digitalocean?: {
|
|
621
624
|
[k: string]: any;
|
|
622
625
|
} | undefined;
|
|
626
|
+
elevenlabs?: {
|
|
627
|
+
[k: string]: any;
|
|
628
|
+
} | undefined;
|
|
623
629
|
enfer?: {
|
|
624
630
|
[k: string]: any;
|
|
625
631
|
} | undefined;
|
|
@@ -62,6 +62,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
|
|
|
62
62
|
deepseek: z.record(z.string(), z.any()).optional(),
|
|
63
63
|
dekallm: z.record(z.string(), z.any()).optional(),
|
|
64
64
|
digitalocean: z.record(z.string(), z.any()).optional(),
|
|
65
|
+
elevenlabs: z.record(z.string(), z.any()).optional(),
|
|
65
66
|
enfer: z.record(z.string(), z.any()).optional(),
|
|
66
67
|
fakeProvider: z.record(z.string(), z.any()).optional(),
|
|
67
68
|
featherless: z.record(z.string(), z.any()).optional(),
|
package/esm/models/index.d.ts
CHANGED
|
@@ -420,6 +420,7 @@ export * from "./interninvokerequest.js";
|
|
|
420
420
|
export * from "./internlifecycleerror.js";
|
|
421
421
|
export * from "./internlistresponse.js";
|
|
422
422
|
export * from "./itemreferenceitem.js";
|
|
423
|
+
export * from "./jevrouterplugin.js";
|
|
423
424
|
export * from "./keyassignment.js";
|
|
424
425
|
export * from "./legacychatcontentvideo.js";
|
|
425
426
|
export * from "./legacychatcontentvideoinput.js";
|
|
@@ -695,11 +696,14 @@ export * from "./streameventsresponseoutputitemadded.js";
|
|
|
695
696
|
export * from "./streameventsresponseoutputitemdone.js";
|
|
696
697
|
export * from "./streamlogprob.js";
|
|
697
698
|
export * from "./streamlogprobtoplogprob.js";
|
|
699
|
+
export * from "./sttentity.js";
|
|
700
|
+
export * from "./sttinlineinputaudio.js";
|
|
698
701
|
export * from "./sttinputaudio.js";
|
|
699
702
|
export * from "./sttrequest.js";
|
|
700
703
|
export * from "./sttresponse.js";
|
|
701
704
|
export * from "./sttsegment.js";
|
|
702
705
|
export * from "./stttimestampgranularity.js";
|
|
706
|
+
export * from "./stturlinputaudio.js";
|
|
703
707
|
export * from "./sttusage.js";
|
|
704
708
|
export * from "./sttword.js";
|
|
705
709
|
export * from "./subagentnestedtool.js";
|
package/esm/models/index.js
CHANGED
|
@@ -424,6 +424,7 @@ export * from "./interninvokerequest.js";
|
|
|
424
424
|
export * from "./internlifecycleerror.js";
|
|
425
425
|
export * from "./internlistresponse.js";
|
|
426
426
|
export * from "./itemreferenceitem.js";
|
|
427
|
+
export * from "./jevrouterplugin.js";
|
|
427
428
|
export * from "./keyassignment.js";
|
|
428
429
|
export * from "./legacychatcontentvideo.js";
|
|
429
430
|
export * from "./legacychatcontentvideoinput.js";
|
|
@@ -699,11 +700,14 @@ export * from "./streameventsresponseoutputitemadded.js";
|
|
|
699
700
|
export * from "./streameventsresponseoutputitemdone.js";
|
|
700
701
|
export * from "./streamlogprob.js";
|
|
701
702
|
export * from "./streamlogprobtoplogprob.js";
|
|
703
|
+
export * from "./sttentity.js";
|
|
704
|
+
export * from "./sttinlineinputaudio.js";
|
|
702
705
|
export * from "./sttinputaudio.js";
|
|
703
706
|
export * from "./sttrequest.js";
|
|
704
707
|
export * from "./sttresponse.js";
|
|
705
708
|
export * from "./sttsegment.js";
|
|
706
709
|
export * from "./stttimestampgranularity.js";
|
|
710
|
+
export * from "./stturlinputaudio.js";
|
|
707
711
|
export * from "./sttusage.js";
|
|
708
712
|
export * from "./sttword.js";
|
|
709
713
|
export * from "./subagentnestedtool.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type JevRouterPlugin = {
|
|
3
|
+
/**
|
|
4
|
+
* Alias of `models`, matching the auto-router field name. Entries from both fields are combined.
|
|
5
|
+
*/
|
|
6
|
+
allowedModels?: Array<string> | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Remove these models from the router. Each entry is a model slug or a wildcard pattern (e.g. "xiaomi/*"). A `~author/family-latest` alias matches every revision of that family. Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. Applied after `models`, so an excluded pattern always wins over an included one; when the lists leave no model the request can use, it fails with 404 rather than routing outside them.
|
|
9
|
+
*/
|
|
10
|
+
excludedModels?: Array<string> | undefined;
|
|
11
|
+
id: "jev-router";
|
|
12
|
+
/**
|
|
13
|
+
* Restrict the router to these models. Each entry is a model slug or a wildcard pattern (e.g. "anthropic/*"), matched against the current pool; models outside the pool are ignored. A `~author/family-latest` alias matches every revision of that family. Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. When omitted or empty, every model in the pool is a candidate; when no pool model matches, the list is ignored and the whole pool is used (`excluded_models` still apply). `allowed_models` is an alias; entries from both fields are combined.
|
|
14
|
+
*/
|
|
15
|
+
models?: Array<string> | undefined;
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type JevRouterPlugin$Outbound = {
|
|
19
|
+
allowed_models?: Array<string> | undefined;
|
|
20
|
+
excluded_models?: Array<string> | undefined;
|
|
21
|
+
id: "jev-router";
|
|
22
|
+
models?: Array<string> | undefined;
|
|
23
|
+
};
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const JevRouterPlugin$outboundSchema: z.ZodType<JevRouterPlugin$Outbound, JevRouterPlugin>;
|
|
26
|
+
export declare function jevRouterPluginToJSON(jevRouterPlugin: JevRouterPlugin): string;
|
|
27
|
+
//# sourceMappingURL=jevrouterplugin.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 87ebd9753273
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const JevRouterPlugin$outboundSchema = z.object({
|
|
9
|
+
allowedModels: z.array(z.string()).optional(),
|
|
10
|
+
excludedModels: z.array(z.string()).optional(),
|
|
11
|
+
id: z.literal("jev-router"),
|
|
12
|
+
models: z.array(z.string()).optional(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
allowedModels: "allowed_models",
|
|
16
|
+
excludedModels: "excluded_models",
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
export function jevRouterPluginToJSON(jevRouterPlugin) {
|
|
20
|
+
return JSON.stringify(JevRouterPlugin$outboundSchema.parse(jevRouterPlugin));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=jevrouterplugin.js.map
|
|
@@ -22,6 +22,7 @@ import { DatetimeServerTool, DatetimeServerTool$Outbound } from "./datetimeserve
|
|
|
22
22
|
import { FileParserPlugin, FileParserPlugin$Outbound } from "./fileparserplugin.js";
|
|
23
23
|
import { FusionPlugin, FusionPlugin$Outbound } from "./fusionplugin.js";
|
|
24
24
|
import { ImageGenerationServerToolOpenRouter, ImageGenerationServerToolOpenRouter$Outbound } from "./imagegenerationservertoolopenrouter.js";
|
|
25
|
+
import { JevRouterPlugin, JevRouterPlugin$Outbound } from "./jevrouterplugin.js";
|
|
25
26
|
import { MessagesFallbackParam, MessagesFallbackParam$Outbound } from "./messagesfallbackparam.js";
|
|
26
27
|
import { MessagesMessageParam, MessagesMessageParam$Outbound } from "./messagesmessageparam.js";
|
|
27
28
|
import { MessagesOutputConfig, MessagesOutputConfig$Outbound } from "./messagesoutputconfig.js";
|
|
@@ -86,7 +87,7 @@ export type ContextManagement = {
|
|
|
86
87
|
export type MessagesRequestMetadata = {
|
|
87
88
|
userId?: string | null | undefined;
|
|
88
89
|
};
|
|
89
|
-
export type MessagesRequestPlugin = AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
90
|
+
export type MessagesRequestPlugin = AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
90
91
|
/**
|
|
91
92
|
* Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted.
|
|
92
93
|
*/
|
|
@@ -284,7 +285,7 @@ export type MessagesRequest = {
|
|
|
284
285
|
/**
|
|
285
286
|
* Plugins you want to enable for this request, including their settings.
|
|
286
287
|
*/
|
|
287
|
-
plugins?: Array<AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
288
|
+
plugins?: Array<AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
288
289
|
/**
|
|
289
290
|
* When multiple model providers are available, optionally indicate your routing preference.
|
|
290
291
|
*/
|
|
@@ -404,7 +405,7 @@ export type MessagesRequestMetadata$Outbound = {
|
|
|
404
405
|
export declare const MessagesRequestMetadata$outboundSchema: z.ZodType<MessagesRequestMetadata$Outbound, MessagesRequestMetadata>;
|
|
405
406
|
export declare function messagesRequestMetadataToJSON(messagesRequestMetadata: MessagesRequestMetadata): string;
|
|
406
407
|
/** @internal */
|
|
407
|
-
export type MessagesRequestPlugin$Outbound = AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
408
|
+
export type MessagesRequestPlugin$Outbound = AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | JevRouterPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
408
409
|
/** @internal */
|
|
409
410
|
export declare const MessagesRequestPlugin$outboundSchema: z.ZodType<MessagesRequestPlugin$Outbound, MessagesRequestPlugin>;
|
|
410
411
|
export declare function messagesRequestPluginToJSON(messagesRequestPlugin: MessagesRequestPlugin): string;
|
|
@@ -618,7 +619,7 @@ export type MessagesRequest$Outbound = {
|
|
|
618
619
|
model: string;
|
|
619
620
|
models?: Array<string> | undefined;
|
|
620
621
|
output_config?: MessagesOutputConfig$Outbound | undefined;
|
|
621
|
-
plugins?: Array<AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
622
|
+
plugins?: Array<AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | JevRouterPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
622
623
|
provider?: ProviderPreferences$Outbound | null | undefined;
|
|
623
624
|
safeguards?: Array<AnthropicSafeguard$Outbound> | null | undefined;
|
|
624
625
|
service_tier?: string | undefined;
|
|
@@ -27,6 +27,7 @@ import { DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js";
|
|
|
27
27
|
import { FileParserPlugin$outboundSchema, } from "./fileparserplugin.js";
|
|
28
28
|
import { FusionPlugin$outboundSchema, } from "./fusionplugin.js";
|
|
29
29
|
import { ImageGenerationServerToolOpenRouter$outboundSchema, } from "./imagegenerationservertoolopenrouter.js";
|
|
30
|
+
import { JevRouterPlugin$outboundSchema, } from "./jevrouterplugin.js";
|
|
30
31
|
import { MessagesFallbackParam$outboundSchema, } from "./messagesfallbackparam.js";
|
|
31
32
|
import { MessagesMessageParam$outboundSchema, } from "./messagesmessageparam.js";
|
|
32
33
|
import { MessagesOutputConfig$outboundSchema, } from "./messagesoutputconfig.js";
|
|
@@ -226,6 +227,7 @@ export const MessagesRequestPlugin$outboundSchema = z.union([
|
|
|
226
227
|
ContextCompressionPlugin$outboundSchema,
|
|
227
228
|
FileParserPlugin$outboundSchema,
|
|
228
229
|
FusionPlugin$outboundSchema,
|
|
230
|
+
JevRouterPlugin$outboundSchema,
|
|
229
231
|
ModerationPlugin$outboundSchema,
|
|
230
232
|
ParetoRouterPlugin$outboundSchema,
|
|
231
233
|
ResponseHealingPlugin$outboundSchema,
|
|
@@ -565,6 +567,7 @@ export const MessagesRequest$outboundSchema = z.object({
|
|
|
565
567
|
ContextCompressionPlugin$outboundSchema,
|
|
566
568
|
FileParserPlugin$outboundSchema,
|
|
567
569
|
FusionPlugin$outboundSchema,
|
|
570
|
+
JevRouterPlugin$outboundSchema,
|
|
568
571
|
ModerationPlugin$outboundSchema,
|
|
569
572
|
ParetoRouterPlugin$outboundSchema,
|
|
570
573
|
ResponseHealingPlugin$outboundSchema,
|
|
@@ -43,9 +43,17 @@ export declare const TimestampGranularities: {
|
|
|
43
43
|
export type TimestampGranularities = OpenEnum<typeof TimestampGranularities>;
|
|
44
44
|
export type CreateAudioTranscriptionsMultipartRequestBody = {
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Label each word with the speaker who said it (words[].speaker, words[].speaker_label). Requires response_format "verbose_json" (400 otherwise); word timestamps are included even when timestamp_granularities[] omits "word". Only supported by some providers; 400 when the selected model cannot diarize.
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
diarize?: boolean | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* The audio file to transcribe. The format is derived from the filename extension or the file part content type. Max 25 MB; send larger files as base64 JSON via input_audio, or by URL via source_url. Exactly one of file or source_url is required.
|
|
51
|
+
*/
|
|
52
|
+
file?: CreateAudioTranscriptionsMultipartFile | Blob | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Domain terms, names, or phrases to bias recognition toward; repeat the part once per term (keyterms=... is also accepted). Only supported by some providers; 400 when the selected model cannot use keyterms.
|
|
55
|
+
*/
|
|
56
|
+
keyterms?: Array<string> | undefined;
|
|
49
57
|
/**
|
|
50
58
|
* The language of the input audio (ISO-639-1).
|
|
51
59
|
*/
|
|
@@ -54,6 +62,10 @@ export type CreateAudioTranscriptionsMultipartRequestBody = {
|
|
|
54
62
|
* The model to use for transcription.
|
|
55
63
|
*/
|
|
56
64
|
model: string;
|
|
65
|
+
/**
|
|
66
|
+
* JSON-encoded provider preferences object, the same shape as the JSON body field: { "options": { "<provider-slug>": { ... } } }. Only options for the matched provider are forwarded. Must decode to a JSON object.
|
|
67
|
+
*/
|
|
68
|
+
provider?: string | undefined;
|
|
57
69
|
/**
|
|
58
70
|
* The response format. "json" (default) returns { text, usage }; "verbose_json" additionally returns task, language, duration, and segment-level timestamps (OpenAI-compatible providers only).
|
|
59
71
|
*/
|
|
@@ -62,6 +74,10 @@ export type CreateAudioTranscriptionsMultipartRequestBody = {
|
|
|
62
74
|
* A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence.
|
|
63
75
|
*/
|
|
64
76
|
sessionId?: string | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Publicly reachable http(s) URL of the audio file, downloaded by the provider directly (no size limit on our side). The format is derived from the URL path extension. Only supported by some providers; exactly one of file or source_url is required.
|
|
79
|
+
*/
|
|
80
|
+
sourceUrl?: string | undefined;
|
|
65
81
|
/**
|
|
66
82
|
* The sampling temperature.
|
|
67
83
|
*/
|
|
@@ -115,11 +131,15 @@ export declare const ResponseFormat$outboundSchema: z.ZodType<string, ResponseFo
|
|
|
115
131
|
export declare const TimestampGranularities$outboundSchema: z.ZodType<string, TimestampGranularities>;
|
|
116
132
|
/** @internal */
|
|
117
133
|
export type CreateAudioTranscriptionsMultipartRequestBody$Outbound = {
|
|
118
|
-
|
|
134
|
+
diarize?: boolean | undefined;
|
|
135
|
+
file?: CreateAudioTranscriptionsMultipartFile$Outbound | Blob | undefined;
|
|
136
|
+
"keyterms[]"?: Array<string> | undefined;
|
|
119
137
|
language?: string | undefined;
|
|
120
138
|
model: string;
|
|
139
|
+
provider?: string | undefined;
|
|
121
140
|
response_format?: string | undefined;
|
|
122
141
|
session_id?: string | undefined;
|
|
142
|
+
source_url?: string | undefined;
|
|
123
143
|
temperature?: number | undefined;
|
|
124
144
|
"timestamp_granularities[]"?: Array<string> | undefined;
|
|
125
145
|
trace?: string | undefined;
|
|
@@ -36,12 +36,16 @@ export const ResponseFormat$outboundSchema = openEnums.outboundSchema(ResponseFo
|
|
|
36
36
|
export const TimestampGranularities$outboundSchema = openEnums.outboundSchema(TimestampGranularities);
|
|
37
37
|
/** @internal */
|
|
38
38
|
export const CreateAudioTranscriptionsMultipartRequestBody$outboundSchema = z.object({
|
|
39
|
+
diarize: z.boolean().optional(),
|
|
39
40
|
file: z.lazy(() => CreateAudioTranscriptionsMultipartFile$outboundSchema)
|
|
40
|
-
.or(blobLikeSchema),
|
|
41
|
+
.or(blobLikeSchema).optional(),
|
|
42
|
+
keyterms: z.array(z.string()).optional(),
|
|
41
43
|
language: z.string().optional(),
|
|
42
44
|
model: z.string(),
|
|
45
|
+
provider: z.string().optional(),
|
|
43
46
|
responseFormat: ResponseFormat$outboundSchema.optional(),
|
|
44
47
|
sessionId: z.string().optional(),
|
|
48
|
+
sourceUrl: z.string().optional(),
|
|
45
49
|
temperature: z.number().optional(),
|
|
46
50
|
timestampGranularities: z.array(TimestampGranularities$outboundSchema)
|
|
47
51
|
.optional(),
|
|
@@ -49,8 +53,10 @@ export const CreateAudioTranscriptionsMultipartRequestBody$outboundSchema = z.ob
|
|
|
49
53
|
user: z.string().optional(),
|
|
50
54
|
}).transform((v) => {
|
|
51
55
|
return remap$(v, {
|
|
56
|
+
keyterms: "keyterms[]",
|
|
52
57
|
responseFormat: "response_format",
|
|
53
58
|
sessionId: "session_id",
|
|
59
|
+
sourceUrl: "source_url",
|
|
54
60
|
timestampGranularities: "timestamp_granularities[]",
|
|
55
61
|
});
|
|
56
62
|
});
|
|
@@ -65,6 +65,7 @@ export declare const Provider: {
|
|
|
65
65
|
readonly Deepseek: "deepseek";
|
|
66
66
|
readonly Dekallm: "dekallm";
|
|
67
67
|
readonly Digitalocean: "digitalocean";
|
|
68
|
+
readonly Elevenlabs: "elevenlabs";
|
|
68
69
|
readonly Featherless: "featherless";
|
|
69
70
|
readonly Fireworks: "fireworks";
|
|
70
71
|
readonly FishAudio: "fish-audio";
|
|
@@ -38,6 +38,7 @@ export declare const ProviderName: {
|
|
|
38
38
|
readonly DeepSeek: "DeepSeek";
|
|
39
39
|
readonly DekaLLM: "DekaLLM";
|
|
40
40
|
readonly DigitalOcean: "DigitalOcean";
|
|
41
|
+
readonly ElevenLabs: "ElevenLabs";
|
|
41
42
|
readonly Featherless: "Featherless";
|
|
42
43
|
readonly Fireworks: "Fireworks";
|
|
43
44
|
readonly FishAudio: "Fish Audio";
|
|
@@ -132,6 +132,9 @@ export type ProviderOptions = {
|
|
|
132
132
|
digitalocean?: {
|
|
133
133
|
[k: string]: any;
|
|
134
134
|
} | undefined;
|
|
135
|
+
elevenlabs?: {
|
|
136
|
+
[k: string]: any;
|
|
137
|
+
} | undefined;
|
|
135
138
|
enfer?: {
|
|
136
139
|
[k: string]: any;
|
|
137
140
|
} | undefined;
|
|
@@ -570,6 +573,9 @@ export type ProviderOptions$Outbound = {
|
|
|
570
573
|
digitalocean?: {
|
|
571
574
|
[k: string]: any;
|
|
572
575
|
} | undefined;
|
|
576
|
+
elevenlabs?: {
|
|
577
|
+
[k: string]: any;
|
|
578
|
+
} | undefined;
|
|
573
579
|
enfer?: {
|
|
574
580
|
[k: string]: any;
|
|
575
581
|
} | undefined;
|
|
@@ -49,6 +49,7 @@ export const ProviderOptions$outboundSchema = z.object({
|
|
|
49
49
|
deepseek: z.record(z.string(), z.any()).optional(),
|
|
50
50
|
dekallm: z.record(z.string(), z.any()).optional(),
|
|
51
51
|
digitalocean: z.record(z.string(), z.any()).optional(),
|
|
52
|
+
elevenlabs: z.record(z.string(), z.any()).optional(),
|
|
52
53
|
enfer: z.record(z.string(), z.any()).optional(),
|
|
53
54
|
fakeProvider: z.record(z.string(), z.any()).optional(),
|
|
54
55
|
featherless: z.record(z.string(), z.any()).optional(),
|
|
@@ -71,6 +71,7 @@ export declare const ProviderResponseProviderName: {
|
|
|
71
71
|
readonly DeepSeek: "DeepSeek";
|
|
72
72
|
readonly DekaLLM: "DekaLLM";
|
|
73
73
|
readonly DigitalOcean: "DigitalOcean";
|
|
74
|
+
readonly ElevenLabs: "ElevenLabs";
|
|
74
75
|
readonly Featherless: "Featherless";
|
|
75
76
|
readonly Fireworks: "Fireworks";
|
|
76
77
|
readonly FishAudio: "Fish Audio";
|
|
@@ -23,6 +23,7 @@ import { ImageConfig, ImageConfig$Outbound } from "./imageconfig.js";
|
|
|
23
23
|
import { ImageGenerationServerTool, ImageGenerationServerTool$Outbound } from "./imagegenerationservertool.js";
|
|
24
24
|
import { ImageGenerationServerToolOpenRouter, ImageGenerationServerToolOpenRouter$Outbound } from "./imagegenerationservertoolopenrouter.js";
|
|
25
25
|
import { InputsUnion, InputsUnion$Outbound } from "./inputsunion.js";
|
|
26
|
+
import { JevRouterPlugin, JevRouterPlugin$Outbound } from "./jevrouterplugin.js";
|
|
26
27
|
import { LegacyWebSearchServerTool, LegacyWebSearchServerTool$Outbound } from "./legacywebsearchservertool.js";
|
|
27
28
|
import { McpServerTool, McpServerTool$Outbound } from "./mcpservertool.js";
|
|
28
29
|
import { ModerationPlugin, ModerationPlugin$Outbound } from "./moderationplugin.js";
|
|
@@ -56,7 +57,7 @@ import { WebFetchServerTool, WebFetchServerTool$Outbound } from "./webfetchserve
|
|
|
56
57
|
import { WebSearchPlugin, WebSearchPlugin$Outbound } from "./websearchplugin.js";
|
|
57
58
|
import { WebSearchServerTool, WebSearchServerTool$Outbound } from "./websearchservertool.js";
|
|
58
59
|
import { WebSearchServerToolOpenRouter, WebSearchServerToolOpenRouter$Outbound } from "./websearchservertoolopenrouter.js";
|
|
59
|
-
export type ResponsesRequestPlugin = AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
60
|
+
export type ResponsesRequestPlugin = AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
60
61
|
export type ReasoningConfig = {
|
|
61
62
|
/**
|
|
62
63
|
* Controls which reasoning is available to the model. `auto` uses the model default (same as omitting); `all_turns` includes reasoning from earlier turns passed in input; `current_turn` limits to the current turn only. Only supported by OpenAI GPT-5.6 and newer.
|
|
@@ -208,7 +209,7 @@ export type ResponsesRequest = {
|
|
|
208
209
|
/**
|
|
209
210
|
* Plugins you want to enable for this request, including their settings.
|
|
210
211
|
*/
|
|
211
|
-
plugins?: Array<AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
212
|
+
plugins?: Array<AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
212
213
|
presencePenalty?: number | null | undefined;
|
|
213
214
|
/**
|
|
214
215
|
* Not supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead.
|
|
@@ -321,7 +322,7 @@ export type ResponsesRequest = {
|
|
|
321
322
|
user?: string | undefined;
|
|
322
323
|
};
|
|
323
324
|
/** @internal */
|
|
324
|
-
export type ResponsesRequestPlugin$Outbound = AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
325
|
+
export type ResponsesRequestPlugin$Outbound = AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | JevRouterPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
325
326
|
/** @internal */
|
|
326
327
|
export declare const ResponsesRequestPlugin$outboundSchema: z.ZodType<ResponsesRequestPlugin$Outbound, ResponsesRequestPlugin>;
|
|
327
328
|
export declare function responsesRequestPluginToJSON(responsesRequestPlugin: ResponsesRequestPlugin): string;
|
|
@@ -434,7 +435,7 @@ export type ResponsesRequest$Outbound = {
|
|
|
434
435
|
model?: string | undefined;
|
|
435
436
|
models?: Array<string> | undefined;
|
|
436
437
|
parallel_tool_calls?: boolean | null | undefined;
|
|
437
|
-
plugins?: Array<AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
438
|
+
plugins?: Array<AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | JevRouterPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
438
439
|
presence_penalty?: number | null | undefined;
|
|
439
440
|
previous_response_id?: any | undefined;
|
|
440
441
|
prompt?: StoredPromptTemplate$Outbound | null | undefined;
|
|
@@ -28,6 +28,7 @@ import { ImageConfig$outboundSchema, } from "./imageconfig.js";
|
|
|
28
28
|
import { ImageGenerationServerTool$outboundSchema, } from "./imagegenerationservertool.js";
|
|
29
29
|
import { ImageGenerationServerToolOpenRouter$outboundSchema, } from "./imagegenerationservertoolopenrouter.js";
|
|
30
30
|
import { InputsUnion$outboundSchema, } from "./inputsunion.js";
|
|
31
|
+
import { JevRouterPlugin$outboundSchema, } from "./jevrouterplugin.js";
|
|
31
32
|
import { LegacyWebSearchServerTool$outboundSchema, } from "./legacywebsearchservertool.js";
|
|
32
33
|
import { McpServerTool$outboundSchema, } from "./mcpservertool.js";
|
|
33
34
|
import { ModerationPlugin$outboundSchema, } from "./moderationplugin.js";
|
|
@@ -79,6 +80,7 @@ export const ResponsesRequestPlugin$outboundSchema = z.union([
|
|
|
79
80
|
ContextCompressionPlugin$outboundSchema,
|
|
80
81
|
FileParserPlugin$outboundSchema,
|
|
81
82
|
FusionPlugin$outboundSchema,
|
|
83
|
+
JevRouterPlugin$outboundSchema,
|
|
82
84
|
ModerationPlugin$outboundSchema,
|
|
83
85
|
ParetoRouterPlugin$outboundSchema,
|
|
84
86
|
ResponseHealingPlugin$outboundSchema,
|
|
@@ -181,6 +183,7 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
181
183
|
ContextCompressionPlugin$outboundSchema,
|
|
182
184
|
FileParserPlugin$outboundSchema,
|
|
183
185
|
FusionPlugin$outboundSchema,
|
|
186
|
+
JevRouterPlugin$outboundSchema,
|
|
184
187
|
ModerationPlugin$outboundSchema,
|
|
185
188
|
ParetoRouterPlugin$outboundSchema,
|
|
186
189
|
ResponseHealingPlugin$outboundSchema,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* A detected entity, returned when the provider runs entity detection
|
|
6
|
+
*/
|
|
7
|
+
export type STTEntity = {
|
|
8
|
+
/**
|
|
9
|
+
* Zero-based exclusive character offset of the entity end within the response-level text (not seconds)
|
|
10
|
+
*/
|
|
11
|
+
endChar: number;
|
|
12
|
+
/**
|
|
13
|
+
* Zero-based character offset of the entity start within the response-level text (not seconds)
|
|
14
|
+
*/
|
|
15
|
+
startChar: number;
|
|
16
|
+
/**
|
|
17
|
+
* Entity text as it appears in the transcript
|
|
18
|
+
*/
|
|
19
|
+
text: string;
|
|
20
|
+
/**
|
|
21
|
+
* Provider entity type label
|
|
22
|
+
*/
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare const STTEntity$inboundSchema: z.ZodType<STTEntity, unknown>;
|
|
27
|
+
export declare function sttEntityFromJSON(jsonString: string): SafeParseResult<STTEntity, SDKValidationError>;
|
|
28
|
+
//# sourceMappingURL=sttentity.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 7178554c1194
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const STTEntity$inboundSchema = z.object({
|
|
10
|
+
end_char: z.int(),
|
|
11
|
+
start_char: z.int(),
|
|
12
|
+
text: z.string(),
|
|
13
|
+
type: z.string(),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"end_char": "endChar",
|
|
17
|
+
"start_char": "startChar",
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export function sttEntityFromJSON(jsonString) {
|
|
21
|
+
return safeParse(jsonString, (x) => STTEntity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'STTEntity' from JSON`);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=sttentity.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
/**
|
|
3
|
+
* Inline base64 audio input for speech-to-text
|
|
4
|
+
*/
|
|
5
|
+
export type STTInlineInputAudio = {
|
|
6
|
+
/**
|
|
7
|
+
* Base64-encoded audio data (raw bytes, not a data URI)
|
|
8
|
+
*/
|
|
9
|
+
data: string;
|
|
10
|
+
/**
|
|
11
|
+
* Audio format (e.g., wav, mp3, flac, m4a, ogg, webm, aac). Supported formats vary by provider. "pcm" means headerless signed 16-bit little-endian mono audio at 16 kHz.
|
|
12
|
+
*/
|
|
13
|
+
format: string;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type STTInlineInputAudio$Outbound = {
|
|
17
|
+
data: string;
|
|
18
|
+
format: string;
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const STTInlineInputAudio$outboundSchema: z.ZodType<STTInlineInputAudio$Outbound, STTInlineInputAudio>;
|
|
22
|
+
export declare function sttInlineInputAudioToJSON(sttInlineInputAudio: STTInlineInputAudio): string;
|
|
23
|
+
//# sourceMappingURL=sttinlineinputaudio.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 58a47542cf73
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const STTInlineInputAudio$outboundSchema = z.object({
|
|
8
|
+
data: z.string(),
|
|
9
|
+
format: z.string(),
|
|
10
|
+
});
|
|
11
|
+
export function sttInlineInputAudioToJSON(sttInlineInputAudio) {
|
|
12
|
+
return JSON.stringify(STTInlineInputAudio$outboundSchema.parse(sttInlineInputAudio));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=sttinlineinputaudio.js.map
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { STTInlineInputAudio, STTInlineInputAudio$Outbound } from "./sttinlineinputaudio.js";
|
|
3
|
+
import { STTUrlInputAudio, STTUrlInputAudio$Outbound } from "./stturlinputaudio.js";
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
5
|
+
* Audio to transcribe: inline base64 bytes, or a URL the provider downloads directly.
|
|
4
6
|
*/
|
|
5
|
-
export type STTInputAudio =
|
|
6
|
-
/**
|
|
7
|
-
* Base64-encoded audio data (raw bytes, not a data URI)
|
|
8
|
-
*/
|
|
9
|
-
data: string;
|
|
10
|
-
/**
|
|
11
|
-
* Audio format (e.g., wav, mp3, flac, m4a, ogg, webm, aac). Supported formats vary by provider.
|
|
12
|
-
*/
|
|
13
|
-
format: string;
|
|
14
|
-
};
|
|
7
|
+
export type STTInputAudio = STTInlineInputAudio | STTUrlInputAudio;
|
|
15
8
|
/** @internal */
|
|
16
|
-
export type STTInputAudio$Outbound =
|
|
17
|
-
data: string;
|
|
18
|
-
format: string;
|
|
19
|
-
};
|
|
9
|
+
export type STTInputAudio$Outbound = STTInlineInputAudio$Outbound | STTUrlInputAudio$Outbound;
|
|
20
10
|
/** @internal */
|
|
21
11
|
export declare const STTInputAudio$outboundSchema: z.ZodType<STTInputAudio$Outbound, STTInputAudio>;
|
|
22
12
|
export declare function sttInputAudioToJSON(sttInputAudio: STTInputAudio): string;
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
* @generated-id: 2251488e7c0b
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
+
import { STTInlineInputAudio$outboundSchema, } from "./sttinlineinputaudio.js";
|
|
7
|
+
import { STTUrlInputAudio$outboundSchema, } from "./stturlinputaudio.js";
|
|
6
8
|
/** @internal */
|
|
7
|
-
export const STTInputAudio$outboundSchema = z.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
export const STTInputAudio$outboundSchema = z.union([
|
|
10
|
+
STTInlineInputAudio$outboundSchema,
|
|
11
|
+
STTUrlInputAudio$outboundSchema,
|
|
12
|
+
]);
|
|
11
13
|
export function sttInputAudioToJSON(sttInputAudio) {
|
|
12
14
|
return JSON.stringify(STTInputAudio$outboundSchema.parse(sttInputAudio));
|
|
13
15
|
}
|
|
@@ -25,13 +25,21 @@ export declare const STTRequestResponseFormat: {
|
|
|
25
25
|
*/
|
|
26
26
|
export type STTRequestResponseFormat = OpenEnum<typeof STTRequestResponseFormat>;
|
|
27
27
|
/**
|
|
28
|
-
* Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio.
|
|
28
|
+
* Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio or a URL the provider downloads.
|
|
29
29
|
*/
|
|
30
30
|
export type STTRequest = {
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Label each word with the speaker who said it. Speaker labels are returned on the words array (speaker, speaker_label), so response_format must be "verbose_json" (a "json" request is rejected with a 400) and word timestamps are included even when timestamp_granularities omits "word". Only supported by some providers; the request is rejected with a 400 when the selected model cannot diarize. Providers may charge extra.
|
|
33
|
+
*/
|
|
34
|
+
diarize?: boolean | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Audio to transcribe: inline base64 bytes, or a URL the provider downloads directly.
|
|
33
37
|
*/
|
|
34
38
|
inputAudio: STTInputAudio;
|
|
39
|
+
/**
|
|
40
|
+
* Domain terms, names, or phrases to bias recognition toward. Only supported by some providers; the request is rejected with a 400 when the selected model cannot use keyterms. Providers may cap the number of terms or characters per term and may charge extra.
|
|
41
|
+
*/
|
|
42
|
+
keyterms?: Array<string> | undefined;
|
|
35
43
|
/**
|
|
36
44
|
* ISO-639-1 language code (e.g., "en", "ja"). Auto-detected if omitted.
|
|
37
45
|
*/
|
|
@@ -80,7 +88,9 @@ export declare function sttRequestProviderToJSON(sttRequestProvider: STTRequestP
|
|
|
80
88
|
export declare const STTRequestResponseFormat$outboundSchema: z.ZodType<string, STTRequestResponseFormat>;
|
|
81
89
|
/** @internal */
|
|
82
90
|
export type STTRequest$Outbound = {
|
|
91
|
+
diarize?: boolean | undefined;
|
|
83
92
|
input_audio: STTInputAudio$Outbound;
|
|
93
|
+
keyterms?: Array<string> | undefined;
|
|
84
94
|
language?: string | undefined;
|
|
85
95
|
model: string;
|
|
86
96
|
provider?: STTRequestProvider$Outbound | undefined;
|
package/esm/models/sttrequest.js
CHANGED
|
@@ -27,7 +27,9 @@ export function sttRequestProviderToJSON(sttRequestProvider) {
|
|
|
27
27
|
export const STTRequestResponseFormat$outboundSchema = openEnums.outboundSchema(STTRequestResponseFormat);
|
|
28
28
|
/** @internal */
|
|
29
29
|
export const STTRequest$outboundSchema = z.object({
|
|
30
|
+
diarize: z.boolean().optional(),
|
|
30
31
|
inputAudio: STTInputAudio$outboundSchema,
|
|
32
|
+
keyterms: z.array(z.string()).optional(),
|
|
31
33
|
language: z.string().optional(),
|
|
32
34
|
model: z.string(),
|
|
33
35
|
provider: z.lazy(() => STTRequestProvider$outboundSchema).optional(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { STTEntity } from "./sttentity.js";
|
|
4
5
|
import { STTSegment } from "./sttsegment.js";
|
|
5
6
|
import { STTUsage } from "./sttusage.js";
|
|
6
7
|
import { STTWord } from "./sttword.js";
|
|
@@ -16,10 +17,18 @@ export type STTResponse = {
|
|
|
16
17
|
* Duration of the input audio in seconds, present when response_format is verbose_json
|
|
17
18
|
*/
|
|
18
19
|
duration?: number | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Detected entities with character offsets into text, present when the provider runs entity detection
|
|
22
|
+
*/
|
|
23
|
+
entities?: Array<STTEntity> | undefined;
|
|
19
24
|
/**
|
|
20
25
|
* Detected or forced language, present when response_format is verbose_json
|
|
21
26
|
*/
|
|
22
27
|
language?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Provider confidence in the detected language from 0 to 1, present when response_format is verbose_json and the provider scores language detection
|
|
30
|
+
*/
|
|
31
|
+
languageConfidence?: number | undefined;
|
|
23
32
|
/**
|
|
24
33
|
* Timestamped transcript segments, present when response_format is verbose_json
|
|
25
34
|
*/
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* @generated-id: 383a6e21047b
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { STTEntity$inboundSchema } from "./sttentity.js";
|
|
7
9
|
import { STTSegment$inboundSchema } from "./sttsegment.js";
|
|
8
10
|
import { STTUsage$inboundSchema } from "./sttusage.js";
|
|
9
11
|
import { STTWord$inboundSchema } from "./sttword.js";
|
|
@@ -12,12 +14,18 @@ export const STTResponse$inboundSchema = z
|
|
|
12
14
|
.object({
|
|
13
15
|
confidence: z.number().optional(),
|
|
14
16
|
duration: z.number().optional(),
|
|
17
|
+
entities: z.array(STTEntity$inboundSchema).optional(),
|
|
15
18
|
language: z.string().optional(),
|
|
19
|
+
language_confidence: z.number().optional(),
|
|
16
20
|
segments: z.array(STTSegment$inboundSchema).optional(),
|
|
17
21
|
task: z.string().optional(),
|
|
18
22
|
text: z.string(),
|
|
19
23
|
usage: STTUsage$inboundSchema.optional(),
|
|
20
24
|
words: z.array(STTWord$inboundSchema).optional(),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"language_confidence": "languageConfidence",
|
|
28
|
+
});
|
|
21
29
|
});
|
|
22
30
|
export function sttResponseFromJSON(jsonString) {
|
|
23
31
|
return safeParse(jsonString, (x) => STTResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'STTResponse' from JSON`);
|
|
@@ -9,6 +9,10 @@ export type STTSegment = {
|
|
|
9
9
|
* Average log probability of the segment
|
|
10
10
|
*/
|
|
11
11
|
avgLogprob?: number | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Zero-based audio channel index for the segment, present when the provider transcribes channels separately
|
|
14
|
+
*/
|
|
15
|
+
channel?: number | undefined;
|
|
12
16
|
/**
|
|
13
17
|
* Compression ratio of the segment
|
|
14
18
|
*/
|
|
@@ -33,6 +37,10 @@ export type STTSegment = {
|
|
|
33
37
|
* Speaker index for the segment, present when the provider returns diarization data
|
|
34
38
|
*/
|
|
35
39
|
speaker?: number | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Provider speaker label for the segment, present when the provider labels speakers with a string
|
|
42
|
+
*/
|
|
43
|
+
speakerLabel?: string | undefined;
|
|
36
44
|
/**
|
|
37
45
|
* Segment start time in seconds
|
|
38
46
|
*/
|
package/esm/models/sttsegment.js
CHANGED
|
@@ -9,12 +9,14 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
9
9
|
export const STTSegment$inboundSchema = z
|
|
10
10
|
.object({
|
|
11
11
|
avg_logprob: z.number().optional(),
|
|
12
|
+
channel: z.int().optional(),
|
|
12
13
|
compression_ratio: z.number().optional(),
|
|
13
14
|
end: z.number(),
|
|
14
15
|
id: z.int(),
|
|
15
16
|
no_speech_prob: z.number().optional(),
|
|
16
17
|
seek: z.int().optional(),
|
|
17
18
|
speaker: z.int().optional(),
|
|
19
|
+
speaker_label: z.string().optional(),
|
|
18
20
|
start: z.number(),
|
|
19
21
|
temperature: z.number().optional(),
|
|
20
22
|
text: z.string(),
|
|
@@ -24,6 +26,7 @@ export const STTSegment$inboundSchema = z
|
|
|
24
26
|
"avg_logprob": "avgLogprob",
|
|
25
27
|
"compression_ratio": "compressionRatio",
|
|
26
28
|
"no_speech_prob": "noSpeechProb",
|
|
29
|
+
"speaker_label": "speakerLabel",
|
|
27
30
|
});
|
|
28
31
|
});
|
|
29
32
|
export function sttSegmentFromJSON(jsonString) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
/**
|
|
3
|
+
* Audio input fetched by the provider from a URL
|
|
4
|
+
*/
|
|
5
|
+
export type STTUrlInputAudio = {
|
|
6
|
+
/**
|
|
7
|
+
* Audio format of the file at the URL. Defaults to the extension of the URL path; required when the path has no extension.
|
|
8
|
+
*/
|
|
9
|
+
format?: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Publicly reachable http(s) URL of the audio file. The provider downloads it directly, so the inline upload size limit does not apply. Only supported by some providers.
|
|
12
|
+
*/
|
|
13
|
+
url: string;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type STTUrlInputAudio$Outbound = {
|
|
17
|
+
format?: string | undefined;
|
|
18
|
+
url: string;
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const STTUrlInputAudio$outboundSchema: z.ZodType<STTUrlInputAudio$Outbound, STTUrlInputAudio>;
|
|
22
|
+
export declare function sttUrlInputAudioToJSON(sttUrlInputAudio: STTUrlInputAudio): string;
|
|
23
|
+
//# sourceMappingURL=stturlinputaudio.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: d7757cc949dd
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const STTUrlInputAudio$outboundSchema = z.object({
|
|
8
|
+
format: z.string().optional(),
|
|
9
|
+
url: z.string(),
|
|
10
|
+
});
|
|
11
|
+
export function sttUrlInputAudioToJSON(sttUrlInputAudio) {
|
|
12
|
+
return JSON.stringify(STTUrlInputAudio$outboundSchema.parse(sttUrlInputAudio));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=stturlinputaudio.js.map
|
package/esm/models/sttword.d.ts
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* Kind of entry; omitted or "word" for spoken words, "audio_event" for non-speech sounds the provider tags with timestamps
|
|
7
|
+
*/
|
|
8
|
+
export declare const STTWordType: {
|
|
9
|
+
readonly Word: "word";
|
|
10
|
+
readonly AudioEvent: "audio_event";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Kind of entry; omitted or "word" for spoken words, "audio_event" for non-speech sounds the provider tags with timestamps
|
|
14
|
+
*/
|
|
15
|
+
export type STTWordType = OpenEnum<typeof STTWordType>;
|
|
4
16
|
/**
|
|
5
17
|
* A timestamped word, returned when the provider includes word-level timestamps
|
|
6
18
|
*/
|
|
7
19
|
export type STTWord = {
|
|
20
|
+
/**
|
|
21
|
+
* Zero-based audio channel index for the word, present when the provider transcribes channels separately
|
|
22
|
+
*/
|
|
23
|
+
channel?: number | undefined;
|
|
8
24
|
/**
|
|
9
25
|
* Provider confidence for the word from 0 to 1, present when the provider returns per-word confidence
|
|
10
26
|
*/
|
|
@@ -17,16 +33,26 @@ export type STTWord = {
|
|
|
17
33
|
* Speaker index for the word, present when the provider returns diarization data
|
|
18
34
|
*/
|
|
19
35
|
speaker?: number | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Provider speaker label for the word, present when the provider labels speakers with a string
|
|
38
|
+
*/
|
|
39
|
+
speakerLabel?: string | undefined;
|
|
20
40
|
/**
|
|
21
41
|
* Word start time in seconds
|
|
22
42
|
*/
|
|
23
43
|
start: number;
|
|
24
44
|
/**
|
|
25
|
-
*
|
|
45
|
+
* Kind of entry; omitted or "word" for spoken words, "audio_event" for non-speech sounds the provider tags with timestamps
|
|
46
|
+
*/
|
|
47
|
+
type?: STTWordType | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* The transcribed word, or the event tag such as "(laughter)" when type is audio_event
|
|
26
50
|
*/
|
|
27
51
|
word: string;
|
|
28
52
|
};
|
|
29
53
|
/** @internal */
|
|
54
|
+
export declare const STTWordType$inboundSchema: z.ZodType<STTWordType, unknown>;
|
|
55
|
+
/** @internal */
|
|
30
56
|
export declare const STTWord$inboundSchema: z.ZodType<STTWord, unknown>;
|
|
31
57
|
export declare function sttWordFromJSON(jsonString: string): SafeParseResult<STTWord, SDKValidationError>;
|
|
32
58
|
//# sourceMappingURL=sttword.d.ts.map
|
package/esm/models/sttword.js
CHANGED
|
@@ -3,14 +3,32 @@
|
|
|
3
3
|
* @generated-id: 748744003b2c
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
/**
|
|
10
|
+
* Kind of entry; omitted or "word" for spoken words, "audio_event" for non-speech sounds the provider tags with timestamps
|
|
11
|
+
*/
|
|
12
|
+
export const STTWordType = {
|
|
13
|
+
Word: "word",
|
|
14
|
+
AudioEvent: "audio_event",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const STTWordType$inboundSchema = openEnums.inboundSchema(STTWordType);
|
|
7
18
|
/** @internal */
|
|
8
19
|
export const STTWord$inboundSchema = z.object({
|
|
20
|
+
channel: z.int().optional(),
|
|
9
21
|
confidence: z.number().optional(),
|
|
10
22
|
end: z.number(),
|
|
11
23
|
speaker: z.int().optional(),
|
|
24
|
+
speaker_label: z.string().optional(),
|
|
12
25
|
start: z.number(),
|
|
26
|
+
type: STTWordType$inboundSchema.optional(),
|
|
13
27
|
word: z.string(),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"speaker_label": "speakerLabel",
|
|
31
|
+
});
|
|
14
32
|
});
|
|
15
33
|
export function sttWordFromJSON(jsonString) {
|
|
16
34
|
return safeParse(jsonString, (x) => STTWord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'STTWord' from JSON`);
|
|
@@ -154,6 +154,9 @@ export type VideoGenerationRequestOptions = {
|
|
|
154
154
|
digitalocean?: {
|
|
155
155
|
[k: string]: any;
|
|
156
156
|
} | undefined;
|
|
157
|
+
elevenlabs?: {
|
|
158
|
+
[k: string]: any;
|
|
159
|
+
} | undefined;
|
|
157
160
|
enfer?: {
|
|
158
161
|
[k: string]: any;
|
|
159
162
|
} | undefined;
|
|
@@ -688,6 +691,9 @@ export type VideoGenerationRequestOptions$Outbound = {
|
|
|
688
691
|
digitalocean?: {
|
|
689
692
|
[k: string]: any;
|
|
690
693
|
} | undefined;
|
|
694
|
+
elevenlabs?: {
|
|
695
|
+
[k: string]: any;
|
|
696
|
+
} | undefined;
|
|
691
697
|
enfer?: {
|
|
692
698
|
[k: string]: any;
|
|
693
699
|
} | undefined;
|
|
@@ -82,6 +82,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
|
|
|
82
82
|
deepseek: z.record(z.string(), z.any()).optional(),
|
|
83
83
|
dekallm: z.record(z.string(), z.any()).optional(),
|
|
84
84
|
digitalocean: z.record(z.string(), z.any()).optional(),
|
|
85
|
+
elevenlabs: z.record(z.string(), z.any()).optional(),
|
|
85
86
|
enfer: z.record(z.string(), z.any()).optional(),
|
|
86
87
|
fakeProvider: z.record(z.string(), z.any()).optional(),
|
|
87
88
|
featherless: z.record(z.string(), z.any()).optional(),
|
package/esm/sdk/stt.d.ts
CHANGED
|
@@ -6,14 +6,14 @@ export declare class STT extends ClientSDK {
|
|
|
6
6
|
* Create transcription
|
|
7
7
|
*
|
|
8
8
|
* @remarks
|
|
9
|
-
* Transcribes audio into text. Accepts base64-encoded audio input as JSON
|
|
9
|
+
* Transcribes audio into text. Accepts base64-encoded audio input as JSON, an OpenAI-style multipart/form-data file upload, or a URL the provider downloads directly, and returns the transcribed text.
|
|
10
10
|
*/
|
|
11
11
|
createTranscription(request: operations.CreateAudioTranscriptionsRequest, options?: RequestOptions): Promise<models.STTResponse>;
|
|
12
12
|
/**
|
|
13
13
|
* Create transcription
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Transcribes audio into text. Accepts base64-encoded audio input as JSON
|
|
16
|
+
* Transcribes audio into text. Accepts base64-encoded audio input as JSON, an OpenAI-style multipart/form-data file upload, or a URL the provider downloads directly, and returns the transcribed text.
|
|
17
17
|
*/
|
|
18
18
|
createTranscriptionMultipart(request: operations.CreateAudioTranscriptionsMultipartRequest, options?: RequestOptions): Promise<models.STTResponse>;
|
|
19
19
|
}
|
package/esm/sdk/stt.js
CHANGED
|
@@ -11,7 +11,7 @@ export class STT extends ClientSDK {
|
|
|
11
11
|
* Create transcription
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
|
-
* Transcribes audio into text. Accepts base64-encoded audio input as JSON
|
|
14
|
+
* Transcribes audio into text. Accepts base64-encoded audio input as JSON, an OpenAI-style multipart/form-data file upload, or a URL the provider downloads directly, and returns the transcribed text.
|
|
15
15
|
*/
|
|
16
16
|
async createTranscription(request, options) {
|
|
17
17
|
return unwrapAsync(sttCreateTranscription(this, request, options));
|
|
@@ -20,7 +20,7 @@ export class STT extends ClientSDK {
|
|
|
20
20
|
* Create transcription
|
|
21
21
|
*
|
|
22
22
|
* @remarks
|
|
23
|
-
* Transcribes audio into text. Accepts base64-encoded audio input as JSON
|
|
23
|
+
* Transcribes audio into text. Accepts base64-encoded audio input as JSON, an OpenAI-style multipart/form-data file upload, or a URL the provider downloads directly, and returns the transcribed text.
|
|
24
24
|
*/
|
|
25
25
|
async createTranscriptionMultipart(request, options) {
|
|
26
26
|
return unwrapAsync(sttCreateTranscriptionMultipart(this, request, options));
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"packageManager": "pnpm@10.22.0",
|
|
23
23
|
"publishConfig": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"provenance": true,
|
|
25
|
+
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "./esm/index.js",
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"typecheck:transit": "exit 0",
|
|
77
76
|
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
78
77
|
"postinstall": "node scripts/check-types.js || true",
|
|
79
78
|
"prepare": "npm run build",
|
|
80
79
|
"test": "vitest --run --project unit",
|
|
81
|
-
"test:e2e": "vitest --run --project e2e",
|
|
82
80
|
"test:transit": "exit 0",
|
|
83
81
|
"test:watch": "vitest --watch --project unit",
|
|
84
|
-
"
|
|
82
|
+
"test:e2e": "vitest --run --project e2e",
|
|
83
|
+
"typecheck": "tsc --noEmit",
|
|
84
|
+
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|