@clickraft/cli 0.13.0 → 0.14.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/CHANGELOG.md CHANGED
@@ -1,16 +1,10 @@
1
- ## [0.13.0](https://github.com/clickraft/cli/compare/v0.12.0...v0.13.0) (2026-08-08)
1
+ ## [0.14.0](https://github.com/clickraft/cli/compare/v0.13.0...v0.14.0) (2026-09-25)
2
2
 
3
3
  ### Features
4
4
 
5
- * **cli:** add product create ([fe46251](https://github.com/clickraft/cli/commit/fe4625100ae9af7571e0b97156d58eba59e9aea1))
6
- * **cli:** request products:write at login and degrade when the server refuses it ([a8b6db2](https://github.com/clickraft/cli/commit/a8b6db24d2789df834bffdf6290cb1bebd41116c))
7
- * **errors:** recognize the five product-create error codes ([9e0aef4](https://github.com/clickraft/cli/commit/9e0aef4a3eb0cf188b1016f70b7c326b14b7cd8b))
8
- * **mcp:** add the product_create tool ([f725172](https://github.com/clickraft/cli/commit/f725172c9df13af80c244c93506036c178008284))
9
- * **sdk:** add the product create request contract ([75ae3c7](https://github.com/clickraft/cli/commit/75ae3c78b011b5278a21da75d247e7452e2c630c))
10
-
11
- ### Bug Fixes
12
-
13
- * **cli:** point the insufficient-scope hint at login --force-reauth ([398abd3](https://github.com/clickraft/cli/commit/398abd3ba7928706faf7f505038c4b52361b4a68))
5
+ * **cli:** add --quality to generate create ([1497837](https://github.com/clickraft/cli/commit/149783789b272eeeb879a0b83e18522c6d7ced37))
6
+ * **mcp:** add quality to generate_create ([72e8232](https://github.com/clickraft/cli/commit/72e82323005efc7f535d6c7708d43c107e721229))
7
+ * **sdk:** accept a quality tier in the generate create contract ([3ef37ec](https://github.com/clickraft/cli/commit/3ef37ec4bfba289ee46d08cdac88beeff769798d))
14
8
 
15
9
  # Changelog
16
10
 
package/README.md CHANGED
@@ -45,6 +45,16 @@ clickraft generate create --model-slug nano-banana-2 \
45
45
 
46
46
  > **Note:** `--brand-model` only works with reference-supporting models (nano-banana-2 recommended).
47
47
 
48
+ ### Quality
49
+
50
+ Use `--quality` to pick a model's quality tier. Lower tiers cost fewer credits. Valid values depend on the model (GPT Image 2.5 offers `low`, `medium`, `high`, `xhigh` and `max`). Omit it to use the model default. An unsupported value is rejected before any charge, and the error lists the values the model accepts:
51
+
52
+ ```bash
53
+ clickraft generate create --model-slug gpt-image-2.5-flare \
54
+ --prompt "product on marble" \
55
+ --quality low
56
+ ```
57
+
48
58
  ### Products
49
59
 
50
60
  Create a product from images you have already uploaded, then generate against it:
package/dist/cli.js CHANGED
@@ -235,6 +235,10 @@ var GenerateCreateRequestSchema = z6.object({
235
235
  "resolution must match WxH (e.g. 1280x720), p-token (e.g. 720p), or K-token (e.g. 1K)"
236
236
  ).optional(),
237
237
  durationSeconds: z6.number().int().min(1).max(60).optional(),
238
+ // The model's quality tier (e.g. 'low' | 'medium' | 'high'). The valid set is
239
+ // per model, so it is checked server-side: an unoffered value returns 400
240
+ // INPUT_INVALID_FORMAT with the supported options in `details.allowed`.
241
+ quality: z6.string().min(1).max(40).optional(),
238
242
  width: z6.number().int().min(64).max(8192).optional(),
239
243
  height: z6.number().int().min(64).max(8192).optional(),
240
244
  providerParams: z6.record(z6.string(), z6.unknown()).optional()
@@ -2245,6 +2249,7 @@ function buildRequestBody(args) {
2245
2249
  if (args.aspectRatio !== void 0) input.aspectRatio = args.aspectRatio;
2246
2250
  if (args.resolution !== void 0) input.resolution = args.resolution;
2247
2251
  if (args.durationSeconds !== void 0) input.durationSeconds = args.durationSeconds;
2252
+ if (args.quality !== void 0) input.quality = args.quality;
2248
2253
  if (args.brandModels !== void 0 && args.brandModels.length > 0) {
2249
2254
  input.providerParams = {
2250
2255
  brandModels: args.brandModels.map((spec) => {
@@ -4627,6 +4632,7 @@ function renderCommandHelp(command) {
4627
4632
  " --aspect-ratio <a:b> e.g. 16:9",
4628
4633
  " --resolution <size> e.g. 1024x768, 720p, 1K",
4629
4634
  " --duration-seconds <n> For video/audio models (1-60)",
4635
+ " --quality <tier> e.g. low, medium, high (valid values depend on the model)",
4630
4636
  " --workflow-id <uuid> Attach to an existing workflow",
4631
4637
  " --node-id <id> Attach to a specific node",
4632
4638
  " --no-wait, --async Return immediately with the jobId",
@@ -4945,6 +4951,7 @@ async function runGenerateCreate(argv, ctx, rc) {
4945
4951
  "aspect-ratio",
4946
4952
  "resolution",
4947
4953
  "duration-seconds",
4954
+ "quality",
4948
4955
  "workflow-id",
4949
4956
  "node-id",
4950
4957
  "timeout"
@@ -4968,6 +4975,7 @@ async function runGenerateCreate(argv, ctx, rc) {
4968
4975
  aspectRatio: parsed.string["aspect-ratio"],
4969
4976
  resolution: parsed.string.resolution,
4970
4977
  durationSeconds: optionalInt(parsed.string["duration-seconds"], "duration-seconds"),
4978
+ quality: parsed.string.quality,
4971
4979
  brandModels,
4972
4980
  products,
4973
4981
  workflowId: parsed.string["workflow-id"],