upres-cli 0.1.0 → 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/models.js CHANGED
@@ -1,222 +1,82 @@
1
- #!/usr/bin/env node
2
-
3
1
  // src/models.ts
4
2
  var MODELS = [
5
3
  {
6
- id: "wavespeed-ai/real-esrgan",
7
- name: "Real-ESRGAN",
8
- description: "Fast image super-resolution with artifact removal. Best value.",
4
+ id: "flare",
5
+ name: "Flare",
6
+ description: "Everyday photos, 2x-4x. Fastest and cheapest. Does not invent detail.",
9
7
  category: "image-upscale",
10
- price: "$0.0024/image",
8
+ price: "Included in plan quota",
11
9
  inputTypes: ["image/*"],
12
10
  params: [
13
- { name: "image", type: "string", required: true, description: "Image URL" }
11
+ { name: "image", type: "string", required: true, description: "Image URL or file" },
12
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4], description: "Scale multiplier" }
14
13
  ]
15
14
  },
16
15
  {
17
- id: "wavespeed-ai/image-upscaler",
18
- name: "Image Upscaler",
19
- description: "AI upscaler to 2K/4K/8K with detail preservation.",
16
+ id: "prism",
17
+ name: "Prism",
18
+ description: "Text, logos, screenshots and product shots. Keeps edges true, does not invent detail.",
20
19
  category: "image-upscale",
21
- price: "$0.01/image",
20
+ price: "Included in plan quota",
22
21
  inputTypes: ["image/*"],
23
22
  params: [
24
- { name: "image", type: "string", required: true, description: "Image URL" },
25
- { name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
26
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
23
+ { name: "image", type: "string", required: true, description: "Image URL or file" },
24
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4], description: "Scale multiplier" }
27
25
  ]
28
26
  },
29
27
  {
30
- id: "wavespeed-ai/ultimate-image-upscaler",
31
- name: "Ultimate Image Upscaler",
32
- description: "Most advanced AI enhancer. Reimagines fine detail at 2K/4K/8K.",
28
+ id: "lumen",
29
+ name: "Lumen",
30
+ description: "Maximum detail recovery for print, up to 8x. Slower and dearer than Flare.",
33
31
  category: "image-upscale",
34
- price: "$0.01/image",
32
+ price: "Included in plan quota",
35
33
  inputTypes: ["image/*"],
36
34
  params: [
37
- { name: "image", type: "string", required: true, description: "Image URL" },
38
- { name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
39
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
35
+ { name: "image", type: "string", required: true, description: "Image URL or file" },
36
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4, 8], description: "Scale multiplier" }
40
37
  ]
41
38
  },
42
39
  {
43
- id: "wavespeed-ai/seedvr2/image",
44
- name: "SeedVR2 Image",
45
- description: "ByteDance SeedVR2 architecture for sharp, detailed upscaling.",
46
- category: "image-upscale",
47
- price: "$0.01/image",
48
- inputTypes: ["image/*"],
49
- params: [
50
- { name: "image", type: "string", required: true, description: "Image URL" },
51
- { name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
52
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
53
- ]
54
- },
55
- {
56
- id: "bria/increase-resolution",
57
- name: "Bria Increase Resolution",
58
- description: "Preservation-first 2x/4x upscale. No content drift.",
59
- category: "image-upscale",
60
- price: "$0.04/image",
61
- inputTypes: ["image/*"],
62
- params: [
63
- { name: "image", type: "string", required: true, description: "Image URL. Max output 8192x8192" },
64
- { name: "desired_increase", type: "integer", required: false, default: 2, options: [2, 4], description: "Resolution multiplier" }
65
- ]
66
- },
67
- {
68
- id: "clarity-ai/crystal-upscaler",
69
- name: "Crystal Upscaler",
70
- description: "Upscale to target megapixels with creativity control.",
71
- category: "image-upscale",
72
- price: "Pay per use",
73
- inputTypes: ["image/*"],
74
- params: [
75
- { name: "image", type: "string", required: true, description: "Image URL" },
76
- { name: "target_megapixels", type: "number", required: false, default: 2, range: "1-200", description: "Target size in megapixels" },
77
- { name: "creativity", type: "number", required: false, default: 0, range: "0-10", description: "Quality improvement strength" }
78
- ]
79
- },
80
- {
81
- id: "recraft-ai/recraft-crisp-upscale",
82
- name: "Recraft Crisp Upscale",
83
- description: "Enhances textures and facial features. Ideal for portraits.",
84
- category: "image-enhance",
85
- price: "Pay per use",
86
- inputTypes: ["image/*"],
87
- params: [
88
- { name: "image", type: "string", required: true, description: "Image URL or base64" }
89
- ]
90
- },
91
- {
92
- id: "recraft-ai/recraft-creative-upscale",
93
- name: "Recraft Creative Upscale",
94
- description: "Generative enhancement adding depth and polish to complex elements.",
95
- category: "image-enhance",
96
- price: "$0.25/image",
97
- inputTypes: ["image/*"],
98
- params: [
99
- { name: "image", type: "string", required: true, description: "Image URL or base64" }
100
- ]
101
- },
102
- {
103
- id: "wavespeed-ai/phota/enhance",
104
- name: "Phota Enhance",
105
- description: "Batch enhancement up to 4 images per run with optional 4K output.",
106
- category: "image-enhance",
107
- price: "$0.09/image",
108
- inputTypes: ["image/*"],
109
- params: [
110
- { name: "image", type: "string", required: true, description: "Image URL or base64 data URI" },
111
- { name: "num_images", type: "integer", required: false, default: 1, range: "1-4", description: "Enhanced variations to generate" },
112
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
113
- ]
114
- },
115
- {
116
- id: "wavespeed-ai/z-image-turbo/image-to-image",
117
- name: "Z-Image Turbo",
118
- description: "Fast enhance with strength control. Low strength = subtle upscale.",
40
+ id: "mirage",
41
+ name: "Mirage",
42
+ description: "Invents plausible new detail rather than recovering what was there. Most dramatic, least faithful. Good for art, wrong for documents.",
119
43
  category: "image-enhance",
120
- price: "$0.01/image",
44
+ price: "Included in plan quota",
121
45
  inputTypes: ["image/*"],
122
46
  params: [
123
- { name: "image", type: "string", required: true, description: "Reference image URL" },
124
- { name: "prompt", type: "string", required: true, description: "Enhancement prompt", default: "enhance image quality, sharp details" },
125
- { 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" },
126
- { name: "size", type: "string", required: false, default: "1024*1024", description: "Output size (width*height)" },
127
- { name: "seed", type: "integer", required: false, default: -1, range: "-1-2147483647", description: "Random seed. -1 = random" },
128
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
129
- ]
130
- },
131
- {
132
- id: "wavespeed-ai/video-upscaler",
133
- name: "Video Upscaler",
134
- description: "Fast AI video upscaling to 720p-4K. Best value for video.",
135
- category: "video-upscale",
136
- price: "$0.005-0.02/sec",
137
- inputTypes: ["video/*"],
138
- params: [
139
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
140
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
141
- ]
142
- },
143
- {
144
- id: "wavespeed-ai/video-upscaler-pro",
145
- name: "Video Upscaler Pro",
146
- description: "Motion-aware processing with artifact cleanup for pro results.",
147
- category: "video-upscale",
148
- price: "$0.03-0.05/sec",
149
- inputTypes: ["video/*"],
150
- params: [
151
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
152
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
153
- ]
154
- },
155
- {
156
- id: "wavespeed-ai/ultimate-video-upscaler",
157
- name: "Ultimate Video Upscaler",
158
- description: "Deep learning detail reconstruction for highest quality 4K video.",
159
- category: "video-upscale",
160
- price: "$0.02-0.08/sec",
161
- inputTypes: ["video/*"],
162
- params: [
163
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
164
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
165
- ]
166
- },
167
- {
168
- id: "wavespeed-ai/seedvr2/video",
169
- name: "SeedVR2 Video",
170
- description: "16B param ByteDance model. Highest fidelity with frame consistency.",
171
- category: "video-upscale",
172
- price: "$0.02-0.05/sec",
173
- inputTypes: ["video/*"],
174
- params: [
175
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
176
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
177
- ]
178
- },
179
- {
180
- id: "bytedance/video-upscaler",
181
- name: "ByteDance Video Upscaler",
182
- description: "ByteDance super-resolution recovering fine detail to 4K.",
183
- category: "video-upscale",
184
- price: "$0.007-0.029/sec",
185
- inputTypes: ["video/*"],
186
- params: [
187
- { name: "video", type: "string", required: true, description: "Video URL" },
188
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["1080p", "2k", "4k"], description: "Target resolution" }
47
+ { name: "image", type: "string", required: true, description: "Image URL or file" },
48
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4, 8], description: "Scale multiplier" }
189
49
  ]
190
50
  },
191
51
  {
192
- id: "bria/fibo/video-upscaler",
193
- name: "Bria Video Upscaler",
194
- description: "Temporal consistency with multiple output codec options.",
52
+ id: "motion",
53
+ name: "Motion",
54
+ description: "Fast 4K finish for AI-generated video (Sora, Kling, Runway). Frame-consistent, does not invent faces.",
195
55
  category: "video-upscale",
196
- price: "$0.14/sec",
56
+ price: "Counts against monthly video minutes",
197
57
  inputTypes: ["video/*"],
198
58
  params: [
199
- { name: "video", type: "string", required: true, description: "Video URL" },
200
- { name: "target_resolution", type: "string", required: false, default: "2k", options: ["2k", "4k"], description: "Target resolution" },
201
- { 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" }
59
+ { name: "video", type: "string", required: true, description: "Video URL or file" },
60
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4], description: "Scale multiplier" }
202
61
  ]
203
62
  },
204
63
  {
205
- id: "runwayml/upscale-v1",
206
- name: "RunwayML Upscale",
207
- description: "Simple one-click video upscale to 4K by RunwayML.",
64
+ id: "motion-x",
65
+ name: "Motion X",
66
+ description: "Cinema-grade video upscale for film and commercials. Noticeably slower and dearer per second than Motion.",
208
67
  category: "video-upscale",
209
- price: "$0.02/sec",
68
+ price: "Counts against monthly video minutes",
210
69
  inputTypes: ["video/*"],
211
70
  params: [
212
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" }
71
+ { name: "video", type: "string", required: true, description: "Video URL or file" },
72
+ { name: "scale", type: "integer", required: false, default: 4, options: [2, 4], description: "Scale multiplier" }
213
73
  ]
214
74
  }
215
75
  ];
216
76
  var IMAGE_MODELS = MODELS.filter((m) => m.category !== "video-upscale");
217
77
  var VIDEO_MODELS = MODELS.filter((m) => m.category === "video-upscale");
218
- var DEFAULT_IMAGE_MODEL = "wavespeed-ai/image-upscaler";
219
- var DEFAULT_VIDEO_MODEL = "wavespeed-ai/video-upscaler";
78
+ var DEFAULT_IMAGE_MODEL = "flare";
79
+ var DEFAULT_VIDEO_MODEL = "motion";
220
80
  export {
221
81
  DEFAULT_IMAGE_MODEL,
222
82
  DEFAULT_VIDEO_MODEL,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/models.ts"],"sourcesContent":["import type { ModelDefinition } from \"./types.js\";\n\nexport const MODELS: ModelDefinition[] = [\n {\n id: \"wavespeed-ai/real-esrgan\",\n name: \"Real-ESRGAN\",\n description: \"Fast image super-resolution with artifact removal. Best value.\",\n category: \"image-upscale\",\n price: \"$0.0024/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL\" },\n ],\n },\n {\n id: \"wavespeed-ai/image-upscaler\",\n name: \"Image Upscaler\",\n description: \"AI upscaler to 2K/4K/8K with detail preservation.\",\n category: \"image-upscale\",\n price: \"$0.01/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"4k\", options: [\"2k\", \"4k\", \"8k\"], description: \"Target output resolution\" },\n { name: \"output_format\", type: \"string\", required: false, default: \"jpeg\", options: [\"jpeg\", \"png\", \"webp\"], description: \"Output format\" },\n ],\n },\n {\n id: \"wavespeed-ai/ultimate-image-upscaler\",\n name: \"Ultimate Image Upscaler\",\n description: \"Most advanced AI enhancer. Reimagines fine detail at 2K/4K/8K.\",\n category: \"image-upscale\",\n price: \"$0.01/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"4k\", options: [\"2k\", \"4k\", \"8k\"], description: \"Target output resolution\" },\n { name: \"output_format\", type: \"string\", required: false, default: \"jpeg\", options: [\"jpeg\", \"png\", \"webp\"], description: \"Output format\" },\n ],\n },\n {\n id: \"wavespeed-ai/seedvr2/image\",\n name: \"SeedVR2 Image\",\n description: \"ByteDance SeedVR2 architecture for sharp, detailed upscaling.\",\n category: \"image-upscale\",\n price: \"$0.01/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"4k\", options: [\"2k\", \"4k\", \"8k\"], description: \"Target output resolution\" },\n { name: \"output_format\", type: \"string\", required: false, default: \"jpeg\", options: [\"jpeg\", \"png\", \"webp\"], description: \"Output format\" },\n ],\n },\n {\n id: \"bria/increase-resolution\",\n name: \"Bria Increase Resolution\",\n description: \"Preservation-first 2x/4x upscale. No content drift.\",\n category: \"image-upscale\",\n price: \"$0.04/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL. Max output 8192x8192\" },\n { name: \"desired_increase\", type: \"integer\", required: false, default: 2, options: [2, 4], description: \"Resolution multiplier\" },\n ],\n },\n {\n id: \"clarity-ai/crystal-upscaler\",\n name: \"Crystal Upscaler\",\n description: \"Upscale to target megapixels with creativity control.\",\n category: \"image-upscale\",\n price: \"Pay per use\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL\" },\n { name: \"target_megapixels\", type: \"number\", required: false, default: 2, range: \"1-200\", description: \"Target size in megapixels\" },\n { name: \"creativity\", type: \"number\", required: false, default: 0, range: \"0-10\", description: \"Quality improvement strength\" },\n ],\n },\n {\n id: \"recraft-ai/recraft-crisp-upscale\",\n name: \"Recraft Crisp Upscale\",\n description: \"Enhances textures and facial features. Ideal for portraits.\",\n category: \"image-enhance\",\n price: \"Pay per use\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL or base64\" },\n ],\n },\n {\n id: \"recraft-ai/recraft-creative-upscale\",\n name: \"Recraft Creative Upscale\",\n description: \"Generative enhancement adding depth and polish to complex elements.\",\n category: \"image-enhance\",\n price: \"$0.25/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL or base64\" },\n ],\n },\n {\n id: \"wavespeed-ai/phota/enhance\",\n name: \"Phota Enhance\",\n description: \"Batch enhancement up to 4 images per run with optional 4K output.\",\n category: \"image-enhance\",\n price: \"$0.09/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL or base64 data URI\" },\n { name: \"num_images\", type: \"integer\", required: false, default: 1, range: \"1-4\", description: \"Enhanced variations to generate\" },\n { name: \"output_format\", type: \"string\", required: false, default: \"jpeg\", options: [\"jpeg\", \"png\", \"webp\"], description: \"Output format\" },\n ],\n },\n {\n id: \"wavespeed-ai/z-image-turbo/image-to-image\",\n name: \"Z-Image Turbo\",\n description: \"Fast enhance with strength control. Low strength = subtle upscale.\",\n category: \"image-enhance\",\n price: \"$0.01/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Reference image URL\" },\n { name: \"prompt\", type: \"string\", required: true, description: \"Enhancement prompt\", default: \"enhance image quality, sharp details\" },\n { 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\" },\n { name: \"size\", type: \"string\", required: false, default: \"1024*1024\", description: \"Output size (width*height)\" },\n { name: \"seed\", type: \"integer\", required: false, default: -1, range: \"-1-2147483647\", description: \"Random seed. -1 = random\" },\n { name: \"output_format\", type: \"string\", required: false, default: \"jpeg\", options: [\"jpeg\", \"png\", \"webp\"], description: \"Output format\" },\n ],\n },\n {\n id: \"wavespeed-ai/video-upscaler\",\n name: \"Video Upscaler\",\n description: \"Fast AI video upscaling to 720p-4K. Best value for video.\",\n category: \"video-upscale\",\n price: \"$0.005-0.02/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL. Max 10 minutes\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"1080p\", options: [\"720p\", \"1080p\", \"2k\", \"4k\"], description: \"Target resolution\" },\n ],\n },\n {\n id: \"wavespeed-ai/video-upscaler-pro\",\n name: \"Video Upscaler Pro\",\n description: \"Motion-aware processing with artifact cleanup for pro results.\",\n category: \"video-upscale\",\n price: \"$0.03-0.05/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL. Max 10 minutes\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"1080p\", options: [\"720p\", \"1080p\", \"2k\", \"4k\"], description: \"Target resolution\" },\n ],\n },\n {\n id: \"wavespeed-ai/ultimate-video-upscaler\",\n name: \"Ultimate Video Upscaler\",\n description: \"Deep learning detail reconstruction for highest quality 4K video.\",\n category: \"video-upscale\",\n price: \"$0.02-0.08/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL. Max 10 minutes\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"1080p\", options: [\"720p\", \"1080p\", \"2k\", \"4k\"], description: \"Target resolution\" },\n ],\n },\n {\n id: \"wavespeed-ai/seedvr2/video\",\n name: \"SeedVR2 Video\",\n description: \"16B param ByteDance model. Highest fidelity with frame consistency.\",\n category: \"video-upscale\",\n price: \"$0.02-0.05/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL. Max 10 minutes\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"1080p\", options: [\"720p\", \"1080p\", \"2k\", \"4k\"], description: \"Target resolution\" },\n ],\n },\n {\n id: \"bytedance/video-upscaler\",\n name: \"ByteDance Video Upscaler\",\n description: \"ByteDance super-resolution recovering fine detail to 4K.\",\n category: \"video-upscale\",\n price: \"$0.007-0.029/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"1080p\", options: [\"1080p\", \"2k\", \"4k\"], description: \"Target resolution\" },\n ],\n },\n {\n id: \"bria/fibo/video-upscaler\",\n name: \"Bria Video Upscaler\",\n description: \"Temporal consistency with multiple output codec options.\",\n category: \"video-upscale\",\n price: \"$0.14/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"2k\", options: [\"2k\", \"4k\"], description: \"Target resolution\" },\n { 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\" },\n ],\n },\n {\n id: \"runwayml/upscale-v1\",\n name: \"RunwayML Upscale\",\n description: \"Simple one-click video upscale to 4K by RunwayML.\",\n category: \"video-upscale\",\n price: \"$0.02/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL. Max 10 minutes\" },\n ],\n },\n];\n\nexport const IMAGE_MODELS = MODELS.filter((m) => m.category !== \"video-upscale\");\nexport const VIDEO_MODELS = MODELS.filter((m) => m.category === \"video-upscale\");\nexport const DEFAULT_IMAGE_MODEL = \"wavespeed-ai/image-upscaler\";\nexport const DEFAULT_VIDEO_MODEL = \"wavespeed-ai/video-upscaler\";\n"],"mappings":";;;AAEO,IAAM,SAA4B;AAAA,EACvC;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ;AAAA,MACN,EAAE,MAAM,SAAS,MAAM,UAAU,UAAU,MAAM,aAAa,YAAY;AAAA,IAC5E;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ;AAAA,MACN,EAAE,MAAM,SAAS,MAAM,UAAU,UAAU,MAAM,aAAa,YAAY;AAAA,MAC1E,EAAE,MAAM,qBAAqB,MAAM,UAAU,UAAU,OAAO,SAAS,MAAM,SAAS,CAAC,MAAM,MAAM,IAAI,GAAG,aAAa,2BAA2B;AAAA,MAClJ,EAAE,MAAM,iBAAiB,MAAM,UAAU,UAAU,OAAO,SAAS,QAAQ,SAAS,CAAC,QAAQ,OAAO,MAAM,GAAG,aAAa,gBAAgB;AAAA,IAC5I;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ;AAAA,MACN,EAAE,MAAM,SAAS,MAAM,UAAU,UAAU,MAAM,aAAa,YAAY;AAAA,MAC1E,EAAE,MAAM,qBAAqB,MAAM,U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A,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ;AAAA,MACN,EAAE,MAAM,SAAS,MAAM,UAAU,UAAU,MAAM,aAAa,YAAY;AAAA,MAC1E,EAAE,MAAM,qBAAqB,MAAM,UAAU,UAAU,OAAO,SAAS,MAAM,SAAS,CAAC,MAAM,IAAI,GAAG,aAAa,oBAAoB;AAAA,MACrI,EAAE,MAAM,8BAA8B,MAAM,UAAU,UAAU,OAAO,SAAS,YAAY,SAAS,CAAC,YAAY,YAAY,YAAY,YAAY,gBAAgB,YAAY,YAAY,WAAW,KAAK,GAAG,aAAa,6BAA6B;AAAA,IAC7P;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ;AAAA,MACN,EAAE,MAAM,SAAS,MAAM,UAAU,UAAU,MAAM,aAAa,4BAA4B;AAAA,IAC5F;AAAA,EACF;AACF;AAEO,IAAM,eAAe,OAAO,OAAO,CAAC,MAAM,EAAE,aAAa,eAAe;AACxE,IAAM,eAAe,OAAO,OAAO,CAAC,MAAM,EAAE,aAAa,eAAe;AACxE,IAAM,sBAAsB;AAC5B,IAAM,sBAAsB;","names":[]}
1
+ {"version":3,"sources":["../src/models.ts"],"sourcesContent":["import type { ModelDefinition } from \"./types.js\";\n\n// Synced with https://api.upres.ai/v1/openapi.json (spec v1.1.0).\n// A job names one of six models. Which backend serves a model is ours to\n// choose and can change without notice — that is how a failing vendor\n// stops being your outage.\nexport const MODELS: ModelDefinition[] = [\n {\n id: \"flare\",\n name: \"Flare\",\n description: \"Everyday photos, 2x-4x. Fastest and cheapest. Does not invent detail.\",\n category: \"image-upscale\",\n price: \"Included in plan quota\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL or file\" },\n { name: \"scale\", type: \"integer\", required: false, default: 4, options: [2, 4], description: \"Scale multiplier\" },\n ],\n },\n {\n id: \"prism\",\n name: \"Prism\",\n description: \"Text, logos, screenshots and product shots. Keeps edges true, does not invent detail.\",\n category: \"image-upscale\",\n price: \"Included in plan quota\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL or file\" },\n { name: \"scale\", type: \"integer\", required: false, default: 4, options: [2, 4], description: \"Scale multiplier\" },\n ],\n },\n {\n id: \"lumen\",\n name: \"Lumen\",\n description: \"Maximum detail recovery for print, up to 8x. Slower and dearer than Flare.\",\n category: \"image-upscale\",\n price: \"Included in plan quota\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL or file\" },\n { name: \"scale\", type: \"integer\", required: false, default: 4, options: [2, 4, 8], description: \"Scale multiplier\" },\n ],\n },\n {\n id: \"mirage\",\n name: \"Mirage\",\n description: \"Invents plausible new detail rather than recovering what was there. Most dramatic, least faithful. Good for art, wrong for documents.\",\n category: \"image-enhance\",\n price: \"Included in plan quota\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL or file\" },\n { name: \"scale\", type: \"integer\", required: false, default: 4, options: [2, 4, 8], description: \"Scale multiplier\" },\n ],\n },\n {\n id: \"motion\",\n name: \"Motion\",\n description: \"Fast 4K finish for AI-generated video (Sora, Kling, Runway). Frame-consistent, does not invent faces.\",\n category: \"video-upscale\",\n price: \"Counts against monthly video minutes\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL or file\" },\n { name: \"scale\", type: \"integer\", required: false, default: 4, options: [2, 4], description: \"Scale multiplier\" },\n ],\n },\n {\n id: \"motion-x\",\n name: \"Motion X\",\n description: \"Cinema-grade video upscale for film and commercials. Noticeably slower and dearer per second than Motion.\",\n category: \"video-upscale\",\n price: \"Counts against monthly video minutes\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL or file\" },\n { name: \"scale\", type: \"integer\", required: false, default: 4, options: [2, 4], description: \"Scale multiplier\" },\n ],\n },\n];\n\nexport const IMAGE_MODELS = MODELS.filter((m) => m.category !== \"video-upscale\");\nexport const VIDEO_MODELS = MODELS.filter((m) => m.category === \"video-upscale\");\nexport const DEFAULT_IMAGE_MODEL = \"flare\";\nexport const DEFAULT_VIDEO_MODEL = \"motion\";\n"],"mappings":";AAMO,IAAM,SAA4B;AAAA,EACvC;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ;AAAA,MACN,EAAE,MAAM,SAAS,MAAM,UAAU,UAAU,MAAM,aAAa,oBAAoB;AAAA,MAClF,EAAE,MAAM,SAAS,MAAM,WAAW,UAAU,OAAO,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,aAAa,mBAAmB;AAAA,IAClH;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ;AAAA,MACN,EAAE,MAAM,SAAS,MAAM,UAAU,UAAU,MAAM,aAAa,oBAAoB;AAAA,MAClF,EAAE,MAAM,SAAS,MAAM,WAAW,UAAU,OAAO,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,aAAa,mBAAmB;AAAA,IAClH;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ;AAAA,MACN,EAAE,MAAM,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AEO,IAAM,eAAe,OAAO,OAAO,CAAC,MAAM,EAAE,aAAa,eAAe;AACxE,IAAM,eAAe,OAAO,OAAO,CAAC,MAAM,EAAE,aAAa,eAAe;AACxE,IAAM,sBAAsB;AAC5B,IAAM,sBAAsB;","names":[]}
package/dist/types.cjs CHANGED
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env node
2
1
  "use strict";
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["// Auto-generated from https://api.upres.ai/v1/openapi.json\n\nexport type JobStatus = \"pending\" | \"processing\" | \"completed\" | \"failed\";\n\nexport type ModelCategory = \"image-upscale\" | \"image-enhance\" | \"video-upscale\";\n\nexport interface Job {\n id: string;\n status: JobStatus;\n model: string;\n scale: number;\n result_url: string | null;\n error: string | null;\n original_filename: string;\n created_at: string;\n updated_at: string;\n}\n\nexport interface JobCreateRequest {\n image_url?: string;\n model?: string;\n scale?: number;\n}\n\nexport interface JobListResponse {\n data: Job[];\n has_more: boolean;\n next_cursor: string | null;\n}\n\nexport interface ApiError {\n error: string;\n quota?: number;\n used?: number;\n}\n\nexport interface ModelParam {\n name: string;\n type: \"string\" | \"number\" | \"integer\" | \"boolean\";\n required: boolean;\n description: string;\n default?: string | number | boolean;\n options?: (string | number)[];\n range?: string;\n}\n\nexport interface ModelDefinition {\n id: string;\n name: string;\n description: string;\n category: ModelCategory;\n price: string;\n inputTypes: string[];\n params: ModelParam[];\n}\n\nexport interface UpresConfig {\n apiKey?: string;\n baseUrl?: string;\n}\n\nexport interface UpscaleOptions {\n model?: string;\n scale?: number;\n resolution?: string;\n output?: string;\n wait?: boolean;\n}\n\nexport interface BatchOptions extends UpscaleOptions {\n concurrency?: number;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["// Auto-generated from https://api.upres.ai/v1/openapi.json\n\nexport type JobStatus = \"pending\" | \"processing\" | \"completed\" | \"failed\";\n\nexport type ModelCategory = \"image-upscale\" | \"image-enhance\" | \"video-upscale\";\n\nexport interface Job {\n id: string;\n status: JobStatus;\n model: string;\n scale: number;\n result_url: string | null;\n error: string | null;\n original_filename: string;\n created_at: string;\n updated_at: string;\n}\n\nexport interface JobCreateRequest {\n image_url?: string;\n model?: string;\n scale?: number;\n}\n\nexport interface JobListResponse {\n data: Job[];\n has_more: boolean;\n next_cursor: string | null;\n}\n\nexport interface ApiError {\n error: string;\n quota?: number;\n used?: number;\n}\n\nexport interface ModelParam {\n name: string;\n type: \"string\" | \"number\" | \"integer\" | \"boolean\";\n required: boolean;\n description: string;\n default?: string | number | boolean;\n options?: (string | number)[];\n range?: string;\n}\n\nexport interface ModelDefinition {\n id: string;\n name: string;\n description: string;\n category: ModelCategory;\n price: string;\n inputTypes: string[];\n params: ModelParam[];\n}\n\nexport interface UpresConfig {\n apiKey?: string;\n baseUrl?: string;\n}\n\nexport interface UpscaleOptions {\n model?: string;\n scale?: number;\n resolution?: string;\n output?: string;\n wait?: boolean;\n}\n\nexport interface BatchOptions extends UpscaleOptions {\n concurrency?: number;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/dist/types.js CHANGED
@@ -1,2 +1 @@
1
- #!/usr/bin/env node
2
1
  //# sourceMappingURL=types.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "upres-cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Official CLI + SDK for upres.ai — AI image & video upscaling",
5
5
  "type": "module",
6
6
  "main": "./dist/client.js",
@@ -17,17 +17,19 @@
17
17
  }
18
18
  },
19
19
  "bin": {
20
- "upres": "./dist/cli.js"
20
+ "upres": "dist/cli.js"
21
21
  },
22
22
  "scripts": {
23
23
  "build": "tsup",
24
24
  "dev": "tsx src/cli.ts",
25
25
  "typecheck": "tsc --noEmit",
26
26
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
27
+ "prepare": "node scripts/ensure-dist.mjs",
27
28
  "prepublishOnly": "npm run build"
28
29
  },
29
30
  "files": [
30
31
  "dist",
32
+ "scripts",
31
33
  "README.md",
32
34
  "LICENSE"
33
35
  ],
@@ -35,22 +37,25 @@
35
37
  "ai",
36
38
  "upscaling",
37
39
  "cli",
38
- "real-esrgan",
39
- "seedvr2",
40
+ "flare",
41
+ "motion",
40
42
  "image-processing",
41
43
  "video-upscaling",
42
44
  "8k",
43
45
  "upscaler",
44
46
  "ai-tools",
45
47
  "image-upscaler",
46
- "ai-image-upscaler"
48
+ "ai-image-upscaler",
49
+ "mcp",
50
+ "mcp-server",
51
+ "model-context-protocol"
47
52
  ],
48
53
  "author": "upres.ai <support@upres.ai>",
49
54
  "license": "MIT",
50
55
  "homepage": "https://upres.ai",
51
56
  "repository": {
52
57
  "type": "git",
53
- "url": "https://github.com/auroracapital/upres-cli"
58
+ "url": "git+https://github.com/auroracapital/upres-cli.git"
54
59
  },
55
60
  "bugs": {
56
61
  "url": "https://github.com/auroracapital/upres-cli/issues"
@@ -61,7 +66,7 @@
61
66
  "devDependencies": {
62
67
  "@types/jest": "^29.5.12",
63
68
  "@types/node": "^20.11.0",
64
- "jest": "^29.7.0",
69
+ "jest": "^30.4.2",
65
70
  "ts-jest": "^29.1.2",
66
71
  "tsup": "^8.0.2",
67
72
  "tsx": "^4.7.1",
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env bash
2
+ # Live health gate for the official MCP registry entry. Fails when the
3
+ # listing goes stale (404, missing version, or status != active) so CI
4
+ # catches drift instead of users discovering it.
5
+ #
6
+ # Usage: bash scripts/check-mcp-registry.sh <name>
7
+ # name e.g. io.github.auroracapital/upres-cli
8
+ set -euo pipefail
9
+
10
+ NAME="${1:-io.github.auroracapital/upres-cli}"
11
+ REG="https://registry.modelcontextprotocol.io/v0"
12
+
13
+ # Latest version must equal latest npm-tagged version. The registry does not
14
+ # expose a stable per-name GET, so use the search endpoint and pin on `name`.
15
+ LATEST_JSON=$(curl -sS "${REG}/servers?search=upres-cli")
16
+ LATEST=$(printf '%s' "$LATEST_JSON" | python3 -c "
17
+ import sys, json
18
+ sites = json.load(sys.stdin).get('servers', [])
19
+ for s in sites:
20
+ if s.get('server', {}).get('name') == sys.argv[1]:
21
+ print(s['server']['version'])
22
+ break
23
+ else:
24
+ print('missing')
25
+ " "$NAME")
26
+ [[ "$LATEST" != "missing" ]] || { echo "drift: not listed"; exit 1; }
27
+
28
+ GH_TAG_LATEST=$(gh release view --repo auroracapital/upres-cli --json tagName -q .tagName 2>/dev/null | sed 's/^v//')
29
+ [[ "$LATEST" == "$GH_TAG_LATEST" ]] || { echo "drift: registry=$LATEST tag=$GH_TAG_LATEST"; exit 1; }
30
+
31
+ # mcpb sha must still match the asset on GitHub
32
+ LISTED_SHA=$(printf '%s' "$LATEST_JSON" | python3 -c "
33
+ import sys, json
34
+ sites = json.load(sys.stdin).get('servers', [])
35
+ for s in sites:
36
+ if s.get('server', {}).get('name') == sys.argv[1]:
37
+ print(s['server']['packages'][0]['fileSha256'])
38
+ break
39
+ " "$NAME")
40
+ ASSET_URL="https://github.com/auroracapital/upres-cli/releases/download/v${LATEST}/upres-cli-${LATEST}.mcpb"
41
+ TMP_DIR=$(mktemp -d)
42
+ trap 'rm -rf "$TMP_DIR"' EXIT
43
+ REAL_SHA=$(
44
+ cd "$TMP_DIR"
45
+ gh release download "v${LATEST}" --repo auroracapital/upres-cli \
46
+ --pattern "upres-cli-${LATEST}.mcpb" >/dev/null
47
+ sha256sum "upres-cli-${LATEST}.mcpb" | awk '{print $1}'
48
+ )
49
+ [[ "$REAL_SHA" == "$LISTED_SHA" ]] || { echo "drift: sha $LISTED_SHA != $REAL_SHA"; exit 1; }
50
+
51
+ echo "mcp-registry healthy: $NAME v$LATEST"
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import { existsSync } from "node:fs";
3
+ import { spawnSync } from "node:child_process";
4
+ import { fileURLToPath } from "node:url";
5
+ import path from "node:path";
6
+
7
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
8
+ if (existsSync(path.join(root, "dist", "cli.js"))) process.exit(0);
9
+
10
+ const r = spawnSync("npx", ["--yes", "tsup"], {
11
+ cwd: root,
12
+ stdio: "inherit",
13
+ env: process.env,
14
+ });
15
+ process.exit(r.status ?? 1);