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/models.js CHANGED
@@ -1,220 +1,82 @@
1
1
  // src/models.ts
2
2
  var MODELS = [
3
3
  {
4
- id: "wavespeed-ai/real-esrgan",
5
- name: "Real-ESRGAN",
6
- 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.",
7
7
  category: "image-upscale",
8
- price: "$0.0024/image",
8
+ price: "Included in plan quota",
9
9
  inputTypes: ["image/*"],
10
10
  params: [
11
- { 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" }
12
13
  ]
13
14
  },
14
15
  {
15
- id: "wavespeed-ai/image-upscaler",
16
- name: "Image Upscaler",
17
- 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.",
18
19
  category: "image-upscale",
19
- price: "$0.01/image",
20
+ price: "Included in plan quota",
20
21
  inputTypes: ["image/*"],
21
22
  params: [
22
- { name: "image", type: "string", required: true, description: "Image URL" },
23
- { name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
24
- { 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" }
25
25
  ]
26
26
  },
27
27
  {
28
- id: "wavespeed-ai/ultimate-image-upscaler",
29
- name: "Ultimate Image Upscaler",
30
- 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.",
31
31
  category: "image-upscale",
32
- price: "$0.01/image",
32
+ price: "Included in plan quota",
33
33
  inputTypes: ["image/*"],
34
34
  params: [
35
- { name: "image", type: "string", required: true, description: "Image URL" },
36
- { name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
37
- { 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" }
38
37
  ]
39
38
  },
40
39
  {
41
- id: "wavespeed-ai/seedvr2/image",
42
- name: "SeedVR2 Image",
43
- description: "ByteDance SeedVR2 architecture for sharp, detailed upscaling.",
44
- category: "image-upscale",
45
- price: "$0.01/image",
46
- inputTypes: ["image/*"],
47
- params: [
48
- { name: "image", type: "string", required: true, description: "Image URL" },
49
- { name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
50
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
51
- ]
52
- },
53
- {
54
- id: "bria/increase-resolution",
55
- name: "Bria Increase Resolution",
56
- description: "Preservation-first 2x/4x upscale. No content drift.",
57
- category: "image-upscale",
58
- price: "$0.04/image",
59
- inputTypes: ["image/*"],
60
- params: [
61
- { name: "image", type: "string", required: true, description: "Image URL. Max output 8192x8192" },
62
- { name: "desired_increase", type: "integer", required: false, default: 2, options: [2, 4], description: "Resolution multiplier" }
63
- ]
64
- },
65
- {
66
- id: "clarity-ai/crystal-upscaler",
67
- name: "Crystal Upscaler",
68
- description: "Upscale to target megapixels with creativity control.",
69
- category: "image-upscale",
70
- price: "Pay per use",
71
- inputTypes: ["image/*"],
72
- params: [
73
- { name: "image", type: "string", required: true, description: "Image URL" },
74
- { name: "target_megapixels", type: "number", required: false, default: 2, range: "1-200", description: "Target size in megapixels" },
75
- { name: "creativity", type: "number", required: false, default: 0, range: "0-10", description: "Quality improvement strength" }
76
- ]
77
- },
78
- {
79
- id: "recraft-ai/recraft-crisp-upscale",
80
- name: "Recraft Crisp Upscale",
81
- description: "Enhances textures and facial features. Ideal for portraits.",
82
- category: "image-enhance",
83
- price: "Pay per use",
84
- inputTypes: ["image/*"],
85
- params: [
86
- { name: "image", type: "string", required: true, description: "Image URL or base64" }
87
- ]
88
- },
89
- {
90
- id: "recraft-ai/recraft-creative-upscale",
91
- name: "Recraft Creative Upscale",
92
- description: "Generative enhancement adding depth and polish to complex elements.",
93
- category: "image-enhance",
94
- price: "$0.25/image",
95
- inputTypes: ["image/*"],
96
- params: [
97
- { name: "image", type: "string", required: true, description: "Image URL or base64" }
98
- ]
99
- },
100
- {
101
- id: "wavespeed-ai/phota/enhance",
102
- name: "Phota Enhance",
103
- description: "Batch enhancement up to 4 images per run with optional 4K output.",
104
- category: "image-enhance",
105
- price: "$0.09/image",
106
- inputTypes: ["image/*"],
107
- params: [
108
- { name: "image", type: "string", required: true, description: "Image URL or base64 data URI" },
109
- { name: "num_images", type: "integer", required: false, default: 1, range: "1-4", description: "Enhanced variations to generate" },
110
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
111
- ]
112
- },
113
- {
114
- id: "wavespeed-ai/z-image-turbo/image-to-image",
115
- name: "Z-Image Turbo",
116
- 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.",
117
43
  category: "image-enhance",
118
- price: "$0.01/image",
44
+ price: "Included in plan quota",
119
45
  inputTypes: ["image/*"],
120
46
  params: [
121
- { name: "image", type: "string", required: true, description: "Reference image URL" },
122
- { name: "prompt", type: "string", required: true, description: "Enhancement prompt", default: "enhance image quality, sharp details" },
123
- { 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" },
124
- { name: "size", type: "string", required: false, default: "1024*1024", description: "Output size (width*height)" },
125
- { name: "seed", type: "integer", required: false, default: -1, range: "-1-2147483647", description: "Random seed. -1 = random" },
126
- { name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
127
- ]
128
- },
129
- {
130
- id: "wavespeed-ai/video-upscaler",
131
- name: "Video Upscaler",
132
- description: "Fast AI video upscaling to 720p-4K. Best value for video.",
133
- category: "video-upscale",
134
- price: "$0.005-0.02/sec",
135
- inputTypes: ["video/*"],
136
- params: [
137
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
138
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
139
- ]
140
- },
141
- {
142
- id: "wavespeed-ai/video-upscaler-pro",
143
- name: "Video Upscaler Pro",
144
- description: "Motion-aware processing with artifact cleanup for pro results.",
145
- category: "video-upscale",
146
- price: "$0.03-0.05/sec",
147
- inputTypes: ["video/*"],
148
- params: [
149
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
150
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
151
- ]
152
- },
153
- {
154
- id: "wavespeed-ai/ultimate-video-upscaler",
155
- name: "Ultimate Video Upscaler",
156
- description: "Deep learning detail reconstruction for highest quality 4K video.",
157
- category: "video-upscale",
158
- price: "$0.02-0.08/sec",
159
- inputTypes: ["video/*"],
160
- params: [
161
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
162
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
163
- ]
164
- },
165
- {
166
- id: "wavespeed-ai/seedvr2/video",
167
- name: "SeedVR2 Video",
168
- description: "16B param ByteDance model. Highest fidelity with frame consistency.",
169
- category: "video-upscale",
170
- price: "$0.02-0.05/sec",
171
- inputTypes: ["video/*"],
172
- params: [
173
- { name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
174
- { name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
175
- ]
176
- },
177
- {
178
- id: "bytedance/video-upscaler",
179
- name: "ByteDance Video Upscaler",
180
- description: "ByteDance super-resolution recovering fine detail to 4K.",
181
- category: "video-upscale",
182
- price: "$0.007-0.029/sec",
183
- inputTypes: ["video/*"],
184
- params: [
185
- { name: "video", type: "string", required: true, description: "Video URL" },
186
- { 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" }
187
49
  ]
188
50
  },
189
51
  {
190
- id: "bria/fibo/video-upscaler",
191
- name: "Bria Video Upscaler",
192
- 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.",
193
55
  category: "video-upscale",
194
- price: "$0.14/sec",
56
+ price: "Counts against monthly video minutes",
195
57
  inputTypes: ["video/*"],
196
58
  params: [
197
- { name: "video", type: "string", required: true, description: "Video URL" },
198
- { name: "target_resolution", type: "string", required: false, default: "2k", options: ["2k", "4k"], description: "Target resolution" },
199
- { 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" }
200
61
  ]
201
62
  },
202
63
  {
203
- id: "runwayml/upscale-v1",
204
- name: "RunwayML Upscale",
205
- 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.",
206
67
  category: "video-upscale",
207
- price: "$0.02/sec",
68
+ price: "Counts against monthly video minutes",
208
69
  inputTypes: ["video/*"],
209
70
  params: [
210
- { 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" }
211
73
  ]
212
74
  }
213
75
  ];
214
76
  var IMAGE_MODELS = MODELS.filter((m) => m.category !== "video-upscale");
215
77
  var VIDEO_MODELS = MODELS.filter((m) => m.category === "video-upscale");
216
- var DEFAULT_IMAGE_MODEL = "wavespeed-ai/image-upscaler";
217
- var DEFAULT_VIDEO_MODEL = "wavespeed-ai/video-upscaler";
78
+ var DEFAULT_IMAGE_MODEL = "flare";
79
+ var DEFAULT_VIDEO_MODEL = "motion";
218
80
  export {
219
81
  DEFAULT_IMAGE_MODEL,
220
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,UAAU,UAAU,OAAO,SAAS,MA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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,SAAS,MAAM,UAAU,UAAU,M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AO,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
File without changes
package/dist/types.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "upres-cli",
3
- "version": "0.1.1",
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",
@@ -24,10 +24,12 @@
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,15 +37,18 @@
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",
@@ -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);