@openrouter/sdk 1.5.118 → 1.5.120
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/sttCreateTranscriptionMultipart.js +3 -0
- package/esm/funcs/ttsGetModel.d.ts +19 -0
- package/esm/funcs/ttsGetModel.js +101 -0
- package/esm/funcs/ttsListModels.d.ts +19 -0
- package/esm/funcs/ttsListModels.js +91 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/index.d.ts +11 -0
- package/esm/models/index.js +11 -0
- package/esm/models/operations/createaudiotranscriptionsmultipart.d.ts +5 -0
- package/esm/models/operations/createaudiotranscriptionsmultipart.js +1 -0
- package/esm/models/operations/getspeechmodel.d.ts +63 -0
- package/esm/models/operations/getspeechmodel.js +21 -0
- package/esm/models/operations/index.d.ts +2 -0
- package/esm/models/operations/index.js +2 -0
- package/esm/models/operations/listspeechmodels.d.ts +53 -0
- package/esm/models/operations/listspeechmodels.js +19 -0
- package/esm/models/speechenumparameter.d.ts +18 -0
- package/esm/models/speechenumparameter.js +19 -0
- package/esm/models/speechinputmodality.d.ts +89 -0
- package/esm/models/speechinputmodality.js +86 -0
- package/esm/models/speechmodelendpoint.d.ts +24 -0
- package/esm/models/speechmodelendpoint.js +26 -0
- package/esm/models/speechmodelresponse.d.ts +31 -0
- package/esm/models/speechmodelresponse.js +28 -0
- package/esm/models/speechmodelslistresponse.d.ts +14 -0
- package/esm/models/speechmodelslistresponse.js +14 -0
- package/esm/models/speechoutputmodality.d.ts +19 -0
- package/esm/models/speechoutputmodality.js +25 -0
- package/esm/models/speechrangeparameter.d.ts +22 -0
- package/esm/models/speechrangeparameter.js +20 -0
- package/esm/models/speechreferencecount.d.ts +19 -0
- package/esm/models/speechreferencecount.js +20 -0
- package/esm/models/speechsupportedparameters.d.ts +23 -0
- package/esm/models/speechsupportedparameters.js +25 -0
- package/esm/models/speechunknownparameter.d.ts +17 -0
- package/esm/models/speechunknownparameter.js +18 -0
- package/esm/models/speechvoiceparameter.d.ts +38 -0
- package/esm/models/speechvoiceparameter.js +30 -0
- package/esm/models/sttrequest.d.ts +5 -0
- package/esm/models/sttrequest.js +1 -0
- package/esm/sdk/tts.d.ts +15 -0
- package/esm/sdk/tts.js +20 -0
- package/jsr.json +1 -1
- package/package.json +7 -7
|
@@ -60,6 +60,9 @@ async function $do(client, request, options) {
|
|
|
60
60
|
if (payload.RequestBody.language !== undefined) {
|
|
61
61
|
appendForm(body, "language", payload.RequestBody.language);
|
|
62
62
|
}
|
|
63
|
+
if (payload.RequestBody.prompt !== undefined) {
|
|
64
|
+
appendForm(body, "prompt", payload.RequestBody.prompt);
|
|
65
|
+
}
|
|
63
66
|
if (payload.RequestBody.provider !== undefined) {
|
|
64
67
|
appendForm(body, "provider", payload.RequestBody.provider);
|
|
65
68
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as models from "../models/index.js";
|
|
9
|
+
import * as operations from "../models/operations/index.js";
|
|
10
|
+
import { APIPromise } from "../types/async.js";
|
|
11
|
+
import { Result } from "../types/fp.js";
|
|
12
|
+
/**
|
|
13
|
+
* Get a text-to-speech model
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Returns a text-to-speech model with each endpoint's own inputs and speech output parameters.
|
|
17
|
+
*/
|
|
18
|
+
export declare function ttsGetModel(client: OpenRouterCore, request: operations.GetSpeechModelRequest, options?: RequestOptions): APIPromise<Result<models.SpeechModelResponse, errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
|
+
//# sourceMappingURL=ttsGetModel.d.ts.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
5
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
6
|
+
import * as M from "../lib/matchers.js";
|
|
7
|
+
import { compactMap } from "../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { pathToFunc } from "../lib/url.js";
|
|
10
|
+
import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js";
|
|
11
|
+
import { SpeechModelResponse$inboundSchema as models_SpeechModelResponse$inboundSchema } from "../models/speechmodelresponse.js";
|
|
12
|
+
import { GetSpeechModelRequest$outboundSchema as operations_GetSpeechModelRequest$outboundSchema } from "../models/operations/getspeechmodel.js";
|
|
13
|
+
import { APIPromise } from "../types/async.js";
|
|
14
|
+
/**
|
|
15
|
+
* Get a text-to-speech model
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Returns a text-to-speech model with each endpoint's own inputs and speech output parameters.
|
|
19
|
+
*/
|
|
20
|
+
export function ttsGetModel(client, request, options) {
|
|
21
|
+
return new APIPromise($do(client, request, options));
|
|
22
|
+
}
|
|
23
|
+
async function $do(client, request, options) {
|
|
24
|
+
const parsed = safeParse(request, (value) => operations_GetSpeechModelRequest$outboundSchema.parse(value), "Input validation failed");
|
|
25
|
+
if (!parsed.ok) {
|
|
26
|
+
return [parsed, { status: "invalid" }];
|
|
27
|
+
}
|
|
28
|
+
const payload = parsed.value;
|
|
29
|
+
const body = null;
|
|
30
|
+
const pathParams = {
|
|
31
|
+
author: encodeSimple("author", payload.author, {
|
|
32
|
+
explode: false,
|
|
33
|
+
charEncoding: "percent",
|
|
34
|
+
}),
|
|
35
|
+
slug: encodeSimple("slug", payload.slug, {
|
|
36
|
+
explode: false,
|
|
37
|
+
charEncoding: "percent",
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
const path = pathToFunc("/audio/speech/models/{author}/{slug}")(pathParams);
|
|
41
|
+
const headers = new Headers(compactMap({
|
|
42
|
+
Accept: "application/json",
|
|
43
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
44
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
45
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
46
|
+
}));
|
|
47
|
+
const context = {
|
|
48
|
+
options: client._options,
|
|
49
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
50
|
+
operationID: "getSpeechModel",
|
|
51
|
+
oAuth2Scopes: null,
|
|
52
|
+
resolvedSecurity: null,
|
|
53
|
+
securitySource: null,
|
|
54
|
+
retryConfig: options?.retries
|
|
55
|
+
|| client._options.retryConfig
|
|
56
|
+
|| {
|
|
57
|
+
strategy: "backoff",
|
|
58
|
+
backoff: {
|
|
59
|
+
initialInterval: 500,
|
|
60
|
+
maxInterval: 60000,
|
|
61
|
+
exponent: 1.5,
|
|
62
|
+
maxElapsedTime: 3600000,
|
|
63
|
+
},
|
|
64
|
+
retryConnectionErrors: true,
|
|
65
|
+
}
|
|
66
|
+
|| { strategy: "none" },
|
|
67
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
68
|
+
};
|
|
69
|
+
const requestRes = client._createRequest(context, {
|
|
70
|
+
method: "GET",
|
|
71
|
+
baseURL: options?.serverURL,
|
|
72
|
+
path: path,
|
|
73
|
+
headers: headers,
|
|
74
|
+
body: body,
|
|
75
|
+
userAgent: client._options.userAgent,
|
|
76
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
77
|
+
}, options);
|
|
78
|
+
if (!requestRes.ok) {
|
|
79
|
+
return [requestRes, { status: "invalid" }];
|
|
80
|
+
}
|
|
81
|
+
const req = requestRes.value;
|
|
82
|
+
const doResult = await client._do(req, {
|
|
83
|
+
context,
|
|
84
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
85
|
+
retryConfig: context.retryConfig,
|
|
86
|
+
retryCodes: context.retryCodes,
|
|
87
|
+
});
|
|
88
|
+
if (!doResult.ok) {
|
|
89
|
+
return [doResult, { status: "request-error", request: req }];
|
|
90
|
+
}
|
|
91
|
+
const response = doResult.value;
|
|
92
|
+
const responseFields = {
|
|
93
|
+
HttpMeta: { Response: response, Request: req },
|
|
94
|
+
};
|
|
95
|
+
const [result] = await M.match(M.json(200, models_SpeechModelResponse$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
96
|
+
if (!result.ok) {
|
|
97
|
+
return [result, { status: "complete", request: req, response }];
|
|
98
|
+
}
|
|
99
|
+
return [result, { status: "complete", request: req, response }];
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=ttsGetModel.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as models from "../models/index.js";
|
|
9
|
+
import * as operations from "../models/operations/index.js";
|
|
10
|
+
import { APIPromise } from "../types/async.js";
|
|
11
|
+
import { Result } from "../types/fp.js";
|
|
12
|
+
/**
|
|
13
|
+
* List text-to-speech models
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Lists every text-to-speech model with the inputs it accepts and its speech output parameters, merged across its endpoints, plus each endpoint with its own.
|
|
17
|
+
*/
|
|
18
|
+
export declare function ttsListModels(client: OpenRouterCore, request?: operations.ListSpeechModelsRequest | undefined, options?: RequestOptions): APIPromise<Result<models.SpeechModelsListResponse, errors.ForbiddenResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
|
+
//# sourceMappingURL=ttsListModels.d.ts.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
5
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
6
|
+
import * as M from "../lib/matchers.js";
|
|
7
|
+
import { compactMap } from "../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { pathToFunc } from "../lib/url.js";
|
|
10
|
+
import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js";
|
|
11
|
+
import { SpeechModelsListResponse$inboundSchema as models_SpeechModelsListResponse$inboundSchema } from "../models/speechmodelslistresponse.js";
|
|
12
|
+
import { ListSpeechModelsRequest$outboundSchema as operations_ListSpeechModelsRequest$outboundSchema } from "../models/operations/listspeechmodels.js";
|
|
13
|
+
import { APIPromise } from "../types/async.js";
|
|
14
|
+
/**
|
|
15
|
+
* List text-to-speech models
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Lists every text-to-speech model with the inputs it accepts and its speech output parameters, merged across its endpoints, plus each endpoint with its own.
|
|
19
|
+
*/
|
|
20
|
+
export function ttsListModels(client, request, options) {
|
|
21
|
+
return new APIPromise($do(client, request, options));
|
|
22
|
+
}
|
|
23
|
+
async function $do(client, request, options) {
|
|
24
|
+
const parsed = safeParse(request, (value) => operations_ListSpeechModelsRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
25
|
+
if (!parsed.ok) {
|
|
26
|
+
return [parsed, { status: "invalid" }];
|
|
27
|
+
}
|
|
28
|
+
const payload = parsed.value;
|
|
29
|
+
const body = null;
|
|
30
|
+
const path = pathToFunc("/audio/speech/models")();
|
|
31
|
+
const headers = new Headers(compactMap({
|
|
32
|
+
Accept: "application/json",
|
|
33
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
34
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload?.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
35
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
36
|
+
}));
|
|
37
|
+
const context = {
|
|
38
|
+
options: client._options,
|
|
39
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
40
|
+
operationID: "listSpeechModels",
|
|
41
|
+
oAuth2Scopes: null,
|
|
42
|
+
resolvedSecurity: null,
|
|
43
|
+
securitySource: null,
|
|
44
|
+
retryConfig: options?.retries
|
|
45
|
+
|| client._options.retryConfig
|
|
46
|
+
|| {
|
|
47
|
+
strategy: "backoff",
|
|
48
|
+
backoff: {
|
|
49
|
+
initialInterval: 500,
|
|
50
|
+
maxInterval: 60000,
|
|
51
|
+
exponent: 1.5,
|
|
52
|
+
maxElapsedTime: 3600000,
|
|
53
|
+
},
|
|
54
|
+
retryConnectionErrors: true,
|
|
55
|
+
}
|
|
56
|
+
|| { strategy: "none" },
|
|
57
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
58
|
+
};
|
|
59
|
+
const requestRes = client._createRequest(context, {
|
|
60
|
+
method: "GET",
|
|
61
|
+
baseURL: options?.serverURL,
|
|
62
|
+
path: path,
|
|
63
|
+
headers: headers,
|
|
64
|
+
body: body,
|
|
65
|
+
userAgent: client._options.userAgent,
|
|
66
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
67
|
+
}, options);
|
|
68
|
+
if (!requestRes.ok) {
|
|
69
|
+
return [requestRes, { status: "invalid" }];
|
|
70
|
+
}
|
|
71
|
+
const req = requestRes.value;
|
|
72
|
+
const doResult = await client._do(req, {
|
|
73
|
+
context,
|
|
74
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
75
|
+
retryConfig: context.retryConfig,
|
|
76
|
+
retryCodes: context.retryCodes,
|
|
77
|
+
});
|
|
78
|
+
if (!doResult.ok) {
|
|
79
|
+
return [doResult, { status: "request-error", request: req }];
|
|
80
|
+
}
|
|
81
|
+
const response = doResult.value;
|
|
82
|
+
const responseFields = {
|
|
83
|
+
HttpMeta: { Response: response, Request: req },
|
|
84
|
+
};
|
|
85
|
+
const [result] = await M.match(M.json(200, models_SpeechModelsListResponse$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
86
|
+
if (!result.ok) {
|
|
87
|
+
return [result, { status: "complete", request: req, response }];
|
|
88
|
+
}
|
|
89
|
+
return [result, { status: "complete", request: req, response }];
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=ttsListModels.js.map
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "1.5.
|
|
52
|
+
readonly sdkVersion: "1.5.120";
|
|
53
53
|
readonly genVersion: "2.960.8";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.120 2.960.8 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
|
|
|
25
25
|
export const SDK_METADATA = {
|
|
26
26
|
language: "typescript",
|
|
27
27
|
openapiDocVersion: "1.0.0",
|
|
28
|
-
sdkVersion: "1.5.
|
|
28
|
+
sdkVersion: "1.5.120",
|
|
29
29
|
genVersion: "2.960.8",
|
|
30
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
30
|
+
userAgent: "speakeasy-sdk/typescript 1.5.120 2.960.8 1.0.0 @openrouter/sdk",
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=config.js.map
|
package/esm/models/index.d.ts
CHANGED
|
@@ -821,15 +821,26 @@ export * from "./shellservertoolconfig.js";
|
|
|
821
821
|
export * from "./shellservertoolengine.js";
|
|
822
822
|
export * from "./shellservertoolenvironment.js";
|
|
823
823
|
export * from "./shellservertoolopenrouter.js";
|
|
824
|
+
export * from "./speechenumparameter.js";
|
|
824
825
|
export * from "./speechinput.js";
|
|
826
|
+
export * from "./speechinputmodality.js";
|
|
825
827
|
export * from "./speechinputreference.js";
|
|
826
828
|
export * from "./speechinputreferenceaudio.js";
|
|
827
829
|
export * from "./speechinputreferenceaudioinput.js";
|
|
828
830
|
export * from "./speechinputreferenceimage.js";
|
|
829
831
|
export * from "./speechinputreferenceimageinput.js";
|
|
830
832
|
export * from "./speechinputreferencetext.js";
|
|
833
|
+
export * from "./speechmodelendpoint.js";
|
|
834
|
+
export * from "./speechmodelresponse.js";
|
|
835
|
+
export * from "./speechmodelslistresponse.js";
|
|
836
|
+
export * from "./speechoutputmodality.js";
|
|
837
|
+
export * from "./speechrangeparameter.js";
|
|
838
|
+
export * from "./speechreferencecount.js";
|
|
831
839
|
export * from "./speechrequest.js";
|
|
840
|
+
export * from "./speechsupportedparameters.js";
|
|
832
841
|
export * from "./speechturn.js";
|
|
842
|
+
export * from "./speechunknownparameter.js";
|
|
843
|
+
export * from "./speechvoiceparameter.js";
|
|
833
844
|
export * from "./stopservertoolswhencondition.js";
|
|
834
845
|
export * from "./stopservertoolswhenfinishreasonis.js";
|
|
835
846
|
export * from "./stopservertoolswhenhastoolcall.js";
|
package/esm/models/index.js
CHANGED
|
@@ -824,15 +824,26 @@ export * from "./shellservertoolconfig.js";
|
|
|
824
824
|
export * from "./shellservertoolengine.js";
|
|
825
825
|
export * from "./shellservertoolenvironment.js";
|
|
826
826
|
export * from "./shellservertoolopenrouter.js";
|
|
827
|
+
export * from "./speechenumparameter.js";
|
|
827
828
|
export * from "./speechinput.js";
|
|
829
|
+
export * from "./speechinputmodality.js";
|
|
828
830
|
export * from "./speechinputreference.js";
|
|
829
831
|
export * from "./speechinputreferenceaudio.js";
|
|
830
832
|
export * from "./speechinputreferenceaudioinput.js";
|
|
831
833
|
export * from "./speechinputreferenceimage.js";
|
|
832
834
|
export * from "./speechinputreferenceimageinput.js";
|
|
833
835
|
export * from "./speechinputreferencetext.js";
|
|
836
|
+
export * from "./speechmodelendpoint.js";
|
|
837
|
+
export * from "./speechmodelresponse.js";
|
|
838
|
+
export * from "./speechmodelslistresponse.js";
|
|
839
|
+
export * from "./speechoutputmodality.js";
|
|
840
|
+
export * from "./speechrangeparameter.js";
|
|
841
|
+
export * from "./speechreferencecount.js";
|
|
834
842
|
export * from "./speechrequest.js";
|
|
843
|
+
export * from "./speechsupportedparameters.js";
|
|
835
844
|
export * from "./speechturn.js";
|
|
845
|
+
export * from "./speechunknownparameter.js";
|
|
846
|
+
export * from "./speechvoiceparameter.js";
|
|
836
847
|
export * from "./stopservertoolswhencondition.js";
|
|
837
848
|
export * from "./stopservertoolswhenfinishreasonis.js";
|
|
838
849
|
export * from "./stopservertoolswhenhastoolcall.js";
|
|
@@ -62,6 +62,10 @@ export type CreateAudioTranscriptionsMultipartRequestBody = {
|
|
|
62
62
|
* The model to use for transcription.
|
|
63
63
|
*/
|
|
64
64
|
model: string;
|
|
65
|
+
/**
|
|
66
|
+
* Context to guide transcription on providers that support contextual prompting. Takes precedence over provider-specific prompt options, including when empty.
|
|
67
|
+
*/
|
|
68
|
+
prompt?: string | undefined;
|
|
65
69
|
/**
|
|
66
70
|
* JSON-encoded provider preferences object, the same shape as the JSON body field: { "zdr": true, "data_collection": "deny", "options": { "<provider-slug>": { ... } } }. Only options for the matched provider are forwarded. Must decode to a JSON object.
|
|
67
71
|
*/
|
|
@@ -136,6 +140,7 @@ export type CreateAudioTranscriptionsMultipartRequestBody$Outbound = {
|
|
|
136
140
|
"keyterms[]"?: Array<string> | undefined;
|
|
137
141
|
language?: string | undefined;
|
|
138
142
|
model: string;
|
|
143
|
+
prompt?: string | undefined;
|
|
139
144
|
provider?: string | undefined;
|
|
140
145
|
response_format?: string | undefined;
|
|
141
146
|
session_id?: string | undefined;
|
|
@@ -41,6 +41,7 @@ export const CreateAudioTranscriptionsMultipartRequestBody$outboundSchema = z.ob
|
|
|
41
41
|
keyterms: z.array(z.string()).optional(),
|
|
42
42
|
language: z.string().optional(),
|
|
43
43
|
model: z.string(),
|
|
44
|
+
prompt: z.string().optional(),
|
|
44
45
|
provider: z.string().optional(),
|
|
45
46
|
responseFormat: ResponseFormat$outboundSchema.optional(),
|
|
46
47
|
sessionId: z.string().optional(),
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type GetSpeechModelGlobals = {
|
|
3
|
+
/**
|
|
4
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This is used to track API usage per application.
|
|
8
|
+
*/
|
|
9
|
+
httpReferer?: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*/
|
|
15
|
+
appTitle?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
*/
|
|
21
|
+
appCategories?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type GetSpeechModelRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* This is used to track API usage per application.
|
|
29
|
+
*/
|
|
30
|
+
httpReferer?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
*/
|
|
36
|
+
appTitle?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
*/
|
|
42
|
+
appCategories?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Model author/organization
|
|
45
|
+
*/
|
|
46
|
+
author: string;
|
|
47
|
+
/**
|
|
48
|
+
* Model slug
|
|
49
|
+
*/
|
|
50
|
+
slug: string;
|
|
51
|
+
};
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type GetSpeechModelRequest$Outbound = {
|
|
54
|
+
"HTTP-Referer"?: string | undefined;
|
|
55
|
+
appTitle?: string | undefined;
|
|
56
|
+
appCategories?: string | undefined;
|
|
57
|
+
author: string;
|
|
58
|
+
slug: string;
|
|
59
|
+
};
|
|
60
|
+
/** @internal */
|
|
61
|
+
export declare const GetSpeechModelRequest$outboundSchema: z.ZodType<GetSpeechModelRequest$Outbound, GetSpeechModelRequest>;
|
|
62
|
+
export declare function getSpeechModelRequestToJSON(getSpeechModelRequest: GetSpeechModelRequest): string;
|
|
63
|
+
//# sourceMappingURL=getspeechmodel.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const GetSpeechModelRequest$outboundSchema = z.object({
|
|
8
|
+
httpReferer: z.string().optional(),
|
|
9
|
+
appTitle: z.string().optional(),
|
|
10
|
+
appCategories: z.string().optional(),
|
|
11
|
+
author: z.string(),
|
|
12
|
+
slug: z.string(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
httpReferer: "HTTP-Referer",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export function getSpeechModelRequestToJSON(getSpeechModelRequest) {
|
|
19
|
+
return JSON.stringify(GetSpeechModelRequest$outboundSchema.parse(getSpeechModelRequest));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=getspeechmodel.js.map
|
|
@@ -93,6 +93,7 @@ export * from "./getrankingsdaily.js";
|
|
|
93
93
|
export * from "./getscimgroupmapping.js";
|
|
94
94
|
export * from "./getscimsyncjob.js";
|
|
95
95
|
export * from "./getsessioncost.js";
|
|
96
|
+
export * from "./getspeechmodel.js";
|
|
96
97
|
export * from "./gettaskclassifications.js";
|
|
97
98
|
export * from "./gettool.js";
|
|
98
99
|
export * from "./getuseractivity.js";
|
|
@@ -135,6 +136,7 @@ export * from "./listprivateproviders.js";
|
|
|
135
136
|
export * from "./listproviders.js";
|
|
136
137
|
export * from "./listscimgroupmappings.js";
|
|
137
138
|
export * from "./listscimgroups.js";
|
|
139
|
+
export * from "./listspeechmodels.js";
|
|
138
140
|
export * from "./listtools.js";
|
|
139
141
|
export * from "./listvaultsecrets.js";
|
|
140
142
|
export * from "./listvideoscontent.js";
|
|
@@ -96,6 +96,7 @@ export * from "./getrankingsdaily.js";
|
|
|
96
96
|
export * from "./getscimgroupmapping.js";
|
|
97
97
|
export * from "./getscimsyncjob.js";
|
|
98
98
|
export * from "./getsessioncost.js";
|
|
99
|
+
export * from "./getspeechmodel.js";
|
|
99
100
|
export * from "./gettaskclassifications.js";
|
|
100
101
|
export * from "./gettool.js";
|
|
101
102
|
export * from "./getuseractivity.js";
|
|
@@ -138,6 +139,7 @@ export * from "./listprivateproviders.js";
|
|
|
138
139
|
export * from "./listproviders.js";
|
|
139
140
|
export * from "./listscimgroupmappings.js";
|
|
140
141
|
export * from "./listscimgroups.js";
|
|
142
|
+
export * from "./listspeechmodels.js";
|
|
141
143
|
export * from "./listtools.js";
|
|
142
144
|
export * from "./listvaultsecrets.js";
|
|
143
145
|
export * from "./listvideoscontent.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type ListSpeechModelsGlobals = {
|
|
3
|
+
/**
|
|
4
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This is used to track API usage per application.
|
|
8
|
+
*/
|
|
9
|
+
httpReferer?: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*/
|
|
15
|
+
appTitle?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
*/
|
|
21
|
+
appCategories?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type ListSpeechModelsRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* This is used to track API usage per application.
|
|
29
|
+
*/
|
|
30
|
+
httpReferer?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
*/
|
|
36
|
+
appTitle?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
*/
|
|
42
|
+
appCategories?: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type ListSpeechModelsRequest$Outbound = {
|
|
46
|
+
"HTTP-Referer"?: string | undefined;
|
|
47
|
+
appTitle?: string | undefined;
|
|
48
|
+
appCategories?: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
/** @internal */
|
|
51
|
+
export declare const ListSpeechModelsRequest$outboundSchema: z.ZodType<ListSpeechModelsRequest$Outbound, ListSpeechModelsRequest>;
|
|
52
|
+
export declare function listSpeechModelsRequestToJSON(listSpeechModelsRequest: ListSpeechModelsRequest): string;
|
|
53
|
+
//# sourceMappingURL=listspeechmodels.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const ListSpeechModelsRequest$outboundSchema = z.object({
|
|
8
|
+
httpReferer: z.string().optional(),
|
|
9
|
+
appTitle: z.string().optional(),
|
|
10
|
+
appCategories: z.string().optional(),
|
|
11
|
+
}).transform((v) => {
|
|
12
|
+
return remap$(v, {
|
|
13
|
+
httpReferer: "HTTP-Referer",
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
export function listSpeechModelsRequestToJSON(listSpeechModelsRequest) {
|
|
17
|
+
return JSON.stringify(ListSpeechModelsRequest$outboundSchema.parse(listSpeechModelsRequest));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=listspeechmodels.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const SpeechEnumParameterType: {
|
|
6
|
+
readonly Enum: "enum";
|
|
7
|
+
};
|
|
8
|
+
export type SpeechEnumParameterType = ClosedEnum<typeof SpeechEnumParameterType>;
|
|
9
|
+
export type SpeechEnumParameter = {
|
|
10
|
+
type: SpeechEnumParameterType;
|
|
11
|
+
values: Array<string>;
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const SpeechEnumParameterType$inboundSchema: z.ZodEnum<typeof SpeechEnumParameterType>;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const SpeechEnumParameter$inboundSchema: z.ZodType<SpeechEnumParameter, unknown>;
|
|
17
|
+
export declare function speechEnumParameterFromJSON(jsonString: string): SafeParseResult<SpeechEnumParameter, SDKValidationError>;
|
|
18
|
+
//# sourceMappingURL=speechenumparameter.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
export const SpeechEnumParameterType = {
|
|
7
|
+
Enum: "enum",
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const SpeechEnumParameterType$inboundSchema = z.enum(SpeechEnumParameterType);
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const SpeechEnumParameter$inboundSchema = z.object({
|
|
13
|
+
type: SpeechEnumParameterType$inboundSchema,
|
|
14
|
+
values: z.array(z.string()),
|
|
15
|
+
});
|
|
16
|
+
export function speechEnumParameterFromJSON(jsonString) {
|
|
17
|
+
return safeParse(jsonString, (x) => SpeechEnumParameter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechEnumParameter' from JSON`);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=speechenumparameter.js.map
|