@openrouter/sdk 0.12.16 → 0.12.18

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.
Files changed (99) hide show
  1. package/esm/funcs/generationsGetGeneration.d.ts +2 -1
  2. package/esm/funcs/generationsGetGeneration.js +2 -1
  3. package/esm/funcs/generationsListGenerationContent.d.ts +16 -0
  4. package/esm/funcs/generationsListGenerationContent.js +108 -0
  5. package/esm/funcs/ttsCreateSpeech.d.ts +1 -1
  6. package/esm/funcs/ttsCreateSpeech.js +6 -6
  7. package/esm/funcs/workspacesBulkAddMembers.d.ts +19 -0
  8. package/esm/funcs/workspacesBulkAddMembers.js +105 -0
  9. package/esm/funcs/workspacesBulkRemoveMembers.d.ts +19 -0
  10. package/esm/funcs/workspacesBulkRemoveMembers.js +105 -0
  11. package/esm/funcs/workspacesCreate.d.ts +19 -0
  12. package/esm/funcs/workspacesCreate.js +99 -0
  13. package/esm/funcs/workspacesDelete.d.ts +19 -0
  14. package/esm/funcs/workspacesDelete.js +102 -0
  15. package/esm/funcs/workspacesGet.d.ts +19 -0
  16. package/esm/funcs/workspacesGet.js +102 -0
  17. package/esm/funcs/workspacesList.d.ts +21 -0
  18. package/esm/funcs/workspacesList.js +133 -0
  19. package/esm/funcs/workspacesUpdate.d.ts +19 -0
  20. package/esm/funcs/workspacesUpdate.js +105 -0
  21. package/esm/lib/config.d.ts +2 -2
  22. package/esm/lib/config.js +2 -2
  23. package/esm/models/bulkaddworkspacemembersrequest.d.ts +15 -0
  24. package/esm/models/bulkaddworkspacemembersrequest.js +18 -0
  25. package/esm/models/bulkaddworkspacemembersresponse.d.ts +18 -0
  26. package/esm/models/bulkaddworkspacemembersresponse.js +21 -0
  27. package/esm/models/bulkremoveworkspacemembersrequest.d.ts +15 -0
  28. package/esm/models/bulkremoveworkspacemembersrequest.js +18 -0
  29. package/esm/models/bulkremoveworkspacemembersresponse.d.ts +13 -0
  30. package/esm/models/bulkremoveworkspacemembersresponse.js +19 -0
  31. package/esm/models/chatrequest.d.ts +5 -4
  32. package/esm/models/chatrequest.js +3 -0
  33. package/esm/models/createworkspacerequest.d.ts +55 -0
  34. package/esm/models/createworkspacerequest.js +31 -0
  35. package/esm/models/createworkspaceresponse.d.ts +11 -0
  36. package/esm/models/createworkspaceresponse.js +15 -0
  37. package/esm/models/deleteworkspaceresponse.d.ts +13 -0
  38. package/esm/models/deleteworkspaceresponse.js +14 -0
  39. package/esm/models/generationcontentdata.d.ts +55 -0
  40. package/esm/models/generationcontentdata.js +45 -0
  41. package/esm/models/generationcontentresponse.d.ts +17 -0
  42. package/esm/models/generationcontentresponse.js +15 -0
  43. package/esm/models/generationresponse.d.ts +198 -0
  44. package/esm/models/generationresponse.js +109 -0
  45. package/esm/models/getworkspaceresponse.d.ts +11 -0
  46. package/esm/models/getworkspaceresponse.js +15 -0
  47. package/esm/models/index.d.ts +18 -0
  48. package/esm/models/index.js +18 -0
  49. package/esm/models/listworkspacesresponse.d.ts +18 -0
  50. package/esm/models/listworkspacesresponse.js +21 -0
  51. package/esm/models/modelscountresponse.d.ts +4 -4
  52. package/esm/models/modelscountresponse.js +4 -4
  53. package/esm/models/operations/bulkaddworkspacemembers.d.ts +61 -0
  54. package/esm/models/operations/bulkaddworkspacemembers.js +24 -0
  55. package/esm/models/operations/bulkremoveworkspacemembers.d.ts +61 -0
  56. package/esm/models/operations/bulkremoveworkspacemembers.js +24 -0
  57. package/esm/models/operations/createaudiospeech.d.ts +56 -0
  58. package/esm/models/operations/createaudiospeech.js +23 -0
  59. package/esm/models/operations/createworkspace.d.ts +56 -0
  60. package/esm/models/operations/createworkspace.js +23 -0
  61. package/esm/models/operations/deleteworkspace.d.ts +58 -0
  62. package/esm/models/operations/deleteworkspace.js +21 -0
  63. package/esm/models/operations/getgeneration.d.ts +0 -196
  64. package/esm/models/operations/getgeneration.js +0 -102
  65. package/esm/models/operations/getworkspace.d.ts +58 -0
  66. package/esm/models/operations/getworkspace.js +21 -0
  67. package/esm/models/operations/index.d.ts +9 -1
  68. package/esm/models/operations/index.js +9 -1
  69. package/esm/models/operations/listgenerationcontent.d.ts +58 -0
  70. package/esm/models/operations/listgenerationcontent.js +21 -0
  71. package/esm/models/operations/listworkspaces.d.ts +72 -0
  72. package/esm/models/operations/listworkspaces.js +35 -0
  73. package/esm/models/operations/updateworkspace.d.ts +61 -0
  74. package/esm/models/operations/updateworkspace.js +24 -0
  75. package/esm/models/paretorouterplugin.d.ts +22 -0
  76. package/esm/models/paretorouterplugin.js +20 -0
  77. package/esm/models/responsesrequest.d.ts +5 -4
  78. package/esm/models/responsesrequest.js +3 -0
  79. package/esm/models/{operations/createtts.d.ts → speechrequest.d.ts} +23 -76
  80. package/esm/models/{operations/createtts.js → speechrequest.js} +18 -35
  81. package/esm/models/updateworkspacerequest.d.ts +55 -0
  82. package/esm/models/updateworkspacerequest.js +31 -0
  83. package/esm/models/updateworkspaceresponse.d.ts +11 -0
  84. package/esm/models/updateworkspaceresponse.js +15 -0
  85. package/esm/models/videogenerationrequest.d.ts +12 -12
  86. package/esm/models/videogenerationrequest.js +10 -10
  87. package/esm/models/workspace.d.ts +61 -0
  88. package/esm/models/workspace.js +39 -0
  89. package/esm/models/workspacemember.d.ts +43 -0
  90. package/esm/models/workspacemember.js +35 -0
  91. package/esm/sdk/generations.d.ts +6 -1
  92. package/esm/sdk/generations.js +7 -0
  93. package/esm/sdk/sdk.d.ts +5 -2
  94. package/esm/sdk/sdk.js +7 -3
  95. package/esm/sdk/tts.d.ts +1 -1
  96. package/esm/sdk/workspaces.d.ts +58 -0
  97. package/esm/sdk/workspaces.js +80 -0
  98. package/jsr.json +1 -1
  99. package/package.json +5 -5
@@ -0,0 +1,58 @@
1
+ import * as z from "zod/v4";
2
+ export type ListGenerationContentGlobals = {
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 ListGenerationContentRequest = {
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
+ * The generation ID
45
+ */
46
+ id: string;
47
+ };
48
+ /** @internal */
49
+ export type ListGenerationContentRequest$Outbound = {
50
+ "HTTP-Referer"?: string | undefined;
51
+ appTitle?: string | undefined;
52
+ appCategories?: string | undefined;
53
+ id: string;
54
+ };
55
+ /** @internal */
56
+ export declare const ListGenerationContentRequest$outboundSchema: z.ZodType<ListGenerationContentRequest$Outbound, ListGenerationContentRequest>;
57
+ export declare function listGenerationContentRequestToJSON(listGenerationContentRequest: ListGenerationContentRequest): string;
58
+ //# sourceMappingURL=listgenerationcontent.d.ts.map
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 75c4167b92a2
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ /** @internal */
8
+ export const ListGenerationContentRequest$outboundSchema = z.object({
9
+ httpReferer: z.string().optional(),
10
+ appTitle: z.string().optional(),
11
+ appCategories: z.string().optional(),
12
+ id: z.string(),
13
+ }).transform((v) => {
14
+ return remap$(v, {
15
+ httpReferer: "HTTP-Referer",
16
+ });
17
+ });
18
+ export function listGenerationContentRequestToJSON(listGenerationContentRequest) {
19
+ return JSON.stringify(ListGenerationContentRequest$outboundSchema.parse(listGenerationContentRequest));
20
+ }
21
+ //# sourceMappingURL=listgenerationcontent.js.map
@@ -0,0 +1,72 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ import * as models from "../index.js";
5
+ export type ListWorkspacesGlobals = {
6
+ /**
7
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
8
+ *
9
+ * @remarks
10
+ * This is used to track API usage per application.
11
+ */
12
+ httpReferer?: string | undefined;
13
+ /**
14
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
15
+ *
16
+ * @remarks
17
+ */
18
+ appTitle?: string | undefined;
19
+ /**
20
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
21
+ *
22
+ * @remarks
23
+ */
24
+ appCategories?: string | undefined;
25
+ };
26
+ export type ListWorkspacesRequest = {
27
+ /**
28
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
29
+ *
30
+ * @remarks
31
+ * This is used to track API usage per application.
32
+ */
33
+ httpReferer?: string | undefined;
34
+ /**
35
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
36
+ *
37
+ * @remarks
38
+ */
39
+ appTitle?: string | undefined;
40
+ /**
41
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
42
+ *
43
+ * @remarks
44
+ */
45
+ appCategories?: string | undefined;
46
+ /**
47
+ * Number of records to skip for pagination
48
+ */
49
+ offset?: number | null | undefined;
50
+ /**
51
+ * Maximum number of records to return (max 100)
52
+ */
53
+ limit?: number | undefined;
54
+ };
55
+ export type ListWorkspacesResponse = {
56
+ result: models.ListWorkspacesResponse;
57
+ };
58
+ /** @internal */
59
+ export type ListWorkspacesRequest$Outbound = {
60
+ "HTTP-Referer"?: string | undefined;
61
+ appTitle?: string | undefined;
62
+ appCategories?: string | undefined;
63
+ offset?: number | null | undefined;
64
+ limit?: number | undefined;
65
+ };
66
+ /** @internal */
67
+ export declare const ListWorkspacesRequest$outboundSchema: z.ZodType<ListWorkspacesRequest$Outbound, ListWorkspacesRequest>;
68
+ export declare function listWorkspacesRequestToJSON(listWorkspacesRequest: ListWorkspacesRequest): string;
69
+ /** @internal */
70
+ export declare const ListWorkspacesResponse$inboundSchema: z.ZodType<ListWorkspacesResponse, unknown>;
71
+ export declare function listWorkspacesResponseFromJSON(jsonString: string): SafeParseResult<ListWorkspacesResponse, SDKValidationError>;
72
+ //# sourceMappingURL=listworkspaces.d.ts.map
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 04f9b5b78c0f
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
+ import * as models from "../index.js";
9
+ /** @internal */
10
+ export const ListWorkspacesRequest$outboundSchema = z.object({
11
+ httpReferer: z.string().optional(),
12
+ appTitle: z.string().optional(),
13
+ appCategories: z.string().optional(),
14
+ offset: z.nullable(z.int()).optional(),
15
+ limit: z.int().optional(),
16
+ }).transform((v) => {
17
+ return remap$(v, {
18
+ httpReferer: "HTTP-Referer",
19
+ });
20
+ });
21
+ export function listWorkspacesRequestToJSON(listWorkspacesRequest) {
22
+ return JSON.stringify(ListWorkspacesRequest$outboundSchema.parse(listWorkspacesRequest));
23
+ }
24
+ /** @internal */
25
+ export const ListWorkspacesResponse$inboundSchema = z.object({
26
+ Result: models.ListWorkspacesResponse$inboundSchema,
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ "Result": "result",
30
+ });
31
+ });
32
+ export function listWorkspacesResponseFromJSON(jsonString) {
33
+ return safeParse(jsonString, (x) => ListWorkspacesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListWorkspacesResponse' from JSON`);
34
+ }
35
+ //# sourceMappingURL=listworkspaces.js.map
@@ -0,0 +1,61 @@
1
+ import * as z from "zod/v4";
2
+ import * as models from "../index.js";
3
+ export type UpdateWorkspaceGlobals = {
4
+ /**
5
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
6
+ *
7
+ * @remarks
8
+ * This is used to track API usage per application.
9
+ */
10
+ httpReferer?: string | undefined;
11
+ /**
12
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
13
+ *
14
+ * @remarks
15
+ */
16
+ appTitle?: string | undefined;
17
+ /**
18
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
19
+ *
20
+ * @remarks
21
+ */
22
+ appCategories?: string | undefined;
23
+ };
24
+ export type UpdateWorkspaceRequest = {
25
+ /**
26
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
27
+ *
28
+ * @remarks
29
+ * This is used to track API usage per application.
30
+ */
31
+ httpReferer?: string | undefined;
32
+ /**
33
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
34
+ *
35
+ * @remarks
36
+ */
37
+ appTitle?: string | undefined;
38
+ /**
39
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
40
+ *
41
+ * @remarks
42
+ */
43
+ appCategories?: string | undefined;
44
+ /**
45
+ * The workspace ID (UUID) or slug
46
+ */
47
+ id: string;
48
+ updateWorkspaceRequest: models.UpdateWorkspaceRequest;
49
+ };
50
+ /** @internal */
51
+ export type UpdateWorkspaceRequest$Outbound = {
52
+ "HTTP-Referer"?: string | undefined;
53
+ appTitle?: string | undefined;
54
+ appCategories?: string | undefined;
55
+ id: string;
56
+ UpdateWorkspaceRequest: models.UpdateWorkspaceRequest$Outbound;
57
+ };
58
+ /** @internal */
59
+ export declare const UpdateWorkspaceRequest$outboundSchema: z.ZodType<UpdateWorkspaceRequest$Outbound, UpdateWorkspaceRequest>;
60
+ export declare function updateWorkspaceRequestToJSON(updateWorkspaceRequest: UpdateWorkspaceRequest): string;
61
+ //# sourceMappingURL=updateworkspace.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b10c83b1ce4f
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import * as models from "../index.js";
8
+ /** @internal */
9
+ export const UpdateWorkspaceRequest$outboundSchema = z.object({
10
+ httpReferer: z.string().optional(),
11
+ appTitle: z.string().optional(),
12
+ appCategories: z.string().optional(),
13
+ id: z.string(),
14
+ updateWorkspaceRequest: models.UpdateWorkspaceRequest$outboundSchema,
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ httpReferer: "HTTP-Referer",
18
+ updateWorkspaceRequest: "UpdateWorkspaceRequest",
19
+ });
20
+ });
21
+ export function updateWorkspaceRequestToJSON(updateWorkspaceRequest) {
22
+ return JSON.stringify(UpdateWorkspaceRequest$outboundSchema.parse(updateWorkspaceRequest));
23
+ }
24
+ //# sourceMappingURL=updateworkspace.js.map
@@ -0,0 +1,22 @@
1
+ import * as z from "zod/v4";
2
+ export type ParetoRouterPlugin = {
3
+ /**
4
+ * Set to false to disable the pareto-router plugin for this request. Defaults to true.
5
+ */
6
+ enabled?: boolean | undefined;
7
+ id: "pareto-router";
8
+ /**
9
+ * Minimum desired coding score between 0 and 1, where 1 is best. Higher values select from stronger coding models (sourced from Artificial Analysis coding percentiles). Maps internally to one of three tiers (low, medium, high). Omit to use the router default tier.
10
+ */
11
+ minCodingScore?: number | undefined;
12
+ };
13
+ /** @internal */
14
+ export type ParetoRouterPlugin$Outbound = {
15
+ enabled?: boolean | undefined;
16
+ id: "pareto-router";
17
+ min_coding_score?: number | undefined;
18
+ };
19
+ /** @internal */
20
+ export declare const ParetoRouterPlugin$outboundSchema: z.ZodType<ParetoRouterPlugin$Outbound, ParetoRouterPlugin>;
21
+ export declare function paretoRouterPluginToJSON(paretoRouterPlugin: ParetoRouterPlugin): string;
22
+ //# sourceMappingURL=paretorouterplugin.d.ts.map
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 4e557119b1dd
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ /** @internal */
8
+ export const ParetoRouterPlugin$outboundSchema = z.object({
9
+ enabled: z.boolean().optional(),
10
+ id: z.literal("pareto-router"),
11
+ minCodingScore: z.number().optional(),
12
+ }).transform((v) => {
13
+ return remap$(v, {
14
+ minCodingScore: "min_coding_score",
15
+ });
16
+ });
17
+ export function paretoRouterPluginToJSON(paretoRouterPlugin) {
18
+ return JSON.stringify(ParetoRouterPlugin$outboundSchema.parse(paretoRouterPlugin));
19
+ }
20
+ //# sourceMappingURL=paretorouterplugin.js.map
@@ -21,6 +21,7 @@ import { ModerationPlugin, ModerationPlugin$Outbound } from "./moderationplugin.
21
21
  import { OpenAIResponsesToolChoiceUnion, OpenAIResponsesToolChoiceUnion$Outbound } from "./openairesponsestoolchoiceunion.js";
22
22
  import { OpenAIResponsesTruncation } from "./openairesponsestruncation.js";
23
23
  import { OutputModalityEnum } from "./outputmodalityenum.js";
24
+ import { ParetoRouterPlugin, ParetoRouterPlugin$Outbound } from "./paretorouterplugin.js";
24
25
  import { Preview20250311WebSearchServerTool, Preview20250311WebSearchServerTool$Outbound } from "./preview20250311websearchservertool.js";
25
26
  import { PreviewWebSearchServerTool, PreviewWebSearchServerTool$Outbound } from "./previewwebsearchservertool.js";
26
27
  import { ProviderPreferences, ProviderPreferences$Outbound } from "./providerpreferences.js";
@@ -34,7 +35,7 @@ import { TraceConfig, TraceConfig$Outbound } from "./traceconfig.js";
34
35
  import { WebSearchPlugin, WebSearchPlugin$Outbound } from "./websearchplugin.js";
35
36
  import { WebSearchServerTool, WebSearchServerTool$Outbound } from "./websearchservertool.js";
36
37
  import { WebSearchServerToolOpenRouter, WebSearchServerToolOpenRouter$Outbound } from "./websearchservertoolopenrouter.js";
37
- export type ResponsesRequestPlugin = AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | ModerationPlugin | ResponseHealingPlugin | WebSearchPlugin;
38
+ export type ResponsesRequestPlugin = AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin;
38
39
  export declare const ResponsesRequestServiceTier: {
39
40
  readonly Auto: "auto";
40
41
  readonly Default: "default";
@@ -98,7 +99,7 @@ export type ResponsesRequest = {
98
99
  /**
99
100
  * Plugins you want to enable for this request, including their settings.
100
101
  */
101
- plugins?: Array<AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | ModerationPlugin | ResponseHealingPlugin | WebSearchPlugin> | undefined;
102
+ plugins?: Array<AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin> | undefined;
102
103
  presencePenalty?: number | null | undefined;
103
104
  previousResponseId?: string | null | undefined;
104
105
  prompt?: StoredPromptTemplate | null | undefined;
@@ -146,7 +147,7 @@ export type ResponsesRequest = {
146
147
  user?: string | undefined;
147
148
  };
148
149
  /** @internal */
149
- export type ResponsesRequestPlugin$Outbound = AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | ModerationPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound;
150
+ export type ResponsesRequestPlugin$Outbound = AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound;
150
151
  /** @internal */
151
152
  export declare const ResponsesRequestPlugin$outboundSchema: z.ZodType<ResponsesRequestPlugin$Outbound, ResponsesRequestPlugin>;
152
153
  export declare function responsesRequestPluginToJSON(responsesRequestPlugin: ResponsesRequestPlugin): string;
@@ -195,7 +196,7 @@ export type ResponsesRequest$Outbound = {
195
196
  model?: string | undefined;
196
197
  models?: Array<string> | undefined;
197
198
  parallel_tool_calls?: boolean | null | undefined;
198
- plugins?: Array<AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | ModerationPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound> | undefined;
199
+ plugins?: Array<AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound> | undefined;
199
200
  presence_penalty?: number | null | undefined;
200
201
  previous_response_id?: string | null | undefined;
201
202
  prompt?: StoredPromptTemplate$Outbound | null | undefined;
@@ -26,6 +26,7 @@ import { ModerationPlugin$outboundSchema, } from "./moderationplugin.js";
26
26
  import { OpenAIResponsesToolChoiceUnion$outboundSchema, } from "./openairesponsestoolchoiceunion.js";
27
27
  import { OpenAIResponsesTruncation$outboundSchema, } from "./openairesponsestruncation.js";
28
28
  import { OutputModalityEnum$outboundSchema, } from "./outputmodalityenum.js";
29
+ import { ParetoRouterPlugin$outboundSchema, } from "./paretorouterplugin.js";
29
30
  import { Preview20250311WebSearchServerTool$outboundSchema, } from "./preview20250311websearchservertool.js";
30
31
  import { PreviewWebSearchServerTool$outboundSchema, } from "./previewwebsearchservertool.js";
31
32
  import { ProviderPreferences$outboundSchema, } from "./providerpreferences.js";
@@ -52,6 +53,7 @@ export const ResponsesRequestPlugin$outboundSchema = z.union([
52
53
  ContextCompressionPlugin$outboundSchema,
53
54
  FileParserPlugin$outboundSchema,
54
55
  ModerationPlugin$outboundSchema,
56
+ ParetoRouterPlugin$outboundSchema,
55
57
  ResponseHealingPlugin$outboundSchema,
56
58
  WebSearchPlugin$outboundSchema,
57
59
  ]);
@@ -115,6 +117,7 @@ export const ResponsesRequest$outboundSchema = z.object({
115
117
  ContextCompressionPlugin$outboundSchema,
116
118
  FileParserPlugin$outboundSchema,
117
119
  ModerationPlugin$outboundSchema,
120
+ ParetoRouterPlugin$outboundSchema,
118
121
  ResponseHealingPlugin$outboundSchema,
119
122
  WebSearchPlugin$outboundSchema,
120
123
  ])).optional(),
@@ -1,30 +1,9 @@
1
1
  import * as z from "zod/v4";
2
- import { OpenEnum } from "../../types/enums.js";
3
- export type CreateTtsGlobals = {
4
- /**
5
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
6
- *
7
- * @remarks
8
- * This is used to track API usage per application.
9
- */
10
- httpReferer?: string | undefined;
11
- /**
12
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
13
- *
14
- * @remarks
15
- */
16
- appTitle?: string | undefined;
17
- /**
18
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
19
- *
20
- * @remarks
21
- */
22
- appCategories?: string | undefined;
23
- };
2
+ import { OpenEnum } from "../types/enums.js";
24
3
  /**
25
4
  * Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.
26
5
  */
27
- export type Options = {
6
+ export type SpeechRequestOptions = {
28
7
  oneai?: {
29
8
  [k: string]: any | null;
30
9
  } | undefined;
@@ -350,27 +329,27 @@ export type Options = {
350
329
  /**
351
330
  * Provider-specific passthrough configuration
352
331
  */
353
- export type Provider = {
332
+ export type SpeechRequestProvider = {
354
333
  /**
355
334
  * Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.
356
335
  */
357
- options?: Options | undefined;
336
+ options?: SpeechRequestOptions | undefined;
358
337
  };
359
338
  /**
360
339
  * Audio output format
361
340
  */
362
- export declare const ResponseFormat: {
341
+ export declare const ResponseFormatEnum: {
363
342
  readonly Mp3: "mp3";
364
343
  readonly Pcm: "pcm";
365
344
  };
366
345
  /**
367
346
  * Audio output format
368
347
  */
369
- export type ResponseFormat = OpenEnum<typeof ResponseFormat>;
348
+ export type ResponseFormatEnum = OpenEnum<typeof ResponseFormatEnum>;
370
349
  /**
371
350
  * Text-to-speech request input
372
351
  */
373
- export type CreateTtsRequestBody = {
352
+ export type SpeechRequest = {
374
353
  /**
375
354
  * Text to synthesize
376
355
  */
@@ -382,44 +361,22 @@ export type CreateTtsRequestBody = {
382
361
  /**
383
362
  * Provider-specific passthrough configuration
384
363
  */
385
- provider?: Provider | undefined;
364
+ provider?: SpeechRequestProvider | undefined;
386
365
  /**
387
366
  * Audio output format
388
367
  */
389
- responseFormat?: ResponseFormat | undefined;
368
+ responseFormat?: ResponseFormatEnum | undefined;
390
369
  /**
391
370
  * Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers.
392
371
  */
393
372
  speed?: number | undefined;
394
373
  /**
395
- * Voice identifier
374
+ * Voice identifier (provider-specific).
396
375
  */
397
376
  voice: string;
398
377
  };
399
- export type CreateTtsRequest = {
400
- /**
401
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
402
- *
403
- * @remarks
404
- * This is used to track API usage per application.
405
- */
406
- httpReferer?: string | undefined;
407
- /**
408
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
409
- *
410
- * @remarks
411
- */
412
- appTitle?: string | undefined;
413
- /**
414
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
415
- *
416
- * @remarks
417
- */
418
- appCategories?: string | undefined;
419
- requestBody: CreateTtsRequestBody;
420
- };
421
378
  /** @internal */
422
- export type Options$Outbound = {
379
+ export type SpeechRequestOptions$Outbound = {
423
380
  "01ai"?: {
424
381
  [k: string]: any | null;
425
382
  } | undefined;
@@ -743,37 +700,27 @@ export type Options$Outbound = {
743
700
  } | undefined;
744
701
  };
745
702
  /** @internal */
746
- export declare const Options$outboundSchema: z.ZodType<Options$Outbound, Options>;
747
- export declare function optionsToJSON(options: Options): string;
703
+ export declare const SpeechRequestOptions$outboundSchema: z.ZodType<SpeechRequestOptions$Outbound, SpeechRequestOptions>;
704
+ export declare function speechRequestOptionsToJSON(speechRequestOptions: SpeechRequestOptions): string;
748
705
  /** @internal */
749
- export type Provider$Outbound = {
750
- options?: Options$Outbound | undefined;
706
+ export type SpeechRequestProvider$Outbound = {
707
+ options?: SpeechRequestOptions$Outbound | undefined;
751
708
  };
752
709
  /** @internal */
753
- export declare const Provider$outboundSchema: z.ZodType<Provider$Outbound, Provider>;
754
- export declare function providerToJSON(provider: Provider): string;
710
+ export declare const SpeechRequestProvider$outboundSchema: z.ZodType<SpeechRequestProvider$Outbound, SpeechRequestProvider>;
711
+ export declare function speechRequestProviderToJSON(speechRequestProvider: SpeechRequestProvider): string;
755
712
  /** @internal */
756
- export declare const ResponseFormat$outboundSchema: z.ZodType<string, ResponseFormat>;
713
+ export declare const ResponseFormatEnum$outboundSchema: z.ZodType<string, ResponseFormatEnum>;
757
714
  /** @internal */
758
- export type CreateTtsRequestBody$Outbound = {
715
+ export type SpeechRequest$Outbound = {
759
716
  input: string;
760
717
  model: string;
761
- provider?: Provider$Outbound | undefined;
718
+ provider?: SpeechRequestProvider$Outbound | undefined;
762
719
  response_format: string;
763
720
  speed?: number | undefined;
764
721
  voice: string;
765
722
  };
766
723
  /** @internal */
767
- export declare const CreateTtsRequestBody$outboundSchema: z.ZodType<CreateTtsRequestBody$Outbound, CreateTtsRequestBody>;
768
- export declare function createTtsRequestBodyToJSON(createTtsRequestBody: CreateTtsRequestBody): string;
769
- /** @internal */
770
- export type CreateTtsRequest$Outbound = {
771
- "HTTP-Referer"?: string | undefined;
772
- appTitle?: string | undefined;
773
- appCategories?: string | undefined;
774
- RequestBody: CreateTtsRequestBody$Outbound;
775
- };
776
- /** @internal */
777
- export declare const CreateTtsRequest$outboundSchema: z.ZodType<CreateTtsRequest$Outbound, CreateTtsRequest>;
778
- export declare function createTtsRequestToJSON(createTtsRequest: CreateTtsRequest): string;
779
- //# sourceMappingURL=createtts.d.ts.map
724
+ export declare const SpeechRequest$outboundSchema: z.ZodType<SpeechRequest$Outbound, SpeechRequest>;
725
+ export declare function speechRequestToJSON(speechRequest: SpeechRequest): string;
726
+ //# sourceMappingURL=speechrequest.d.ts.map
@@ -1,20 +1,19 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: fd4cb8ec3732
3
+ * @generated-id: 96d573d68420
4
4
  */
5
5
  import * as z from "zod/v4";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import * as openEnums from "../../types/enums.js";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import * as openEnums from "../types/enums.js";
8
8
  /**
9
9
  * Audio output format
10
10
  */
11
- export const ResponseFormat = {
11
+ export const ResponseFormatEnum = {
12
12
  Mp3: "mp3",
13
13
  Pcm: "pcm",
14
14
  };
15
15
  /** @internal */
16
- export const Options$outboundSchema = z
17
- .object({
16
+ export const SpeechRequestOptions$outboundSchema = z.object({
18
17
  oneai: z.record(z.string(), z.nullable(z.any())).optional(),
19
18
  ai21: z.record(z.string(), z.nullable(z.any())).optional(),
20
19
  aionLabs: z.record(z.string(), z.nullable(z.any())).optional(),
@@ -146,25 +145,24 @@ export const Options$outboundSchema = z
146
145
  zAi: "z-ai",
147
146
  });
148
147
  });
149
- export function optionsToJSON(options) {
150
- return JSON.stringify(Options$outboundSchema.parse(options));
148
+ export function speechRequestOptionsToJSON(speechRequestOptions) {
149
+ return JSON.stringify(SpeechRequestOptions$outboundSchema.parse(speechRequestOptions));
151
150
  }
152
151
  /** @internal */
153
- export const Provider$outboundSchema = z
154
- .object({
155
- options: z.lazy(() => Options$outboundSchema).optional(),
152
+ export const SpeechRequestProvider$outboundSchema = z.object({
153
+ options: z.lazy(() => SpeechRequestOptions$outboundSchema).optional(),
156
154
  });
157
- export function providerToJSON(provider) {
158
- return JSON.stringify(Provider$outboundSchema.parse(provider));
155
+ export function speechRequestProviderToJSON(speechRequestProvider) {
156
+ return JSON.stringify(SpeechRequestProvider$outboundSchema.parse(speechRequestProvider));
159
157
  }
160
158
  /** @internal */
161
- export const ResponseFormat$outboundSchema = openEnums.outboundSchema(ResponseFormat);
159
+ export const ResponseFormatEnum$outboundSchema = openEnums.outboundSchema(ResponseFormatEnum);
162
160
  /** @internal */
163
- export const CreateTtsRequestBody$outboundSchema = z.object({
161
+ export const SpeechRequest$outboundSchema = z.object({
164
162
  input: z.string(),
165
163
  model: z.string(),
166
- provider: z.lazy(() => Provider$outboundSchema).optional(),
167
- responseFormat: ResponseFormat$outboundSchema.default("pcm"),
164
+ provider: z.lazy(() => SpeechRequestProvider$outboundSchema).optional(),
165
+ responseFormat: ResponseFormatEnum$outboundSchema.default("pcm"),
168
166
  speed: z.number().optional(),
169
167
  voice: z.string(),
170
168
  }).transform((v) => {
@@ -172,22 +170,7 @@ export const CreateTtsRequestBody$outboundSchema = z.object({
172
170
  responseFormat: "response_format",
173
171
  });
174
172
  });
175
- export function createTtsRequestBodyToJSON(createTtsRequestBody) {
176
- return JSON.stringify(CreateTtsRequestBody$outboundSchema.parse(createTtsRequestBody));
173
+ export function speechRequestToJSON(speechRequest) {
174
+ return JSON.stringify(SpeechRequest$outboundSchema.parse(speechRequest));
177
175
  }
178
- /** @internal */
179
- export const CreateTtsRequest$outboundSchema = z.object({
180
- httpReferer: z.string().optional(),
181
- appTitle: z.string().optional(),
182
- appCategories: z.string().optional(),
183
- requestBody: z.lazy(() => CreateTtsRequestBody$outboundSchema),
184
- }).transform((v) => {
185
- return remap$(v, {
186
- httpReferer: "HTTP-Referer",
187
- requestBody: "RequestBody",
188
- });
189
- });
190
- export function createTtsRequestToJSON(createTtsRequest) {
191
- return JSON.stringify(CreateTtsRequest$outboundSchema.parse(createTtsRequest));
192
- }
193
- //# sourceMappingURL=createtts.js.map
176
+ //# sourceMappingURL=speechrequest.js.map