@openrouter/sdk 0.12.25 → 0.12.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.
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Create transcription
14
14
  *
15
15
  * @remarks
16
- * Transcribes audio into text
16
+ * Transcribes audio into text. Accepts base64-encoded audio input and returns the transcribed text.
17
17
  */
18
18
  export declare function sttCreateTranscription(client: OpenRouterCore, request: operations.CreateAudioTranscriptionsRequest, options?: RequestOptions): APIPromise<Result<models.STTResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=sttCreateTranscription.d.ts.map
@@ -16,7 +16,7 @@ import { APIPromise } from "../types/async.js";
16
16
  * Create transcription
17
17
  *
18
18
  * @remarks
19
- * Transcribes audio into text
19
+ * Transcribes audio into text. Accepts base64-encoded audio input and returns the transcribed text.
20
20
  */
21
21
  export function sttCreateTranscription(client, request, options) {
22
22
  return new APIPromise($do(client, request, options));
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * Create speech
13
13
  *
14
14
  * @remarks
15
- * Synthesizes audio from the input text
15
+ * Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).
16
16
  */
17
17
  export declare function ttsCreateSpeech(client: OpenRouterCore, request: operations.CreateAudioSpeechRequest, options?: RequestOptions): APIPromise<Result<ReadableStream<Uint8Array>, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=ttsCreateSpeech.d.ts.map
@@ -16,7 +16,7 @@ import { APIPromise } from "../types/async.js";
16
16
  * Create speech
17
17
  *
18
18
  * @remarks
19
- * Synthesizes audio from the input text
19
+ * Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).
20
20
  */
21
21
  export function ttsCreateSpeech(client, request, options) {
22
22
  return new APIPromise($do(client, request, options));
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
49
49
  export declare const SDK_METADATA: {
50
50
  readonly language: "typescript";
51
51
  readonly openapiDocVersion: "1.0.0";
52
- readonly sdkVersion: "0.12.25";
52
+ readonly sdkVersion: "0.12.26";
53
53
  readonly genVersion: "2.879.1";
54
- readonly userAgent: "speakeasy-sdk/typescript 0.12.25 2.879.1 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 0.12.26 2.879.1 1.0.0 @openrouter/sdk";
55
55
  };
56
56
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
26
26
  export const SDK_METADATA = {
27
27
  language: "typescript",
28
28
  openapiDocVersion: "1.0.0",
29
- sdkVersion: "0.12.25",
29
+ sdkVersion: "0.12.26",
30
30
  genVersion: "2.879.1",
31
- userAgent: "speakeasy-sdk/typescript 0.12.25 2.879.1 1.0.0 @openrouter/sdk",
31
+ userAgent: "speakeasy-sdk/typescript 0.12.26 2.879.1 1.0.0 @openrouter/sdk",
32
32
  };
33
33
  //# sourceMappingURL=config.js.map
@@ -72,6 +72,10 @@ export type Model = {
72
72
  * List of supported parameters for this model
73
73
  */
74
74
  supportedParameters: Array<Parameter>;
75
+ /**
76
+ * List of supported voice identifiers for TTS models. Null for non-TTS models.
77
+ */
78
+ supportedVoices: Array<string> | null;
75
79
  /**
76
80
  * Information about the top provider for this model
77
81
  */
@@ -29,6 +29,7 @@ export const Model$inboundSchema = z.object({
29
29
  per_request_limits: z.nullable(PerRequestLimits$inboundSchema),
30
30
  pricing: PublicPricing$inboundSchema,
31
31
  supported_parameters: z.array(Parameter$inboundSchema),
32
+ supported_voices: z.nullable(z.array(z.string())),
32
33
  top_provider: TopProviderInfo$inboundSchema,
33
34
  }).transform((v) => {
34
35
  return remap$(v, {
@@ -40,6 +41,7 @@ export const Model$inboundSchema = z.object({
40
41
  "knowledge_cutoff": "knowledgeCutoff",
41
42
  "per_request_limits": "perRequestLimits",
42
43
  "supported_parameters": "supportedParameters",
44
+ "supported_voices": "supportedVoices",
43
45
  "top_provider": "topProvider",
44
46
  });
45
47
  });
package/esm/sdk/stt.d.ts CHANGED
@@ -6,7 +6,7 @@ export declare class Stt extends ClientSDK {
6
6
  * Create transcription
7
7
  *
8
8
  * @remarks
9
- * Transcribes audio into text
9
+ * Transcribes audio into text. Accepts base64-encoded audio input and returns the transcribed text.
10
10
  */
11
11
  createTranscription(request: operations.CreateAudioTranscriptionsRequest, options?: RequestOptions): Promise<models.STTResponse>;
12
12
  }
package/esm/sdk/stt.js CHANGED
@@ -10,7 +10,7 @@ export class Stt extends ClientSDK {
10
10
  * Create transcription
11
11
  *
12
12
  * @remarks
13
- * Transcribes audio into text
13
+ * Transcribes audio into text. Accepts base64-encoded audio input and returns the transcribed text.
14
14
  */
15
15
  async createTranscription(request, options) {
16
16
  return unwrapAsync(sttCreateTranscription(this, request, options));
package/esm/sdk/tts.d.ts CHANGED
@@ -5,7 +5,7 @@ export declare class Tts extends ClientSDK {
5
5
  * Create speech
6
6
  *
7
7
  * @remarks
8
- * Synthesizes audio from the input text
8
+ * Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).
9
9
  */
10
10
  createSpeech(request: operations.CreateAudioSpeechRequest, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
11
11
  }
package/esm/sdk/tts.js CHANGED
@@ -10,7 +10,7 @@ export class Tts extends ClientSDK {
10
10
  * Create speech
11
11
  *
12
12
  * @remarks
13
- * Synthesizes audio from the input text
13
+ * Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).
14
14
  */
15
15
  async createSpeech(request, options) {
16
16
  return unwrapAsync(ttsCreateSpeech(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "0.12.25",
5
+ "version": "0.12.26",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "0.12.25",
3
+ "version": "0.12.26",
4
4
  "author": "OpenRouter",
5
5
  "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.",
6
6
  "keywords": [
@@ -69,15 +69,15 @@
69
69
  "lint": "eslint --cache --max-warnings=0 src",
70
70
  "build": "tsc",
71
71
  "prepublishOnly": "npm run build",
72
- "test": "vitest --run --project unit",
73
72
  "test:watch": "vitest --watch --project unit",
73
+ "typecheck": "tsc --noEmit",
74
+ "typecheck:transit": "exit 0",
74
75
  "compile": "tsc",
75
76
  "postinstall": "node scripts/check-types.js || true",
76
77
  "prepare": "npm run build",
78
+ "test": "vitest --run --project unit",
77
79
  "test:e2e": "vitest --run --project e2e",
78
- "test:transit": "exit 0",
79
- "typecheck": "tsc --noEmit",
80
- "typecheck:transit": "exit 0"
80
+ "test:transit": "exit 0"
81
81
  },
82
82
  "peerDependencies": {},
83
83
  "devDependencies": {