@openrouter/sdk 1.5.43 → 1.5.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.
Files changed (34) hide show
  1. package/esm/funcs/providersListProviderEndpoints.d.ts +19 -0
  2. package/esm/funcs/providersListProviderEndpoints.js +108 -0
  3. package/esm/lib/config.d.ts +2 -2
  4. package/esm/lib/config.js +2 -2
  5. package/esm/models/endpointsummary.d.ts +65 -0
  6. package/esm/models/endpointsummary.js +48 -0
  7. package/esm/models/endpointtestprofile.d.ts +271 -0
  8. package/esm/models/endpointtestprofile.js +252 -0
  9. package/esm/models/extractions.d.ts +16 -0
  10. package/esm/models/extractions.js +23 -0
  11. package/esm/models/index.d.ts +8 -0
  12. package/esm/models/index.js +8 -0
  13. package/esm/models/operations/gettaskclassifications.d.ts +4 -4
  14. package/esm/models/operations/gettaskclassifications.js +3 -3
  15. package/esm/models/operations/index.d.ts +1 -0
  16. package/esm/models/operations/index.js +1 -0
  17. package/esm/models/operations/listproviderendpoints.d.ts +106 -0
  18. package/esm/models/operations/listproviderendpoints.js +55 -0
  19. package/esm/models/perflast30mbyworkload.d.ts +2 -0
  20. package/esm/models/perflast30mbyworkload.js +2 -0
  21. package/esm/models/providerendpoints.d.ts +34 -0
  22. package/esm/models/providerendpoints.js +32 -0
  23. package/esm/models/providerendpointsresponse.d.ts +11 -0
  24. package/esm/models/providerendpointsresponse.js +15 -0
  25. package/esm/models/providerendpointstats.d.ts +11 -0
  26. package/esm/models/providerendpointstats.js +17 -0
  27. package/esm/models/providerendpointstatsavailable.d.ts +66 -0
  28. package/esm/models/providerendpointstatsavailable.js +51 -0
  29. package/esm/models/providerendpointstatsunavailable.d.ts +10 -0
  30. package/esm/models/providerendpointstatsunavailable.js +14 -0
  31. package/esm/sdk/providers.d.ts +8 -0
  32. package/esm/sdk/providers.js +10 -0
  33. package/jsr.json +1 -1
  34. package/package.json +6 -6
@@ -0,0 +1,252 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: ed343fe8be16
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 openEnums from "../types/enums.js";
9
+ /**
10
+ * Reasoning return mechanism the endpoint uses when neither its features nor the model set one
11
+ */
12
+ export const DefaultReasoningReturnMechanism = {
13
+ ContentString: "content-string",
14
+ ReasoningContent: "reasoning-content",
15
+ Reasoning: "reasoning",
16
+ None: "none",
17
+ };
18
+ /**
19
+ * How leading instruction (developer/system) messages are mapped before reaching a chat-completions provider. 'developer' keeps the developer role, 'system' downgrades developer to system, 'user-only' downgrades both to a wrapped user message. Overridable per-endpoint.
20
+ */
21
+ export const InstructionRoleSupport = {
22
+ Developer: "developer",
23
+ System: "system",
24
+ UserOnly: "user-only",
25
+ };
26
+ export const FeaturesDefaultReasoningEffort = {
27
+ Max: "max",
28
+ Xhigh: "xhigh",
29
+ High: "high",
30
+ Medium: "medium",
31
+ Low: "low",
32
+ Minimal: "minimal",
33
+ };
34
+ /**
35
+ * Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
36
+ */
37
+ export const FeaturesReasoningReturnMechanism = {
38
+ ContentString: "content-string",
39
+ ReasoningContent: "reasoning-content",
40
+ Reasoning: "reasoning",
41
+ None: "none",
42
+ };
43
+ export const FeaturesSupportedReasoningEffort = {
44
+ Max: "max",
45
+ Xhigh: "xhigh",
46
+ High: "high",
47
+ Medium: "medium",
48
+ Low: "low",
49
+ Minimal: "minimal",
50
+ };
51
+ export const RequiredInputModality = {
52
+ Text: "text",
53
+ Image: "image",
54
+ Audio: "audio",
55
+ Video: "video",
56
+ };
57
+ export const EndpointTestProfileInputModality = {
58
+ Text: "text",
59
+ Image: "image",
60
+ File: "file",
61
+ Audio: "audio",
62
+ Video: "video",
63
+ };
64
+ export const EndpointTestProfileOutputModality = {
65
+ Text: "text",
66
+ Image: "image",
67
+ Embeddings: "embeddings",
68
+ Audio: "audio",
69
+ Video: "video",
70
+ Rerank: "rerank",
71
+ Decisions: "decisions",
72
+ Speech: "speech",
73
+ Transcription: "transcription",
74
+ };
75
+ export const DefaultReasoningEffort = {
76
+ Max: "max",
77
+ Xhigh: "xhigh",
78
+ High: "high",
79
+ Medium: "medium",
80
+ Low: "low",
81
+ Minimal: "minimal",
82
+ };
83
+ /**
84
+ * Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
85
+ */
86
+ export const ReasoningReturnMechanism = {
87
+ ContentString: "content-string",
88
+ ReasoningContent: "reasoning-content",
89
+ Reasoning: "reasoning",
90
+ None: "none",
91
+ };
92
+ export const SupportedReasoningEffort = {
93
+ Max: "max",
94
+ Xhigh: "xhigh",
95
+ High: "high",
96
+ Medium: "medium",
97
+ Low: "low",
98
+ Minimal: "minimal",
99
+ };
100
+ /** @internal */
101
+ export const DefaultReasoningReturnMechanism$inboundSchema = openEnums.inboundSchema(DefaultReasoningReturnMechanism);
102
+ /** @internal */
103
+ export const InstructionRoleSupport$inboundSchema = openEnums.inboundSchema(InstructionRoleSupport);
104
+ /** @internal */
105
+ export const ChatTemplateConfig$inboundSchema = z.object({
106
+ instruction_role_support: z.nullable(InstructionRoleSupport$inboundSchema)
107
+ .optional(),
108
+ should_hoist_and_merge_system_messages: z.nullable(z.boolean()).optional(),
109
+ supports_mid_session_system: z.nullable(z.boolean()).optional(),
110
+ }).transform((v) => {
111
+ return remap$(v, {
112
+ "instruction_role_support": "instructionRoleSupport",
113
+ "should_hoist_and_merge_system_messages": "shouldHoistAndMergeSystemMessages",
114
+ "supports_mid_session_system": "supportsMidSessionSystem",
115
+ });
116
+ });
117
+ export function chatTemplateConfigFromJSON(jsonString) {
118
+ return safeParse(jsonString, (x) => ChatTemplateConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatTemplateConfig' from JSON`);
119
+ }
120
+ /** @internal */
121
+ export const FeaturesDefaultReasoningEffort$inboundSchema = openEnums.inboundSchema(FeaturesDefaultReasoningEffort);
122
+ /** @internal */
123
+ export const FeaturesReasoningReturnMechanism$inboundSchema = openEnums.inboundSchema(FeaturesReasoningReturnMechanism);
124
+ /** @internal */
125
+ export const FeaturesSupportedReasoningEffort$inboundSchema = openEnums.inboundSchema(FeaturesSupportedReasoningEffort);
126
+ /** @internal */
127
+ export const FeaturesReasoningConfig$inboundSchema = z.object({
128
+ default_reasoning_effort: z.nullable(FeaturesDefaultReasoningEffort$inboundSchema).optional(),
129
+ default_reasoning_enabled: z.nullable(z.boolean()).optional(),
130
+ end_token: z.nullable(z.string()).optional(),
131
+ is_mandatory_reasoning: z.nullable(z.boolean()).optional(),
132
+ reasoning_return_mechanism: z.nullable(FeaturesReasoningReturnMechanism$inboundSchema).optional(),
133
+ start_token: z.nullable(z.string()).optional(),
134
+ supported_reasoning_efforts: z.nullable(z.array(FeaturesSupportedReasoningEffort$inboundSchema)).optional(),
135
+ supports_reasoning_effort: z.nullable(z.boolean()).optional(),
136
+ supports_reasoning_max_tokens: z.nullable(z.boolean()).optional(),
137
+ system_prompt: z.nullable(z.string()).optional(),
138
+ }).transform((v) => {
139
+ return remap$(v, {
140
+ "default_reasoning_effort": "defaultReasoningEffort",
141
+ "default_reasoning_enabled": "defaultReasoningEnabled",
142
+ "end_token": "endToken",
143
+ "is_mandatory_reasoning": "isMandatoryReasoning",
144
+ "reasoning_return_mechanism": "reasoningReturnMechanism",
145
+ "start_token": "startToken",
146
+ "supported_reasoning_efforts": "supportedReasoningEfforts",
147
+ "supports_reasoning_effort": "supportsReasoningEffort",
148
+ "supports_reasoning_max_tokens": "supportsReasoningMaxTokens",
149
+ "system_prompt": "systemPrompt",
150
+ });
151
+ });
152
+ export function featuresReasoningConfigFromJSON(jsonString) {
153
+ return safeParse(jsonString, (x) => FeaturesReasoningConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FeaturesReasoningConfig' from JSON`);
154
+ }
155
+ /** @internal */
156
+ export const RequiredInputModality$inboundSchema = openEnums.inboundSchema(RequiredInputModality);
157
+ /** @internal */
158
+ export const Features$inboundSchema = z.object({
159
+ chat_template_config: z.nullable(z.lazy(() => ChatTemplateConfig$inboundSchema)).optional(),
160
+ reasoning_config: z.nullable(z.lazy(() => FeaturesReasoningConfig$inboundSchema)).optional(),
161
+ required_input_modalities: z.nullable(z.array(RequiredInputModality$inboundSchema)).optional(),
162
+ }).transform((v) => {
163
+ return remap$(v, {
164
+ "chat_template_config": "chatTemplateConfig",
165
+ "reasoning_config": "reasoningConfig",
166
+ "required_input_modalities": "requiredInputModalities",
167
+ });
168
+ });
169
+ export function featuresFromJSON(jsonString) {
170
+ return safeParse(jsonString, (x) => Features$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Features' from JSON`);
171
+ }
172
+ /** @internal */
173
+ export const EndpointTestProfileInputModality$inboundSchema = openEnums.inboundSchema(EndpointTestProfileInputModality);
174
+ /** @internal */
175
+ export const EndpointTestProfileOutputModality$inboundSchema = openEnums.inboundSchema(EndpointTestProfileOutputModality);
176
+ /** @internal */
177
+ export const DefaultReasoningEffort$inboundSchema = openEnums.inboundSchema(DefaultReasoningEffort);
178
+ /** @internal */
179
+ export const ReasoningReturnMechanism$inboundSchema = openEnums.inboundSchema(ReasoningReturnMechanism);
180
+ /** @internal */
181
+ export const SupportedReasoningEffort$inboundSchema = openEnums.inboundSchema(SupportedReasoningEffort);
182
+ /** @internal */
183
+ export const EndpointTestProfileReasoningConfig$inboundSchema = z.object({
184
+ default_reasoning_effort: z.nullable(DefaultReasoningEffort$inboundSchema)
185
+ .optional(),
186
+ default_reasoning_enabled: z.nullable(z.boolean()).optional(),
187
+ end_token: z.nullable(z.string()).optional(),
188
+ is_mandatory_reasoning: z.nullable(z.boolean()).optional(),
189
+ reasoning_return_mechanism: z.nullable(ReasoningReturnMechanism$inboundSchema)
190
+ .optional(),
191
+ start_token: z.nullable(z.string()).optional(),
192
+ supported_reasoning_efforts: z.nullable(z.array(SupportedReasoningEffort$inboundSchema)).optional(),
193
+ supports_reasoning_effort: z.nullable(z.boolean()).optional(),
194
+ supports_reasoning_max_tokens: z.nullable(z.boolean()).optional(),
195
+ system_prompt: z.nullable(z.string()).optional(),
196
+ }).transform((v) => {
197
+ return remap$(v, {
198
+ "default_reasoning_effort": "defaultReasoningEffort",
199
+ "default_reasoning_enabled": "defaultReasoningEnabled",
200
+ "end_token": "endToken",
201
+ "is_mandatory_reasoning": "isMandatoryReasoning",
202
+ "reasoning_return_mechanism": "reasoningReturnMechanism",
203
+ "start_token": "startToken",
204
+ "supported_reasoning_efforts": "supportedReasoningEfforts",
205
+ "supports_reasoning_effort": "supportsReasoningEffort",
206
+ "supports_reasoning_max_tokens": "supportsReasoningMaxTokens",
207
+ "system_prompt": "systemPrompt",
208
+ });
209
+ });
210
+ export function endpointTestProfileReasoningConfigFromJSON(jsonString) {
211
+ return safeParse(jsonString, (x) => EndpointTestProfileReasoningConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndpointTestProfileReasoningConfig' from JSON`);
212
+ }
213
+ /** @internal */
214
+ export const EndpointTestProfileModel$inboundSchema = z.object({
215
+ features: z.nullable(z.lazy(() => Features$inboundSchema)),
216
+ input_modalities: z.array(EndpointTestProfileInputModality$inboundSchema),
217
+ output_modalities: z.array(EndpointTestProfileOutputModality$inboundSchema),
218
+ reasoning_config: z.nullable(z.lazy(() => EndpointTestProfileReasoningConfig$inboundSchema)),
219
+ slug: z.string(),
220
+ supports_reasoning: z.boolean(),
221
+ }).transform((v) => {
222
+ return remap$(v, {
223
+ "input_modalities": "inputModalities",
224
+ "output_modalities": "outputModalities",
225
+ "reasoning_config": "reasoningConfig",
226
+ "supports_reasoning": "supportsReasoning",
227
+ });
228
+ });
229
+ export function endpointTestProfileModelFromJSON(jsonString) {
230
+ return safeParse(jsonString, (x) => EndpointTestProfileModel$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndpointTestProfileModel' from JSON`);
231
+ }
232
+ /** @internal */
233
+ export const EndpointTestProfile$inboundSchema = z.object({
234
+ context_length: z.nullable(z.int()),
235
+ default_reasoning_return_mechanism: z.nullable(DefaultReasoningReturnMechanism$inboundSchema),
236
+ effective_adapter_name: z.nullable(z.string()),
237
+ endpoint_features: z.nullable(z.record(z.string(), z.any())),
238
+ is_lab_trusted: z.boolean(),
239
+ model: z.lazy(() => EndpointTestProfileModel$inboundSchema),
240
+ }).transform((v) => {
241
+ return remap$(v, {
242
+ "context_length": "contextLength",
243
+ "default_reasoning_return_mechanism": "defaultReasoningReturnMechanism",
244
+ "effective_adapter_name": "effectiveAdapterName",
245
+ "endpoint_features": "endpointFeatures",
246
+ "is_lab_trusted": "isLabTrusted",
247
+ });
248
+ });
249
+ export function endpointTestProfileFromJSON(jsonString) {
250
+ return safeParse(jsonString, (x) => EndpointTestProfile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndpointTestProfile' from JSON`);
251
+ }
252
+ //# sourceMappingURL=endpointtestprofile.js.map
@@ -0,0 +1,16 @@
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 { PercentileStats } from "./percentilestats.js";
5
+ export type Extractions = {
6
+ latency: PercentileStats | null;
7
+ /**
8
+ * Total requests admitted for this workload in the window.
9
+ */
10
+ requestCount: number | null;
11
+ throughput: PercentileStats | null;
12
+ };
13
+ /** @internal */
14
+ export declare const Extractions$inboundSchema: z.ZodType<Extractions, unknown>;
15
+ export declare function extractionsFromJSON(jsonString: string): SafeParseResult<Extractions, SDKValidationError>;
16
+ //# sourceMappingURL=extractions.d.ts.map
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b8db9219ea90
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 { PercentileStats$inboundSchema, } from "./percentilestats.js";
9
+ /** @internal */
10
+ export const Extractions$inboundSchema = z
11
+ .object({
12
+ latency: z.nullable(PercentileStats$inboundSchema),
13
+ request_count: z.nullable(z.int()),
14
+ throughput: z.nullable(PercentileStats$inboundSchema),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ "request_count": "requestCount",
18
+ });
19
+ });
20
+ export function extractionsFromJSON(jsonString) {
21
+ return safeParse(jsonString, (x) => Extractions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Extractions' from JSON`);
22
+ }
23
+ //# sourceMappingURL=extractions.js.map
@@ -330,6 +330,8 @@ export * from "./embeddings.js";
330
330
  export * from "./endpointinfo.js";
331
331
  export * from "./endpointsmetadata.js";
332
332
  export * from "./endpointstatus.js";
333
+ export * from "./endpointsummary.js";
334
+ export * from "./endpointtestprofile.js";
333
335
  export * from "./enumcapability.js";
334
336
  export * from "./errorevent.js";
335
337
  export * from "./externaluser.js";
@@ -350,6 +352,7 @@ export * from "./extractionlistanswer.js";
350
352
  export * from "./extractionlistfield.js";
351
353
  export * from "./extractionnumberanswer.js";
352
354
  export * from "./extractionnumberfield.js";
355
+ export * from "./extractions.js";
353
356
  export * from "./extractionsrequest.js";
354
357
  export * from "./extractionsresponse.js";
355
358
  export * from "./extractionsusage.js";
@@ -669,6 +672,11 @@ export * from "./privateprovider.js";
669
672
  export * from "./promptcachebreakpoint.js";
670
673
  export * from "./promptcacheoptions.js";
671
674
  export * from "./promptinjectionscanscope.js";
675
+ export * from "./providerendpoints.js";
676
+ export * from "./providerendpointsresponse.js";
677
+ export * from "./providerendpointstats.js";
678
+ export * from "./providerendpointstatsavailable.js";
679
+ export * from "./providerendpointstatsunavailable.js";
672
680
  export * from "./providername.js";
673
681
  export * from "./provideroptions.js";
674
682
  export * from "./provideroverloadedresponseerrordata.js";
@@ -334,6 +334,8 @@ export * from "./embeddings.js";
334
334
  export * from "./endpointinfo.js";
335
335
  export * from "./endpointsmetadata.js";
336
336
  export * from "./endpointstatus.js";
337
+ export * from "./endpointsummary.js";
338
+ export * from "./endpointtestprofile.js";
337
339
  export * from "./enumcapability.js";
338
340
  export * from "./errorevent.js";
339
341
  export * from "./externaluser.js";
@@ -354,6 +356,7 @@ export * from "./extractionlistanswer.js";
354
356
  export * from "./extractionlistfield.js";
355
357
  export * from "./extractionnumberanswer.js";
356
358
  export * from "./extractionnumberfield.js";
359
+ export * from "./extractions.js";
357
360
  export * from "./extractionsrequest.js";
358
361
  export * from "./extractionsresponse.js";
359
362
  export * from "./extractionsusage.js";
@@ -673,6 +676,11 @@ export * from "./privateprovider.js";
673
676
  export * from "./promptcachebreakpoint.js";
674
677
  export * from "./promptcacheoptions.js";
675
678
  export * from "./promptinjectionscanscope.js";
679
+ export * from "./providerendpoints.js";
680
+ export * from "./providerendpointsresponse.js";
681
+ export * from "./providerendpointstats.js";
682
+ export * from "./providerendpointstatsavailable.js";
683
+ export * from "./providerendpointstatsunavailable.js";
676
684
  export * from "./providername.js";
677
685
  export * from "./provideroptions.js";
678
686
  export * from "./provideroverloadedresponseerrordata.js";
@@ -24,13 +24,13 @@ export type GetTaskClassificationsGlobals = {
24
24
  /**
25
25
  * Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported.
26
26
  */
27
- export declare const Window: {
27
+ export declare const GetTaskClassificationsWindow: {
28
28
  readonly Sevend: "7d";
29
29
  };
30
30
  /**
31
31
  * Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported.
32
32
  */
33
- export type Window = ClosedEnum<typeof Window>;
33
+ export type GetTaskClassificationsWindow = ClosedEnum<typeof GetTaskClassificationsWindow>;
34
34
  export type GetTaskClassificationsRequest = {
35
35
  /**
36
36
  * The app identifier should be your app's URL and is used as the primary identifier for rankings.
@@ -54,10 +54,10 @@ export type GetTaskClassificationsRequest = {
54
54
  /**
55
55
  * Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported.
56
56
  */
57
- window?: Window | undefined;
57
+ window?: GetTaskClassificationsWindow | undefined;
58
58
  };
59
59
  /** @internal */
60
- export declare const Window$outboundSchema: z.ZodEnum<typeof Window>;
60
+ export declare const GetTaskClassificationsWindow$outboundSchema: z.ZodEnum<typeof GetTaskClassificationsWindow>;
61
61
  /** @internal */
62
62
  export type GetTaskClassificationsRequest$Outbound = {
63
63
  "HTTP-Referer"?: string | undefined;
@@ -7,17 +7,17 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  /**
8
8
  * Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported.
9
9
  */
10
- export const Window = {
10
+ export const GetTaskClassificationsWindow = {
11
11
  Sevend: "7d",
12
12
  };
13
13
  /** @internal */
14
- export const Window$outboundSchema = z.enum(Window);
14
+ export const GetTaskClassificationsWindow$outboundSchema = z.enum(GetTaskClassificationsWindow);
15
15
  /** @internal */
16
16
  export const GetTaskClassificationsRequest$outboundSchema = z.object({
17
17
  httpReferer: z.string().optional(),
18
18
  appTitle: z.string().optional(),
19
19
  appCategories: z.string().optional(),
20
- window: Window$outboundSchema.default("7d"),
20
+ window: GetTaskClassificationsWindow$outboundSchema.default("7d"),
21
21
  }).transform((v) => {
22
22
  return remap$(v, {
23
23
  httpReferer: "HTTP-Referer",
@@ -112,6 +112,7 @@ export * from "./listpresets.js";
112
112
  export * from "./listpresetversions.js";
113
113
  export * from "./listprivateendpoints.js";
114
114
  export * from "./listprivateproviders.js";
115
+ export * from "./listproviderendpoints.js";
115
116
  export * from "./listproviders.js";
116
117
  export * from "./listscimgroupmappings.js";
117
118
  export * from "./listscimgroups.js";
@@ -116,6 +116,7 @@ export * from "./listpresets.js";
116
116
  export * from "./listpresetversions.js";
117
117
  export * from "./listprivateendpoints.js";
118
118
  export * from "./listprivateproviders.js";
119
+ export * from "./listproviderendpoints.js";
119
120
  export * from "./listproviders.js";
120
121
  export * from "./listscimgroupmappings.js";
121
122
  export * from "./listscimgroups.js";
@@ -0,0 +1,106 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../../types/enums.js";
3
+ export type ListProviderEndpointsGlobals = {
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
+ /**
25
+ * Time window the provider-wide stats cover
26
+ */
27
+ export declare const ListProviderEndpointsWindow: {
28
+ readonly Onehr: "1hr";
29
+ readonly Oned: "1d";
30
+ readonly Onew: "1w";
31
+ readonly Onemo: "1mo";
32
+ readonly Oney: "1y";
33
+ };
34
+ /**
35
+ * Time window the provider-wide stats cover
36
+ */
37
+ export type ListProviderEndpointsWindow = OpenEnum<typeof ListProviderEndpointsWindow>;
38
+ /**
39
+ * Workload the latency and throughput stats measure; defaults to the workload most of the endpoints serve
40
+ */
41
+ export declare const PerfWorkload: {
42
+ readonly TextGeneration: "text_generation";
43
+ readonly ImageGeneration: "image_generation";
44
+ readonly VideoGeneration: "video_generation";
45
+ readonly Embeddings: "embeddings";
46
+ readonly Rerank: "rerank";
47
+ readonly TTS: "tts";
48
+ readonly STT: "stt";
49
+ readonly Decisions: "decisions";
50
+ readonly Extractions: "extractions";
51
+ readonly Unknown: "unknown";
52
+ };
53
+ /**
54
+ * Workload the latency and throughput stats measure; defaults to the workload most of the endpoints serve
55
+ */
56
+ export type PerfWorkload = OpenEnum<typeof PerfWorkload>;
57
+ export type ListProviderEndpointsRequest = {
58
+ /**
59
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
60
+ *
61
+ * @remarks
62
+ * This is used to track API usage per application.
63
+ */
64
+ httpReferer?: string | undefined;
65
+ /**
66
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
67
+ *
68
+ * @remarks
69
+ */
70
+ appTitle?: string | undefined;
71
+ /**
72
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
73
+ *
74
+ * @remarks
75
+ */
76
+ appCategories?: string | undefined;
77
+ /**
78
+ * URL-friendly provider identifier (e.g. "openai", "fireworks")
79
+ */
80
+ providerSlug: string;
81
+ /**
82
+ * Time window the provider-wide stats cover
83
+ */
84
+ window?: ListProviderEndpointsWindow | undefined;
85
+ /**
86
+ * Workload the latency and throughput stats measure; defaults to the workload most of the endpoints serve
87
+ */
88
+ perfWorkload?: PerfWorkload | undefined;
89
+ };
90
+ /** @internal */
91
+ export declare const ListProviderEndpointsWindow$outboundSchema: z.ZodType<string, ListProviderEndpointsWindow>;
92
+ /** @internal */
93
+ export declare const PerfWorkload$outboundSchema: z.ZodType<string, PerfWorkload>;
94
+ /** @internal */
95
+ export type ListProviderEndpointsRequest$Outbound = {
96
+ "HTTP-Referer"?: string | undefined;
97
+ appTitle?: string | undefined;
98
+ appCategories?: string | undefined;
99
+ provider_slug: string;
100
+ window: string;
101
+ perf_workload?: string | undefined;
102
+ };
103
+ /** @internal */
104
+ export declare const ListProviderEndpointsRequest$outboundSchema: z.ZodType<ListProviderEndpointsRequest$Outbound, ListProviderEndpointsRequest>;
105
+ export declare function listProviderEndpointsRequestToJSON(listProviderEndpointsRequest: ListProviderEndpointsRequest): string;
106
+ //# sourceMappingURL=listproviderendpoints.d.ts.map
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 11ea9fe75522
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import * as openEnums from "../../types/enums.js";
8
+ /**
9
+ * Time window the provider-wide stats cover
10
+ */
11
+ export const ListProviderEndpointsWindow = {
12
+ Onehr: "1hr",
13
+ Oned: "1d",
14
+ Onew: "1w",
15
+ Onemo: "1mo",
16
+ Oney: "1y",
17
+ };
18
+ /**
19
+ * Workload the latency and throughput stats measure; defaults to the workload most of the endpoints serve
20
+ */
21
+ export const PerfWorkload = {
22
+ TextGeneration: "text_generation",
23
+ ImageGeneration: "image_generation",
24
+ VideoGeneration: "video_generation",
25
+ Embeddings: "embeddings",
26
+ Rerank: "rerank",
27
+ TTS: "tts",
28
+ STT: "stt",
29
+ Decisions: "decisions",
30
+ Extractions: "extractions",
31
+ Unknown: "unknown",
32
+ };
33
+ /** @internal */
34
+ export const ListProviderEndpointsWindow$outboundSchema = openEnums.outboundSchema(ListProviderEndpointsWindow);
35
+ /** @internal */
36
+ export const PerfWorkload$outboundSchema = openEnums.outboundSchema(PerfWorkload);
37
+ /** @internal */
38
+ export const ListProviderEndpointsRequest$outboundSchema = z.object({
39
+ httpReferer: z.string().optional(),
40
+ appTitle: z.string().optional(),
41
+ appCategories: z.string().optional(),
42
+ providerSlug: z.string(),
43
+ window: ListProviderEndpointsWindow$outboundSchema.default("1mo"),
44
+ perfWorkload: PerfWorkload$outboundSchema.optional(),
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ httpReferer: "HTTP-Referer",
48
+ providerSlug: "provider_slug",
49
+ perfWorkload: "perf_workload",
50
+ });
51
+ });
52
+ export function listProviderEndpointsRequestToJSON(listProviderEndpointsRequest) {
53
+ return JSON.stringify(ListProviderEndpointsRequest$outboundSchema.parse(listProviderEndpointsRequest));
54
+ }
55
+ //# sourceMappingURL=listproviderendpoints.js.map
@@ -3,6 +3,7 @@ import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { Decisions } from "./decisions.js";
4
4
  import { Embeddings } from "./embeddings.js";
5
5
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
6
+ import { Extractions } from "./extractions.js";
6
7
  import { ImageGeneration } from "./imagegeneration.js";
7
8
  import { Rerank } from "./rerank.js";
8
9
  import { STT } from "./stt.js";
@@ -16,6 +17,7 @@ import { VideoGeneration } from "./videogeneration.js";
16
17
  export type PerfLast30mByWorkload = {
17
18
  decisions?: Decisions | undefined;
18
19
  embeddings?: Embeddings | undefined;
20
+ extractions?: Extractions | undefined;
19
21
  imageGeneration?: ImageGeneration | undefined;
20
22
  rerank?: Rerank | undefined;
21
23
  stt?: STT | undefined;
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { safeParse } from "../lib/schemas.js";
8
8
  import { Decisions$inboundSchema } from "./decisions.js";
9
9
  import { Embeddings$inboundSchema } from "./embeddings.js";
10
+ import { Extractions$inboundSchema } from "./extractions.js";
10
11
  import { ImageGeneration$inboundSchema, } from "./imagegeneration.js";
11
12
  import { Rerank$inboundSchema } from "./rerank.js";
12
13
  import { STT$inboundSchema } from "./stt.js";
@@ -18,6 +19,7 @@ import { VideoGeneration$inboundSchema, } from "./videogeneration.js";
18
19
  export const PerfLast30mByWorkload$inboundSchema = z.object({
19
20
  decisions: Decisions$inboundSchema.optional(),
20
21
  embeddings: Embeddings$inboundSchema.optional(),
22
+ extractions: Extractions$inboundSchema.optional(),
21
23
  image_generation: ImageGeneration$inboundSchema.optional(),
22
24
  rerank: Rerank$inboundSchema.optional(),
23
25
  stt: STT$inboundSchema.optional(),
@@ -0,0 +1,34 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { EndpointSummary } from "./endpointsummary.js";
5
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
6
+ import { ProviderEndpointStats } from "./providerendpointstats.js";
7
+ /**
8
+ * Time window the provider-wide stats cover
9
+ */
10
+ export declare const Window: {
11
+ readonly Onehr: "1hr";
12
+ readonly Oned: "1d";
13
+ readonly Onew: "1w";
14
+ readonly Onemo: "1mo";
15
+ readonly Oney: "1y";
16
+ };
17
+ /**
18
+ * Time window the provider-wide stats cover
19
+ */
20
+ export type Window = OpenEnum<typeof Window>;
21
+ export type ProviderEndpoints = {
22
+ endpoints: Array<EndpointSummary>;
23
+ stats: ProviderEndpointStats;
24
+ /**
25
+ * Time window the provider-wide stats cover
26
+ */
27
+ window: Window;
28
+ };
29
+ /** @internal */
30
+ export declare const Window$inboundSchema: z.ZodType<Window, unknown>;
31
+ /** @internal */
32
+ export declare const ProviderEndpoints$inboundSchema: z.ZodType<ProviderEndpoints, unknown>;
33
+ export declare function providerEndpointsFromJSON(jsonString: string): SafeParseResult<ProviderEndpoints, SDKValidationError>;
34
+ //# sourceMappingURL=providerendpoints.d.ts.map