@openrouter/sdk 1.5.76 → 1.5.78
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/byokCreate.d.ts +1 -1
- package/esm/funcs/byokCreate.js +1 -1
- package/esm/funcs/byokDelete.d.ts +1 -1
- package/esm/funcs/byokDelete.js +1 -1
- package/esm/funcs/byokGet.d.ts +1 -1
- package/esm/funcs/byokGet.js +1 -1
- package/esm/funcs/byokList.d.ts +1 -1
- package/esm/funcs/byokList.js +1 -1
- package/esm/funcs/byokUpdate.d.ts +1 -1
- package/esm/funcs/byokUpdate.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/byokkey.d.ts +1 -1
- package/esm/models/createbyokkeyrequest.d.ts +2 -2
- package/esm/models/operations/listbyokkeys.d.ts +1 -1
- package/esm/models/reasoningformat.d.ts +1 -0
- package/esm/models/reasoningformat.js +1 -0
- package/esm/models/updatebyokkeyrequest.d.ts +1 -1
- package/esm/sdk/byok.d.ts +5 -5
- package/esm/sdk/byok.js +5 -5
- package/jsr.json +1 -1
- package/package.json +8 -8
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* Create a BYOK provider credential
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. Treat the raw key as write-only; it is never returned after creation. Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
16
|
+
* Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. A workspace-scoped management key creates the credential in its own workspace when `workspace_id` is omitted, and any other `workspace_id` returns 403. Treat the raw key as write-only; it is never returned after creation. Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
18
|
export declare function byokCreate(client: OpenRouterCore, request: operations.CreateBYOKKeyRequest, options?: RequestOptions): APIPromise<Result<models.CreateBYOKKeyResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=byokCreate.d.ts.map
|
package/esm/funcs/byokCreate.js
CHANGED
|
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
* Create a BYOK provider credential
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. Treat the raw key as write-only; it is never returned after creation. Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
20
|
+
* Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. A workspace-scoped management key creates the credential in its own workspace when `workspace_id` is omitted, and any other `workspace_id` returns 403. Treat the raw key as write-only; it is never returned after creation. Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
21
|
*/
|
|
22
22
|
export function byokCreate(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* Delete a BYOK provider credential
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
16
|
+
* Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
18
|
export declare function byokDelete(client: OpenRouterCore, request: operations.DeleteBYOKKeyRequest, options?: RequestOptions): APIPromise<Result<models.DeleteBYOKKeyResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=byokDelete.d.ts.map
|
package/esm/funcs/byokDelete.js
CHANGED
|
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
* Delete a BYOK provider credential
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
20
|
+
* Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
21
|
*/
|
|
22
22
|
export function byokDelete(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
package/esm/funcs/byokGet.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* Get a BYOK provider credential
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
16
|
+
* Get a single bring-your-own-key (BYOK) provider credential by its `id`. A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
18
|
export declare function byokGet(client: OpenRouterCore, request: operations.GetBYOKKeyRequest, options?: RequestOptions): APIPromise<Result<models.GetBYOKKeyResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=byokGet.d.ts.map
|
package/esm/funcs/byokGet.js
CHANGED
|
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
* Get a BYOK provider credential
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
20
|
+
* Get a single bring-your-own-key (BYOK) provider credential by its `id`. A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
21
|
*/
|
|
22
22
|
export function byokGet(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
package/esm/funcs/byokList.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
13
13
|
* List BYOK provider credentials
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
16
|
+
* List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace, or a workspace-scoped management key's own workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. A workspace-scoped management key can only list its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
18
|
export declare function byokList(client: OpenRouterCore, request?: operations.ListBYOKKeysRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListBYOKKeysResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
19
19
|
offset: number;
|
package/esm/funcs/byokList.js
CHANGED
|
@@ -17,7 +17,7 @@ import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
|
17
17
|
* List BYOK provider credentials
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
20
|
+
* List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace, or a workspace-scoped management key's own workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. A workspace-scoped management key can only list its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
21
|
*/
|
|
22
22
|
export function byokList(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* Update a BYOK provider credential
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys (`null` clears the restriction). [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
16
|
+
* Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys (`null` clears the restriction). A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
18
|
export declare function byokUpdate(client: OpenRouterCore, request: operations.UpdateBYOKKeyRequest, options?: RequestOptions): APIPromise<Result<models.UpdateBYOKKeyResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.ConflictResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=byokUpdate.d.ts.map
|
package/esm/funcs/byokUpdate.js
CHANGED
|
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
* Update a BYOK provider credential
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys (`null` clears the restriction). [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
20
|
+
* Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys (`null` clears the restriction). A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
21
|
*/
|
|
22
22
|
export function byokUpdate(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
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.5.
|
|
53
|
+
readonly sdkVersion: "1.5.78";
|
|
54
54
|
readonly genVersion: "2.950.13";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.78 2.950.13 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.5.
|
|
32
|
+
sdkVersion: "1.5.78",
|
|
33
33
|
genVersion: "2.950.13",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.78 2.950.13 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
package/esm/models/byokkey.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const BYOKKeyDeclaredRegion: {
|
|
|
17
17
|
export type BYOKKeyDeclaredRegion = OpenEnum<typeof BYOKKeyDeclaredRegion>;
|
|
18
18
|
export type BYOKKey = {
|
|
19
19
|
/**
|
|
20
|
-
* Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction.
|
|
20
|
+
* Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. A workspace-scoped management key can only name API keys in its own workspace.
|
|
21
21
|
*/
|
|
22
22
|
allowedApiKeyHashes: Array<string> | null;
|
|
23
23
|
/**
|
|
@@ -15,7 +15,7 @@ export declare const CreateBYOKKeyRequestDeclaredRegion: {
|
|
|
15
15
|
export type CreateBYOKKeyRequestDeclaredRegion = OpenEnum<typeof CreateBYOKKeyRequestDeclaredRegion>;
|
|
16
16
|
export type CreateBYOKKeyRequest = {
|
|
17
17
|
/**
|
|
18
|
-
* Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400.
|
|
18
|
+
* Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace.
|
|
19
19
|
*/
|
|
20
20
|
allowedApiKeyHashes?: Array<string> | null | undefined;
|
|
21
21
|
/**
|
|
@@ -63,7 +63,7 @@ export type CreateBYOKKeyRequest = {
|
|
|
63
63
|
*/
|
|
64
64
|
provider: BYOKProviderSlug;
|
|
65
65
|
/**
|
|
66
|
-
* Optional workspace ID to scope the credential to. When omitted,
|
|
66
|
+
* Optional workspace ID to scope the credential to. When omitted, a workspace-scoped management key creates it in its own workspace. An organization management key creates it in the account's default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly.
|
|
67
67
|
*/
|
|
68
68
|
workspaceId?: string | undefined;
|
|
69
69
|
};
|
|
@@ -186,7 +186,7 @@ export type ListBYOKKeysRequest = {
|
|
|
186
186
|
*/
|
|
187
187
|
limit?: number | undefined;
|
|
188
188
|
/**
|
|
189
|
-
* Optional workspace ID to filter by. When omitted,
|
|
189
|
+
* Optional workspace ID to filter by. When omitted, a workspace-scoped management key uses its own workspace. An organization management key uses the account’s default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly.
|
|
190
190
|
*/
|
|
191
191
|
workspaceId?: string | undefined;
|
|
192
192
|
/**
|
|
@@ -8,6 +8,7 @@ export declare const ReasoningFormat: {
|
|
|
8
8
|
readonly BedrockXaiResponsesV1: "bedrock-xai-responses-v1";
|
|
9
9
|
readonly XaiResponsesV1: "xai-responses-v1";
|
|
10
10
|
readonly MetaResponsesV1: "meta-responses-v1";
|
|
11
|
+
readonly GoogleVertexResponsesV1: "google-vertex-responses-v1";
|
|
11
12
|
readonly OpenrouterStealthV1: "openrouter-stealth-v1";
|
|
12
13
|
readonly AnthropicClaudeV1: "anthropic-claude-v1";
|
|
13
14
|
readonly GoogleGeminiV1: "google-gemini-v1";
|
|
@@ -11,6 +11,7 @@ export const ReasoningFormat = {
|
|
|
11
11
|
BedrockXaiResponsesV1: "bedrock-xai-responses-v1",
|
|
12
12
|
XaiResponsesV1: "xai-responses-v1",
|
|
13
13
|
MetaResponsesV1: "meta-responses-v1",
|
|
14
|
+
GoogleVertexResponsesV1: "google-vertex-responses-v1",
|
|
14
15
|
OpenrouterStealthV1: "openrouter-stealth-v1",
|
|
15
16
|
AnthropicClaudeV1: "anthropic-claude-v1",
|
|
16
17
|
GoogleGeminiV1: "google-gemini-v1",
|
|
@@ -14,7 +14,7 @@ export declare const UpdateBYOKKeyRequestDeclaredRegion: {
|
|
|
14
14
|
export type UpdateBYOKKeyRequestDeclaredRegion = OpenEnum<typeof UpdateBYOKKeyRequestDeclaredRegion>;
|
|
15
15
|
export type UpdateBYOKKeyRequest = {
|
|
16
16
|
/**
|
|
17
|
-
* Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400.
|
|
17
|
+
* Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace.
|
|
18
18
|
*/
|
|
19
19
|
allowedApiKeyHashes?: Array<string> | null | undefined;
|
|
20
20
|
/**
|
package/esm/sdk/byok.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare class BYOK extends ClientSDK {
|
|
|
7
7
|
* List BYOK provider credentials
|
|
8
8
|
*
|
|
9
9
|
* @remarks
|
|
10
|
-
* List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
10
|
+
* List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace, or a workspace-scoped management key's own workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. A workspace-scoped management key can only list its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
11
11
|
*/
|
|
12
12
|
list(request?: operations.ListBYOKKeysRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.ListBYOKKeysResponse, {
|
|
13
13
|
offset: number;
|
|
@@ -16,28 +16,28 @@ export declare class BYOK extends ClientSDK {
|
|
|
16
16
|
* Create a BYOK provider credential
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
|
-
* Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. Treat the raw key as write-only; it is never returned after creation. Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
19
|
+
* Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. A workspace-scoped management key creates the credential in its own workspace when `workspace_id` is omitted, and any other `workspace_id` returns 403. Treat the raw key as write-only; it is never returned after creation. Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
20
20
|
*/
|
|
21
21
|
create(request: operations.CreateBYOKKeyRequest, options?: RequestOptions): Promise<models.CreateBYOKKeyResponse>;
|
|
22
22
|
/**
|
|
23
23
|
* Delete a BYOK provider credential
|
|
24
24
|
*
|
|
25
25
|
* @remarks
|
|
26
|
-
* Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
26
|
+
* Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
27
27
|
*/
|
|
28
28
|
delete(request: operations.DeleteBYOKKeyRequest, options?: RequestOptions): Promise<models.DeleteBYOKKeyResponse>;
|
|
29
29
|
/**
|
|
30
30
|
* Get a BYOK provider credential
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
33
|
+
* Get a single bring-your-own-key (BYOK) provider credential by its `id`. A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
34
34
|
*/
|
|
35
35
|
get(request: operations.GetBYOKKeyRequest, options?: RequestOptions): Promise<models.GetBYOKKeyResponse>;
|
|
36
36
|
/**
|
|
37
37
|
* Update a BYOK provider credential
|
|
38
38
|
*
|
|
39
39
|
* @remarks
|
|
40
|
-
* Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys (`null` clears the restriction). [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
40
|
+
* Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys (`null` clears the restriction). A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
41
41
|
*/
|
|
42
42
|
update(request: operations.UpdateBYOKKeyRequest, options?: RequestOptions): Promise<models.UpdateBYOKKeyResponse>;
|
|
43
43
|
}
|
package/esm/sdk/byok.js
CHANGED
|
@@ -15,7 +15,7 @@ export class BYOK extends ClientSDK {
|
|
|
15
15
|
* List BYOK provider credentials
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
* List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
18
|
+
* List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace, or a workspace-scoped management key's own workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. A workspace-scoped management key can only list its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
19
19
|
*/
|
|
20
20
|
async list(request, options) {
|
|
21
21
|
return unwrapResultIterator(byokList(this, request, options));
|
|
@@ -24,7 +24,7 @@ export class BYOK extends ClientSDK {
|
|
|
24
24
|
* Create a BYOK provider credential
|
|
25
25
|
*
|
|
26
26
|
* @remarks
|
|
27
|
-
* Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. Treat the raw key as write-only; it is never returned after creation. Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
27
|
+
* Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. A workspace-scoped management key creates the credential in its own workspace when `workspace_id` is omitted, and any other `workspace_id` returns 403. Treat the raw key as write-only; it is never returned after creation. Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
28
28
|
*/
|
|
29
29
|
async create(request, options) {
|
|
30
30
|
return unwrapAsync(byokCreate(this, request, options));
|
|
@@ -33,7 +33,7 @@ export class BYOK extends ClientSDK {
|
|
|
33
33
|
* Delete a BYOK provider credential
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
|
-
* Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
36
|
+
* Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
37
37
|
*/
|
|
38
38
|
async delete(request, options) {
|
|
39
39
|
return unwrapAsync(byokDelete(this, request, options));
|
|
@@ -42,7 +42,7 @@ export class BYOK extends ClientSDK {
|
|
|
42
42
|
* Get a BYOK provider credential
|
|
43
43
|
*
|
|
44
44
|
* @remarks
|
|
45
|
-
* Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
45
|
+
* Get a single bring-your-own-key (BYOK) provider credential by its `id`. A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
46
46
|
*/
|
|
47
47
|
async get(request, options) {
|
|
48
48
|
return unwrapAsync(byokGet(this, request, options));
|
|
@@ -51,7 +51,7 @@ export class BYOK extends ClientSDK {
|
|
|
51
51
|
* Update a BYOK provider credential
|
|
52
52
|
*
|
|
53
53
|
* @remarks
|
|
54
|
-
* Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys (`null` clears the restriction). [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
54
|
+
* Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). Use `allowed_api_key_hashes` to restrict the credential to specific OpenRouter API keys (`null` clears the restriction). A workspace-scoped management key only reaches credentials in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
55
55
|
*/
|
|
56
56
|
async update(request, options) {
|
|
57
57
|
return unwrapAsync(byokUpdate(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.5.
|
|
3
|
+
"version": "1.5.78",
|
|
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
|
-
"test:e2e": "vitest --run --project e2e",
|
|
77
|
-
"test:transit": "exit 0",
|
|
78
|
-
"test:watch": "vitest --watch --project unit",
|
|
79
76
|
"typecheck:transit": "exit 0",
|
|
80
77
|
"postinstall": "node scripts/check-types.js || true",
|
|
78
|
+
"prepare": "npm run build",
|
|
81
79
|
"test": "vitest --run --project unit",
|
|
82
|
-
"
|
|
80
|
+
"test:e2e": "vitest --run --project e2e",
|
|
81
|
+
"test:watch": "vitest --watch --project unit",
|
|
83
82
|
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
84
|
-
"
|
|
83
|
+
"test:transit": "exit 0",
|
|
84
|
+
"typecheck": "tsc --noEmit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|