@openrouter/sdk 1.5.118 → 1.5.120

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 (45) hide show
  1. package/esm/funcs/sttCreateTranscriptionMultipart.js +3 -0
  2. package/esm/funcs/ttsGetModel.d.ts +19 -0
  3. package/esm/funcs/ttsGetModel.js +101 -0
  4. package/esm/funcs/ttsListModels.d.ts +19 -0
  5. package/esm/funcs/ttsListModels.js +91 -0
  6. package/esm/lib/config.d.ts +2 -2
  7. package/esm/lib/config.js +2 -2
  8. package/esm/models/index.d.ts +11 -0
  9. package/esm/models/index.js +11 -0
  10. package/esm/models/operations/createaudiotranscriptionsmultipart.d.ts +5 -0
  11. package/esm/models/operations/createaudiotranscriptionsmultipart.js +1 -0
  12. package/esm/models/operations/getspeechmodel.d.ts +63 -0
  13. package/esm/models/operations/getspeechmodel.js +21 -0
  14. package/esm/models/operations/index.d.ts +2 -0
  15. package/esm/models/operations/index.js +2 -0
  16. package/esm/models/operations/listspeechmodels.d.ts +53 -0
  17. package/esm/models/operations/listspeechmodels.js +19 -0
  18. package/esm/models/speechenumparameter.d.ts +18 -0
  19. package/esm/models/speechenumparameter.js +19 -0
  20. package/esm/models/speechinputmodality.d.ts +89 -0
  21. package/esm/models/speechinputmodality.js +86 -0
  22. package/esm/models/speechmodelendpoint.d.ts +24 -0
  23. package/esm/models/speechmodelendpoint.js +26 -0
  24. package/esm/models/speechmodelresponse.d.ts +31 -0
  25. package/esm/models/speechmodelresponse.js +28 -0
  26. package/esm/models/speechmodelslistresponse.d.ts +14 -0
  27. package/esm/models/speechmodelslistresponse.js +14 -0
  28. package/esm/models/speechoutputmodality.d.ts +19 -0
  29. package/esm/models/speechoutputmodality.js +25 -0
  30. package/esm/models/speechrangeparameter.d.ts +22 -0
  31. package/esm/models/speechrangeparameter.js +20 -0
  32. package/esm/models/speechreferencecount.d.ts +19 -0
  33. package/esm/models/speechreferencecount.js +20 -0
  34. package/esm/models/speechsupportedparameters.d.ts +23 -0
  35. package/esm/models/speechsupportedparameters.js +25 -0
  36. package/esm/models/speechunknownparameter.d.ts +17 -0
  37. package/esm/models/speechunknownparameter.js +18 -0
  38. package/esm/models/speechvoiceparameter.d.ts +38 -0
  39. package/esm/models/speechvoiceparameter.js +30 -0
  40. package/esm/models/sttrequest.d.ts +5 -0
  41. package/esm/models/sttrequest.js +1 -0
  42. package/esm/sdk/tts.d.ts +15 -0
  43. package/esm/sdk/tts.js +20 -0
  44. package/jsr.json +1 -1
  45. package/package.json +7 -7
@@ -0,0 +1,89 @@
1
+ import * as z from "zod/v4";
2
+ import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
+ import { OpenEnum } from "../types/enums.js";
4
+ import { Result as SafeParseResult } from "../types/fp.js";
5
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
6
+ import { SpeechReferenceCount } from "./speechreferencecount.js";
7
+ /**
8
+ * `required`: an image reference is accepted only together with an audio reference. `excluded`: only without one. Absent: either.
9
+ */
10
+ export declare const AudioEnum: {
11
+ readonly Required: "required";
12
+ readonly Excluded: "excluded";
13
+ };
14
+ /**
15
+ * `required`: an image reference is accepted only together with an audio reference. `excluded`: only without one. Absent: either.
16
+ */
17
+ export type AudioEnum = OpenEnum<typeof AudioEnum>;
18
+ export type SupportedInputs2 = {
19
+ /**
20
+ * `required`: an image reference is accepted only together with an audio reference. `excluded`: only without one. Absent: either.
21
+ */
22
+ audio?: AudioEnum | undefined;
23
+ references: SpeechReferenceCount;
24
+ };
25
+ export type SpeechInputModalityImage = {
26
+ supportedInputs: SupportedInputs2;
27
+ type: "image";
28
+ };
29
+ /**
30
+ * `references` is how many audio clips a request may send. With more than one, some providers require the text to address every clip with an `@AudioN` placeholder.
31
+ */
32
+ export type SupportedInputs1 = {
33
+ references: SpeechReferenceCount;
34
+ };
35
+ export type SpeechInputModalityAudio = {
36
+ /**
37
+ * `references` is how many audio clips a request may send. With more than one, some providers require the text to address every clip with an `@AudioN` placeholder.
38
+ */
39
+ supportedInputs: SupportedInputs1;
40
+ type: "audio";
41
+ };
42
+ /**
43
+ * `optional`: `input` may also be a multi-speaker turn array, which cannot be combined with `input_references`. `required`: `input` must be a turn array with at least two distinct voices. Absent: `input` is a string.
44
+ */
45
+ export declare const Turns: {
46
+ readonly Required: "required";
47
+ readonly Optional: "optional";
48
+ };
49
+ /**
50
+ * `optional`: `input` may also be a multi-speaker turn array, which cannot be combined with `input_references`. `required`: `input` must be a turn array with at least two distinct voices. Absent: `input` is a string.
51
+ */
52
+ export type Turns = OpenEnum<typeof Turns>;
53
+ /**
54
+ * The `input` text.
55
+ */
56
+ export type SpeechInputModalityText = {
57
+ /**
58
+ * `optional`: `input` may also be a multi-speaker turn array, which cannot be combined with `input_references`. `required`: `input` must be a turn array with at least two distinct voices. Absent: `input` is a string.
59
+ */
60
+ turns?: Turns | undefined;
61
+ type: "text";
62
+ };
63
+ /**
64
+ * An input the model accepts. `audio` and `image` are `input_references` for voice cloning and voice design.
65
+ */
66
+ export type SpeechInputModality = SpeechInputModalityText | SpeechInputModalityAudio | SpeechInputModalityImage | discriminatedUnionTypes.Unknown<"type">;
67
+ /** @internal */
68
+ export declare const AudioEnum$inboundSchema: z.ZodType<AudioEnum, unknown>;
69
+ /** @internal */
70
+ export declare const SupportedInputs2$inboundSchema: z.ZodType<SupportedInputs2, unknown>;
71
+ export declare function supportedInputs2FromJSON(jsonString: string): SafeParseResult<SupportedInputs2, SDKValidationError>;
72
+ /** @internal */
73
+ export declare const SpeechInputModalityImage$inboundSchema: z.ZodType<SpeechInputModalityImage, unknown>;
74
+ export declare function speechInputModalityImageFromJSON(jsonString: string): SafeParseResult<SpeechInputModalityImage, SDKValidationError>;
75
+ /** @internal */
76
+ export declare const SupportedInputs1$inboundSchema: z.ZodType<SupportedInputs1, unknown>;
77
+ export declare function supportedInputs1FromJSON(jsonString: string): SafeParseResult<SupportedInputs1, SDKValidationError>;
78
+ /** @internal */
79
+ export declare const SpeechInputModalityAudio$inboundSchema: z.ZodType<SpeechInputModalityAudio, unknown>;
80
+ export declare function speechInputModalityAudioFromJSON(jsonString: string): SafeParseResult<SpeechInputModalityAudio, SDKValidationError>;
81
+ /** @internal */
82
+ export declare const Turns$inboundSchema: z.ZodType<Turns, unknown>;
83
+ /** @internal */
84
+ export declare const SpeechInputModalityText$inboundSchema: z.ZodType<SpeechInputModalityText, unknown>;
85
+ export declare function speechInputModalityTextFromJSON(jsonString: string): SafeParseResult<SpeechInputModalityText, SDKValidationError>;
86
+ /** @internal */
87
+ export declare const SpeechInputModality$inboundSchema: z.ZodType<SpeechInputModality, unknown>;
88
+ export declare function speechInputModalityFromJSON(jsonString: string): SafeParseResult<SpeechInputModality, SDKValidationError>;
89
+ //# sourceMappingURL=speechinputmodality.d.ts.map
@@ -0,0 +1,86 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { remap as remap$ } from "../lib/primitives.js";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { discriminatedUnion } from "../types/discriminatedUnion.js";
8
+ import * as openEnums from "../types/enums.js";
9
+ import { SpeechReferenceCount$inboundSchema, } from "./speechreferencecount.js";
10
+ /**
11
+ * `required`: an image reference is accepted only together with an audio reference. `excluded`: only without one. Absent: either.
12
+ */
13
+ export const AudioEnum = {
14
+ Required: "required",
15
+ Excluded: "excluded",
16
+ };
17
+ /**
18
+ * `optional`: `input` may also be a multi-speaker turn array, which cannot be combined with `input_references`. `required`: `input` must be a turn array with at least two distinct voices. Absent: `input` is a string.
19
+ */
20
+ export const Turns = {
21
+ Required: "required",
22
+ Optional: "optional",
23
+ };
24
+ /** @internal */
25
+ export const AudioEnum$inboundSchema = openEnums
26
+ .inboundSchema(AudioEnum);
27
+ /** @internal */
28
+ export const SupportedInputs2$inboundSchema = z.object({
29
+ audio: AudioEnum$inboundSchema.optional(),
30
+ references: SpeechReferenceCount$inboundSchema,
31
+ });
32
+ export function supportedInputs2FromJSON(jsonString) {
33
+ return safeParse(jsonString, (x) => SupportedInputs2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SupportedInputs2' from JSON`);
34
+ }
35
+ /** @internal */
36
+ export const SpeechInputModalityImage$inboundSchema = z.object({
37
+ supported_inputs: z.lazy(() => SupportedInputs2$inboundSchema),
38
+ type: z.literal("image"),
39
+ }).transform((v) => {
40
+ return remap$(v, {
41
+ "supported_inputs": "supportedInputs",
42
+ });
43
+ });
44
+ export function speechInputModalityImageFromJSON(jsonString) {
45
+ return safeParse(jsonString, (x) => SpeechInputModalityImage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechInputModalityImage' from JSON`);
46
+ }
47
+ /** @internal */
48
+ export const SupportedInputs1$inboundSchema = z.object({
49
+ references: SpeechReferenceCount$inboundSchema,
50
+ });
51
+ export function supportedInputs1FromJSON(jsonString) {
52
+ return safeParse(jsonString, (x) => SupportedInputs1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SupportedInputs1' from JSON`);
53
+ }
54
+ /** @internal */
55
+ export const SpeechInputModalityAudio$inboundSchema = z.object({
56
+ supported_inputs: z.lazy(() => SupportedInputs1$inboundSchema),
57
+ type: z.literal("audio"),
58
+ }).transform((v) => {
59
+ return remap$(v, {
60
+ "supported_inputs": "supportedInputs",
61
+ });
62
+ });
63
+ export function speechInputModalityAudioFromJSON(jsonString) {
64
+ return safeParse(jsonString, (x) => SpeechInputModalityAudio$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechInputModalityAudio' from JSON`);
65
+ }
66
+ /** @internal */
67
+ export const Turns$inboundSchema = openEnums
68
+ .inboundSchema(Turns);
69
+ /** @internal */
70
+ export const SpeechInputModalityText$inboundSchema = z.object({
71
+ turns: Turns$inboundSchema.optional(),
72
+ type: z.literal("text"),
73
+ });
74
+ export function speechInputModalityTextFromJSON(jsonString) {
75
+ return safeParse(jsonString, (x) => SpeechInputModalityText$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechInputModalityText' from JSON`);
76
+ }
77
+ /** @internal */
78
+ export const SpeechInputModality$inboundSchema = discriminatedUnion("type", {
79
+ text: z.lazy(() => SpeechInputModalityText$inboundSchema),
80
+ audio: z.lazy(() => SpeechInputModalityAudio$inboundSchema),
81
+ image: z.lazy(() => SpeechInputModalityImage$inboundSchema),
82
+ });
83
+ export function speechInputModalityFromJSON(jsonString) {
84
+ return safeParse(jsonString, (x) => SpeechInputModality$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechInputModality' from JSON`);
85
+ }
86
+ //# sourceMappingURL=speechinputmodality.js.map
@@ -0,0 +1,24 @@
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 { SpeechInputModality } from "./speechinputmodality.js";
5
+ import { SpeechOutputModality } from "./speechoutputmodality.js";
6
+ /**
7
+ * One endpoint serving a speech model, with the inputs and parameters it accepts.
8
+ */
9
+ export type SpeechModelEndpoint = {
10
+ inputModalities: Array<SpeechInputModality>;
11
+ outputModalities: Array<SpeechOutputModality>;
12
+ /**
13
+ * Provider display name
14
+ */
15
+ providerName: string;
16
+ /**
17
+ * Provider slug
18
+ */
19
+ providerSlug: string;
20
+ };
21
+ /** @internal */
22
+ export declare const SpeechModelEndpoint$inboundSchema: z.ZodType<SpeechModelEndpoint, unknown>;
23
+ export declare function speechModelEndpointFromJSON(jsonString: string): SafeParseResult<SpeechModelEndpoint, SDKValidationError>;
24
+ //# sourceMappingURL=speechmodelendpoint.d.ts.map
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { remap as remap$ } from "../lib/primitives.js";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { SpeechInputModality$inboundSchema, } from "./speechinputmodality.js";
8
+ import { SpeechOutputModality$inboundSchema, } from "./speechoutputmodality.js";
9
+ /** @internal */
10
+ export const SpeechModelEndpoint$inboundSchema = z.object({
11
+ input_modalities: z.array(SpeechInputModality$inboundSchema),
12
+ output_modalities: z.array(SpeechOutputModality$inboundSchema),
13
+ provider_name: z.string(),
14
+ provider_slug: z.string(),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ "input_modalities": "inputModalities",
18
+ "output_modalities": "outputModalities",
19
+ "provider_name": "providerName",
20
+ "provider_slug": "providerSlug",
21
+ });
22
+ });
23
+ export function speechModelEndpointFromJSON(jsonString) {
24
+ return safeParse(jsonString, (x) => SpeechModelEndpoint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechModelEndpoint' from JSON`);
25
+ }
26
+ //# sourceMappingURL=speechmodelendpoint.js.map
@@ -0,0 +1,31 @@
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 { SpeechInputModality } from "./speechinputmodality.js";
5
+ import { SpeechModelEndpoint } from "./speechmodelendpoint.js";
6
+ import { SpeechOutputModality } from "./speechoutputmodality.js";
7
+ /**
8
+ * A text-to-speech model. Its members are the envelope of its endpoints': enums are unioned and ranges widened, so a value inside a range may be accepted by no single endpoint. Each record in `endpoints` lists exactly what that endpoint accepts.
9
+ */
10
+ export type SpeechModelResponse = {
11
+ /**
12
+ * Unix timestamp (seconds) of when the model was created
13
+ */
14
+ created: number;
15
+ description: string;
16
+ /**
17
+ * Each endpoint serving the model, with exactly the inputs and parameters it accepts. Some endpoints route only after the caller accepts a provider requirement such as a self-attestation; until then, a request to them is rejected with a 403 that names the requirement.
18
+ */
19
+ endpoints: Array<SpeechModelEndpoint>;
20
+ /**
21
+ * Model slug
22
+ */
23
+ id: string;
24
+ inputModalities: Array<SpeechInputModality>;
25
+ name: string;
26
+ outputModalities: Array<SpeechOutputModality>;
27
+ };
28
+ /** @internal */
29
+ export declare const SpeechModelResponse$inboundSchema: z.ZodType<SpeechModelResponse, unknown>;
30
+ export declare function speechModelResponseFromJSON(jsonString: string): SafeParseResult<SpeechModelResponse, SDKValidationError>;
31
+ //# sourceMappingURL=speechmodelresponse.d.ts.map
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { remap as remap$ } from "../lib/primitives.js";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { SpeechInputModality$inboundSchema, } from "./speechinputmodality.js";
8
+ import { SpeechModelEndpoint$inboundSchema, } from "./speechmodelendpoint.js";
9
+ import { SpeechOutputModality$inboundSchema, } from "./speechoutputmodality.js";
10
+ /** @internal */
11
+ export const SpeechModelResponse$inboundSchema = z.object({
12
+ created: z.int(),
13
+ description: z.string(),
14
+ endpoints: z.array(SpeechModelEndpoint$inboundSchema),
15
+ id: z.string(),
16
+ input_modalities: z.array(SpeechInputModality$inboundSchema),
17
+ name: z.string(),
18
+ output_modalities: z.array(SpeechOutputModality$inboundSchema),
19
+ }).transform((v) => {
20
+ return remap$(v, {
21
+ "input_modalities": "inputModalities",
22
+ "output_modalities": "outputModalities",
23
+ });
24
+ });
25
+ export function speechModelResponseFromJSON(jsonString) {
26
+ return safeParse(jsonString, (x) => SpeechModelResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechModelResponse' from JSON`);
27
+ }
28
+ //# sourceMappingURL=speechmodelresponse.js.map
@@ -0,0 +1,14 @@
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 { SpeechModelResponse } from "./speechmodelresponse.js";
5
+ /**
6
+ * List of text-to-speech models, each with its endpoints.
7
+ */
8
+ export type SpeechModelsListResponse = {
9
+ data: Array<SpeechModelResponse>;
10
+ };
11
+ /** @internal */
12
+ export declare const SpeechModelsListResponse$inboundSchema: z.ZodType<SpeechModelsListResponse, unknown>;
13
+ export declare function speechModelsListResponseFromJSON(jsonString: string): SafeParseResult<SpeechModelsListResponse, SDKValidationError>;
14
+ //# sourceMappingURL=speechmodelslistresponse.d.ts.map
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ import { SpeechModelResponse$inboundSchema, } from "./speechmodelresponse.js";
7
+ /** @internal */
8
+ export const SpeechModelsListResponse$inboundSchema = z.object({
9
+ data: z.array(SpeechModelResponse$inboundSchema),
10
+ });
11
+ export function speechModelsListResponseFromJSON(jsonString) {
12
+ return safeParse(jsonString, (x) => SpeechModelsListResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechModelsListResponse' from JSON`);
13
+ }
14
+ //# sourceMappingURL=speechmodelslistresponse.js.map
@@ -0,0 +1,19 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ import { SpeechSupportedParameters } from "./speechsupportedparameters.js";
6
+ export declare const SpeechOutputModalityType: {
7
+ readonly Speech: "speech";
8
+ };
9
+ export type SpeechOutputModalityType = ClosedEnum<typeof SpeechOutputModalityType>;
10
+ export type SpeechOutputModality = {
11
+ supportedParameters: SpeechSupportedParameters;
12
+ type: SpeechOutputModalityType;
13
+ };
14
+ /** @internal */
15
+ export declare const SpeechOutputModalityType$inboundSchema: z.ZodEnum<typeof SpeechOutputModalityType>;
16
+ /** @internal */
17
+ export declare const SpeechOutputModality$inboundSchema: z.ZodType<SpeechOutputModality, unknown>;
18
+ export declare function speechOutputModalityFromJSON(jsonString: string): SafeParseResult<SpeechOutputModality, SDKValidationError>;
19
+ //# sourceMappingURL=speechoutputmodality.d.ts.map
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { remap as remap$ } from "../lib/primitives.js";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { SpeechSupportedParameters$inboundSchema, } from "./speechsupportedparameters.js";
8
+ export const SpeechOutputModalityType = {
9
+ Speech: "speech",
10
+ };
11
+ /** @internal */
12
+ export const SpeechOutputModalityType$inboundSchema = z.enum(SpeechOutputModalityType);
13
+ /** @internal */
14
+ export const SpeechOutputModality$inboundSchema = z.object({
15
+ supported_parameters: SpeechSupportedParameters$inboundSchema,
16
+ type: SpeechOutputModalityType$inboundSchema,
17
+ }).transform((v) => {
18
+ return remap$(v, {
19
+ "supported_parameters": "supportedParameters",
20
+ });
21
+ });
22
+ export function speechOutputModalityFromJSON(jsonString) {
23
+ return safeParse(jsonString, (x) => SpeechOutputModality$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechOutputModality' from JSON`);
24
+ }
25
+ //# sourceMappingURL=speechoutputmodality.js.map
@@ -0,0 +1,22 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const SpeechRangeParameterType: {
6
+ readonly Range: "range";
7
+ };
8
+ export type SpeechRangeParameterType = ClosedEnum<typeof SpeechRangeParameterType>;
9
+ /**
10
+ * The accepted `speed` range. Absent: the provider documents no range; some providers still forward `speed`.
11
+ */
12
+ export type SpeechRangeParameter = {
13
+ max: number;
14
+ min: number;
15
+ type: SpeechRangeParameterType;
16
+ };
17
+ /** @internal */
18
+ export declare const SpeechRangeParameterType$inboundSchema: z.ZodEnum<typeof SpeechRangeParameterType>;
19
+ /** @internal */
20
+ export declare const SpeechRangeParameter$inboundSchema: z.ZodType<SpeechRangeParameter, unknown>;
21
+ export declare function speechRangeParameterFromJSON(jsonString: string): SafeParseResult<SpeechRangeParameter, SDKValidationError>;
22
+ //# sourceMappingURL=speechrangeparameter.d.ts.map
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ export const SpeechRangeParameterType = {
7
+ Range: "range",
8
+ };
9
+ /** @internal */
10
+ export const SpeechRangeParameterType$inboundSchema = z.enum(SpeechRangeParameterType);
11
+ /** @internal */
12
+ export const SpeechRangeParameter$inboundSchema = z.object({
13
+ max: z.number(),
14
+ min: z.number(),
15
+ type: SpeechRangeParameterType$inboundSchema,
16
+ });
17
+ export function speechRangeParameterFromJSON(jsonString) {
18
+ return safeParse(jsonString, (x) => SpeechRangeParameter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechRangeParameter' from JSON`);
19
+ }
20
+ //# sourceMappingURL=speechrangeparameter.js.map
@@ -0,0 +1,19 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const SpeechReferenceCountType: {
6
+ readonly Integer: "integer";
7
+ };
8
+ export type SpeechReferenceCountType = ClosedEnum<typeof SpeechReferenceCountType>;
9
+ export type SpeechReferenceCount = {
10
+ max?: number | undefined;
11
+ min: number;
12
+ type: SpeechReferenceCountType;
13
+ };
14
+ /** @internal */
15
+ export declare const SpeechReferenceCountType$inboundSchema: z.ZodEnum<typeof SpeechReferenceCountType>;
16
+ /** @internal */
17
+ export declare const SpeechReferenceCount$inboundSchema: z.ZodType<SpeechReferenceCount, unknown>;
18
+ export declare function speechReferenceCountFromJSON(jsonString: string): SafeParseResult<SpeechReferenceCount, SDKValidationError>;
19
+ //# sourceMappingURL=speechreferencecount.d.ts.map
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ export const SpeechReferenceCountType = {
7
+ Integer: "integer",
8
+ };
9
+ /** @internal */
10
+ export const SpeechReferenceCountType$inboundSchema = z.enum(SpeechReferenceCountType);
11
+ /** @internal */
12
+ export const SpeechReferenceCount$inboundSchema = z.object({
13
+ max: z.int().optional(),
14
+ min: z.int(),
15
+ type: SpeechReferenceCountType$inboundSchema,
16
+ });
17
+ export function speechReferenceCountFromJSON(jsonString) {
18
+ return safeParse(jsonString, (x) => SpeechReferenceCount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechReferenceCount' from JSON`);
19
+ }
20
+ //# sourceMappingURL=speechreferencecount.js.map
@@ -0,0 +1,23 @@
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 { SpeechEnumParameter } from "./speechenumparameter.js";
5
+ import { SpeechRangeParameter } from "./speechrangeparameter.js";
6
+ import { SpeechUnknownParameter } from "./speechunknownparameter.js";
7
+ import { SpeechVoiceParameter } from "./speechvoiceparameter.js";
8
+ export type SpeechSupportedParameters = {
9
+ instructions?: SpeechUnknownParameter | undefined;
10
+ responseFormat?: SpeechEnumParameter | undefined;
11
+ /**
12
+ * The accepted `speed` range. Absent: the provider documents no range; some providers still forward `speed`.
13
+ */
14
+ speed?: SpeechRangeParameter | undefined;
15
+ /**
16
+ * `enum` lists the documented voices in `values`; some providers also accept voice IDs not listed there (custom or cloned voices). `unknown` means the field is accepted but no voices are listed.
17
+ */
18
+ voice?: SpeechVoiceParameter | undefined;
19
+ };
20
+ /** @internal */
21
+ export declare const SpeechSupportedParameters$inboundSchema: z.ZodType<SpeechSupportedParameters, unknown>;
22
+ export declare function speechSupportedParametersFromJSON(jsonString: string): SafeParseResult<SpeechSupportedParameters, SDKValidationError>;
23
+ //# sourceMappingURL=speechsupportedparameters.d.ts.map
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { remap as remap$ } from "../lib/primitives.js";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { SpeechEnumParameter$inboundSchema, } from "./speechenumparameter.js";
8
+ import { SpeechRangeParameter$inboundSchema, } from "./speechrangeparameter.js";
9
+ import { SpeechUnknownParameter$inboundSchema, } from "./speechunknownparameter.js";
10
+ import { SpeechVoiceParameter$inboundSchema, } from "./speechvoiceparameter.js";
11
+ /** @internal */
12
+ export const SpeechSupportedParameters$inboundSchema = z.object({
13
+ instructions: SpeechUnknownParameter$inboundSchema.optional(),
14
+ response_format: SpeechEnumParameter$inboundSchema.optional(),
15
+ speed: SpeechRangeParameter$inboundSchema.optional(),
16
+ voice: SpeechVoiceParameter$inboundSchema.optional(),
17
+ }).transform((v) => {
18
+ return remap$(v, {
19
+ "response_format": "responseFormat",
20
+ });
21
+ });
22
+ export function speechSupportedParametersFromJSON(jsonString) {
23
+ return safeParse(jsonString, (x) => SpeechSupportedParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechSupportedParameters' from JSON`);
24
+ }
25
+ //# sourceMappingURL=speechsupportedparameters.js.map
@@ -0,0 +1,17 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const SpeechUnknownParameterType: {
6
+ readonly Unknown: "unknown";
7
+ };
8
+ export type SpeechUnknownParameterType = ClosedEnum<typeof SpeechUnknownParameterType>;
9
+ export type SpeechUnknownParameter = {
10
+ type: SpeechUnknownParameterType;
11
+ };
12
+ /** @internal */
13
+ export declare const SpeechUnknownParameterType$inboundSchema: z.ZodEnum<typeof SpeechUnknownParameterType>;
14
+ /** @internal */
15
+ export declare const SpeechUnknownParameter$inboundSchema: z.ZodType<SpeechUnknownParameter, unknown>;
16
+ export declare function speechUnknownParameterFromJSON(jsonString: string): SafeParseResult<SpeechUnknownParameter, SDKValidationError>;
17
+ //# sourceMappingURL=speechunknownparameter.d.ts.map
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ export const SpeechUnknownParameterType = {
7
+ Unknown: "unknown",
8
+ };
9
+ /** @internal */
10
+ export const SpeechUnknownParameterType$inboundSchema = z.enum(SpeechUnknownParameterType);
11
+ /** @internal */
12
+ export const SpeechUnknownParameter$inboundSchema = z.object({
13
+ type: SpeechUnknownParameterType$inboundSchema,
14
+ });
15
+ export function speechUnknownParameterFromJSON(jsonString) {
16
+ return safeParse(jsonString, (x) => SpeechUnknownParameter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechUnknownParameter' from JSON`);
17
+ }
18
+ //# sourceMappingURL=speechunknownparameter.js.map
@@ -0,0 +1,38 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ /**
6
+ * `excluded`: `voice` is rejected when the request also sends a nonempty `input_references`. Absent: they can be combined.
7
+ */
8
+ export declare const References: {
9
+ readonly Excluded: "excluded";
10
+ };
11
+ /**
12
+ * `excluded`: `voice` is rejected when the request also sends a nonempty `input_references`. Absent: they can be combined.
13
+ */
14
+ export type References = ClosedEnum<typeof References>;
15
+ export declare const SpeechVoiceParameterType: {
16
+ readonly Enum: "enum";
17
+ readonly Unknown: "unknown";
18
+ };
19
+ export type SpeechVoiceParameterType = OpenEnum<typeof SpeechVoiceParameterType>;
20
+ /**
21
+ * `enum` lists the documented voices in `values`; some providers also accept voice IDs not listed there (custom or cloned voices). `unknown` means the field is accepted but no voices are listed.
22
+ */
23
+ export type SpeechVoiceParameter = {
24
+ /**
25
+ * `excluded`: `voice` is rejected when the request also sends a nonempty `input_references`. Absent: they can be combined.
26
+ */
27
+ references?: References | undefined;
28
+ type: SpeechVoiceParameterType;
29
+ values?: Array<string> | undefined;
30
+ };
31
+ /** @internal */
32
+ export declare const References$inboundSchema: z.ZodEnum<typeof References>;
33
+ /** @internal */
34
+ export declare const SpeechVoiceParameterType$inboundSchema: z.ZodType<SpeechVoiceParameterType, unknown>;
35
+ /** @internal */
36
+ export declare const SpeechVoiceParameter$inboundSchema: z.ZodType<SpeechVoiceParameter, unknown>;
37
+ export declare function speechVoiceParameterFromJSON(jsonString: string): SafeParseResult<SpeechVoiceParameter, SDKValidationError>;
38
+ //# sourceMappingURL=speechvoiceparameter.d.ts.map
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ import * as openEnums from "../types/enums.js";
7
+ /**
8
+ * `excluded`: `voice` is rejected when the request also sends a nonempty `input_references`. Absent: they can be combined.
9
+ */
10
+ export const References = {
11
+ Excluded: "excluded",
12
+ };
13
+ export const SpeechVoiceParameterType = {
14
+ Enum: "enum",
15
+ Unknown: "unknown",
16
+ };
17
+ /** @internal */
18
+ export const References$inboundSchema = z.enum(References);
19
+ /** @internal */
20
+ export const SpeechVoiceParameterType$inboundSchema = openEnums.inboundSchema(SpeechVoiceParameterType);
21
+ /** @internal */
22
+ export const SpeechVoiceParameter$inboundSchema = z.object({
23
+ references: References$inboundSchema.optional(),
24
+ type: SpeechVoiceParameterType$inboundSchema,
25
+ values: z.array(z.string()).optional(),
26
+ });
27
+ export function speechVoiceParameterFromJSON(jsonString) {
28
+ return safeParse(jsonString, (x) => SpeechVoiceParameter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechVoiceParameter' from JSON`);
29
+ }
30
+ //# sourceMappingURL=speechvoiceparameter.js.map
@@ -106,6 +106,10 @@ export type STTRequest = {
106
106
  * STT model identifier
107
107
  */
108
108
  model: string;
109
+ /**
110
+ * Context to guide transcription, such as domain vocabulary or a previous segment. Honored by OpenAI (except gpt-4o-transcribe-diarize), Azure OpenAI, Groq, Together, Alibaba, and AssemblyAI endpoints with prompted pricing configured. Other providers ignore it; use keyterms for supported keyword boosting. Takes precedence over provider-specific prompt options, including when empty.
111
+ */
112
+ prompt?: string | undefined;
109
113
  /**
110
114
  * Provider configuration: provider routing preferences (`order`, `only`, `ignore`, `allow_fallbacks`), data policy routing preferences (`zdr`, `data_collection`) and provider-specific passthrough options
111
115
  */
@@ -174,6 +178,7 @@ export type STTRequest$Outbound = {
174
178
  keyterms?: Array<string> | undefined;
175
179
  language?: string | undefined;
176
180
  model: string;
181
+ prompt?: string | undefined;
177
182
  provider?: STTRequestProvider$Outbound | undefined;
178
183
  response_format?: string | undefined;
179
184
  session_id?: string | undefined;
@@ -75,6 +75,7 @@ export const STTRequest$outboundSchema = z.object({
75
75
  keyterms: z.array(z.string()).optional(),
76
76
  language: z.string().optional(),
77
77
  model: z.string(),
78
+ prompt: z.string().optional(),
78
79
  provider: z.lazy(() => STTRequestProvider$outboundSchema).optional(),
79
80
  responseFormat: STTRequestResponseFormat$outboundSchema.optional(),
80
81
  sessionId: z.string().optional(),