@openrouter/sdk 1.5.141 → 1.5.143
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/apiKeysList.js +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/inputreference.d.ts +1 -1
- package/esm/models/operations/list.d.ts +5 -0
- package/esm/models/operations/list.js +2 -0
- package/esm/models/videogenerationrequest.d.ts +4 -4
- package/jsr.json +1 -1
- package/package.json +6 -6
package/esm/funcs/apiKeysList.js
CHANGED
|
@@ -30,6 +30,7 @@ async function $do(client, request, options) {
|
|
|
30
30
|
const body = null;
|
|
31
31
|
const path = pathToFunc("/keys")();
|
|
32
32
|
const query = encodeFormQuery({
|
|
33
|
+
"creator_user_id": payload?.creator_user_id,
|
|
33
34
|
"include_disabled": payload?.include_disabled,
|
|
34
35
|
"include_expired": payload?.include_expired,
|
|
35
36
|
"offset": payload?.offset,
|
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.143";
|
|
53
53
|
readonly genVersion: "2.960.8";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.143 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.143",
|
|
29
29
|
genVersion: "2.960.8",
|
|
30
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
30
|
+
userAgent: "speakeasy-sdk/typescript 1.5.143 2.960.8 1.0.0 @openrouter/sdk",
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=config.js.map
|
|
@@ -3,7 +3,7 @@ import { ContentPartAudio, ContentPartAudio$Outbound } from "./contentpartaudio.
|
|
|
3
3
|
import { ContentPartImage, ContentPartImage$Outbound } from "./contentpartimage.js";
|
|
4
4
|
import { ContentPartVideo, ContentPartVideo$Outbound } from "./contentpartvideo.js";
|
|
5
5
|
/**
|
|
6
|
-
* A reference asset used to guide video generation. Image references are
|
|
6
|
+
* A reference asset used to guide video generation. Image references are the most widely supported; audio and video references are only accepted by providers that advertise those input modalities (including BytePlus Seedance generation 2 and newer).
|
|
7
7
|
*/
|
|
8
8
|
export type InputReference = ContentPartAudio | (ContentPartImage & {
|
|
9
9
|
type: "image_url";
|
|
@@ -58,6 +58,10 @@ export type ListRequest = {
|
|
|
58
58
|
* Filter API keys by workspace ID. By default an organization-scoped management key gets the default workspace; a workspace-scoped management key always gets its own workspace and cannot list another.
|
|
59
59
|
*/
|
|
60
60
|
workspaceId?: string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Only return API keys created by this user ID (the `creator_user_id` on each key). Requires a management key that can view key creators.
|
|
63
|
+
*/
|
|
64
|
+
creatorUserId?: string | undefined;
|
|
61
65
|
};
|
|
62
66
|
export type ListData = {
|
|
63
67
|
/**
|
|
@@ -174,6 +178,7 @@ export type ListRequest$Outbound = {
|
|
|
174
178
|
include_expired?: boolean | undefined;
|
|
175
179
|
offset?: number | null | undefined;
|
|
176
180
|
workspace_id?: string | undefined;
|
|
181
|
+
creator_user_id?: string | undefined;
|
|
177
182
|
};
|
|
178
183
|
/** @internal */
|
|
179
184
|
export declare const ListRequest$outboundSchema: z.ZodType<ListRequest$Outbound, ListRequest>;
|
|
@@ -13,12 +13,14 @@ export const ListRequest$outboundSchema = z.object({
|
|
|
13
13
|
includeExpired: z.boolean().optional(),
|
|
14
14
|
offset: z.nullable(z.int()).optional(),
|
|
15
15
|
workspaceId: z.string().optional(),
|
|
16
|
+
creatorUserId: z.string().optional(),
|
|
16
17
|
}).transform((v) => {
|
|
17
18
|
return remap$(v, {
|
|
18
19
|
httpReferer: "HTTP-Referer",
|
|
19
20
|
includeDisabled: "include_disabled",
|
|
20
21
|
includeExpired: "include_expired",
|
|
21
22
|
workspaceId: "workspace_id",
|
|
23
|
+
creatorUserId: "creator_user_id",
|
|
22
24
|
});
|
|
23
25
|
});
|
|
24
26
|
export function listRequestToJSON(listRequest) {
|
|
@@ -593,15 +593,15 @@ export type VideoGenerationRequest = {
|
|
|
593
593
|
*/
|
|
594
594
|
duration?: number | undefined;
|
|
595
595
|
/**
|
|
596
|
-
* Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.
|
|
596
|
+
* Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame, and each frame_type may appear at most once. Combining frame_images with input_references is provider-specific: some models reject the combination (as a 400 on submit or as a failed job), some use the frame images alone, and some use both (e.g. Runway applies image references as style/guidance alongside the frame anchors).
|
|
597
597
|
*/
|
|
598
598
|
frameImages?: Array<FrameImage> | undefined;
|
|
599
599
|
/**
|
|
600
|
-
* Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. When neither is set, some providers (such as xAI) apply their own default and generate audio, so send false to request a silent video. Some models always include audio and ignore false.
|
|
600
|
+
* Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. When neither is set, some providers (such as xAI) apply their own default and generate audio, so send false to request a silent video. Some models always include audio and ignore false. POST /videos returns 400 for true if every otherwise eligible endpoint explicitly disables audio generation.
|
|
601
601
|
*/
|
|
602
602
|
generateAudio?: boolean | undefined;
|
|
603
603
|
/**
|
|
604
|
-
* Reference assets to guide video generation. Accepts image, audio, and video references.
|
|
604
|
+
* Reference assets to guide video generation. Accepts image, audio, and video references. POST /videos rejects the request with a 400 when the model or its provider integration does not support a supplied reference modality. Combining input_references with frame_images is provider-specific: some models reject the combination (as a 400 on submit or as a failed job), some use the frame images alone, and some use both (e.g. Runway applies image references as style/guidance alongside the frame anchors).
|
|
605
605
|
*/
|
|
606
606
|
inputReferences?: Array<InputReference> | undefined;
|
|
607
607
|
model: string;
|
|
@@ -622,7 +622,7 @@ export type VideoGenerationRequest = {
|
|
|
622
622
|
*/
|
|
623
623
|
resolution?: VideoGenerationRequestResolution | undefined;
|
|
624
624
|
/**
|
|
625
|
-
* If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers.
|
|
625
|
+
* If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. POST /videos returns 400 if every otherwise eligible endpoint explicitly declares seed unsupported.
|
|
626
626
|
*/
|
|
627
627
|
seed?: number | undefined;
|
|
628
628
|
/**
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.143",
|
|
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": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
|
|
77
76
|
"postinstall": "node scripts/check-types.js || true",
|
|
78
|
-
"test:watch": "vitest --watch --project unit",
|
|
79
|
-
"typecheck": "tsc --noEmit",
|
|
80
|
-
"typecheck:transit": "exit 0",
|
|
81
77
|
"prepare": "npm run build",
|
|
82
78
|
"test": "vitest --run --project unit",
|
|
79
|
+
"test:transit": "exit 0",
|
|
80
|
+
"typecheck": "tsc --noEmit",
|
|
81
|
+
"compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
|
|
83
82
|
"test:e2e": "vitest --run --project e2e",
|
|
84
|
-
"test:
|
|
83
|
+
"test:watch": "vitest --watch --project unit",
|
|
84
|
+
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|