diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 4305bba6a..a61c66f3c 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,12 +1,12 @@
lockVersion: ""
id: ""
management:
- docChecksum: 07fbb79d51250e334f820b313eb992cb
+ docChecksum: 78cda80193a326d2864d2cc849dd3ca6
docVersion: 1.0.0
speakeasyVersion: 1.808.1
generationVersion: 2.960.8
- releaseVersion: 1.5.174
- configChecksum: afe6af6ec10a534ea1b8b05215e5633a
+ releaseVersion: 1.5.175
+ configChecksum: 6d4acdd3418ee4723460d590d2a14555
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
published: true
@@ -20505,7 +20505,7 @@ examples:
createImages:
speakeasy-default-create-images:
requestBody:
- application/json: {"model": "bytedance-seed/seedream-4.5", "prompt": "a red panda astronaut floating in space, studio lighting"}
+ application/json: {"model": "bytedance-seed/seedream-4.5"}
responses:
"200":
application/json: {"created": 1748372400, "data": [{}]}
@@ -24218,3 +24218,4 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
+releaseNotes: "## Typescript SDK Changes:\n* `openrouter.images.generate()`: \n * `request.imageGenerationRequest.prompt` **Changed**\n"
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 2b5f1812e..4e1b1da4e 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -38,7 +38,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
typescript:
- version: 1.5.174
+ version: 1.5.175
acceptHeaderEnum: false
additionalDependencies:
dependencies:
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index 064be408b..50189a227 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -18098,7 +18098,7 @@ components:
type: 'string'
x-speakeasy-unknown-values: allow
prompt:
- description: 'Text description of the desired image'
+ description: 'Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead.'
example: 'a red panda astronaut floating in space, studio lighting'
minLength: 1
type: 'string'
@@ -18163,7 +18163,6 @@ components:
type: 'string'
required:
- 'model'
- - 'prompt'
type: 'object'
ImageGenerationResponse:
description: 'Image generation response'
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index d83291b05..d1ae725c5 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:479ff757f75fd3f10c14301133831a9ceceff32d48f5262245f6454234231f98
- sourceBlobDigest: sha256:15a13f926d6ee036c1ff95838832674f2199a20a9b0f9e1a75a678433829d3a7
+ sourceRevisionDigest: sha256:84dcf6baea33334dd13051ff7655fd2f137ab31c7ccc655572b9663de77906a8
+ sourceBlobDigest: sha256:3ae4d15f8e5299884e9a223dd05616d30c8430a6d3a956197523f434069cf02f
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:479ff757f75fd3f10c14301133831a9ceceff32d48f5262245f6454234231f98
- sourceBlobDigest: sha256:15a13f926d6ee036c1ff95838832674f2199a20a9b0f9e1a75a678433829d3a7
+ sourceRevisionDigest: sha256:84dcf6baea33334dd13051ff7655fd2f137ab31c7ccc655572b9663de77906a8
+ sourceBlobDigest: sha256:3ae4d15f8e5299884e9a223dd05616d30c8430a6d3a956197523f434069cf02f
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
- codeSamplesRevisionDigest: sha256:3b1bf96919d29904beb4f9b7f4c5222848076aecdba371b7c8809e103f70e383
+ codeSamplesRevisionDigest: sha256:fe4bf962f41f788d840048c4d364d723675e163f8e5c5635a545832de938d5b3
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.808.1
diff --git a/RELEASES.md b/RELEASES.md
index 021c954d7..9a1acfbda 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -6116,4 +6116,14 @@ Based on:
### Generated
- [typescript v1.5.174] .
### Releases
-- [NPM v1.5.174] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.174 - .
\ No newline at end of file
+- [NPM v1.5.174] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.174 - .
+
+## 2026-12-04 03:01:34
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.808.1 (2.960.8) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [typescript v1.5.175] .
+### Releases
+- [NPM v1.5.175] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.175 - .
\ No newline at end of file
diff --git a/docs/models/imagegenerationrequest.mdx b/docs/models/imagegenerationrequest.mdx
index bc3f41c34..411d7f698 100644
--- a/docs/models/imagegenerationrequest.mdx
+++ b/docs/models/imagegenerationrequest.mdx
@@ -11,7 +11,6 @@ import { ImageGenerationRequest } from "@openrouter/sdk/models";
let value: ImageGenerationRequest = {
model: "bytedance-seed/seedream-4.5",
- prompt: "a red panda astronaut floating in space, studio lighting",
};
```
@@ -29,7 +28,7 @@ let value: ImageGenerationRequest = {
| `n` | *number* | ➖ | Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. | 1 |
| `outputCompression` | *number* | ➖ | Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format "jpeg" or "webp"). | 100 |
| `outputFormat` | [models.ImageGenerationRequestOutputFormat](../models/imagegenerationrequestoutputformat.mdx) | ➖ | Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`). | png |
-| `prompt` | *string* | ✔️ | Text description of the desired image | a red panda astronaut floating in space, studio lighting |
+| `prompt` | *string* | ➖ | Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead. | a red panda astronaut floating in space, studio lighting |
| `provider` | [models.ImageGenerationProviderPreferences](../models/imagegenerationproviderpreferences.mdx) | ➖ | Provider routing preferences and provider-specific passthrough configuration. | \{
"allow_fallbacks": false,
"only": [
"google-ai-studio"
]
} |
| `quality` | [models.ImageGenerationRequestQuality](../models/imagegenerationrequestquality.mdx) | ➖ | Rendering quality. Providers without a quality knob ignore this. | high |
| `resolution` | [models.ImageGenerationRequestResolution](../models/imagegenerationrequestresolution.mdx) | ➖ | Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. | 2K |
diff --git a/docs/models/operations/createimagesrequest.mdx b/docs/models/operations/createimagesrequest.mdx
index 7bd059459..caedf7059 100644
--- a/docs/models/operations/createimagesrequest.mdx
+++ b/docs/models/operations/createimagesrequest.mdx
@@ -10,7 +10,6 @@ import { CreateImagesRequest } from "@openrouter/sdk/models/operations";
let value: CreateImagesRequest = {
imageGenerationRequest: {
model: "bytedance-seed/seedream-4.5",
- prompt: "a red panda astronaut floating in space, studio lighting",
},
};
```
diff --git a/jsr.json b/jsr.json
index 999dc7468..bd33be372 100644
--- a/jsr.json
+++ b/jsr.json
@@ -2,7 +2,7 @@
{
"name": "@openrouter/sdk",
- "version": "1.5.174",
+ "version": "1.5.175",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
diff --git a/package.json b/package.json
index 970a476e7..8b4e90684 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@openrouter/sdk",
- "version": "1.5.174",
+ "version": "1.5.175",
"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",
- "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
"prepare": "npm run build",
"test": "vitest --run --project unit",
+ "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
"test:e2e": "vitest --run --project e2e",
"test:transit": "exit 0",
+ "test:watch": "vitest --watch --project unit",
"typecheck": "tsc --noEmit",
"typecheck:transit": "exit 0",
- "postinstall": "node scripts/check-types.js || true",
- "test:watch": "vitest --watch --project unit"
+ "postinstall": "node scripts/check-types.js || true"
},
"peerDependencies": {
diff --git a/src/lib/config.ts b/src/lib/config.ts
index ef01314c2..64f83c1bb 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.174",
+ sdkVersion: "1.5.175",
genVersion: "2.960.8",
- userAgent: "speakeasy-sdk/typescript 1.5.174 2.960.8 1.0.0 @openrouter/sdk",
+ userAgent: "speakeasy-sdk/typescript 1.5.175 2.960.8 1.0.0 @openrouter/sdk",
} as const;
diff --git a/src/models/imagegenerationrequest.ts b/src/models/imagegenerationrequest.ts
index de3f3f9e0..437023285 100644
--- a/src/models/imagegenerationrequest.ts
+++ b/src/models/imagegenerationrequest.ts
@@ -211,9 +211,9 @@ export type ImageGenerationRequest = {
*/
outputFormat?: ImageGenerationRequestOutputFormat | undefined;
/**
- * Text description of the desired image
+ * Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead.
*/
- prompt: string;
+ prompt?: string | undefined;
/**
* Provider routing preferences and provider-specific passthrough configuration.
*/
@@ -353,7 +353,7 @@ export type ImageGenerationRequest$Outbound = {
n?: number | undefined;
output_compression?: number | undefined;
output_format?: string | undefined;
- prompt: string;
+ prompt?: string | undefined;
provider?: ImageGenerationProviderPreferences$Outbound | undefined;
quality?: string | undefined;
resolution?: string | undefined;
@@ -381,7 +381,7 @@ export const ImageGenerationRequest$outboundSchema: z.ZodType<
n: z.int().optional(),
outputCompression: z.int().optional(),
outputFormat: ImageGenerationRequestOutputFormat$outboundSchema.optional(),
- prompt: z.string(),
+ prompt: z.string().optional(),
provider: ImageGenerationProviderPreferences$outboundSchema.optional(),
quality: ImageGenerationRequestQuality$outboundSchema.optional(),
resolution: ImageGenerationRequestResolution$outboundSchema.optional(),