@openrouter/sdk 1.5.24 → 1.5.26

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 (70) hide show
  1. package/esm/funcs/alphaExtractionsCreate.d.ts +19 -0
  2. package/esm/funcs/alphaExtractionsCreate.js +105 -0
  3. package/esm/lib/config.d.ts +2 -2
  4. package/esm/lib/config.js +2 -2
  5. package/esm/models/decisionsresponse.d.ts +3 -3
  6. package/esm/models/decisionsresponse.js +3 -3
  7. package/esm/models/extractiondateanswer.d.ts +46 -0
  8. package/esm/models/extractiondateanswer.js +37 -0
  9. package/esm/models/extractiondatefield.d.ts +22 -0
  10. package/esm/models/extractiondatefield.js +20 -0
  11. package/esm/models/extractiondatetimeanswer.d.ts +46 -0
  12. package/esm/models/extractiondatetimeanswer.js +37 -0
  13. package/esm/models/extractiondatetimefield.d.ts +22 -0
  14. package/esm/models/extractiondatetimefield.js +20 -0
  15. package/esm/models/extractiondurationanswer.d.ts +50 -0
  16. package/esm/models/extractiondurationanswer.js +38 -0
  17. package/esm/models/extractiondurationfield.d.ts +34 -0
  18. package/esm/models/extractiondurationfield.js +23 -0
  19. package/esm/models/extractionestimateanswer.d.ts +89 -0
  20. package/esm/models/extractionestimateanswer.js +80 -0
  21. package/esm/models/extractionestimatefield.d.ts +70 -0
  22. package/esm/models/extractionestimatefield.js +65 -0
  23. package/esm/models/extractionforecastanswer.d.ts +72 -0
  24. package/esm/models/extractionforecastanswer.js +72 -0
  25. package/esm/models/extractionforecastfield.d.ts +90 -0
  26. package/esm/models/extractionforecastfield.js +80 -0
  27. package/esm/models/extractionforecaststep.d.ts +50 -0
  28. package/esm/models/extractionforecaststep.js +57 -0
  29. package/esm/models/extractionlistanswer.d.ts +51 -0
  30. package/esm/models/extractionlistanswer.js +47 -0
  31. package/esm/models/extractionlistfield.d.ts +38 -0
  32. package/esm/models/extractionlistfield.js +31 -0
  33. package/esm/models/extractionnumberanswer.d.ts +46 -0
  34. package/esm/models/extractionnumberanswer.js +37 -0
  35. package/esm/models/extractionnumberfield.d.ts +31 -0
  36. package/esm/models/extractionnumberfield.js +23 -0
  37. package/esm/models/extractionsrequest.d.ts +75 -0
  38. package/esm/models/extractionsrequest.js +65 -0
  39. package/esm/models/extractionsresponse.d.ts +42 -0
  40. package/esm/models/extractionsresponse.js +61 -0
  41. package/esm/models/extractionsusage.d.ts +19 -0
  42. package/esm/models/extractionsusage.js +29 -0
  43. package/esm/models/extractiontextanswer.d.ts +46 -0
  44. package/esm/models/extractiontextanswer.js +37 -0
  45. package/esm/models/extractiontextfield.d.ts +22 -0
  46. package/esm/models/extractiontextfield.js +20 -0
  47. package/esm/models/extractiontimeanswer.d.ts +46 -0
  48. package/esm/models/extractiontimeanswer.js +37 -0
  49. package/esm/models/extractiontimefield.d.ts +22 -0
  50. package/esm/models/extractiontimefield.js +20 -0
  51. package/esm/models/generationresponse.d.ts +1 -0
  52. package/esm/models/generationresponse.js +1 -0
  53. package/esm/models/imagegenerationproviderpreferences.d.ts +1 -1
  54. package/esm/models/index.d.ts +22 -0
  55. package/esm/models/index.js +22 -0
  56. package/esm/models/operations/createapialphaextractions.d.ts +57 -0
  57. package/esm/models/operations/createapialphaextractions.js +26 -0
  58. package/esm/models/operations/index.d.ts +1 -0
  59. package/esm/models/operations/index.js +1 -0
  60. package/esm/models/provideroptions.d.ts +1 -1
  61. package/esm/models/providerpreferences.d.ts +1 -1
  62. package/esm/models/speechrequest.d.ts +1 -1
  63. package/esm/models/sttrequest.d.ts +1 -1
  64. package/esm/models/videogenerationrequest.d.ts +1 -1
  65. package/esm/sdk/alpha.d.ts +3 -0
  66. package/esm/sdk/alpha.js +4 -0
  67. package/esm/sdk/extractions.d.ts +13 -0
  68. package/esm/sdk/extractions.js +19 -0
  69. package/jsr.json +1 -1
  70. package/package.json +9 -9
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 2c4d0e7507e5
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 { discriminatedUnion } from "../types/discriminatedUnion.js";
9
+ import { ExtractionDateAnswer$inboundSchema, } from "./extractiondateanswer.js";
10
+ import { ExtractionDatetimeAnswer$inboundSchema, } from "./extractiondatetimeanswer.js";
11
+ import { ExtractionDurationAnswer$inboundSchema, } from "./extractiondurationanswer.js";
12
+ import { ExtractionEstimateAnswer$inboundSchema, } from "./extractionestimateanswer.js";
13
+ import { ExtractionForecastAnswer$inboundSchema, } from "./extractionforecastanswer.js";
14
+ import { ExtractionListAnswer$inboundSchema, } from "./extractionlistanswer.js";
15
+ import { ExtractionNumberAnswer$inboundSchema, } from "./extractionnumberanswer.js";
16
+ import { ExtractionsUsage$inboundSchema, } from "./extractionsusage.js";
17
+ import { ExtractionTextAnswer$inboundSchema, } from "./extractiontextanswer.js";
18
+ import { ExtractionTimeAnswer$inboundSchema, } from "./extractiontimeanswer.js";
19
+ /** @internal */
20
+ export const ExtractionsResponseAnswers$inboundSchema = discriminatedUnion("type", {
21
+ date: ExtractionDateAnswer$inboundSchema,
22
+ datetime: ExtractionDatetimeAnswer$inboundSchema,
23
+ duration: ExtractionDurationAnswer$inboundSchema,
24
+ estimate: ExtractionEstimateAnswer$inboundSchema,
25
+ forecast: ExtractionForecastAnswer$inboundSchema,
26
+ list: ExtractionListAnswer$inboundSchema,
27
+ number: ExtractionNumberAnswer$inboundSchema,
28
+ text: ExtractionTextAnswer$inboundSchema,
29
+ time: ExtractionTimeAnswer$inboundSchema,
30
+ });
31
+ export function extractionsResponseAnswersFromJSON(jsonString) {
32
+ return safeParse(jsonString, (x) => ExtractionsResponseAnswers$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionsResponseAnswers' from JSON`);
33
+ }
34
+ /** @internal */
35
+ export const ExtractionsResponse$inboundSchema = z.object({
36
+ answers: z.record(z.string(), discriminatedUnion("type", {
37
+ date: ExtractionDateAnswer$inboundSchema,
38
+ datetime: ExtractionDatetimeAnswer$inboundSchema,
39
+ duration: ExtractionDurationAnswer$inboundSchema,
40
+ estimate: ExtractionEstimateAnswer$inboundSchema,
41
+ forecast: ExtractionForecastAnswer$inboundSchema,
42
+ list: ExtractionListAnswer$inboundSchema,
43
+ number: ExtractionNumberAnswer$inboundSchema,
44
+ text: ExtractionTextAnswer$inboundSchema,
45
+ time: ExtractionTimeAnswer$inboundSchema,
46
+ })),
47
+ id: z.string().optional(),
48
+ model: z.string(),
49
+ provider: z.string().optional(),
50
+ state_text: z.nullable(z.string()).optional(),
51
+ truncated: z.boolean().optional(),
52
+ usage: ExtractionsUsage$inboundSchema,
53
+ }).transform((v) => {
54
+ return remap$(v, {
55
+ "state_text": "stateText",
56
+ });
57
+ });
58
+ export function extractionsResponseFromJSON(jsonString) {
59
+ return safeParse(jsonString, (x) => ExtractionsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionsResponse' from JSON`);
60
+ }
61
+ //# sourceMappingURL=extractionsresponse.js.map
@@ -0,0 +1,19 @@
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 ExtractionsUsage = {
5
+ cost?: number | undefined;
6
+ imageTokens?: number | undefined;
7
+ inputTokens: number;
8
+ outputTokens: number;
9
+ /**
10
+ * Number of upstream passes when the fields did not fit in one.
11
+ */
12
+ passes?: number | undefined;
13
+ schemaTokens?: number | undefined;
14
+ stateTokens?: number | undefined;
15
+ };
16
+ /** @internal */
17
+ export declare const ExtractionsUsage$inboundSchema: z.ZodType<ExtractionsUsage, unknown>;
18
+ export declare function extractionsUsageFromJSON(jsonString: string): SafeParseResult<ExtractionsUsage, SDKValidationError>;
19
+ //# sourceMappingURL=extractionsusage.d.ts.map
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 539fcca69ecb
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 ExtractionsUsage$inboundSchema = z.object({
10
+ cost: z.number().optional(),
11
+ image_tokens: z.int().optional(),
12
+ input_tokens: z.int(),
13
+ output_tokens: z.int(),
14
+ passes: z.int().optional(),
15
+ schema_tokens: z.int().optional(),
16
+ state_tokens: z.int().optional(),
17
+ }).transform((v) => {
18
+ return remap$(v, {
19
+ "image_tokens": "imageTokens",
20
+ "input_tokens": "inputTokens",
21
+ "output_tokens": "outputTokens",
22
+ "schema_tokens": "schemaTokens",
23
+ "state_tokens": "stateTokens",
24
+ });
25
+ });
26
+ export function extractionsUsageFromJSON(jsonString) {
27
+ return safeParse(jsonString, (x) => ExtractionsUsage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionsUsage' from JSON`);
28
+ }
29
+ //# sourceMappingURL=extractionsusage.js.map
@@ -0,0 +1,46 @@
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 { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ /**
6
+ * Set to `image` when the answer was read from an image rather than the state text.
7
+ */
8
+ export declare const ExtractionTextAnswerSource: {
9
+ readonly State: "state";
10
+ readonly Image: "image";
11
+ };
12
+ /**
13
+ * Set to `image` when the answer was read from an image rather than the state text.
14
+ */
15
+ export type ExtractionTextAnswerSource = OpenEnum<typeof ExtractionTextAnswerSource>;
16
+ export type ExtractionTextAnswer = {
17
+ confidence?: number | undefined;
18
+ /**
19
+ * The most likely value even when `value` is null because `p_null` crossed the threshold.
20
+ */
21
+ guess?: string | undefined;
22
+ /**
23
+ * Probability that the state contains nothing for this field.
24
+ */
25
+ pNull?: number | undefined;
26
+ /**
27
+ * Set to `image` when the answer was read from an image rather than the state text.
28
+ */
29
+ source?: ExtractionTextAnswerSource | undefined;
30
+ /**
31
+ * Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once.
32
+ */
33
+ span?: Array<number> | undefined;
34
+ /**
35
+ * Confidence in the spelling of text read from an image.
36
+ */
37
+ spellConfidence?: number | undefined;
38
+ type: "text";
39
+ value: string | null;
40
+ };
41
+ /** @internal */
42
+ export declare const ExtractionTextAnswerSource$inboundSchema: z.ZodType<ExtractionTextAnswerSource, unknown>;
43
+ /** @internal */
44
+ export declare const ExtractionTextAnswer$inboundSchema: z.ZodType<ExtractionTextAnswer, unknown>;
45
+ export declare function extractionTextAnswerFromJSON(jsonString: string): SafeParseResult<ExtractionTextAnswer, SDKValidationError>;
46
+ //# sourceMappingURL=extractiontextanswer.d.ts.map
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 4c006742e2fc
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
+ * Set to `image` when the answer was read from an image rather than the state text.
11
+ */
12
+ export const ExtractionTextAnswerSource = {
13
+ State: "state",
14
+ Image: "image",
15
+ };
16
+ /** @internal */
17
+ export const ExtractionTextAnswerSource$inboundSchema = openEnums.inboundSchema(ExtractionTextAnswerSource);
18
+ /** @internal */
19
+ export const ExtractionTextAnswer$inboundSchema = z.object({
20
+ confidence: z.number().optional(),
21
+ guess: z.string().optional(),
22
+ p_null: z.number().optional(),
23
+ source: ExtractionTextAnswerSource$inboundSchema.optional(),
24
+ span: z.array(z.int()).optional(),
25
+ spell_confidence: z.number().optional(),
26
+ type: z.literal("text"),
27
+ value: z.nullable(z.string()),
28
+ }).transform((v) => {
29
+ return remap$(v, {
30
+ "p_null": "pNull",
31
+ "spell_confidence": "spellConfidence",
32
+ });
33
+ });
34
+ export function extractionTextAnswerFromJSON(jsonString) {
35
+ return safeParse(jsonString, (x) => ExtractionTextAnswer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionTextAnswer' from JSON`);
36
+ }
37
+ //# sourceMappingURL=extractiontextanswer.js.map
@@ -0,0 +1,22 @@
1
+ import * as z from "zod/v4";
2
+ export type ExtractionTextField = {
3
+ /**
4
+ * What the field should contain.
5
+ */
6
+ instructions?: string | undefined;
7
+ /**
8
+ * Probability of null above which `value` is null. Default 0.5.
9
+ */
10
+ nullThreshold?: number | undefined;
11
+ type: "text";
12
+ };
13
+ /** @internal */
14
+ export type ExtractionTextField$Outbound = {
15
+ instructions?: string | undefined;
16
+ null_threshold?: number | undefined;
17
+ type: "text";
18
+ };
19
+ /** @internal */
20
+ export declare const ExtractionTextField$outboundSchema: z.ZodType<ExtractionTextField$Outbound, ExtractionTextField>;
21
+ export declare function extractionTextFieldToJSON(extractionTextField: ExtractionTextField): string;
22
+ //# sourceMappingURL=extractiontextfield.d.ts.map
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 601482d94cbe
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ /** @internal */
8
+ export const ExtractionTextField$outboundSchema = z.object({
9
+ instructions: z.string().optional(),
10
+ nullThreshold: z.number().optional(),
11
+ type: z.literal("text"),
12
+ }).transform((v) => {
13
+ return remap$(v, {
14
+ nullThreshold: "null_threshold",
15
+ });
16
+ });
17
+ export function extractionTextFieldToJSON(extractionTextField) {
18
+ return JSON.stringify(ExtractionTextField$outboundSchema.parse(extractionTextField));
19
+ }
20
+ //# sourceMappingURL=extractiontextfield.js.map
@@ -0,0 +1,46 @@
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 { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ /**
6
+ * Set to `image` when the answer was read from an image rather than the state text.
7
+ */
8
+ export declare const ExtractionTimeAnswerSource: {
9
+ readonly State: "state";
10
+ readonly Image: "image";
11
+ };
12
+ /**
13
+ * Set to `image` when the answer was read from an image rather than the state text.
14
+ */
15
+ export type ExtractionTimeAnswerSource = OpenEnum<typeof ExtractionTimeAnswerSource>;
16
+ export type ExtractionTimeAnswer = {
17
+ confidence?: number | undefined;
18
+ /**
19
+ * The most likely value even when `value` is null because `p_null` crossed the threshold.
20
+ */
21
+ guess?: string | undefined;
22
+ /**
23
+ * Probability that the state contains nothing for this field.
24
+ */
25
+ pNull?: number | undefined;
26
+ /**
27
+ * Set to `image` when the answer was read from an image rather than the state text.
28
+ */
29
+ source?: ExtractionTimeAnswerSource | undefined;
30
+ /**
31
+ * Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once.
32
+ */
33
+ span?: Array<number> | undefined;
34
+ /**
35
+ * Confidence in the spelling of text read from an image.
36
+ */
37
+ spellConfidence?: number | undefined;
38
+ type: "time";
39
+ value: string | null;
40
+ };
41
+ /** @internal */
42
+ export declare const ExtractionTimeAnswerSource$inboundSchema: z.ZodType<ExtractionTimeAnswerSource, unknown>;
43
+ /** @internal */
44
+ export declare const ExtractionTimeAnswer$inboundSchema: z.ZodType<ExtractionTimeAnswer, unknown>;
45
+ export declare function extractionTimeAnswerFromJSON(jsonString: string): SafeParseResult<ExtractionTimeAnswer, SDKValidationError>;
46
+ //# sourceMappingURL=extractiontimeanswer.d.ts.map
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: bf3ef8199855
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
+ * Set to `image` when the answer was read from an image rather than the state text.
11
+ */
12
+ export const ExtractionTimeAnswerSource = {
13
+ State: "state",
14
+ Image: "image",
15
+ };
16
+ /** @internal */
17
+ export const ExtractionTimeAnswerSource$inboundSchema = openEnums.inboundSchema(ExtractionTimeAnswerSource);
18
+ /** @internal */
19
+ export const ExtractionTimeAnswer$inboundSchema = z.object({
20
+ confidence: z.number().optional(),
21
+ guess: z.string().optional(),
22
+ p_null: z.number().optional(),
23
+ source: ExtractionTimeAnswerSource$inboundSchema.optional(),
24
+ span: z.array(z.int()).optional(),
25
+ spell_confidence: z.number().optional(),
26
+ type: z.literal("time"),
27
+ value: z.nullable(z.string()),
28
+ }).transform((v) => {
29
+ return remap$(v, {
30
+ "p_null": "pNull",
31
+ "spell_confidence": "spellConfidence",
32
+ });
33
+ });
34
+ export function extractionTimeAnswerFromJSON(jsonString) {
35
+ return safeParse(jsonString, (x) => ExtractionTimeAnswer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionTimeAnswer' from JSON`);
36
+ }
37
+ //# sourceMappingURL=extractiontimeanswer.js.map
@@ -0,0 +1,22 @@
1
+ import * as z from "zod/v4";
2
+ export type ExtractionTimeField = {
3
+ /**
4
+ * What the field should contain.
5
+ */
6
+ instructions?: string | undefined;
7
+ /**
8
+ * Probability of null above which `value` is null. Default 0.5.
9
+ */
10
+ nullThreshold?: number | undefined;
11
+ type: "time";
12
+ };
13
+ /** @internal */
14
+ export type ExtractionTimeField$Outbound = {
15
+ instructions?: string | undefined;
16
+ null_threshold?: number | undefined;
17
+ type: "time";
18
+ };
19
+ /** @internal */
20
+ export declare const ExtractionTimeField$outboundSchema: z.ZodType<ExtractionTimeField$Outbound, ExtractionTimeField>;
21
+ export declare function extractionTimeFieldToJSON(extractionTimeField: ExtractionTimeField): string;
22
+ //# sourceMappingURL=extractiontimefield.d.ts.map
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 20957cc003d4
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ /** @internal */
8
+ export const ExtractionTimeField$outboundSchema = z.object({
9
+ instructions: z.string().optional(),
10
+ nullThreshold: z.number().optional(),
11
+ type: z.literal("time"),
12
+ }).transform((v) => {
13
+ return remap$(v, {
14
+ nullThreshold: "null_threshold",
15
+ });
16
+ });
17
+ export function extractionTimeFieldToJSON(extractionTimeField) {
18
+ return JSON.stringify(ExtractionTimeField$outboundSchema.parse(extractionTimeField));
19
+ }
20
+ //# sourceMappingURL=extractiontimefield.js.map
@@ -11,6 +11,7 @@ export declare const ApiType: {
11
11
  readonly Embeddings: "embeddings";
12
12
  readonly Rerank: "rerank";
13
13
  readonly Decisions: "decisions";
14
+ readonly Extractions: "extractions";
14
15
  readonly Video: "video";
15
16
  readonly TTS: "tts";
16
17
  readonly STT: "stt";
@@ -15,6 +15,7 @@ export const ApiType = {
15
15
  Embeddings: "embeddings",
16
16
  Rerank: "rerank",
17
17
  Decisions: "decisions",
18
+ Extractions: "extractions",
18
19
  Video: "video",
19
20
  TTS: "tts",
20
21
  STT: "stt",
@@ -5,7 +5,7 @@ import { ProviderSortConfig, ProviderSortConfig$Outbound } from "./providersortc
5
5
  export type ImageGenerationProviderPreferencesIgnore = ProviderName | string;
6
6
  export type ImageGenerationProviderPreferencesOnly = ProviderName | string;
7
7
  /**
8
- * Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
8
+ * Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
9
9
  */
10
10
  export type ImageGenerationProviderPreferencesOptions = {
11
11
  oneai?: {
@@ -331,6 +331,28 @@ export * from "./enumcapability.js";
331
331
  export * from "./errorevent.js";
332
332
  export * from "./externaluser.js";
333
333
  export * from "./externaluserresponse.js";
334
+ export * from "./extractiondateanswer.js";
335
+ export * from "./extractiondatefield.js";
336
+ export * from "./extractiondatetimeanswer.js";
337
+ export * from "./extractiondatetimefield.js";
338
+ export * from "./extractiondurationanswer.js";
339
+ export * from "./extractiondurationfield.js";
340
+ export * from "./extractionestimateanswer.js";
341
+ export * from "./extractionestimatefield.js";
342
+ export * from "./extractionforecastanswer.js";
343
+ export * from "./extractionforecastfield.js";
344
+ export * from "./extractionforecaststep.js";
345
+ export * from "./extractionlistanswer.js";
346
+ export * from "./extractionlistfield.js";
347
+ export * from "./extractionnumberanswer.js";
348
+ export * from "./extractionnumberfield.js";
349
+ export * from "./extractionsrequest.js";
350
+ export * from "./extractionsresponse.js";
351
+ export * from "./extractionsusage.js";
352
+ export * from "./extractiontextanswer.js";
353
+ export * from "./extractiontextfield.js";
354
+ export * from "./extractiontimeanswer.js";
355
+ export * from "./extractiontimefield.js";
334
356
  export * from "./failabletoolcallstatus.js";
335
357
  export * from "./filecitation.js";
336
358
  export * from "./filedeleteresponse.js";
@@ -335,6 +335,28 @@ export * from "./enumcapability.js";
335
335
  export * from "./errorevent.js";
336
336
  export * from "./externaluser.js";
337
337
  export * from "./externaluserresponse.js";
338
+ export * from "./extractiondateanswer.js";
339
+ export * from "./extractiondatefield.js";
340
+ export * from "./extractiondatetimeanswer.js";
341
+ export * from "./extractiondatetimefield.js";
342
+ export * from "./extractiondurationanswer.js";
343
+ export * from "./extractiondurationfield.js";
344
+ export * from "./extractionestimateanswer.js";
345
+ export * from "./extractionestimatefield.js";
346
+ export * from "./extractionforecastanswer.js";
347
+ export * from "./extractionforecastfield.js";
348
+ export * from "./extractionforecaststep.js";
349
+ export * from "./extractionlistanswer.js";
350
+ export * from "./extractionlistfield.js";
351
+ export * from "./extractionnumberanswer.js";
352
+ export * from "./extractionnumberfield.js";
353
+ export * from "./extractionsrequest.js";
354
+ export * from "./extractionsresponse.js";
355
+ export * from "./extractionsusage.js";
356
+ export * from "./extractiontextanswer.js";
357
+ export * from "./extractiontextfield.js";
358
+ export * from "./extractiontimeanswer.js";
359
+ export * from "./extractiontimefield.js";
338
360
  export * from "./failabletoolcallstatus.js";
339
361
  export * from "./filecitation.js";
340
362
  export * from "./filedeleteresponse.js";
@@ -0,0 +1,57 @@
1
+ import * as z from "zod/v4";
2
+ import * as models from "../index.js";
3
+ export declare const CreateApiAlphaExtractionsServerList: readonly ["https://openrouter.ai"];
4
+ export type CreateApiAlphaExtractionsGlobals = {
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 CreateApiAlphaExtractionsRequest = {
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
+ extractionsRequest: models.ExtractionsRequest;
46
+ };
47
+ /** @internal */
48
+ export type CreateApiAlphaExtractionsRequest$Outbound = {
49
+ "HTTP-Referer"?: string | undefined;
50
+ appTitle?: string | undefined;
51
+ appCategories?: string | undefined;
52
+ ExtractionsRequest: models.ExtractionsRequest$Outbound;
53
+ };
54
+ /** @internal */
55
+ export declare const CreateApiAlphaExtractionsRequest$outboundSchema: z.ZodType<CreateApiAlphaExtractionsRequest$Outbound, CreateApiAlphaExtractionsRequest>;
56
+ export declare function createApiAlphaExtractionsRequestToJSON(createApiAlphaExtractionsRequest: CreateApiAlphaExtractionsRequest): string;
57
+ //# sourceMappingURL=createapialphaextractions.d.ts.map
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b3543519030d
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { ExtractionsRequest$outboundSchema as models_ExtractionsRequest$outboundSchema } from "../extractionsrequest.js";
8
+ export const CreateApiAlphaExtractionsServerList = [
9
+ "https://openrouter.ai",
10
+ ];
11
+ /** @internal */
12
+ export const CreateApiAlphaExtractionsRequest$outboundSchema = z.object({
13
+ httpReferer: z.string().optional(),
14
+ appTitle: z.string().optional(),
15
+ appCategories: z.string().optional(),
16
+ extractionsRequest: models_ExtractionsRequest$outboundSchema,
17
+ }).transform((v) => {
18
+ return remap$(v, {
19
+ httpReferer: "HTTP-Referer",
20
+ extractionsRequest: "ExtractionsRequest",
21
+ });
22
+ });
23
+ export function createApiAlphaExtractionsRequestToJSON(createApiAlphaExtractionsRequest) {
24
+ return JSON.stringify(CreateApiAlphaExtractionsRequest$outboundSchema.parse(createApiAlphaExtractionsRequest));
25
+ }
26
+ //# sourceMappingURL=createapialphaextractions.js.map
@@ -7,6 +7,7 @@ export * from "./bulkunassignkeysfromguardrail.js";
7
7
  export * from "./bulkunassignmembersfromguardrail.js";
8
8
  export * from "./copyvaultsecretstointern.js";
9
9
  export * from "./createapialphadecisions.js";
10
+ export * from "./createapialphaextractions.js";
10
11
  export * from "./createaudiospeech.js";
11
12
  export * from "./createaudiotranscriptions.js";
12
13
  export * from "./createaudiotranscriptionsmultipart.js";
@@ -11,6 +11,7 @@ export * from "./bulkunassignkeysfromguardrail.js";
11
11
  export * from "./bulkunassignmembersfromguardrail.js";
12
12
  export * from "./copyvaultsecretstointern.js";
13
13
  export * from "./createapialphadecisions.js";
14
+ export * from "./createapialphaextractions.js";
14
15
  export * from "./createaudiospeech.js";
15
16
  export * from "./createaudiotranscriptions.js";
16
17
  export * from "./createaudiotranscriptionsmultipart.js";
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod/v4";
2
2
  /**
3
- * Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
3
+ * Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
4
4
  */
5
5
  export type ProviderOptions = {
6
6
  oneai?: {
@@ -98,7 +98,7 @@ export type ProviderPreferences = {
98
98
  */
99
99
  only?: Array<ProviderName | string> | null | undefined;
100
100
  /**
101
- * Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
101
+ * Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
102
102
  */
103
103
  options?: ProviderOptions | undefined;
104
104
  /**
@@ -39,7 +39,7 @@ export type SpeechRequestProvider = {
39
39
  */
40
40
  dataCollection?: SpeechRequestDataCollection | null | undefined;
41
41
  /**
42
- * Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
42
+ * Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
43
43
  */
44
44
  options?: ProviderOptions | undefined;
45
45
  /**
@@ -39,7 +39,7 @@ export type STTRequestProvider = {
39
39
  */
40
40
  dataCollection?: STTRequestDataCollection | null | undefined;
41
41
  /**
42
- * Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
42
+ * Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
43
43
  */
44
44
  options?: ProviderOptions | undefined;
45
45
  /**
@@ -22,7 +22,7 @@ export declare const VideoGenerationRequestAspectRatio: {
22
22
  */
23
23
  export type VideoGenerationRequestAspectRatio = OpenEnum<typeof VideoGenerationRequestAspectRatio>;
24
24
  /**
25
- * Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
25
+ * Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
26
26
  */
27
27
  export type VideoGenerationRequestOptions = {
28
28
  oneai?: {
@@ -1,7 +1,10 @@
1
1
  import { ClientSDK } from "../lib/sdks.js";
2
2
  import { Decisions } from "./decisions.js";
3
+ import { Extractions } from "./extractions.js";
3
4
  export declare class Alpha extends ClientSDK {
4
5
  private _decisions?;
5
6
  get decisions(): Decisions;
7
+ private _extractions?;
8
+ get extractions(): Extractions;
6
9
  }
7
10
  //# sourceMappingURL=alpha.d.ts.map
package/esm/sdk/alpha.js CHANGED
@@ -4,9 +4,13 @@
4
4
  */
5
5
  import { ClientSDK } from "../lib/sdks.js";
6
6
  import { Decisions } from "./decisions.js";
7
+ import { Extractions } from "./extractions.js";
7
8
  export class Alpha extends ClientSDK {
8
9
  get decisions() {
9
10
  return (this._decisions ?? (this._decisions = new Decisions(this._options)));
10
11
  }
12
+ get extractions() {
13
+ return (this._extractions ?? (this._extractions = new Extractions(this._options)));
14
+ }
11
15
  }
12
16
  //# sourceMappingURL=alpha.js.map