@openrouter/sdk 1.2.92 → 1.2.94

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.
@@ -14,5 +14,5 @@ import { Result } from "../types/fp.js";
14
14
  * @remarks
15
15
  * Submits an embedding request to the embeddings router
16
16
  */
17
- export declare function embeddingsGenerate(client: OpenRouterCore, request: operations.CreateEmbeddingsRequest, options?: RequestOptions): APIPromise<Result<operations.CreateEmbeddingsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
17
+ export declare function embeddingsGenerate(client: OpenRouterCore, request: operations.CreateEmbeddingsRequest, options?: RequestOptions): APIPromise<Result<operations.CreateEmbeddingsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=embeddingsGenerate.d.ts.map
@@ -90,7 +90,7 @@ async function $do(client, request, options) {
90
90
  };
91
91
  const [result] = await M.match(M.json(200, operations.CreateEmbeddingsResponse$inboundSchema), M.text(200, operations.CreateEmbeddingsResponse$inboundSchema, {
92
92
  ctype: "text/event-stream",
93
- }), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
93
+ }), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
94
94
  if (!result.ok) {
95
95
  return [result, { status: "complete", request: req, response }];
96
96
  }
@@ -14,5 +14,5 @@ import { Result } from "../types/fp.js";
14
14
  * @remarks
15
15
  * Submits a rerank request to the rerank router
16
16
  */
17
- export declare function rerankRerank(client: OpenRouterCore, request: operations.CreateRerankRequest, options?: RequestOptions): APIPromise<Result<operations.CreateRerankResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
17
+ export declare function rerankRerank(client: OpenRouterCore, request: operations.CreateRerankRequest, options?: RequestOptions): APIPromise<Result<operations.CreateRerankResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=rerankRerank.d.ts.map
@@ -90,7 +90,7 @@ async function $do(client, request, options) {
90
90
  };
91
91
  const [result] = await M.match(M.json(200, operations.CreateRerankResponse$inboundSchema), M.text(200, operations.CreateRerankResponse$inboundSchema, {
92
92
  ctype: "text/event-stream",
93
- }), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
93
+ }), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
94
94
  if (!result.ok) {
95
95
  return [result, { status: "complete", request: req, response }];
96
96
  }
@@ -15,5 +15,5 @@ import { Result } from "../types/fp.js";
15
15
  * @remarks
16
16
  * Transcribes audio into text. Accepts base64-encoded audio input as JSON or an OpenAI-style multipart/form-data file upload, and returns the transcribed text.
17
17
  */
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.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ export declare function sttCreateTranscription(client: OpenRouterCore, request: operations.CreateAudioTranscriptionsRequest, options?: RequestOptions): APIPromise<Result<models.STTResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | 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
@@ -89,7 +89,7 @@ async function $do(client, request, options) {
89
89
  const responseFields = {
90
90
  HttpMeta: { Response: response, Request: req },
91
91
  };
92
- const [result] = await M.match(M.json(200, models.STTResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
92
+ const [result] = await M.match(M.json(200, models.STTResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
93
93
  if (!result.ok) {
94
94
  return [result, { status: "complete", request: req, response }];
95
95
  }
@@ -15,5 +15,5 @@ import { Result } from "../types/fp.js";
15
15
  * @remarks
16
16
  * Transcribes audio into text. Accepts base64-encoded audio input as JSON or an OpenAI-style multipart/form-data file upload, and returns the transcribed text.
17
17
  */
18
- export declare function sttCreateTranscriptionMultipart(client: OpenRouterCore, request: operations.CreateAudioTranscriptionsMultipartRequest, options?: RequestOptions): APIPromise<Result<models.STTResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ export declare function sttCreateTranscriptionMultipart(client: OpenRouterCore, request: operations.CreateAudioTranscriptionsMultipartRequest, options?: RequestOptions): APIPromise<Result<models.STTResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=sttCreateTranscriptionMultipart.d.ts.map
@@ -121,7 +121,7 @@ async function $do(client, request, options) {
121
121
  const responseFields = {
122
122
  HttpMeta: { Response: response, Request: req },
123
123
  };
124
- const [result] = await M.match(M.json(200, models.STTResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
124
+ const [result] = await M.match(M.json(200, models.STTResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
125
125
  if (!result.ok) {
126
126
  return [result, { status: "complete", request: req, response }];
127
127
  }
@@ -14,5 +14,5 @@ import { Result } from "../types/fp.js";
14
14
  * @remarks
15
15
  * Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).
16
16
  */
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.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
17
+ export declare function ttsCreateSpeech(client: OpenRouterCore, request: operations.CreateAudioSpeechRequest, options?: RequestOptions): APIPromise<Result<ReadableStream<Uint8Array>, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | 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
@@ -89,7 +89,7 @@ async function $do(client, request, options) {
89
89
  const responseFields = {
90
90
  HttpMeta: { Response: response, Request: req },
91
91
  };
92
- const [result] = await M.match(M.stream(200, z.custom(x => x instanceof ReadableStream), { ctype: "audio/*" }), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
92
+ const [result] = await M.match(M.stream(200, z.custom(x => x instanceof ReadableStream), { ctype: "audio/*" }), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
93
93
  if (!result.ok) {
94
94
  return [result, { status: "complete", request: req, response }];
95
95
  }
@@ -15,5 +15,5 @@ import { Result } from "../types/fp.js";
15
15
  * @remarks
16
16
  * Submits a video generation request and returns a polling URL to check status
17
17
  */
18
- export declare function videoGenerationGenerate(client: OpenRouterCore, request: operations.CreateVideosRequest, options?: RequestOptions): APIPromise<Result<models.VideoGenerationResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ export declare function videoGenerationGenerate(client: OpenRouterCore, request: operations.CreateVideosRequest, options?: RequestOptions): APIPromise<Result<models.VideoGenerationResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=videoGenerationGenerate.d.ts.map
@@ -91,7 +91,7 @@ async function $do(client, request, options) {
91
91
  const responseFields = {
92
92
  HttpMeta: { Response: response, Request: req },
93
93
  };
94
- const [result] = await M.match(M.json(202, models.VideoGenerationResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
94
+ const [result] = await M.match(M.json(202, models.VideoGenerationResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
95
95
  if (!result.ok) {
96
96
  return [result, { status: "complete", request: req, response }];
97
97
  }
@@ -15,5 +15,5 @@ import { Result } from "../types/fp.js";
15
15
  * @remarks
16
16
  * Returns job status and content URLs when completed
17
17
  */
18
- export declare function videoGenerationGetGeneration(client: OpenRouterCore, request: operations.GetVideosRequest, options?: RequestOptions): APIPromise<Result<models.VideoGenerationResponse, errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ export declare function videoGenerationGetGeneration(client: OpenRouterCore, request: operations.GetVideosRequest, options?: RequestOptions): APIPromise<Result<models.VideoGenerationResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=videoGenerationGetGeneration.d.ts.map
@@ -94,7 +94,7 @@ async function $do(client, request, options) {
94
94
  const responseFields = {
95
95
  HttpMeta: { Response: response, Request: req },
96
96
  };
97
- const [result] = await M.match(M.json(200, models.VideoGenerationResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
97
+ const [result] = await M.match(M.json(200, models.VideoGenerationResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
98
98
  if (!result.ok) {
99
99
  return [result, { status: "complete", request: req, response }];
100
100
  }
@@ -14,5 +14,5 @@ import { Result } from "../types/fp.js";
14
14
  * @remarks
15
15
  * Streams the generated video content from the upstream provider
16
16
  */
17
- export declare function videoGenerationGetVideoContent(client: OpenRouterCore, request: operations.ListVideosContentRequest, options?: RequestOptions): APIPromise<Result<ReadableStream<Uint8Array>, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
17
+ export declare function videoGenerationGetVideoContent(client: OpenRouterCore, request: operations.ListVideosContentRequest, options?: RequestOptions): APIPromise<Result<ReadableStream<Uint8Array>, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=videoGenerationGetVideoContent.d.ts.map
@@ -98,7 +98,7 @@ async function $do(client, request, options) {
98
98
  const responseFields = {
99
99
  HttpMeta: { Response: response, Request: req },
100
100
  };
101
- const [result] = await M.match(M.stream(200, z.custom(x => x instanceof ReadableStream), { ctype: "video/mp4" }), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
101
+ const [result] = await M.match(M.stream(200, z.custom(x => x instanceof ReadableStream), { ctype: "video/mp4" }), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
102
102
  if (!result.ok) {
103
103
  return [result, { status: "complete", request: req, response }];
104
104
  }
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
50
50
  export declare const SDK_METADATA: {
51
51
  readonly language: "typescript";
52
52
  readonly openapiDocVersion: "1.0.0";
53
- readonly sdkVersion: "1.2.92";
53
+ readonly sdkVersion: "1.2.94";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.2.92 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.2.94 2.914.0 1.0.0 @openrouter/sdk";
56
56
  };
57
57
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
29
29
  export const SDK_METADATA = {
30
30
  language: "typescript",
31
31
  openapiDocVersion: "1.0.0",
32
- sdkVersion: "1.2.92",
32
+ sdkVersion: "1.2.94",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.2.92 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.2.94 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -1,19 +1,40 @@
1
1
  import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
2
3
  import { Result as SafeParseResult } from "../types/fp.js";
3
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ /**
6
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
7
+ */
8
+ export declare const ChatContentVideoInputProcessing: {
9
+ readonly Agentic: "agentic";
10
+ readonly Static: "static";
11
+ };
12
+ /**
13
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
14
+ */
15
+ export type ChatContentVideoInputProcessing = OpenEnum<typeof ChatContentVideoInputProcessing>;
4
16
  /**
5
17
  * Video input object
6
18
  */
7
19
  export type ChatContentVideoInput = {
20
+ /**
21
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
22
+ */
23
+ processing?: ChatContentVideoInputProcessing | undefined;
8
24
  /**
9
25
  * URL of the video (data: URLs supported)
10
26
  */
11
27
  url: string;
12
28
  };
13
29
  /** @internal */
30
+ export declare const ChatContentVideoInputProcessing$inboundSchema: z.ZodType<ChatContentVideoInputProcessing, unknown>;
31
+ /** @internal */
32
+ export declare const ChatContentVideoInputProcessing$outboundSchema: z.ZodType<string, ChatContentVideoInputProcessing>;
33
+ /** @internal */
14
34
  export declare const ChatContentVideoInput$inboundSchema: z.ZodType<ChatContentVideoInput, unknown>;
15
35
  /** @internal */
16
36
  export type ChatContentVideoInput$Outbound = {
37
+ processing?: string | undefined;
17
38
  url: string;
18
39
  };
19
40
  /** @internal */
@@ -4,12 +4,26 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ /**
9
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
10
+ */
11
+ export const ChatContentVideoInputProcessing = {
12
+ Agentic: "agentic",
13
+ Static: "static",
14
+ };
15
+ /** @internal */
16
+ export const ChatContentVideoInputProcessing$inboundSchema = openEnums.inboundSchema(ChatContentVideoInputProcessing);
17
+ /** @internal */
18
+ export const ChatContentVideoInputProcessing$outboundSchema = openEnums.outboundSchema(ChatContentVideoInputProcessing);
7
19
  /** @internal */
8
20
  export const ChatContentVideoInput$inboundSchema = z.object({
21
+ processing: ChatContentVideoInputProcessing$inboundSchema.optional(),
9
22
  url: z.string(),
10
23
  });
11
24
  /** @internal */
12
25
  export const ChatContentVideoInput$outboundSchema = z.object({
26
+ processing: ChatContentVideoInputProcessing$outboundSchema.optional(),
13
27
  url: z.string(),
14
28
  });
15
29
  export function chatContentVideoInputToJSON(chatContentVideoInput) {
@@ -6,7 +6,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
6
6
  */
7
7
  export type CostDetails = {
8
8
  /**
9
- * Metered server-tool execution cost (for example, shell sandbox time) billed for this request, in USD. Matches the billed checkpoint and settlement amounts exactly.
9
+ * Metered server-tool execution cost (for example, shell sandbox time) billed for this request, in USD. Matches the billed checkpoint and settlement amounts exactly. 0 when a metered server tool ran but settled at zero dollars; absent when no metered server tool ran.
10
10
  */
11
11
  serverToolCost?: number | null | undefined;
12
12
  upstreamInferenceCompletionsCost: number;
@@ -1,8 +1,24 @@
1
1
  import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ /**
4
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
5
+ */
6
+ export declare const InputVideoProcessing: {
7
+ readonly Agentic: "agentic";
8
+ readonly Static: "static";
9
+ };
10
+ /**
11
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
12
+ */
13
+ export type InputVideoProcessing = OpenEnum<typeof InputVideoProcessing>;
2
14
  /**
3
15
  * Video input content item
4
16
  */
5
17
  export type InputVideo = {
18
+ /**
19
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
20
+ */
21
+ processing?: InputVideoProcessing | undefined;
6
22
  type: "input_video";
7
23
  /**
8
24
  * A base64 data URL or remote URL that resolves to a video file
@@ -10,7 +26,10 @@ export type InputVideo = {
10
26
  videoUrl: string;
11
27
  };
12
28
  /** @internal */
29
+ export declare const InputVideoProcessing$outboundSchema: z.ZodType<string, InputVideoProcessing>;
30
+ /** @internal */
13
31
  export type InputVideo$Outbound = {
32
+ processing?: string | undefined;
14
33
  type: "input_video";
15
34
  video_url: string;
16
35
  };
@@ -4,8 +4,19 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ /**
9
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
10
+ */
11
+ export const InputVideoProcessing = {
12
+ Agentic: "agentic",
13
+ Static: "static",
14
+ };
15
+ /** @internal */
16
+ export const InputVideoProcessing$outboundSchema = openEnums.outboundSchema(InputVideoProcessing);
7
17
  /** @internal */
8
18
  export const InputVideo$outboundSchema = z.object({
19
+ processing: InputVideoProcessing$outboundSchema.optional(),
9
20
  type: z.literal("input_video"),
10
21
  videoUrl: z.string(),
11
22
  }).transform((v) => {
@@ -1,19 +1,40 @@
1
1
  import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
2
3
  import { Result as SafeParseResult } from "../types/fp.js";
3
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ /**
6
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
7
+ */
8
+ export declare const LegacyChatContentVideoInputProcessing: {
9
+ readonly Agentic: "agentic";
10
+ readonly Static: "static";
11
+ };
12
+ /**
13
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
14
+ */
15
+ export type LegacyChatContentVideoInputProcessing = OpenEnum<typeof LegacyChatContentVideoInputProcessing>;
4
16
  /**
5
17
  * Video input object
6
18
  */
7
19
  export type LegacyChatContentVideoInput = {
20
+ /**
21
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
22
+ */
23
+ processing?: LegacyChatContentVideoInputProcessing | undefined;
8
24
  /**
9
25
  * URL of the video (data: URLs supported)
10
26
  */
11
27
  url: string;
12
28
  };
13
29
  /** @internal */
30
+ export declare const LegacyChatContentVideoInputProcessing$inboundSchema: z.ZodType<LegacyChatContentVideoInputProcessing, unknown>;
31
+ /** @internal */
32
+ export declare const LegacyChatContentVideoInputProcessing$outboundSchema: z.ZodType<string, LegacyChatContentVideoInputProcessing>;
33
+ /** @internal */
14
34
  export declare const LegacyChatContentVideoInput$inboundSchema: z.ZodType<LegacyChatContentVideoInput, unknown>;
15
35
  /** @internal */
16
36
  export type LegacyChatContentVideoInput$Outbound = {
37
+ processing?: string | undefined;
17
38
  url: string;
18
39
  };
19
40
  /** @internal */
@@ -4,12 +4,26 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ /**
9
+ * Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).
10
+ */
11
+ export const LegacyChatContentVideoInputProcessing = {
12
+ Agentic: "agentic",
13
+ Static: "static",
14
+ };
15
+ /** @internal */
16
+ export const LegacyChatContentVideoInputProcessing$inboundSchema = openEnums.inboundSchema(LegacyChatContentVideoInputProcessing);
17
+ /** @internal */
18
+ export const LegacyChatContentVideoInputProcessing$outboundSchema = openEnums.outboundSchema(LegacyChatContentVideoInputProcessing);
7
19
  /** @internal */
8
20
  export const LegacyChatContentVideoInput$inboundSchema = z.object({
21
+ processing: LegacyChatContentVideoInputProcessing$inboundSchema.optional(),
9
22
  url: z.string(),
10
23
  });
11
24
  /** @internal */
12
25
  export const LegacyChatContentVideoInput$outboundSchema = z.object({
26
+ processing: LegacyChatContentVideoInputProcessing$outboundSchema.optional(),
13
27
  url: z.string(),
14
28
  });
15
29
  export function legacyChatContentVideoInputToJSON(legacyChatContentVideoInput) {
@@ -89,7 +89,7 @@ export type OutputTokensDetails = {
89
89
  };
90
90
  export type UsageCostDetails = {
91
91
  /**
92
- * Metered server-tool execution cost (for example, shell sandbox time) billed for this request, in USD. Matches the billed checkpoint and settlement amounts exactly.
92
+ * Metered server-tool execution cost (for example, shell sandbox time) billed for this request, in USD. Matches the billed checkpoint and settlement amounts exactly. 0 when a metered server tool ran but settled at zero dollars; absent when no metered server tool ran.
93
93
  */
94
94
  serverToolCost?: number | null | undefined;
95
95
  upstreamInferenceCost?: number | null | undefined;
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.92",
5
+ "version": "1.2.94",
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": "1.2.92",
3
+ "version": "1.2.94",
4
4
  "author": "OpenRouter",
5
5
  "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
6
6
  "keywords": [
@@ -73,15 +73,15 @@
73
73
  "lint": "eslint --cache --max-warnings=0 src",
74
74
  "build": "tsc",
75
75
  "prepublishOnly": "npm run build",
76
- "prepare": "npm run build",
76
+ "compile": "tsc",
77
77
  "test": "vitest --run --project unit",
78
+ "test:e2e": "vitest --run --project e2e",
78
79
  "test:watch": "vitest --watch --project unit",
79
80
  "typecheck:transit": "exit 0",
80
- "test:e2e": "vitest --run --project e2e",
81
+ "postinstall": "node scripts/check-types.js || true",
82
+ "prepare": "npm run build",
81
83
  "test:transit": "exit 0",
82
- "typecheck": "tsc --noEmit",
83
- "compile": "tsc",
84
- "postinstall": "node scripts/check-types.js || true"
84
+ "typecheck": "tsc --noEmit"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {