upres-cli 0.1.1 → 0.2.0

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.
package/dist/cli.js CHANGED
@@ -1,4 +1,314 @@
1
1
  #!/usr/bin/env node
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __esm = (fn, res) => function __init() {
5
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
6
+ };
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+
12
+ // src/models.ts
13
+ var MODELS, IMAGE_MODELS, VIDEO_MODELS, DEFAULT_IMAGE_MODEL, DEFAULT_VIDEO_MODEL;
14
+ var init_models = __esm({
15
+ "src/models.ts"() {
16
+ "use strict";
17
+ MODELS = [
18
+ {
19
+ id: "flare",
20
+ name: "Flare",
21
+ description: "Everyday photos, 2x-4x. Fastest and cheapest. Does not invent detail.",
22
+ category: "image-upscale",
23
+ price: "Included in plan quota",
24
+ inputTypes: ["image/*"],
25
+ params: [
26
+ { name: "image", type: "string", required: true, description: "Image URL or file" },
27
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4], description: "Scale multiplier" }
28
+ ]
29
+ },
30
+ {
31
+ id: "prism",
32
+ name: "Prism",
33
+ description: "Text, logos, screenshots and product shots. Keeps edges true, does not invent detail.",
34
+ category: "image-upscale",
35
+ price: "Included in plan quota",
36
+ inputTypes: ["image/*"],
37
+ params: [
38
+ { name: "image", type: "string", required: true, description: "Image URL or file" },
39
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4], description: "Scale multiplier" }
40
+ ]
41
+ },
42
+ {
43
+ id: "lumen",
44
+ name: "Lumen",
45
+ description: "Maximum detail recovery for print, up to 8x. Slower and dearer than Flare.",
46
+ category: "image-upscale",
47
+ price: "Included in plan quota",
48
+ inputTypes: ["image/*"],
49
+ params: [
50
+ { name: "image", type: "string", required: true, description: "Image URL or file" },
51
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4, 8], description: "Scale multiplier" }
52
+ ]
53
+ },
54
+ {
55
+ id: "mirage",
56
+ name: "Mirage",
57
+ description: "Invents plausible new detail rather than recovering what was there. Most dramatic, least faithful. Good for art, wrong for documents.",
58
+ category: "image-enhance",
59
+ price: "Included in plan quota",
60
+ inputTypes: ["image/*"],
61
+ params: [
62
+ { name: "image", type: "string", required: true, description: "Image URL or file" },
63
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4, 8], description: "Scale multiplier" }
64
+ ]
65
+ },
66
+ {
67
+ id: "motion",
68
+ name: "Motion",
69
+ description: "Fast 4K finish for AI-generated video (Sora, Kling, Runway). Frame-consistent, does not invent faces.",
70
+ category: "video-upscale",
71
+ price: "Counts against monthly video minutes",
72
+ inputTypes: ["video/*"],
73
+ params: [
74
+ { name: "video", type: "string", required: true, description: "Video URL or file" },
75
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4], description: "Scale multiplier" }
76
+ ]
77
+ },
78
+ {
79
+ id: "motion-x",
80
+ name: "Motion X",
81
+ description: "Cinema-grade video upscale for film and commercials. Noticeably slower and dearer per second than Motion.",
82
+ category: "video-upscale",
83
+ price: "Counts against monthly video minutes",
84
+ inputTypes: ["video/*"],
85
+ params: [
86
+ { name: "video", type: "string", required: true, description: "Video URL or file" },
87
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4], description: "Scale multiplier" }
88
+ ]
89
+ }
90
+ ];
91
+ IMAGE_MODELS = MODELS.filter((m) => m.category !== "video-upscale");
92
+ VIDEO_MODELS = MODELS.filter((m) => m.category === "video-upscale");
93
+ DEFAULT_IMAGE_MODEL = "flare";
94
+ DEFAULT_VIDEO_MODEL = "motion";
95
+ }
96
+ });
97
+
98
+ // src/mcp.ts
99
+ var mcp_exports = {};
100
+ __export(mcp_exports, {
101
+ handleMessage: () => handleMessage,
102
+ startStdio: () => startStdio
103
+ });
104
+ function apiKey() {
105
+ return process.env.UPRES_API_KEY ?? "";
106
+ }
107
+ function baseUrl() {
108
+ return process.env.UPRES_BASE_URL ?? DEFAULT_BASE_URL2;
109
+ }
110
+ async function api(method, endpoint, body) {
111
+ const key = apiKey();
112
+ if (!key) {
113
+ throw new Error("UPRES_API_KEY is not set. Get a key at https://upres.ai/account/api-keys");
114
+ }
115
+ const res = await fetch(`${baseUrl()}${endpoint}`, {
116
+ method,
117
+ headers: {
118
+ Authorization: `Bearer ${key}`,
119
+ ...body ? { "Content-Type": "application/json" } : {}
120
+ },
121
+ body: body ? JSON.stringify(body) : void 0
122
+ });
123
+ const data = await res.json().catch(() => ({}));
124
+ if (!res.ok) {
125
+ throw new Error(data.error ?? `HTTP ${res.status}`);
126
+ }
127
+ return data;
128
+ }
129
+ function ok(id, result) {
130
+ return { jsonrpc: "2.0", id, result };
131
+ }
132
+ function fail(id, code, message) {
133
+ return { jsonrpc: "2.0", id, error: { code, message } };
134
+ }
135
+ function text(obj) {
136
+ return { content: [{ type: "text", text: JSON.stringify(obj, null, 2) }] };
137
+ }
138
+ async function callTool(name, args) {
139
+ switch (name) {
140
+ case "upres_list_models":
141
+ return text(
142
+ MODELS.map((m) => ({
143
+ id: m.id,
144
+ name: m.name,
145
+ category: m.category,
146
+ description: m.description
147
+ }))
148
+ );
149
+ case "upres_get_credits": {
150
+ const jobs = await api("GET", "/jobs?limit=100");
151
+ const data = jobs.data ?? [];
152
+ return text({
153
+ recent_jobs: data.length,
154
+ completed: data.filter((j) => j.status === "completed").length,
155
+ pricing: "https://upres.ai/pricing"
156
+ });
157
+ }
158
+ case "upres_upscale_image": {
159
+ const image_url = String(args.image_url ?? "");
160
+ if (!image_url) throw new Error("image_url is required");
161
+ const job = await api("POST", "/jobs", {
162
+ image_url,
163
+ model: args.model ?? "flare",
164
+ scale: args.scale ?? 4
165
+ });
166
+ return text(job);
167
+ }
168
+ case "upres_upscale_video": {
169
+ const video_url = String(args.video_url ?? "");
170
+ if (!video_url) throw new Error("video_url is required");
171
+ const job = await api("POST", "/jobs", {
172
+ image_url: video_url,
173
+ model: args.model ?? "motion",
174
+ scale: args.scale ?? 4
175
+ });
176
+ return text(job);
177
+ }
178
+ case "upres_get_job": {
179
+ const job_id = String(args.job_id ?? "");
180
+ if (!job_id) throw new Error("job_id is required");
181
+ const job = await api("GET", `/jobs/${job_id}`);
182
+ return text(job);
183
+ }
184
+ default:
185
+ throw new Error(`Unknown tool: ${name}`);
186
+ }
187
+ }
188
+ async function handle(msg) {
189
+ const id = msg.id;
190
+ const method = String(msg.method ?? "");
191
+ if (msg.jsonrpc !== "2.0") return fail(id, -32600, "Invalid Request");
192
+ if (method === "initialize") {
193
+ return ok(id, {
194
+ protocolVersion: "2024-11-05",
195
+ capabilities: { tools: {} },
196
+ serverInfo: { name: "upres", version: VERSION }
197
+ });
198
+ }
199
+ if (method === "notifications/initialized" || method === "initialized") return null;
200
+ if (method === "ping") return ok(id, {});
201
+ if (method === "tools/list") return ok(id, { tools: TOOLS });
202
+ if (method === "tools/call") {
203
+ const params = msg.params ?? {};
204
+ const name = String(params.name ?? "");
205
+ const args = params.arguments ?? {};
206
+ try {
207
+ return ok(id, await callTool(name, args));
208
+ } catch (e) {
209
+ return ok(id, {
210
+ isError: true,
211
+ content: [{ type: "text", text: e.message }]
212
+ });
213
+ }
214
+ }
215
+ if (id === void 0) return null;
216
+ return fail(id, -32601, `Method not found: ${method}`);
217
+ }
218
+ async function handleMessage(msg) {
219
+ return handle(msg);
220
+ }
221
+ function startStdio() {
222
+ let buf = "";
223
+ process.stdin.setEncoding("utf8");
224
+ process.stdin.on("data", async (chunk) => {
225
+ buf += chunk;
226
+ while (true) {
227
+ const nl = buf.indexOf("\n");
228
+ if (nl < 0) break;
229
+ const line = buf.slice(0, nl).trim();
230
+ buf = buf.slice(nl + 1);
231
+ if (!line) continue;
232
+ let msg;
233
+ try {
234
+ msg = JSON.parse(line);
235
+ } catch {
236
+ continue;
237
+ }
238
+ const reply = await handle(msg);
239
+ if (reply) process.stdout.write(JSON.stringify(reply) + "\n");
240
+ }
241
+ });
242
+ }
243
+ var VERSION, DEFAULT_BASE_URL2, TOOLS;
244
+ var init_mcp = __esm({
245
+ "src/mcp.ts"() {
246
+ "use strict";
247
+ init_models();
248
+ VERSION = "0.2.0";
249
+ DEFAULT_BASE_URL2 = "https://api.upres.ai/v1";
250
+ TOOLS = [
251
+ {
252
+ name: "upres_list_models",
253
+ description: "List UpRes upscale models (flare, prism, lumen, mirage, motion, motion-x) with use cases.",
254
+ inputSchema: { type: "object", properties: {}, additionalProperties: false }
255
+ },
256
+ {
257
+ name: "upres_get_credits",
258
+ description: "Show recent job count for the authenticated UpRes API key as a quota proxy.",
259
+ inputSchema: { type: "object", properties: {}, additionalProperties: false }
260
+ },
261
+ {
262
+ name: "upres_upscale_image",
263
+ description: "Submit an image upscale job from a public URL. Models: flare, prism, lumen, mirage.",
264
+ inputSchema: {
265
+ type: "object",
266
+ properties: {
267
+ image_url: { type: "string", description: "Public HTTPS URL of the image" },
268
+ model: {
269
+ type: "string",
270
+ enum: ["flare", "prism", "lumen", "mirage"],
271
+ description: "Image model. Default flare."
272
+ },
273
+ scale: { type: "integer", enum: [2, 4, 8], description: "Scale multiplier. Default 4." }
274
+ },
275
+ required: ["image_url"],
276
+ additionalProperties: false
277
+ }
278
+ },
279
+ {
280
+ name: "upres_upscale_video",
281
+ description: "Submit a video upscale job from a public URL. Models: motion, motion-x.",
282
+ inputSchema: {
283
+ type: "object",
284
+ properties: {
285
+ video_url: { type: "string", description: "Public HTTPS URL of the video" },
286
+ model: {
287
+ type: "string",
288
+ enum: ["motion", "motion-x"],
289
+ description: "Video model. Default motion."
290
+ },
291
+ scale: { type: "integer", enum: [2, 4], description: "Scale multiplier. Default 4." }
292
+ },
293
+ required: ["video_url"],
294
+ additionalProperties: false
295
+ }
296
+ },
297
+ {
298
+ name: "upres_get_job",
299
+ description: "Get status and result_url of an UpRes job by id.",
300
+ inputSchema: {
301
+ type: "object",
302
+ properties: {
303
+ job_id: { type: "string", description: "Job UUID returned by an upscale tool" }
304
+ },
305
+ required: ["job_id"],
306
+ additionalProperties: false
307
+ }
308
+ }
309
+ ];
310
+ }
311
+ });
2
312
 
3
313
  // src/cli.ts
4
314
  import fs2 from "fs";
@@ -57,7 +367,7 @@ var UpresClient = class {
57
367
  if (res.status === 402) {
58
368
  console.error(
59
369
  `Error: Monthly quota exceeded (used ${err.used ?? "?"}/${err.quota ?? "?"}).
60
- Upgrade to Business tier at https://upres.ai/pricing`
370
+ Upgrade to Studio at https://upres.ai/pricing`
61
371
  );
62
372
  process.exit(1);
63
373
  }
@@ -164,226 +474,9 @@ var UpresClient = class {
164
474
  }
165
475
  };
166
476
 
167
- // src/models.ts
168
- var MODELS = [
169
- {
170
- id: "wavespeed-ai/real-esrgan",
171
- name: "Real-ESRGAN",
172
- description: "Fast image super-resolution with artifact removal. Best value.",
173
- category: "image-upscale",
174
- price: "$0.0024/image",
175
- inputTypes: ["image/*"],
176
- params: [
177
- { name: "image", type: "string", required: true, description: "Image URL" }
178
- ]
179
- },
180
- {
181
- id: "wavespeed-ai/image-upscaler",
182
- name: "Image Upscaler",
183
- description: "AI upscaler to 2K/4K/8K with detail preservation.",
184
- category: "image-upscale",
185
- price: "$0.01/image",
186
- inputTypes: ["image/*"],
187
- params: [
188
- { name: "image", type: "string", required: true, description: "Image URL" },
189
- { name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
190
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
191
- ]
192
- },
193
- {
194
- id: "wavespeed-ai/ultimate-image-upscaler",
195
- name: "Ultimate Image Upscaler",
196
- description: "Most advanced AI enhancer. Reimagines fine detail at 2K/4K/8K.",
197
- category: "image-upscale",
198
- price: "$0.01/image",
199
- inputTypes: ["image/*"],
200
- params: [
201
- { name: "image", type: "string", required: true, description: "Image URL" },
202
- { name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
203
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
204
- ]
205
- },
206
- {
207
- id: "wavespeed-ai/seedvr2/image",
208
- name: "SeedVR2 Image",
209
- description: "ByteDance SeedVR2 architecture for sharp, detailed upscaling.",
210
- category: "image-upscale",
211
- price: "$0.01/image",
212
- inputTypes: ["image/*"],
213
- params: [
214
- { name: "image", type: "string", required: true, description: "Image URL" },
215
- { name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
216
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
217
- ]
218
- },
219
- {
220
- id: "bria/increase-resolution",
221
- name: "Bria Increase Resolution",
222
- description: "Preservation-first 2x/4x upscale. No content drift.",
223
- category: "image-upscale",
224
- price: "$0.04/image",
225
- inputTypes: ["image/*"],
226
- params: [
227
- { name: "image", type: "string", required: true, description: "Image URL. Max output 8192x8192" },
228
- { name: "desired_increase", type: "integer", required: false, default: 2, options: [2, 4], description: "Resolution multiplier" }
229
- ]
230
- },
231
- {
232
- id: "clarity-ai/crystal-upscaler",
233
- name: "Crystal Upscaler",
234
- description: "Upscale to target megapixels with creativity control.",
235
- category: "image-upscale",
236
- price: "Pay per use",
237
- inputTypes: ["image/*"],
238
- params: [
239
- { name: "image", type: "string", required: true, description: "Image URL" },
240
- { name: "target_megapixels", type: "number", required: false, default: 2, range: "1-200", description: "Target size in megapixels" },
241
- { name: "creativity", type: "number", required: false, default: 0, range: "0-10", description: "Quality improvement strength" }
242
- ]
243
- },
244
- {
245
- id: "recraft-ai/recraft-crisp-upscale",
246
- name: "Recraft Crisp Upscale",
247
- description: "Enhances textures and facial features. Ideal for portraits.",
248
- category: "image-enhance",
249
- price: "Pay per use",
250
- inputTypes: ["image/*"],
251
- params: [
252
- { name: "image", type: "string", required: true, description: "Image URL or base64" }
253
- ]
254
- },
255
- {
256
- id: "recraft-ai/recraft-creative-upscale",
257
- name: "Recraft Creative Upscale",
258
- description: "Generative enhancement adding depth and polish to complex elements.",
259
- category: "image-enhance",
260
- price: "$0.25/image",
261
- inputTypes: ["image/*"],
262
- params: [
263
- { name: "image", type: "string", required: true, description: "Image URL or base64" }
264
- ]
265
- },
266
- {
267
- id: "wavespeed-ai/phota/enhance",
268
- name: "Phota Enhance",
269
- description: "Batch enhancement up to 4 images per run with optional 4K output.",
270
- category: "image-enhance",
271
- price: "$0.09/image",
272
- inputTypes: ["image/*"],
273
- params: [
274
- { name: "image", type: "string", required: true, description: "Image URL or base64 data URI" },
275
- { name: "num_images", type: "integer", required: false, default: 1, range: "1-4", description: "Enhanced variations to generate" },
276
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
277
- ]
278
- },
279
- {
280
- id: "wavespeed-ai/z-image-turbo/image-to-image",
281
- name: "Z-Image Turbo",
282
- description: "Fast enhance with strength control. Low strength = subtle upscale.",
283
- category: "image-enhance",
284
- price: "$0.01/image",
285
- inputTypes: ["image/*"],
286
- params: [
287
- { name: "image", type: "string", required: true, description: "Reference image URL" },
288
- { name: "prompt", type: "string", required: true, description: "Enhancement prompt", default: "enhance image quality, sharp details" },
289
- { name: "strength", type: "number", required: false, default: 0.2, range: "0.00-1.00", description: "0-0.3 subtle enhance, 0.3-0.6 moderate, 0.6+ creative" },
290
- { name: "size", type: "string", required: false, default: "1024*1024", description: "Output size (width*height)" },
291
- { name: "seed", type: "integer", required: false, default: -1, range: "-1-2147483647", description: "Random seed. -1 = random" },
292
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
293
- ]
294
- },
295
- {
296
- id: "wavespeed-ai/video-upscaler",
297
- name: "Video Upscaler",
298
- description: "Fast AI video upscaling to 720p-4K. Best value for video.",
299
- category: "video-upscale",
300
- price: "$0.005-0.02/sec",
301
- inputTypes: ["video/*"],
302
- params: [
303
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
304
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
305
- ]
306
- },
307
- {
308
- id: "wavespeed-ai/video-upscaler-pro",
309
- name: "Video Upscaler Pro",
310
- description: "Motion-aware processing with artifact cleanup for pro results.",
311
- category: "video-upscale",
312
- price: "$0.03-0.05/sec",
313
- inputTypes: ["video/*"],
314
- params: [
315
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
316
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
317
- ]
318
- },
319
- {
320
- id: "wavespeed-ai/ultimate-video-upscaler",
321
- name: "Ultimate Video Upscaler",
322
- description: "Deep learning detail reconstruction for highest quality 4K video.",
323
- category: "video-upscale",
324
- price: "$0.02-0.08/sec",
325
- inputTypes: ["video/*"],
326
- params: [
327
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
328
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
329
- ]
330
- },
331
- {
332
- id: "wavespeed-ai/seedvr2/video",
333
- name: "SeedVR2 Video",
334
- description: "16B param ByteDance model. Highest fidelity with frame consistency.",
335
- category: "video-upscale",
336
- price: "$0.02-0.05/sec",
337
- inputTypes: ["video/*"],
338
- params: [
339
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
340
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
341
- ]
342
- },
343
- {
344
- id: "bytedance/video-upscaler",
345
- name: "ByteDance Video Upscaler",
346
- description: "ByteDance super-resolution recovering fine detail to 4K.",
347
- category: "video-upscale",
348
- price: "$0.007-0.029/sec",
349
- inputTypes: ["video/*"],
350
- params: [
351
- { name: "video", type: "string", required: true, description: "Video URL" },
352
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["1080p", "2k", "4k"], description: "Target resolution" }
353
- ]
354
- },
355
- {
356
- id: "bria/fibo/video-upscaler",
357
- name: "Bria Video Upscaler",
358
- description: "Temporal consistency with multiple output codec options.",
359
- category: "video-upscale",
360
- price: "$0.14/sec",
361
- inputTypes: ["video/*"],
362
- params: [
363
- { name: "video", type: "string", required: true, description: "Video URL" },
364
- { name: "target_resolution", type: "string", required: false, default: "2k", options: ["2k", "4k"], description: "Target resolution" },
365
- { name: "output_container_and_codec", type: "string", required: false, default: "mp4_h264", options: ["webm_vp9", "mp4_h264", "mp4_h265", "mov_h265", "mov_prores4s", "mkv_h264", "mkv_h265", "mkv_vp9", "gif"], description: "Output container and codec" }
366
- ]
367
- },
368
- {
369
- id: "runwayml/upscale-v1",
370
- name: "RunwayML Upscale",
371
- description: "Simple one-click video upscale to 4K by RunwayML.",
372
- category: "video-upscale",
373
- price: "$0.02/sec",
374
- inputTypes: ["video/*"],
375
- params: [
376
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" }
377
- ]
378
- }
379
- ];
380
- var IMAGE_MODELS = MODELS.filter((m) => m.category !== "video-upscale");
381
- var VIDEO_MODELS = MODELS.filter((m) => m.category === "video-upscale");
382
- var DEFAULT_IMAGE_MODEL = "wavespeed-ai/image-upscaler";
383
- var DEFAULT_VIDEO_MODEL = "wavespeed-ai/video-upscaler";
384
-
385
477
  // src/cli.ts
386
- var VERSION = "0.1.0";
478
+ init_models();
479
+ var VERSION2 = "0.2.0";
387
480
  function parseArgs(argv) {
388
481
  const args = [];
389
482
  const flags = {};
@@ -409,7 +502,7 @@ function parseArgs(argv) {
409
502
  }
410
503
  function printHelp() {
411
504
  console.log(`
412
- upres-cli v${VERSION} \u2014 AI image & video upscaling
505
+ upres-cli v${VERSION2} \u2014 AI image & video upscaling
413
506
 
414
507
  USAGE
415
508
  upres <command> [options]
@@ -420,12 +513,12 @@ COMMANDS
420
513
  models List available models
421
514
  jobs List recent jobs
422
515
  account Show quota and plan info
516
+ mcp Speak MCP over stdin/stdout for Claude, Cursor, Hermes
423
517
  version Print version
424
518
 
425
519
  OPTIONS
426
- --model <id> Model ID (default: wavespeed-ai/image-upscaler)
427
- --scale <n> Scale factor 2-8 (image only, default: 4)
428
- --resolution <res> Target resolution: 2k, 4k, 8k, 720p, 1080p (default: 4k)
520
+ --model <id> Model ID (default: flare for images, motion for video)
521
+ --scale <n> Scale factor 2-8 (default: 4)
429
522
  --output <path> Output file or directory
430
523
  --api-key <key> API key (or set UPRES_API_KEY env var)
431
524
  --wait Wait for job to complete (default: true)
@@ -436,22 +529,23 @@ OPTIONS
436
529
  --help Show help
437
530
 
438
531
  EXAMPLES
439
- upres upscale photo.jpg --model real-esrgan --scale 4
440
- upres upscale photo.jpg --model wavespeed-ai/image-upscaler --resolution 8k --output out.jpg
441
- upres batch ./photos/ --model wavespeed-ai/real-esrgan --output ./upscaled/
532
+ upres upscale photo.jpg --model flare --scale 4
533
+ upres upscale photo.jpg --model lumen --scale 8 --output out.jpg
534
+ upres upscale clip.mp4 --model motion
535
+ upres batch ./photos/ --model flare --output ./upscaled/
442
536
  upres models
443
537
  upres jobs --limit 10 --status completed
444
538
  upres account
445
539
 
446
540
  API KEY
447
- 1. Get a free key at https://upres.ai/account/api-keys
541
+ 1. Get a Studio key at https://upres.ai/account/api-keys
448
542
  2. Export: UPRES_API_KEY=upres_yourkey
449
543
  3. Or save: echo '{"apiKey":"upres_yourkey"}' > ~/.config/upres/config.json
450
544
 
451
545
  PRICING
452
- Free: 5 ops/month
453
- Pro: $19/month \u2014 100 ops, HD output, no watermark
454
- Biz: $49/month \u2014 unlimited + batch API + all models
546
+ Free: 3 upscales/month
547
+ Creator: $9/month \u2014 50 stills + 20 min 4K video
548
+ Studio: $39/month \u2014 250 stills + 90 min 4K video + API
455
549
 
456
550
  https://upres.ai/pricing
457
551
  `);
@@ -632,7 +726,7 @@ async function main() {
632
726
  process.exit(0);
633
727
  }
634
728
  if (command === "version" || command === "--version" || command === "-v") {
635
- console.log(`upres-cli v${VERSION}`);
729
+ console.log(`upres-cli v${VERSION2}`);
636
730
  process.exit(0);
637
731
  }
638
732
  switch (command) {
@@ -651,6 +745,11 @@ async function main() {
651
745
  case "account":
652
746
  await cmdAccount(flags);
653
747
  break;
748
+ case "mcp": {
749
+ const { startStdio: startStdio2 } = await Promise.resolve().then(() => (init_mcp(), mcp_exports));
750
+ startStdio2();
751
+ return;
752
+ }
654
753
  default:
655
754
  console.error(`Unknown command: ${command}
656
755
  Run "upres --help" for usage.`);