upres-cli 0.1.1 → 0.3.1
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/README.md +79 -37
- package/dist/cli.cjs +381 -251
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +383 -251
- package/dist/cli.js.map +1 -1
- package/dist/client.cjs +27 -13
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +5 -1
- package/dist/client.d.ts +5 -1
- package/dist/client.js +25 -12
- package/dist/client.js.map +1 -1
- package/dist/mcp.cjs +310 -0
- package/dist/mcp.cjs.map +1 -0
- package/dist/mcp.d.cts +6 -0
- package/dist/mcp.d.ts +6 -0
- package/dist/mcp.js +283 -0
- package/dist/mcp.js.map +1 -0
- package/dist/models.cjs +51 -214
- package/dist/models.cjs.map +1 -1
- package/dist/models.d.cts +5 -3
- package/dist/models.d.ts +5 -3
- package/dist/models.js +49 -214
- package/dist/models.js.map +1 -1
- package/dist/types.cjs +0 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +0 -0
- package/package.json +54 -12
- package/scripts/check-mcp-registry.sh +51 -0
- package/scripts/ensure-dist.mjs +15 -0
package/README.md
CHANGED
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/upres-cli)
|
|
4
4
|
[](https://pypi.org/project/upres-ai/)
|
|
5
5
|
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
> Star this repo if UpRes helps you.
|
|
6
8
|
[](https://github.com/auroracapital/upres-cli/stargazers)
|
|
7
9
|
|
|
8
|
-
Official CLI + SDK for **[upres.ai](https://upres.ai)** —
|
|
10
|
+
Official CLI + SDK for **[upres.ai](https://upres.ai)** — image, video, and speech restoration. One API, 14 public aliases, up to 8K output.
|
|
9
11
|
|
|
10
12
|
```
|
|
11
|
-
$ upres upscale photo.jpg --model
|
|
12
|
-
Submitting job... model=
|
|
13
|
+
$ upres upscale photo.jpg --model flare --scale 4
|
|
14
|
+
Submitting job... model=flare
|
|
13
15
|
Job created: 550e8400-e29b-41d4-a716-446655440000 (status: pending)
|
|
14
16
|
Waiting for result.......
|
|
15
17
|
Downloading to photo_upscaled.jpg... done.
|
|
@@ -25,7 +27,7 @@ Result: photo_upscaled.jpg
|
|
|
25
27
|
- **Upscayl** is great for one-offs but can't handle bulk exports or CI pipelines
|
|
26
28
|
- **Every other SaaS upscaler** either watermarks your output, caps resolution at 2K, or charges per image with no monthly plan
|
|
27
29
|
|
|
28
|
-
upres.ai gives you a clean REST API,
|
|
30
|
+
upres.ai gives you a clean REST API, 14 public aliases, batch processing, and predictable pricing starting at $9/mo on the Creator plan.
|
|
29
31
|
|
|
30
32
|
---
|
|
31
33
|
|
|
@@ -41,21 +43,21 @@ Or install globally:
|
|
|
41
43
|
|
|
42
44
|
```bash
|
|
43
45
|
npm install -g upres-cli
|
|
44
|
-
upres upscale photo.jpg --model
|
|
46
|
+
upres upscale photo.jpg --model lumen --scale 8 --output photo_8k.jpg
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
### Python
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
52
|
pip install upres-ai
|
|
51
|
-
upres upscale photo.jpg --model
|
|
53
|
+
upres upscale photo.jpg --model flare --scale 4
|
|
52
54
|
```
|
|
53
55
|
|
|
54
56
|
---
|
|
55
57
|
|
|
56
58
|
## Authentication
|
|
57
59
|
|
|
58
|
-
1. Sign up at [upres.ai](https://upres.ai) (free — 5
|
|
60
|
+
1. Sign up at [upres.ai](https://upres.ai) (free — 5 upscales/month)
|
|
59
61
|
2. Go to [upres.ai/account/api-keys](https://upres.ai/account/api-keys)
|
|
60
62
|
3. Generate a key — it's shown once
|
|
61
63
|
|
|
@@ -78,15 +80,15 @@ Key resolution order: `--api-key` flag → `UPRES_API_KEY` env var → `~/.confi
|
|
|
78
80
|
|
|
79
81
|
```bash
|
|
80
82
|
# Upscale a single image (local file or URL)
|
|
81
|
-
upres upscale photo.jpg --model
|
|
82
|
-
upres upscale photo.jpg --model
|
|
83
|
-
upres upscale https://example.com/photo.jpg --
|
|
83
|
+
upres upscale photo.jpg --model flare --scale 4
|
|
84
|
+
upres upscale photo.jpg --model lumen --scale 8 --output out.jpg
|
|
85
|
+
upres upscale https://example.com/photo.jpg --model prism
|
|
84
86
|
|
|
85
|
-
# Upscale video
|
|
86
|
-
upres upscale clip.mp4 --model
|
|
87
|
+
# Upscale video (AI-generated video from Sora, Kling, Runway etc.)
|
|
88
|
+
upres upscale clip.mp4 --model motion --scale 4
|
|
87
89
|
|
|
88
90
|
# Batch upscale a folder
|
|
89
|
-
upres batch ./photos/ --model
|
|
91
|
+
upres batch ./photos/ --model flare --output ./upscaled/ --concurrency 5
|
|
90
92
|
|
|
91
93
|
# List available models
|
|
92
94
|
upres models
|
|
@@ -109,7 +111,7 @@ const client = new UpresClient(); // reads UPRES_API_KEY from env
|
|
|
109
111
|
|
|
110
112
|
// Upscale a local file
|
|
111
113
|
const job = await client.createJobFromFile("photo.jpg", {
|
|
112
|
-
model: "
|
|
114
|
+
model: "flare",
|
|
113
115
|
scale: 4,
|
|
114
116
|
});
|
|
115
117
|
|
|
@@ -133,7 +135,7 @@ from upres import UpresClient
|
|
|
133
135
|
with UpresClient() as client: # reads UPRES_API_KEY from env
|
|
134
136
|
job = client.create_job_from_file(
|
|
135
137
|
"photo.jpg",
|
|
136
|
-
model="
|
|
138
|
+
model="flare",
|
|
137
139
|
scale=4,
|
|
138
140
|
)
|
|
139
141
|
completed = client.wait_for_job(job["id"])
|
|
@@ -150,7 +152,7 @@ The Python SDK uses `httpx` — async-ready, no heavy dependencies.
|
|
|
150
152
|
| Example | What it does |
|
|
151
153
|
|---|---|
|
|
152
154
|
| [batch-upscale-folder.js](examples/batch-upscale-folder.js) | Upscale all images in a folder with configurable concurrency |
|
|
153
|
-
| [restore-photo-folder.py](examples/restore-photo-folder.py) | Restore old/scanned photos
|
|
155
|
+
| [restore-photo-folder.py](examples/restore-photo-folder.py) | Restore old/scanned photos with Lumen |
|
|
154
156
|
| [ecommerce-pipeline.js](examples/ecommerce-pipeline.js) | Product image pipeline: raw shots → 4K → publish-ready |
|
|
155
157
|
| [lightroom-export-hook.md](examples/lightroom-export-hook.md) | Auto-upscale Lightroom exports via post-processing hook |
|
|
156
158
|
| [figma-plugin-stub.md](examples/figma-plugin-stub.md) | Figma plugin integration guide |
|
|
@@ -159,29 +161,66 @@ The Python SDK uses `httpx` — async-ready, no heavy dependencies.
|
|
|
159
161
|
|
|
160
162
|
## Models
|
|
161
163
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
|
165
|
-
|
|
166
|
-
|
|
|
167
|
-
| Image
|
|
168
|
-
|
|
|
169
|
-
|
|
170
|
-
|
|
164
|
+
14 public aliases across image, video, and speech. Each one tells you up front whether it invents detail or leaves your file alone. Aliases that do not enlarge ignore `--scale`.
|
|
165
|
+
|
|
166
|
+
| Alias | Kind | Best for |
|
|
167
|
+
|---|---|---|
|
|
168
|
+
| `flare` | Image | Everyday photos, fastest default |
|
|
169
|
+
| `prism` | Image | Text, logos, product shots — keeps edges true |
|
|
170
|
+
| `lumen` | Image | Maximum detail recovery for print, up to 8x |
|
|
171
|
+
| `mirage` | Image | Invents new detail — art and hero images |
|
|
172
|
+
| `hush` | Image | Faithful denoise, same size as the source |
|
|
173
|
+
| `keen` | Image | Deblur and sharpen, same size |
|
|
174
|
+
| `visage` | Image | Faces only, does not enlarge |
|
|
175
|
+
| `atelier` | Image | Hush, Visage if a portrait, then Lumen |
|
|
176
|
+
| `motion` | Video | Fast 4K finish for AI video |
|
|
177
|
+
| `motion-x` | Video | Cinema-grade, for film and commercials |
|
|
178
|
+
| `still` | Video | Temporal denoise, resolution stays put |
|
|
179
|
+
| `cadence` | Video | Frame interpolation, does not enlarge |
|
|
180
|
+
| `atelier-x` | Video | Still, then Motion X |
|
|
181
|
+
| `voice` | Speech | Speech denoise to 48 kHz. Not for music |
|
|
182
|
+
|
|
183
|
+
Full model catalogue: [upres.ai/models](https://upres.ai/models) · Live spec: [api.upres.ai/v1/openapi.json](https://api.upres.ai/v1/openapi.json)
|
|
171
184
|
|
|
172
185
|
---
|
|
173
186
|
|
|
174
187
|
## Pricing
|
|
175
188
|
|
|
176
|
-
| Plan | Price |
|
|
189
|
+
| Plan | Price | Includes | API | Watermark |
|
|
177
190
|
|---|---|---|---|---|
|
|
178
|
-
| **Free** | $0 | 5 | — | Yes |
|
|
179
|
-
| **
|
|
180
|
-
| **
|
|
191
|
+
| **Free** | $0 | 5 upscales/mo | — | Yes |
|
|
192
|
+
| **Creator** | $9/mo | 50 upscales + 20 videos up to 8K/mo | — | No |
|
|
193
|
+
| **Pro** | $19/mo | 100 upscales + 30 videos up to 8K/mo | — | No |
|
|
194
|
+
| **Studio** | $39/mo | 250 upscales + 90 videos up to 8K/mo | — | No |
|
|
195
|
+
| **Business** | $49/mo | 500 upscales + 150 videos up to 8K/mo | **Yes** | No |
|
|
196
|
+
|
|
197
|
+
**API keys (and so this CLI) need the Business plan.** Every paid plan removes the watermark. On another plan the API answers 403; your key is kept and works again once you are on Business.
|
|
198
|
+
|
|
199
|
+
[Compare plans →](https://upres.ai/pricing) · [vs. Topaz →](https://upres.ai/topaz-alternative) · [vs. Upscayl →](https://upres.ai/compare/upscayl)
|
|
200
|
+
|
|
201
|
+
---
|
|
181
202
|
|
|
182
|
-
|
|
203
|
+
## MCP (Claude, Cursor, Hermes)
|
|
183
204
|
|
|
184
|
-
|
|
205
|
+
```bash
|
|
206
|
+
claude mcp add upres -- npx -y github:auroracapital/upres-cli mcp
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Or in `claude_desktop_config.json` / Cursor:
|
|
210
|
+
|
|
211
|
+
```json
|
|
212
|
+
{
|
|
213
|
+
"mcpServers": {
|
|
214
|
+
"upres": {
|
|
215
|
+
"command": "npx",
|
|
216
|
+
"args": ["-y", "github:auroracapital/upres-cli", "mcp"],
|
|
217
|
+
"env": { "UPRES_API_KEY": "upres_yourkey" }
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Tools: `upres_list_models`, `upres_get_credits`, `upres_upscale_image`, `upres_upscale_video`, `upres_enhance_audio`, `upres_get_job`.
|
|
185
224
|
|
|
186
225
|
---
|
|
187
226
|
|
|
@@ -193,14 +232,17 @@ If you're building something open-source on top of the API, email [support@upres
|
|
|
193
232
|
|
|
194
233
|
## Error handling
|
|
195
234
|
|
|
196
|
-
The SDK
|
|
235
|
+
The SDK throws errors that callers can catch. The CLI prints the error and exits with a nonzero status.
|
|
197
236
|
|
|
198
|
-
| Status |
|
|
237
|
+
| Status | SDK behavior |
|
|
199
238
|
|---|---|
|
|
200
|
-
| `401` |
|
|
201
|
-
| `402` |
|
|
202
|
-
| `
|
|
203
|
-
| `
|
|
239
|
+
| `401` | Throws `UpresError` with API key guidance |
|
|
240
|
+
| `402` | Throws `UpresError` with quota and pricing information |
|
|
241
|
+
| `403` | Throws `UpresError` with plan information |
|
|
242
|
+
| `429` | Throws `UpresError` with rate limit information |
|
|
243
|
+
| `5xx` | Throws an error with the API message |
|
|
244
|
+
|
|
245
|
+
`UpresError.status` contains the HTTP status code.
|
|
204
246
|
|
|
205
247
|
In Python: raises `AuthError`, `QuotaExceededError`, or `UpresError`.
|
|
206
248
|
|