@openrouter/sdk 1.5.19 → 1.5.21

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 (62) hide show
  1. package/esm/funcs/privateEndpointsUpdate.d.ts +2 -2
  2. package/esm/funcs/privateEndpointsUpdate.js +2 -2
  3. package/esm/funcs/privateEndpointsUpdateParameters.d.ts +4 -2
  4. package/esm/funcs/privateEndpointsUpdateParameters.js +4 -2
  5. package/esm/funcs/privateEndpointsUpdatePricing.d.ts +4 -2
  6. package/esm/funcs/privateEndpointsUpdatePricing.js +4 -2
  7. package/esm/funcs/privateProvidersCreate.d.ts +18 -0
  8. package/esm/funcs/privateProvidersCreate.js +99 -0
  9. package/esm/funcs/privateProvidersDelete.d.ts +18 -0
  10. package/esm/funcs/privateProvidersDelete.js +102 -0
  11. package/esm/funcs/privateProvidersGet.d.ts +18 -0
  12. package/esm/funcs/privateProvidersGet.js +102 -0
  13. package/esm/funcs/privateProvidersList.d.ts +18 -0
  14. package/esm/funcs/privateProvidersList.js +96 -0
  15. package/esm/funcs/privateProvidersUpdate.d.ts +18 -0
  16. package/esm/funcs/privateProvidersUpdate.js +105 -0
  17. package/esm/lib/config.d.ts +3 -3
  18. package/esm/lib/config.js +3 -3
  19. package/esm/models/createprivateendpointrequest.d.ts +6 -0
  20. package/esm/models/createprivateendpointrequest.js +2 -0
  21. package/esm/models/createprivateproviderrequest.d.ts +36 -0
  22. package/esm/models/createprivateproviderrequest.js +25 -0
  23. package/esm/models/index.d.ts +8 -0
  24. package/esm/models/index.js +8 -0
  25. package/esm/models/operations/createprivateprovider.d.ts +67 -0
  26. package/esm/models/operations/createprivateprovider.js +31 -0
  27. package/esm/models/operations/deleteprivateprovider.d.ts +75 -0
  28. package/esm/models/operations/deleteprivateprovider.js +36 -0
  29. package/esm/models/operations/getprivateprovider.d.ts +67 -0
  30. package/esm/models/operations/getprivateprovider.js +30 -0
  31. package/esm/models/operations/index.d.ts +5 -0
  32. package/esm/models/operations/index.js +5 -0
  33. package/esm/models/operations/listprivateproviders.d.ts +65 -0
  34. package/esm/models/operations/listprivateproviders.js +29 -0
  35. package/esm/models/operations/updateprivateprovider.d.ts +69 -0
  36. package/esm/models/operations/updateprivateprovider.js +32 -0
  37. package/esm/models/privateendpoint.d.ts +5 -0
  38. package/esm/models/privateendpoint.js +2 -0
  39. package/esm/models/privateendpointquantization.d.ts +28 -0
  40. package/esm/models/privateendpointquantization.js +27 -0
  41. package/esm/models/privateendpointreasoningreturnmechanism.d.ts +20 -0
  42. package/esm/models/privateendpointreasoningreturnmechanism.js +19 -0
  43. package/esm/models/privateendpointsettings.d.ts +142 -0
  44. package/esm/models/privateendpointsettings.js +112 -0
  45. package/esm/models/privateprovider.d.ts +50 -0
  46. package/esm/models/privateprovider.js +41 -0
  47. package/esm/models/privateproviderdatapolicy.d.ts +28 -0
  48. package/esm/models/privateproviderdatapolicy.js +21 -0
  49. package/esm/models/updateprivateendpointrequest.d.ts +17 -2
  50. package/esm/models/updateprivateendpointrequest.js +9 -1
  51. package/esm/models/updateprivateendpointsettingsrequest.d.ts +177 -0
  52. package/esm/models/updateprivateendpointsettingsrequest.js +111 -0
  53. package/esm/models/updateprivateproviderrequest.d.ts +42 -0
  54. package/esm/models/updateprivateproviderrequest.js +36 -0
  55. package/esm/sdk/privateendpoints.d.ts +10 -6
  56. package/esm/sdk/privateendpoints.js +10 -6
  57. package/esm/sdk/privateproviders.d.ts +40 -0
  58. package/esm/sdk/privateproviders.js +59 -0
  59. package/esm/sdk/sdk.d.ts +3 -0
  60. package/esm/sdk/sdk.js +4 -0
  61. package/jsr.json +1 -1
  62. package/package.json +7 -7
@@ -0,0 +1,105 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: adcecc581856
4
+ */
5
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ConflictResponseError$inboundSchema as errors_ConflictResponseError$inboundSchema } from "../models/errors/conflictresponseerror.js"; 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 { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js"; import { UnprocessableEntityResponseError$inboundSchema as errors_UnprocessableEntityResponseError$inboundSchema } from "../models/errors/unprocessableentityresponseerror.js";
13
+ import { UpdatePrivateProviderRequest$outboundSchema as operations_UpdatePrivateProviderRequest$outboundSchema, UpdatePrivateProviderResponse$inboundSchema as operations_UpdatePrivateProviderResponse$inboundSchema } from "../models/operations/updateprivateprovider.js";
14
+ import { APIPromise } from "../types/async.js";
15
+ /**
16
+ * Update a private provider
17
+ *
18
+ * @remarks
19
+ * Update a private provider’s details or declared data policy. The name and slug cannot change. Refuses (409) a data-policy change while OpenRouter pins the declared policy on one of its endpoints. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ */
21
+ export function privateProvidersUpdate(client, request, options) {
22
+ return new APIPromise($do(client, request, options));
23
+ }
24
+ async function $do(client, request, options) {
25
+ const parsed = safeParse(request, (value) => operations_UpdatePrivateProviderRequest$outboundSchema.parse(value), "Input validation failed");
26
+ if (!parsed.ok) {
27
+ return [parsed, { status: "invalid" }];
28
+ }
29
+ const payload = parsed.value;
30
+ const body = encodeJSON("body", payload.UpdatePrivateProviderRequest, {
31
+ explode: true,
32
+ });
33
+ const pathParams = {
34
+ slug: encodeSimple("slug", payload.slug, {
35
+ explode: false,
36
+ charEncoding: "percent",
37
+ }),
38
+ };
39
+ const path = pathToFunc("/private-providers/{slug}")(pathParams);
40
+ const headers = new Headers(compactMap({
41
+ "Content-Type": "application/json",
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 secConfig = await extractSecurity(client._options.apiKey);
48
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
49
+ const requestSecurity = resolveGlobalSecurity(securityInput);
50
+ const context = {
51
+ options: client._options,
52
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
53
+ operationID: "updatePrivateProvider",
54
+ oAuth2Scopes: null,
55
+ resolvedSecurity: requestSecurity,
56
+ securitySource: client._options.apiKey,
57
+ retryConfig: options?.retries
58
+ || client._options.retryConfig
59
+ || {
60
+ strategy: "backoff",
61
+ backoff: {
62
+ initialInterval: 500,
63
+ maxInterval: 60000,
64
+ exponent: 1.5,
65
+ maxElapsedTime: 3600000,
66
+ },
67
+ retryConnectionErrors: true,
68
+ }
69
+ || { strategy: "none" },
70
+ retryCodes: options?.retryCodes || ["5XX"],
71
+ };
72
+ const requestRes = client._createRequest(context, {
73
+ security: requestSecurity,
74
+ method: "PATCH",
75
+ baseURL: options?.serverURL,
76
+ path: path,
77
+ headers: headers,
78
+ body: body,
79
+ userAgent: client._options.userAgent,
80
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
81
+ }, options);
82
+ if (!requestRes.ok) {
83
+ return [requestRes, { status: "invalid" }];
84
+ }
85
+ const req = requestRes.value;
86
+ const doResult = await client._do(req, {
87
+ context,
88
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
89
+ retryConfig: context.retryConfig,
90
+ retryCodes: context.retryCodes,
91
+ });
92
+ if (!doResult.ok) {
93
+ return [doResult, { status: "request-error", request: req }];
94
+ }
95
+ const response = doResult.value;
96
+ const responseFields = {
97
+ HttpMeta: { Response: response, Request: req },
98
+ };
99
+ const [result] = await M.match(M.json(200, operations_UpdatePrivateProviderResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(409, errors_ConflictResponseError$inboundSchema), M.jsonErr(422, errors_UnprocessableEntityResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
100
+ if (!result.ok) {
101
+ return [result, { status: "complete", request: req, response }];
102
+ }
103
+ return [result, { status: "complete", request: req, response }];
104
+ }
105
+ //# sourceMappingURL=privateProvidersUpdate.js.map
@@ -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.19";
54
- readonly genVersion: "2.948.4";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.19 2.948.4 1.0.0 @openrouter/sdk";
53
+ readonly sdkVersion: "1.5.21";
54
+ readonly genVersion: "2.950.13";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.21 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.19",
33
- genVersion: "2.948.4",
34
- userAgent: "speakeasy-sdk/typescript 1.5.19 2.948.4 1.0.0 @openrouter/sdk",
32
+ sdkVersion: "1.5.21",
33
+ genVersion: "2.950.13",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.21 2.950.13 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -3,6 +3,7 @@ import { OpenEnum } from "../types/enums.js";
3
3
  import { PrivateEndpointActivation, PrivateEndpointActivation$Outbound } from "./privateendpointactivation.js";
4
4
  import { PrivateEndpointDeclaredParameter } from "./privateendpointdeclaredparameter.js";
5
5
  import { PrivateEndpointPricing, PrivateEndpointPricing$Outbound } from "./privateendpointpricing.js";
6
+ import { UpdatePrivateEndpointSettingsRequest, UpdatePrivateEndpointSettingsRequest$Outbound } from "./updateprivateendpointsettingsrequest.js";
6
7
  /**
7
8
  * Attest where this deployment processes data.
8
9
  */
@@ -52,6 +53,10 @@ export type CreatePrivateEndpointRequest = {
52
53
  * Slug of the upstream provider.
53
54
  */
54
55
  providerSlug: string;
56
+ /**
57
+ * Capabilities and limits to set over the ones copied from the public endpoint for this model and provider (or from the model). Omitted fields keep the copied values.
58
+ */
59
+ settings?: UpdatePrivateEndpointSettingsRequest | undefined;
55
60
  /**
56
61
  * Model or deployment identifier sent to the upstream provider.
57
62
  */
@@ -70,6 +75,7 @@ export type CreatePrivateEndpointRequest$Outbound = {
70
75
  model_permaslug: string;
71
76
  pricing?: PrivateEndpointPricing$Outbound | undefined;
72
77
  provider_slug: string;
78
+ settings?: UpdatePrivateEndpointSettingsRequest$Outbound | undefined;
73
79
  upstream_model_id: string;
74
80
  };
75
81
  /** @internal */
@@ -8,6 +8,7 @@ import * as openEnums from "../types/enums.js";
8
8
  import { PrivateEndpointActivation$outboundSchema, } from "./privateendpointactivation.js";
9
9
  import { PrivateEndpointDeclaredParameter$outboundSchema, } from "./privateendpointdeclaredparameter.js";
10
10
  import { PrivateEndpointPricing$outboundSchema, } from "./privateendpointpricing.js";
11
+ import { UpdatePrivateEndpointSettingsRequest$outboundSchema, } from "./updateprivateendpointsettingsrequest.js";
11
12
  /**
12
13
  * Attest where this deployment processes data.
13
14
  */
@@ -31,6 +32,7 @@ export const CreatePrivateEndpointRequest$outboundSchema = z.object({
31
32
  modelPermaslug: z.string(),
32
33
  pricing: PrivateEndpointPricing$outboundSchema.optional(),
33
34
  providerSlug: z.string(),
35
+ settings: UpdatePrivateEndpointSettingsRequest$outboundSchema.optional(),
34
36
  upstreamModelId: z.string(),
35
37
  }).transform((v) => {
36
38
  return remap$(v, {
@@ -0,0 +1,36 @@
1
+ import * as z from "zod/v4";
2
+ import { PrivateProviderDataPolicy, PrivateProviderDataPolicy$Outbound } from "./privateproviderdatapolicy.js";
3
+ export type CreatePrivateProviderRequest = {
4
+ /**
5
+ * HTTPS base URL of an OpenAI-compatible API, used by private endpoints under this provider that set no URL of their own. Without it, each endpoint must set its own. Private, internal, metadata and OpenRouter hosts are rejected.
6
+ */
7
+ baseUrl?: string | undefined;
8
+ /**
9
+ * Defaults to training on and retaining prompts, the most conservative declaration. Your own declaration; it applies to your own traffic and OpenRouter does not verify it.
10
+ */
11
+ dataPolicy?: PrivateProviderDataPolicy | undefined;
12
+ /**
13
+ * Defaults to `name`.
14
+ */
15
+ displayName?: string | undefined;
16
+ /**
17
+ * Provider name, shown in your activity, logs and Broadcast output. 2-64 letters, numbers, spaces, dots, underscores or hyphens. Cannot be changed later. Neither the name nor its slug may match a public provider name or slug (case-insensitive); other customers may use the same name.
18
+ */
19
+ name: string;
20
+ /**
21
+ * 2-64 lowercase letters and numbers, separated by single hyphens. Cannot be changed later. Defaults to the name lowercased, with every run of other characters replaced by a hyphen (`Acme Inference` becomes `acme-inference`).
22
+ */
23
+ slug?: string | undefined;
24
+ };
25
+ /** @internal */
26
+ export type CreatePrivateProviderRequest$Outbound = {
27
+ base_url?: string | undefined;
28
+ data_policy?: PrivateProviderDataPolicy$Outbound | undefined;
29
+ display_name?: string | undefined;
30
+ name: string;
31
+ slug?: string | undefined;
32
+ };
33
+ /** @internal */
34
+ export declare const CreatePrivateProviderRequest$outboundSchema: z.ZodType<CreatePrivateProviderRequest$Outbound, CreatePrivateProviderRequest>;
35
+ export declare function createPrivateProviderRequestToJSON(createPrivateProviderRequest: CreatePrivateProviderRequest): string;
36
+ //# sourceMappingURL=createprivateproviderrequest.d.ts.map
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: d265ca80a274
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { PrivateProviderDataPolicy$outboundSchema, } from "./privateproviderdatapolicy.js";
8
+ /** @internal */
9
+ export const CreatePrivateProviderRequest$outboundSchema = z.object({
10
+ baseUrl: z.string().optional(),
11
+ dataPolicy: PrivateProviderDataPolicy$outboundSchema.optional(),
12
+ displayName: z.string().optional(),
13
+ name: z.string(),
14
+ slug: z.string().optional(),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ baseUrl: "base_url",
18
+ dataPolicy: "data_policy",
19
+ displayName: "display_name",
20
+ });
21
+ });
22
+ export function createPrivateProviderRequestToJSON(createPrivateProviderRequest) {
23
+ return JSON.stringify(CreatePrivateProviderRequest$outboundSchema.parse(createPrivateProviderRequest));
24
+ }
25
+ //# sourceMappingURL=createprivateproviderrequest.js.map
@@ -278,6 +278,7 @@ export * from "./createobservabilitydestinationresponse.js";
278
278
  export * from "./createpresetfrominferenceresponse.js";
279
279
  export * from "./createprivateendpointrequest.js";
280
280
  export * from "./createprivateendpointvalidationfailedresponseerror.js";
281
+ export * from "./createprivateproviderrequest.js";
281
282
  export * from "./createscimgroupmappingrequest.js";
282
283
  export * from "./createscimgroupmappingresponse.js";
283
284
  export * from "./createscimsyncjobresponse.js";
@@ -618,12 +619,17 @@ export * from "./privateendpointdeclaredparameter.js";
618
619
  export * from "./privateendpointdeclaredregion.js";
619
620
  export * from "./privateendpointparametercheck.js";
620
621
  export * from "./privateendpointpricing.js";
622
+ export * from "./privateendpointquantization.js";
623
+ export * from "./privateendpointreasoningreturnmechanism.js";
621
624
  export * from "./privateendpointresponse.js";
625
+ export * from "./privateendpointsettings.js";
622
626
  export * from "./privateendpointstatus.js";
623
627
  export * from "./privateendpointsummary.js";
624
628
  export * from "./privateendpointvalidation.js";
625
629
  export * from "./privateendpointvalidationnullable.js";
626
630
  export * from "./privateendpointvalidationresponse.js";
631
+ export * from "./privateprovider.js";
632
+ export * from "./privateproviderdatapolicy.js";
627
633
  export * from "./promptcachebreakpoint.js";
628
634
  export * from "./promptcacheoptions.js";
629
635
  export * from "./promptinjectionscanscope.js";
@@ -785,6 +791,8 @@ export * from "./updateorganizationsettingsrequest.js";
785
791
  export * from "./updateprivateendpointparametersrequest.js";
786
792
  export * from "./updateprivateendpointpricingrequest.js";
787
793
  export * from "./updateprivateendpointrequest.js";
794
+ export * from "./updateprivateendpointsettingsrequest.js";
795
+ export * from "./updateprivateproviderrequest.js";
788
796
  export * from "./updatescimgroupmappingrequest.js";
789
797
  export * from "./updatescimgroupmappingresponse.js";
790
798
  export * from "./updateworkspacerequest.js";
@@ -282,6 +282,7 @@ export * from "./createobservabilitydestinationresponse.js";
282
282
  export * from "./createpresetfrominferenceresponse.js";
283
283
  export * from "./createprivateendpointrequest.js";
284
284
  export * from "./createprivateendpointvalidationfailedresponseerror.js";
285
+ export * from "./createprivateproviderrequest.js";
285
286
  export * from "./createscimgroupmappingrequest.js";
286
287
  export * from "./createscimgroupmappingresponse.js";
287
288
  export * from "./createscimsyncjobresponse.js";
@@ -622,12 +623,17 @@ export * from "./privateendpointdeclaredparameter.js";
622
623
  export * from "./privateendpointdeclaredregion.js";
623
624
  export * from "./privateendpointparametercheck.js";
624
625
  export * from "./privateendpointpricing.js";
626
+ export * from "./privateendpointquantization.js";
627
+ export * from "./privateendpointreasoningreturnmechanism.js";
625
628
  export * from "./privateendpointresponse.js";
629
+ export * from "./privateendpointsettings.js";
626
630
  export * from "./privateendpointstatus.js";
627
631
  export * from "./privateendpointsummary.js";
628
632
  export * from "./privateendpointvalidation.js";
629
633
  export * from "./privateendpointvalidationnullable.js";
630
634
  export * from "./privateendpointvalidationresponse.js";
635
+ export * from "./privateprovider.js";
636
+ export * from "./privateproviderdatapolicy.js";
631
637
  export * from "./promptcachebreakpoint.js";
632
638
  export * from "./promptcacheoptions.js";
633
639
  export * from "./promptinjectionscanscope.js";
@@ -789,6 +795,8 @@ export * from "./updateorganizationsettingsrequest.js";
789
795
  export * from "./updateprivateendpointparametersrequest.js";
790
796
  export * from "./updateprivateendpointpricingrequest.js";
791
797
  export * from "./updateprivateendpointrequest.js";
798
+ export * from "./updateprivateendpointsettingsrequest.js";
799
+ export * from "./updateprivateproviderrequest.js";
792
800
  export * from "./updatescimgroupmappingrequest.js";
793
801
  export * from "./updatescimgroupmappingresponse.js";
794
802
  export * from "./updateworkspacerequest.js";
@@ -0,0 +1,67 @@
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 CreatePrivateProviderGlobals = {
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 CreatePrivateProviderRequest = {
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
+ createPrivateProviderRequest: models.CreatePrivateProviderRequest;
47
+ };
48
+ /**
49
+ * The provider was created
50
+ */
51
+ export type CreatePrivateProviderResponse = {
52
+ data: models.PrivateProvider;
53
+ };
54
+ /** @internal */
55
+ export type CreatePrivateProviderRequest$Outbound = {
56
+ "HTTP-Referer"?: string | undefined;
57
+ appTitle?: string | undefined;
58
+ appCategories?: string | undefined;
59
+ CreatePrivateProviderRequest: models.CreatePrivateProviderRequest$Outbound;
60
+ };
61
+ /** @internal */
62
+ export declare const CreatePrivateProviderRequest$outboundSchema: z.ZodType<CreatePrivateProviderRequest$Outbound, CreatePrivateProviderRequest>;
63
+ export declare function createPrivateProviderRequestToJSON(createPrivateProviderRequest: CreatePrivateProviderRequest): string;
64
+ /** @internal */
65
+ export declare const CreatePrivateProviderResponse$inboundSchema: z.ZodType<CreatePrivateProviderResponse, unknown>;
66
+ export declare function createPrivateProviderResponseFromJSON(jsonString: string): SafeParseResult<CreatePrivateProviderResponse, SDKValidationError>;
67
+ //# sourceMappingURL=createprivateprovider.d.ts.map
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 123943bb6a3d
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 { CreatePrivateProviderRequest$outboundSchema as models_CreatePrivateProviderRequest$outboundSchema } from "../createprivateproviderrequest.js"; import { PrivateProvider$inboundSchema as models_PrivateProvider$inboundSchema } from "../privateprovider.js";
9
+ /** @internal */
10
+ export const CreatePrivateProviderRequest$outboundSchema = z.object({
11
+ httpReferer: z.string().optional(),
12
+ appTitle: z.string().optional(),
13
+ appCategories: z.string().optional(),
14
+ createPrivateProviderRequest: models_CreatePrivateProviderRequest$outboundSchema,
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ httpReferer: "HTTP-Referer",
18
+ createPrivateProviderRequest: "CreatePrivateProviderRequest",
19
+ });
20
+ });
21
+ export function createPrivateProviderRequestToJSON(createPrivateProviderRequest) {
22
+ return JSON.stringify(CreatePrivateProviderRequest$outboundSchema.parse(createPrivateProviderRequest));
23
+ }
24
+ /** @internal */
25
+ export const CreatePrivateProviderResponse$inboundSchema = z.object({
26
+ data: models_PrivateProvider$inboundSchema,
27
+ });
28
+ export function createPrivateProviderResponseFromJSON(jsonString) {
29
+ return safeParse(jsonString, (x) => CreatePrivateProviderResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreatePrivateProviderResponse' from JSON`);
30
+ }
31
+ //# sourceMappingURL=createprivateprovider.js.map
@@ -0,0 +1,75 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ export type DeletePrivateProviderGlobals = {
5
+ /**
6
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
7
+ *
8
+ * @remarks
9
+ * This is used to track API usage per application.
10
+ */
11
+ httpReferer?: string | undefined;
12
+ /**
13
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
14
+ *
15
+ * @remarks
16
+ */
17
+ appTitle?: string | undefined;
18
+ /**
19
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
20
+ *
21
+ * @remarks
22
+ */
23
+ appCategories?: string | undefined;
24
+ };
25
+ export type DeletePrivateProviderRequest = {
26
+ /**
27
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
28
+ *
29
+ * @remarks
30
+ * This is used to track API usage per application.
31
+ */
32
+ httpReferer?: string | undefined;
33
+ /**
34
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
35
+ *
36
+ * @remarks
37
+ */
38
+ appTitle?: string | undefined;
39
+ /**
40
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
41
+ *
42
+ * @remarks
43
+ */
44
+ appCategories?: string | undefined;
45
+ slug: string;
46
+ };
47
+ export type DeletePrivateProviderData = {
48
+ /**
49
+ * The slug you chose, unique within your account. Use it as `provider_slug` when creating private endpoints and BYOK keys, and in `provider.order`, `only` and `ignore`.
50
+ */
51
+ slug: string;
52
+ };
53
+ /**
54
+ * The provider was deleted
55
+ */
56
+ export type DeletePrivateProviderResponse = {
57
+ data: DeletePrivateProviderData;
58
+ };
59
+ /** @internal */
60
+ export type DeletePrivateProviderRequest$Outbound = {
61
+ "HTTP-Referer"?: string | undefined;
62
+ appTitle?: string | undefined;
63
+ appCategories?: string | undefined;
64
+ slug: string;
65
+ };
66
+ /** @internal */
67
+ export declare const DeletePrivateProviderRequest$outboundSchema: z.ZodType<DeletePrivateProviderRequest$Outbound, DeletePrivateProviderRequest>;
68
+ export declare function deletePrivateProviderRequestToJSON(deletePrivateProviderRequest: DeletePrivateProviderRequest): string;
69
+ /** @internal */
70
+ export declare const DeletePrivateProviderData$inboundSchema: z.ZodType<DeletePrivateProviderData, unknown>;
71
+ export declare function deletePrivateProviderDataFromJSON(jsonString: string): SafeParseResult<DeletePrivateProviderData, SDKValidationError>;
72
+ /** @internal */
73
+ export declare const DeletePrivateProviderResponse$inboundSchema: z.ZodType<DeletePrivateProviderResponse, unknown>;
74
+ export declare function deletePrivateProviderResponseFromJSON(jsonString: string): SafeParseResult<DeletePrivateProviderResponse, SDKValidationError>;
75
+ //# sourceMappingURL=deleteprivateprovider.d.ts.map
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 3eecb5081a0e
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
+ /** @internal */
9
+ export const DeletePrivateProviderRequest$outboundSchema = z.object({
10
+ httpReferer: z.string().optional(),
11
+ appTitle: z.string().optional(),
12
+ appCategories: z.string().optional(),
13
+ slug: z.string(),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ httpReferer: "HTTP-Referer",
17
+ });
18
+ });
19
+ export function deletePrivateProviderRequestToJSON(deletePrivateProviderRequest) {
20
+ return JSON.stringify(DeletePrivateProviderRequest$outboundSchema.parse(deletePrivateProviderRequest));
21
+ }
22
+ /** @internal */
23
+ export const DeletePrivateProviderData$inboundSchema = z.object({
24
+ slug: z.string(),
25
+ });
26
+ export function deletePrivateProviderDataFromJSON(jsonString) {
27
+ return safeParse(jsonString, (x) => DeletePrivateProviderData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeletePrivateProviderData' from JSON`);
28
+ }
29
+ /** @internal */
30
+ export const DeletePrivateProviderResponse$inboundSchema = z.object({
31
+ data: z.lazy(() => DeletePrivateProviderData$inboundSchema),
32
+ });
33
+ export function deletePrivateProviderResponseFromJSON(jsonString) {
34
+ return safeParse(jsonString, (x) => DeletePrivateProviderResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeletePrivateProviderResponse' from JSON`);
35
+ }
36
+ //# sourceMappingURL=deleteprivateprovider.js.map
@@ -0,0 +1,67 @@
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 GetPrivateProviderGlobals = {
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 GetPrivateProviderRequest = {
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
+ slug: string;
47
+ };
48
+ /**
49
+ * The private provider
50
+ */
51
+ export type GetPrivateProviderResponse = {
52
+ data: models.PrivateProvider;
53
+ };
54
+ /** @internal */
55
+ export type GetPrivateProviderRequest$Outbound = {
56
+ "HTTP-Referer"?: string | undefined;
57
+ appTitle?: string | undefined;
58
+ appCategories?: string | undefined;
59
+ slug: string;
60
+ };
61
+ /** @internal */
62
+ export declare const GetPrivateProviderRequest$outboundSchema: z.ZodType<GetPrivateProviderRequest$Outbound, GetPrivateProviderRequest>;
63
+ export declare function getPrivateProviderRequestToJSON(getPrivateProviderRequest: GetPrivateProviderRequest): string;
64
+ /** @internal */
65
+ export declare const GetPrivateProviderResponse$inboundSchema: z.ZodType<GetPrivateProviderResponse, unknown>;
66
+ export declare function getPrivateProviderResponseFromJSON(jsonString: string): SafeParseResult<GetPrivateProviderResponse, SDKValidationError>;
67
+ //# sourceMappingURL=getprivateprovider.d.ts.map
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 128dcc479487
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 { PrivateProvider$inboundSchema as models_PrivateProvider$inboundSchema } from "../privateprovider.js";
9
+ /** @internal */
10
+ export const GetPrivateProviderRequest$outboundSchema = z.object({
11
+ httpReferer: z.string().optional(),
12
+ appTitle: z.string().optional(),
13
+ appCategories: z.string().optional(),
14
+ slug: z.string(),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ httpReferer: "HTTP-Referer",
18
+ });
19
+ });
20
+ export function getPrivateProviderRequestToJSON(getPrivateProviderRequest) {
21
+ return JSON.stringify(GetPrivateProviderRequest$outboundSchema.parse(getPrivateProviderRequest));
22
+ }
23
+ /** @internal */
24
+ export const GetPrivateProviderResponse$inboundSchema = z.object({
25
+ data: models_PrivateProvider$inboundSchema,
26
+ });
27
+ export function getPrivateProviderResponseFromJSON(jsonString) {
28
+ return safeParse(jsonString, (x) => GetPrivateProviderResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetPrivateProviderResponse' from JSON`);
29
+ }
30
+ //# sourceMappingURL=getprivateprovider.js.map