diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 301aac665..92f60f353 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,12 +1,12 @@
lockVersion: ""
id: ""
management:
- docChecksum: e70e2accb15789ed1d8188205e9e99f4
+ docChecksum: 5221786825510ab2ed2fb6753a3f7938
docVersion: 1.0.0
speakeasyVersion: 1.808.1
generationVersion: 2.960.8
- releaseVersion: 1.5.176
- configChecksum: 0f8dc3176c4649e784bfde212a52b8a9
+ releaseVersion: 1.5.177
+ configChecksum: 77a2df0fea0b66aa9241821d55f3b0cf
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
published: true
@@ -5668,6 +5668,7 @@ trackedFiles:
docs/models/inputimagemask.mdx:
id: f3c5395c02fe
pristine_git_object: 344add2998e705a7765fbdd4beb30ff364db98c5
+ docs/models/inputimagerole.mdx: {}
docs/models/inputimagetypeenum.md:
id: 0cca56846e94
last_write_checksum: sha1:1a7f77ccee3d3c7962de40074df4a2bfc35cdf2e
@@ -24218,3 +24219,6 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
+releaseNotes: |
+ ## Typescript SDK Changes:
+ * `openrouter.images.listModelEndpoints()`: `response.endpoints[].inputImageRole` **Added**
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 5b6fef9bb..7017a4f44 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -38,7 +38,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
typescript:
- version: 1.5.176
+ version: 1.5.177
acceptHeaderEnum: false
additionalDependencies:
dependencies:
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index bc59043e5..9305d535b 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -17633,6 +17633,14 @@ components:
items:
type: 'string'
type: 'array'
+ input_image_role:
+ description: 'How this endpoint uses input_references: edit transforms the input image; reference guides a new generation.'
+ enum:
+ - 'edit'
+ - 'reference'
+ example: 'edit'
+ type: 'string'
+ x-speakeasy-unknown-values: allow
input_modalities:
description: 'Typed inputs the model accepts, following the Models API V2 document.'
items:
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 863151c7f..6b62daf82 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,8 +2,8 @@ speakeasyVersion: 1.808.1
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:81dde53ef43888d932ce5a8d8c1f2ddf91d0f7af7ff3b12be265a89f1904c9b5
- sourceBlobDigest: sha256:3e80adc614afa2806ab0681a6d90d031ed137170f6cd05d7c7dc1c2822796ce3
+ sourceRevisionDigest: sha256:3bdeec0066fa727df2f03c145586e02660fb6a88ff4e44d22e7e71b7e5e49fc7
+ sourceBlobDigest: sha256:60f2509c58618167397bc0aee540545494d7a7b6402bbf56e72192befedc5d86
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:81dde53ef43888d932ce5a8d8c1f2ddf91d0f7af7ff3b12be265a89f1904c9b5
- sourceBlobDigest: sha256:3e80adc614afa2806ab0681a6d90d031ed137170f6cd05d7c7dc1c2822796ce3
+ sourceRevisionDigest: sha256:3bdeec0066fa727df2f03c145586e02660fb6a88ff4e44d22e7e71b7e5e49fc7
+ sourceBlobDigest: sha256:60f2509c58618167397bc0aee540545494d7a7b6402bbf56e72192befedc5d86
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
- codeSamplesRevisionDigest: sha256:979de4275f0bc27c7bf635a7231ac1d791668a2b743eb35132c492f6740e56ff
+ codeSamplesRevisionDigest: sha256:07777671b704fadc2799d9ba1c94c492a9df115cae2b9b4149e1e7a6089dac02
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.808.1
diff --git a/RELEASES.md b/RELEASES.md
index 795113b0c..9efc9aca2 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -6136,4 +6136,14 @@ Based on:
### Generated
- [typescript v1.5.176] .
### Releases
-- [NPM v1.5.176] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.176 - .
\ No newline at end of file
+- [NPM v1.5.176] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.176 - .
+
+## 2026-12-04 11:13:33
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.808.1 (2.960.8) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [typescript v1.5.177] .
+### Releases
+- [NPM v1.5.177] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.177 - .
\ No newline at end of file
diff --git a/docs/models/imageendpoint.mdx b/docs/models/imageendpoint.mdx
index 98bccba34..e8eb479ae 100644
--- a/docs/models/imageendpoint.mdx
+++ b/docs/models/imageendpoint.mdx
@@ -48,6 +48,7 @@ let value: ImageEndpoint = {
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allowedPassthroughParameters` | *string*[] | ✔️ | Provider-specific options accepted under provider.options[provider_slug]. | [] |
+| `inputImageRole` | [models.InputImageRole](../models/inputimagerole.mdx) | ➖ | How this endpoint uses input_references: edit transforms the input image; reference guides a new generation. | edit |
| `inputModalities` | *models.ModelInputModalityV2*[] | ➖ | Typed inputs the model accepts, following the Models API V2 document. | |
| `outputModalities` | *models.ModelOutputModalityV2*[] | ➖ | Typed outputs with the request fields each accepts, following the Models API V2 document. | |
| `pricing` | [models.ImagePricingEntry](../models/imagepricingentry.mdx)[] | ✔️ | Billable pricing lines for this endpoint. | [
\{
"billable": "output_image",
"cost_usd": 0.05,
"unit": "image"
}
] |
diff --git a/docs/models/inputimagerole.mdx b/docs/models/inputimagerole.mdx
new file mode 100644
index 000000000..1b88c52dd
--- /dev/null
+++ b/docs/models/inputimagerole.mdx
@@ -0,0 +1,21 @@
+---
+title: "InputImageRole"
+---
+
+How this endpoint uses input_references: edit transforms the input image; reference guides a new generation.
+
+## Example Usage
+
+```typescript
+import { InputImageRole } from "@openrouter/sdk/models";
+
+let value: InputImageRole = "edit";
+
+// Open enum: unrecognized values are captured as Unrecognized
+```
+
+## Values
+
+```typescript
+"edit" | "reference" | Unrecognized
+```
\ No newline at end of file
diff --git a/jsr.json b/jsr.json
index cbb60e415..62603c766 100644
--- a/jsr.json
+++ b/jsr.json
@@ -2,7 +2,7 @@
{
"name": "@openrouter/sdk",
- "version": "1.5.176",
+ "version": "1.5.177",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
diff --git a/package.json b/package.json
index b40d8aa7c..61993f25d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@openrouter/sdk",
- "version": "1.5.176",
+ "version": "1.5.177",
"author": "OpenRouter",
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
"keywords": [
@@ -73,15 +73,15 @@
"lint": "eslint --cache --max-warnings=0 src",
"build": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
"prepublishOnly": "npm run build",
- "postinstall": "node scripts/check-types.js || true",
- "prepare": "npm run build",
+ "test": "vitest --run --project unit",
"test:e2e": "vitest --run --project e2e",
- "test:transit": "exit 0",
"test:watch": "vitest --watch --project unit",
"typecheck": "tsc --noEmit",
+ "typecheck:transit": "exit 0",
"compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
- "test": "vitest --run --project unit",
- "typecheck:transit": "exit 0"
+ "prepare": "npm run build",
+ "test:transit": "exit 0",
+ "postinstall": "node scripts/check-types.js || true"
},
"peerDependencies": {
diff --git a/src/lib/config.ts b/src/lib/config.ts
index 87a7b1645..926f325d0 100644
--- a/src/lib/config.ts
+++ b/src/lib/config.ts
@@ -74,7 +74,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
- sdkVersion: "1.5.176",
+ sdkVersion: "1.5.177",
genVersion: "2.960.8",
- userAgent: "speakeasy-sdk/typescript 1.5.176 2.960.8 1.0.0 @openrouter/sdk",
+ userAgent: "speakeasy-sdk/typescript 1.5.177 2.960.8 1.0.0 @openrouter/sdk",
} as const;
diff --git a/src/models/imageendpoint.ts b/src/models/imageendpoint.ts
index 3a45fef8c..7450921ed 100644
--- a/src/models/imageendpoint.ts
+++ b/src/models/imageendpoint.ts
@@ -5,6 +5,8 @@
import * as z from "zod/v4";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
+import * as openEnums from "../types/enums.js";
+import { OpenEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import {
CapabilityDescriptor,
@@ -24,6 +26,18 @@ import {
ModelOutputModalityV2$inboundSchema,
} from "./modeloutputmodalityv2.js";
+/**
+ * How this endpoint uses input_references: edit transforms the input image; reference guides a new generation.
+ */
+export const InputImageRole = {
+ Edit: "edit",
+ Reference: "reference",
+} as const;
+/**
+ * How this endpoint uses input_references: edit transforms the input image; reference guides a new generation.
+ */
+export type InputImageRole = OpenEnum;
+
/**
* An endpoint that serves a given image model.
*/
@@ -32,6 +46,10 @@ export type ImageEndpoint = {
* Provider-specific options accepted under provider.options[provider_slug].
*/
allowedPassthroughParameters: Array;
+ /**
+ * How this endpoint uses input_references: edit transforms the input image; reference guides a new generation.
+ */
+ inputImageRole?: InputImageRole | undefined;
/**
* Typed inputs the model accepts, following the Models API V2 document.
*/
@@ -63,10 +81,15 @@ export type ImageEndpoint = {
supportsStreaming: boolean;
};
+/** @internal */
+export const InputImageRole$inboundSchema: z.ZodType =
+ openEnums.inboundSchema(InputImageRole);
+
/** @internal */
export const ImageEndpoint$inboundSchema: z.ZodType = z
.object({
allowed_passthrough_parameters: z.array(z.string()),
+ input_image_role: InputImageRole$inboundSchema.optional(),
input_modalities: z.array(ModelInputModalityV2$inboundSchema).optional(),
output_modalities: z.array(ModelOutputModalityV2$inboundSchema).optional(),
pricing: z.array(ImagePricingEntry$inboundSchema),
@@ -81,6 +104,7 @@ export const ImageEndpoint$inboundSchema: z.ZodType = z
}).transform((v) => {
return remap$(v, {
"allowed_passthrough_parameters": "allowedPassthroughParameters",
+ "input_image_role": "inputImageRole",
"input_modalities": "inputModalities",
"output_modalities": "outputModalities",
"provider_name": "providerName",