pixelkiln 0.92.1 → 0.92.3

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/PROVIDERS.md CHANGED
@@ -217,9 +217,9 @@ conversion to dollars:
217
217
  | `character` state or portrait | 10–25 generations |
218
218
  | `character` animation | 1 (template), 2–4 (`skeleton-v3`, budgeted at 4), 1 at 64px from text, 10–25 (pro) |
219
219
  | `character` outfit | 20 generations (one 2-frame, 92×92 job) |
220
- | `objectPro` base | 6 at 64px (unmeasured) |
220
+ | `objectPro` base | 6 (measured at 32px; about 6 at 64px) |
221
221
  | `uiAsset` | 20 generations (measured once, at 256×192) |
222
- | `uiElement` | 10–25 generations (unmeasured) |
222
+ | `uiElement` | 10–25 generations (a 32×32 call billed 10) |
223
223
  | `image-to-image` / `inpaint` revision | 10–25 generations; 5–9 with `engine: "pro-flash"` (provisional quote) |
224
224
  | `reduce-colors` / `correct-pixelart` revision | 0.1 generations (measured at 32×32) |
225
225
 
package/dist/cli.js CHANGED
@@ -978,6 +978,17 @@ function candidateCount(size) {
978
978
  if (size <= 170) return 4;
979
979
  return 1;
980
980
  }
981
+ function uiElementCandidateCount(size) {
982
+ if (size <= 32) return 64;
983
+ if (size <= 35) return 49;
984
+ if (size <= 41) return 36;
985
+ if (size <= 50) return 25;
986
+ if (size <= 64) return 16;
987
+ if (size <= 84) return 9;
988
+ if (size === 85) return 16;
989
+ if (size <= 170) return 4;
990
+ return 1;
991
+ }
981
992
  function generationCost(width, height, generator = "map") {
982
993
  if (generator === "vfx") return 0;
983
994
  if (generator === "map" || generator === "pixflux") return 1;
@@ -994,6 +1005,16 @@ function proTierCost(width, height) {
994
1005
  if (px <= 102400) return PRO_TIER_PRICES[1];
995
1006
  return PRO_TIER_PRICES[2];
996
1007
  }
1008
+ function pixMiniMaxCost(width, height, frames, enhancePrompt = false) {
1009
+ const f = width * height * Math.max(1, frames) / 4096;
1010
+ let units;
1011
+ if (f <= 8) units = 1;
1012
+ else if (f <= 16) units = 1 + (f - 8) / 8;
1013
+ else if (f <= 40) units = 2 + (f - 16) / 6;
1014
+ else units = 6 + (f - 40) / 6;
1015
+ const base = Math.max(1, Math.ceil(units - 1e-9));
1016
+ return enhancePrompt ? base + 0.05 : base;
1017
+ }
997
1018
  function tilesCost(tileSize, variations) {
998
1019
  const px = tileSize * tileSize * Math.max(1, variations);
999
1020
  if (px <= 1024) return PRO_TIER_PRICES[0];
@@ -7570,10 +7591,10 @@ var PixelLabClient = class {
7570
7591
  * limited to 400x400 and no style reference. Like a revision, this hands
7571
7592
  * back a plain background job with no resource of its own; unlike a
7572
7593
  * revision, one call returns several candidate images to pick from (the
7573
- * same 4/16/64-by-size tiering as `1dir`), not a single result, and its
7574
- * completed shape has not been exercised live yet — `pollImagePro` in
7575
- * pixellab.ts fails loudly rather than guess if `last_response.images`
7576
- * turns out not to be the real field name.
7594
+ * same 4/16/64-by-size tiering as `1dir`), not a single result. It has run
7595
+ * live (a 64x64 call billed 10, October 2026); `pollImagePro` in
7596
+ * pixellab.ts still fails loudly rather than guess if `last_response.images`
7597
+ * is not the field name.
7577
7598
  *
7578
7599
  * Reference images and a style image (`reference_images`, `style_image` +
7579
7600
  * `style_options`) exist on this endpoint but are not modeled here yet.
@@ -7684,7 +7705,8 @@ var PixelLabClient = class {
7684
7705
  * guided by an optional concept image and a natural-language color
7685
7706
  * palette. A plain background job; unlike `/create-ui-asset` there is no
7686
7707
  * piece/element layout, and sizes start at 16px instead of 192. Its
7687
- * completed shape has not been exercised live; `pollUiElement` reads it
7708
+ * completed shape came back as a list of candidates on a live
7709
+ * 32x32 call (64 of them, billed 10); `pollUiElement` still reads it
7688
7710
  * defensively.
7689
7711
  */
7690
7712
  async generateUiV2(args) {
@@ -7930,11 +7952,10 @@ var PixelLabClient = class {
7930
7952
  * no PixelLab character/object resource required — unlike `animateCharacter`
7931
7953
  * / `animateObject`, `firstFrame` is whatever bytes the caller has on hand.
7932
7954
  * A plain background job, like every other PixelLab async submission;
7933
- * unlike `inpaintV3`/`editImagesV2`, its completed shape has not been
7934
- * exercised against a live account (request/response fields here come from
7935
- * the live OpenAPI document, not an observed call — `pollAnimateRevision`
7936
- * in pixellab.ts checks several plausible field names for the frame list
7937
- * defensively, the same as `pollRevision` already does for image edits).
7955
+ * like `inpaintV3`/`editImagesV2`, it has run live (November 2026, a
7956
+ * 64x64 call of 4 frames billed 1 and returned 5 frames); `pollAnimateRevision`
7957
+ * in pixellab.ts still checks several plausible field names for the frame
7958
+ * list defensively, the same as `pollRevision` does for image edits.
7938
7959
  */
7939
7960
  async animateWithTextV3(args) {
7940
7961
  const body = { first_frame: args.firstFrame, action: args.action };
@@ -8018,8 +8039,8 @@ var PixelLabClient = class {
8018
8039
  * `runEstimateSkeleton` in `src/cli/commands`) so the only PixelLab
8019
8040
  * endpoint composed into `animate-with-skeleton-v3`'s submission is that
8020
8041
  * one endpoint itself, not two unverified calls chained together.
8021
- * Synchronous per this endpoint's own framing; unverified against a live
8022
- * account (see `EstimateSkeletonResponseSchema`'s own caveat).
8042
+ * Synchronous, and it has run live (October 2026; see
8043
+ * `EstimateSkeletonResponseSchema`).
8023
8044
  */
8024
8045
  async estimateSkeleton(args) {
8025
8046
  const body = { image: { type: "base64", base64: args.image.base64, format: args.image.format } };
@@ -9195,12 +9216,15 @@ var PixelLabProvider = class _PixelLabProvider {
9195
9216
  const width = spec.revision.sourceWidth ?? spec.width;
9196
9217
  const height = spec.revision.sourceHeight ?? spec.height;
9197
9218
  const side = spec.revision.mode === "edit-animation" ? Math.ceil(Math.sqrt(Math.max(1, spec.revision.sourceMembers?.length ?? 1))) : 1;
9198
- return { unit: "generations", amount: generationCost(width * side, height * side, "1dir"), candidates: 1 };
9219
+ return { unit: "generations", amount: proTierCost(width * side, height * side), candidates: 1 };
9199
9220
  }
9200
9221
  if (spec.revision?.mode === "animate" || spec.revision?.mode === "animate-pixminimax") {
9201
9222
  const width = spec.revision.sourceWidth ?? spec.width;
9202
9223
  const height = spec.revision.sourceHeight ?? spec.height;
9203
9224
  const frames = spec.revision.frames ?? 8;
9225
+ if (spec.revision.mode === "animate-pixminimax") {
9226
+ return { unit: "generations", amount: pixMiniMaxCost(width, height, frames, spec.revision.enhancePrompt), candidates: 1 };
9227
+ }
9204
9228
  const base = Math.max(1, Math.ceil(width * height * frames / 65536));
9205
9229
  return { unit: "generations", amount: spec.revision.enhancePrompt ? base + 0.05 : base, candidates: 1 };
9206
9230
  }
@@ -9231,7 +9255,7 @@ var PixelLabProvider = class _PixelLabProvider {
9231
9255
  return {
9232
9256
  unit: "generations",
9233
9257
  amount: generationCost(spec.width, spec.height, spec.generator),
9234
- candidates: spec.generator === "1dir" || spec.generator === "imagePro" ? candidateCount(spec.size) : 1
9258
+ candidates: spec.generator === "1dir" || spec.generator === "imagePro" ? candidateCount(spec.size) : spec.generator === "uiElement" ? uiElementCandidateCount(spec.size) : 1
9235
9259
  };
9236
9260
  }
9237
9261
  validate(spec, styleImages) {
@@ -11081,15 +11105,15 @@ var PixelLabProvider = class _PixelLabProvider {
11081
11105
  * `pollRevision` above, but completing with an ORDERED FRAME LIST instead
11082
11106
  * of a single image — the same `review-set` shape `pollCharacterAnimation`
11083
11107
  * returns, minus any character/object resource to look the result up on
11084
- * (there is none; this operates on a loose image). Unlike every other
11085
- * PixelLab call this adapter makes, the completed shape for
11086
- * `/animate-with-text-v3`/`/animate-pixminimax` has never been exercised
11087
- * against a live account — the checks below are an informed guess (hosted
11088
- * URLs under a plausible key name, the same `storage_urls.frames` shape
11089
- * character animations use, or inline base64 per frame, decoded to a local
11090
- * cache file the same way `pollRevision`'s single-image case already is)
11091
- * rather than an observed shape, and fail loudly, naming the keys actually
11092
- * received, for whatever the real shape turns out to be.
11108
+ * (there is none; this operates on a loose image). Both
11109
+ * `/animate-with-text-v3` and `/animate-pixminimax` have run live
11110
+ * (November 2026) and the completed jobs were read correctly. The checks
11111
+ * below stay defensive (hosted URLs under a plausible key name, the same
11112
+ * `storage_urls.frames` shape character animations use, or inline base64
11113
+ * per frame, decoded to a local cache file the same way `pollRevision`'s
11114
+ * single-image case is) and fail loudly, naming the keys actually
11115
+ * received, if a shape ever differs. PixMiniMax includes the input frame,
11116
+ * so a set holds the requested count plus one.
11093
11117
  */
11094
11118
  async pollAnimateRevision(jobId, context) {
11095
11119
  const job = await this.client.getBackgroundJob(jobId);
@@ -11230,7 +11254,7 @@ var PixelLabProvider = class _PixelLabProvider {
11230
11254
  }
11231
11255
  return {
11232
11256
  status: "failed",
11233
- error: `Invalid PixelLab response for imagePro job ${jobId}: completed with no recognized images array (got: ${Object.keys(done).join(", ") || "no keys"}); this endpoint's completed shape has not been exercised live yet -- update pollImagePro in src/providers/pixellab.ts with the real shape`
11257
+ error: `Invalid PixelLab response for imagePro job ${jobId}: completed with no recognized images array (got: ${Object.keys(done).join(", ") || "no keys"}); update pollImagePro in src/providers/pixellab.ts with the real shape`
11234
11258
  };
11235
11259
  }
11236
11260
  /**