@openrouter/sdk 1.5.119 → 1.5.121

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 (42) hide show
  1. package/esm/funcs/ttsGetModel.d.ts +19 -0
  2. package/esm/funcs/ttsGetModel.js +101 -0
  3. package/esm/funcs/ttsListModels.d.ts +19 -0
  4. package/esm/funcs/ttsListModels.js +91 -0
  5. package/esm/lib/config.d.ts +2 -2
  6. package/esm/lib/config.js +2 -2
  7. package/esm/models/index.d.ts +11 -0
  8. package/esm/models/index.js +11 -0
  9. package/esm/models/operations/getspeechmodel.d.ts +63 -0
  10. package/esm/models/operations/getspeechmodel.js +21 -0
  11. package/esm/models/operations/index.d.ts +2 -0
  12. package/esm/models/operations/index.js +2 -0
  13. package/esm/models/operations/listspeechmodels.d.ts +53 -0
  14. package/esm/models/operations/listspeechmodels.js +19 -0
  15. package/esm/models/speechenumparameter.d.ts +18 -0
  16. package/esm/models/speechenumparameter.js +19 -0
  17. package/esm/models/speechinputmodality.d.ts +89 -0
  18. package/esm/models/speechinputmodality.js +86 -0
  19. package/esm/models/speechmodelendpoint.d.ts +24 -0
  20. package/esm/models/speechmodelendpoint.js +26 -0
  21. package/esm/models/speechmodelresponse.d.ts +31 -0
  22. package/esm/models/speechmodelresponse.js +28 -0
  23. package/esm/models/speechmodelslistresponse.d.ts +14 -0
  24. package/esm/models/speechmodelslistresponse.js +14 -0
  25. package/esm/models/speechoutputmodality.d.ts +19 -0
  26. package/esm/models/speechoutputmodality.js +25 -0
  27. package/esm/models/speechrangeparameter.d.ts +22 -0
  28. package/esm/models/speechrangeparameter.js +20 -0
  29. package/esm/models/speechreferencecount.d.ts +19 -0
  30. package/esm/models/speechreferencecount.js +20 -0
  31. package/esm/models/speechsupportedparameters.d.ts +23 -0
  32. package/esm/models/speechsupportedparameters.js +25 -0
  33. package/esm/models/speechunknownparameter.d.ts +17 -0
  34. package/esm/models/speechunknownparameter.js +18 -0
  35. package/esm/models/speechvoiceparameter.d.ts +38 -0
  36. package/esm/models/speechvoiceparameter.js +30 -0
  37. package/esm/models/videogenerationresponse.d.ts +23 -0
  38. package/esm/models/videogenerationresponse.js +14 -0
  39. package/esm/sdk/tts.d.ts +15 -0
  40. package/esm/sdk/tts.js +20 -0
  41. package/jsr.json +1 -1
  42. package/package.json +5 -5
@@ -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
@@ -12,6 +12,19 @@ export declare const VideoGenerationResponseStatus: {
12
12
  readonly Expired: "expired";
13
13
  };
14
14
  export type VideoGenerationResponseStatus = OpenEnum<typeof VideoGenerationResponseStatus>;
15
+ /**
16
+ * The step within `status` for a job that is not finished: `submitting` and `queued_at_provider` under `pending`, `generating` and `finalizing` under `in_progress`. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use `status` to tell whether the job is finished.
17
+ */
18
+ export declare const StatusDetail: {
19
+ readonly Submitting: "submitting";
20
+ readonly QueuedAtProvider: "queued_at_provider";
21
+ readonly Generating: "generating";
22
+ readonly Finalizing: "finalizing";
23
+ };
24
+ /**
25
+ * The step within `status` for a job that is not finished: `submitting` and `queued_at_provider` under `pending`, `generating` and `finalizing` under `in_progress`. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use `status` to tell whether the job is finished.
26
+ */
27
+ export type StatusDetail = OpenEnum<typeof StatusDetail>;
15
28
  export type VideoGenerationResponse = {
16
29
  error?: string | undefined;
17
30
  /**
@@ -27,7 +40,15 @@ export type VideoGenerationResponse = {
27
40
  */
28
41
  id: string;
29
42
  pollingUrl: string;
43
+ /**
44
+ * Percent complete, from 0 to 100 and possibly fractional, reported by the provider while `status_detail` is `generating`. Present only for providers that report it, and absent once the job moves to `finalizing`.
45
+ */
46
+ progress?: number | undefined;
30
47
  status: VideoGenerationResponseStatus;
48
+ /**
49
+ * The step within `status` for a job that is not finished: `submitting` and `queued_at_provider` under `pending`, `generating` and `finalizing` under `in_progress`. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use `status` to tell whether the job is finished.
50
+ */
51
+ statusDetail?: StatusDetail | undefined;
31
52
  /**
32
53
  * OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available.
33
54
  */
@@ -44,6 +65,8 @@ export type VideoGenerationResponse = {
44
65
  /** @internal */
45
66
  export declare const VideoGenerationResponseStatus$inboundSchema: z.ZodType<VideoGenerationResponseStatus, unknown>;
46
67
  /** @internal */
68
+ export declare const StatusDetail$inboundSchema: z.ZodType<StatusDetail, unknown>;
69
+ /** @internal */
47
70
  export declare const VideoGenerationResponse$inboundSchema: z.ZodType<VideoGenerationResponse, unknown>;
48
71
  export declare function videoGenerationResponseFromJSON(jsonString: string): SafeParseResult<VideoGenerationResponse, SDKValidationError>;
49
72
  //# sourceMappingURL=videogenerationresponse.d.ts.map
@@ -14,16 +14,29 @@ export const VideoGenerationResponseStatus = {
14
14
  Cancelled: "cancelled",
15
15
  Expired: "expired",
16
16
  };
17
+ /**
18
+ * The step within `status` for a job that is not finished: `submitting` and `queued_at_provider` under `pending`, `generating` and `finalizing` under `in_progress`. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use `status` to tell whether the job is finished.
19
+ */
20
+ export const StatusDetail = {
21
+ Submitting: "submitting",
22
+ QueuedAtProvider: "queued_at_provider",
23
+ Generating: "generating",
24
+ Finalizing: "finalizing",
25
+ };
17
26
  /** @internal */
18
27
  export const VideoGenerationResponseStatus$inboundSchema = openEnums.inboundSchema(VideoGenerationResponseStatus);
19
28
  /** @internal */
29
+ export const StatusDetail$inboundSchema = openEnums.inboundSchema(StatusDetail);
30
+ /** @internal */
20
31
  export const VideoGenerationResponse$inboundSchema = z.object({
21
32
  error: z.string().optional(),
22
33
  expires_at: z.int().optional(),
23
34
  generation_id: z.string().optional(),
24
35
  id: z.string(),
25
36
  polling_url: z.string(),
37
+ progress: z.number().optional(),
26
38
  status: VideoGenerationResponseStatus$inboundSchema,
39
+ status_detail: StatusDetail$inboundSchema.optional(),
27
40
  unsigned_urls: z.array(z.string()).optional(),
28
41
  urls: z.array(z.string()).optional(),
29
42
  usage: VideoGenerationUsage$inboundSchema.optional(),
@@ -32,6 +45,7 @@ export const VideoGenerationResponse$inboundSchema = z.object({
32
45
  "expires_at": "expiresAt",
33
46
  "generation_id": "generationId",
34
47
  "polling_url": "pollingUrl",
48
+ "status_detail": "statusDetail",
35
49
  "unsigned_urls": "unsignedUrls",
36
50
  });
37
51
  });
package/esm/sdk/tts.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
+ import * as models from "../models/index.js";
2
3
  import * as operations from "../models/operations/index.js";
3
4
  export declare class TTS extends ClientSDK {
4
5
  /**
@@ -8,5 +9,19 @@ export declare class TTS extends ClientSDK {
8
9
  * Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).
9
10
  */
10
11
  createSpeech(request: operations.CreateAudioSpeechRequest, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
12
+ /**
13
+ * List text-to-speech models
14
+ *
15
+ * @remarks
16
+ * Lists every text-to-speech model with the inputs it accepts and its speech output parameters, merged across its endpoints, plus each endpoint with its own.
17
+ */
18
+ listModels(request?: operations.ListSpeechModelsRequest | undefined, options?: RequestOptions): Promise<models.SpeechModelsListResponse>;
19
+ /**
20
+ * Get a text-to-speech model
21
+ *
22
+ * @remarks
23
+ * Returns a text-to-speech model with each endpoint's own inputs and speech output parameters.
24
+ */
25
+ getModel(request: operations.GetSpeechModelRequest, options?: RequestOptions): Promise<models.SpeechModelResponse>;
11
26
  }
12
27
  //# sourceMappingURL=tts.d.ts.map