@openrouter/sdk 1.2.44 → 1.2.45

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.
@@ -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.2.44";
53
+ readonly sdkVersion: "1.2.45";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.2.44 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.2.45 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.2.44",
32
+ sdkVersion: "1.2.45",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.2.44 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.2.45 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -461,6 +461,10 @@ export type VideoGenerationRequest = {
461
461
  * URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.
462
462
  */
463
463
  callbackUrl?: string | undefined;
464
+ /**
465
+ * Creativity level for video upscaling models only. This parameter is not supported by video generation models.
466
+ */
467
+ creativity?: number | undefined;
464
468
  /**
465
469
  * Duration of the generated video in seconds
466
470
  */
@@ -498,6 +502,10 @@ export type VideoGenerationRequest = {
498
502
  * Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio.
499
503
  */
500
504
  size?: string | undefined;
505
+ /**
506
+ * Upscale factor for video upscaling models only. This parameter is not supported by video generation models.
507
+ */
508
+ upscaleFactor?: number | undefined;
501
509
  };
502
510
  /** @internal */
503
511
  export declare const VideoGenerationRequestAspectRatio$outboundSchema: z.ZodType<string, VideoGenerationRequestAspectRatio>;
@@ -925,6 +933,7 @@ export declare const VideoGenerationRequestResolution$outboundSchema: z.ZodType<
925
933
  export type VideoGenerationRequest$Outbound = {
926
934
  aspect_ratio?: string | undefined;
927
935
  callback_url?: string | undefined;
936
+ creativity?: number | undefined;
928
937
  duration?: number | undefined;
929
938
  frame_images?: Array<FrameImage$Outbound> | undefined;
930
939
  generate_audio?: boolean | undefined;
@@ -935,6 +944,7 @@ export type VideoGenerationRequest$Outbound = {
935
944
  resolution?: string | undefined;
936
945
  seed?: number | undefined;
937
946
  size?: string | undefined;
947
+ upscale_factor?: number | undefined;
938
948
  };
939
949
  /** @internal */
940
950
  export declare const VideoGenerationRequest$outboundSchema: z.ZodType<VideoGenerationRequest$Outbound, VideoGenerationRequest>;
@@ -222,6 +222,7 @@ export const VideoGenerationRequestResolution$outboundSchema = openEnums.outboun
222
222
  export const VideoGenerationRequest$outboundSchema = z.object({
223
223
  aspectRatio: VideoGenerationRequestAspectRatio$outboundSchema.optional(),
224
224
  callbackUrl: z.string().optional(),
225
+ creativity: z.int().optional(),
225
226
  duration: z.int().optional(),
226
227
  frameImages: z.array(FrameImage$outboundSchema).optional(),
227
228
  generateAudio: z.boolean().optional(),
@@ -233,6 +234,7 @@ export const VideoGenerationRequest$outboundSchema = z.object({
233
234
  resolution: VideoGenerationRequestResolution$outboundSchema.optional(),
234
235
  seed: z.int().optional(),
235
236
  size: z.string().optional(),
237
+ upscaleFactor: z.number().optional(),
236
238
  }).transform((v) => {
237
239
  return remap$(v, {
238
240
  aspectRatio: "aspect_ratio",
@@ -240,6 +242,7 @@ export const VideoGenerationRequest$outboundSchema = z.object({
240
242
  frameImages: "frame_images",
241
243
  generateAudio: "generate_audio",
242
244
  inputReferences: "input_references",
245
+ upscaleFactor: "upscale_factor",
243
246
  });
244
247
  });
245
248
  export function videoGenerationRequestToJSON(videoGenerationRequest) {
@@ -94,6 +94,13 @@ export declare const SupportedSize: {
94
94
  readonly FiveThousandAndFortyx2160: "5040x2160";
95
95
  };
96
96
  export type SupportedSize = OpenEnum<typeof SupportedSize>;
97
+ /**
98
+ * Supported upscale factor range for video upscaling models
99
+ */
100
+ export type UpscaleFactor = {
101
+ max?: number | null | undefined;
102
+ min?: number | null | undefined;
103
+ };
97
104
  export type VideoModel = {
98
105
  /**
99
106
  * List of parameters that are allowed to be passed through to the provider
@@ -107,6 +114,10 @@ export type VideoModel = {
107
114
  * Unix timestamp of when the model was created
108
115
  */
109
116
  created: number;
117
+ /**
118
+ * Supported creativity levels for video upscaling models
119
+ */
120
+ creativity: Array<number> | null;
110
121
  /**
111
122
  * Description of the model
112
123
  */
@@ -157,6 +168,10 @@ export type VideoModel = {
157
168
  * Supported output sizes (width x height)
158
169
  */
159
170
  supportedSizes: Array<SupportedSize> | null;
171
+ /**
172
+ * Supported upscale factor range for video upscaling models
173
+ */
174
+ upscaleFactor: UpscaleFactor | null;
160
175
  };
161
176
  /** @internal */
162
177
  export declare const SupportedAspectRatio$inboundSchema: z.ZodType<SupportedAspectRatio, unknown>;
@@ -167,6 +182,9 @@ export declare const SupportedResolution$inboundSchema: z.ZodType<SupportedResol
167
182
  /** @internal */
168
183
  export declare const SupportedSize$inboundSchema: z.ZodType<SupportedSize, unknown>;
169
184
  /** @internal */
185
+ export declare const UpscaleFactor$inboundSchema: z.ZodType<UpscaleFactor, unknown>;
186
+ export declare function upscaleFactorFromJSON(jsonString: string): SafeParseResult<UpscaleFactor, SDKValidationError>;
187
+ /** @internal */
170
188
  export declare const VideoModel$inboundSchema: z.ZodType<VideoModel, unknown>;
171
189
  export declare function videoModelFromJSON(jsonString: string): SafeParseResult<VideoModel, SDKValidationError>;
172
190
  //# sourceMappingURL=videomodel.d.ts.map
@@ -103,11 +103,21 @@ export const SupportedResolution$inboundSchema = openEnums.inboundSchema(Support
103
103
  /** @internal */
104
104
  export const SupportedSize$inboundSchema = openEnums.inboundSchema(SupportedSize);
105
105
  /** @internal */
106
+ export const UpscaleFactor$inboundSchema = z
107
+ .object({
108
+ max: z.nullable(z.number()).optional(),
109
+ min: z.nullable(z.number()).optional(),
110
+ });
111
+ export function upscaleFactorFromJSON(jsonString) {
112
+ return safeParse(jsonString, (x) => UpscaleFactor$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpscaleFactor' from JSON`);
113
+ }
114
+ /** @internal */
106
115
  export const VideoModel$inboundSchema = z
107
116
  .object({
108
117
  allowed_passthrough_parameters: z.array(z.string()),
109
118
  canonical_slug: z.string(),
110
119
  created: z.int(),
120
+ creativity: z.nullable(z.array(z.int())),
111
121
  description: z.string().optional(),
112
122
  generate_audio: z.nullable(z.boolean()),
113
123
  hugging_face_id: z.nullable(z.string()).optional(),
@@ -120,6 +130,7 @@ export const VideoModel$inboundSchema = z
120
130
  supported_frame_images: z.nullable(z.array(SupportedFrameImage$inboundSchema)),
121
131
  supported_resolutions: z.nullable(z.array(SupportedResolution$inboundSchema)),
122
132
  supported_sizes: z.nullable(z.array(SupportedSize$inboundSchema)),
133
+ upscale_factor: z.nullable(z.lazy(() => UpscaleFactor$inboundSchema)),
123
134
  }).transform((v) => {
124
135
  return remap$(v, {
125
136
  "allowed_passthrough_parameters": "allowedPassthroughParameters",
@@ -132,6 +143,7 @@ export const VideoModel$inboundSchema = z
132
143
  "supported_frame_images": "supportedFrameImages",
133
144
  "supported_resolutions": "supportedResolutions",
134
145
  "supported_sizes": "supportedSizes",
146
+ "upscale_factor": "upscaleFactor",
135
147
  });
136
148
  });
137
149
  export function videoModelFromJSON(jsonString) {
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.44",
5
+ "version": "1.2.45",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "1.2.44",
3
+ "version": "1.2.45",
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": [
@@ -73,15 +73,15 @@
73
73
  "lint": "eslint --cache --max-warnings=0 src",
74
74
  "build": "tsc",
75
75
  "prepublishOnly": "npm run build",
76
- "postinstall": "node scripts/check-types.js || true",
76
+ "compile": "tsc",
77
77
  "prepare": "npm run build",
78
78
  "test": "vitest --run --project unit",
79
79
  "test:transit": "exit 0",
80
- "test:watch": "vitest --watch --project unit",
81
80
  "typecheck": "tsc --noEmit",
82
81
  "typecheck:transit": "exit 0",
82
+ "postinstall": "node scripts/check-types.js || true",
83
83
  "test:e2e": "vitest --run --project e2e",
84
- "compile": "tsc"
84
+ "test:watch": "vitest --watch --project unit"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {